56 #include <QtWidgets/private/qtwidgetsglobal_p.h>
57 #include "QtWidgets/qwidget.h"
58 #include "private/qobject_p.h"
59 #include "QtCore/qrect.h"
60 #include "QtCore/qlocale.h"
61 #include "QtCore/qset.h"
62 #include "QtGui/qregion.h"
63 #include "QtGui/qinputmethod.h"
64 #include "QtGui/qopengl.h"
65 #include "QtGui/qsurfaceformat.h"
66 #include "QtGui/qscreen.h"
67 #include "QtWidgets/qsizepolicy.h"
68 #include "QtWidgets/qstyle.h"
69 #include "QtWidgets/qapplication.h"
70 #if QT_CONFIG(graphicseffect)
71 #include <private/qgraphicseffect_p.h>
73 #if QT_CONFIG(graphicsview)
74 #include "QtWidgets/qgraphicsproxywidget.h"
75 #include "QtWidgets/qgraphicsscene.h"
76 #include "QtWidgets/qgraphicsview.h"
78 #include <private/qgesture_p.h>
79 #include <qpa/qplatformbackingstore.h>
101 class QUnifiedToolbarSurface;
169 #if QT_CONFIG(graphicsview)
209 static inline bool bypassGraphicsProxyWidget(
const QWidget *
p)
214 p =
p->parentWidget();
228 DrawPaintOnScreen = 0x02,
229 DrawRecursive = 0x04,
230 DrawInvisible = 0x08,
231 DontSubtractOpaqueChildren = 0x10,
232 DontDrawOpaqueChildren = 0x20,
233 DontDrawNativeChildren = 0x40,
234 DontSetCompositionMode = 0x80,
235 UseEffectRegionBounds = 0x100
241 DirectionNorth = 0x01,
242 DirectionEast = 0x10,
243 DirectionSouth = 0x02,
267 QWindow *windowHandle(WindowHandleMode
mode = WindowHandleMode::Direct)
const;
268 QWindow *_q_closestWindowHandle()
const;
270 QScreen *associatedScreen()
const;
272 template <
typename T>
275 template <
typename T>
280 void createRecursively();
283 bool setScreenForPoint(
const QPoint &
pos);
286 void createTLExtra();
289 void createSysExtra();
290 void deleteSysExtra();
291 void createTLSysExtra();
292 void deleteTLSysExtra();
293 void updateSystemBackground();
294 void propagatePaletteChange();
296 void setPalette_helper(
const QPalette &);
297 void resolvePalette();
300 void setMask_sys(
const QRegion &);
304 void stackUnder_sys(
QWidget *);
306 QWidget *deepestFocusProxy()
const;
308 void updateFocusChild();
310 void updateFont(
const QFont &);
316 QFont localFont()
const;
318 QFont naturalWidgetFont(
uint inheritedMask)
const;
321 void resolveLayoutDirection();
323 void setLocale_helper(
const QLocale &
l,
bool forceUpdate =
false);
324 void resolveLocale();
326 void setStyle_helper(
QStyle *newStyle,
bool propagate);
329 void setUpdatesEnabled_helper(
bool );
333 bool isAboutToShow()
const;
334 QRegion prepareToRender(
const QRegion ®ion, QWidget::RenderFlags renderFlags);
336 QWidget::RenderFlags renderFlags);
338 QWidget::RenderFlags renderFlags);
341 void sendPaintEvent(
const QRegion &toBePainted);
348 #if QT_CONFIG(graphicsview)
351 bool shouldPaintOnScreen()
const;
352 void paintOnScreen(
const QRegion &rgn);
354 QRect clipRect()
const;
357 void subtractOpaqueChildren(
QRegion &rgn,
const QRect &clipRect)
const;
358 void subtractOpaqueSiblings(
QRegion &
source,
bool *hasDirtySiblingsAbove =
nullptr,
359 bool alsoNonOpaque =
false)
const;
360 void clipToEffectiveMask(
QRegion ®ion)
const;
361 void updateIsOpaque();
362 void setOpaque(
bool opaque);
363 void updateIsTranslucent();
364 #if QT_CONFIG(graphicseffect)
365 void invalidateGraphicsEffectsRecursively();
368 const QRegion &getOpaqueChildren()
const;
369 void setDirtyOpaqueRegion();
375 CloseWithSpontaneousEvent
378 bool handleClose(CloseMode
mode);
380 void setWindowIcon_helper();
381 void setWindowIcon_sys();
382 void setWindowOpacity_sys(
qreal opacity);
383 void adjustQuitOnCloseAttribute();
385 void scrollChildren(
int dx,
int dy);
386 void moveRect(
const QRect &,
int dx,
int dy);
387 void scrollRect(
const QRect &,
int dx,
int dy);
388 void invalidateBackingStore_resizeHelper(
const QPoint &oldPos,
const QSize &oldSize);
391 void invalidateBackingStore(
const T &);
393 QRegion overlappedRegion(
const QRect &
rect,
bool breakAfterFirst =
false)
const;
395 void syncBackingStore();
396 void syncBackingStore(
const QRegion ®ion);
398 bool shouldDiscardSyncRequest()
const;
403 void reparentFocusWidgets(
QWidget *oldtlw);
406 void showChildren(
bool spontaneous);
407 void hideChildren(
bool spontaneous);
409 void scroll_sys(
int dx,
int dy);
410 void scroll_sys(
int dx,
int dy,
const QRect &
r);
411 void deactivateWidgetCleanup();
412 void setGeometry_sys(
int,
int,
int,
int,
bool);
413 void fixPosIncludesFrame();
414 void sendPendingMoveAndResizeEvents(
bool recursive =
false,
bool disableUpdates =
false);
415 void activateChildLayoutsRecursively();
416 void show_recursive();
421 void _q_showIfNotHidden();
422 void setVisible(
bool);
424 void setEnabled_helper(
bool);
425 static void adjustFlags(Qt::WindowFlags &
flags,
QWidget *
w =
nullptr);
427 void updateFrameStrut();
428 QRect frameStrut()
const;
430 #ifdef QT_KEYPAD_NAVIGATION
437 void setWindowIconText_sys(
const QString &
cap);
438 void setWindowIconText_helper(
const QString &
cap);
440 void setWindowFilePath_sys(
const QString &filePath);
444 void unsetCursor_sys();
447 void setWindowTitle_helper(
const QString &
cap);
448 void setWindowFilePath_helper(
const QString &filePath);
449 void setWindowModified_helper();
450 virtual void setWindowFlags(Qt::WindowFlags windowFlags);
452 bool setMinimumSize_helper(
int &minw,
int &minh);
453 bool setMaximumSize_helper(
int &maxw,
int &maxh);
454 void setConstraints_sys();
455 bool pointInsideRectAndMask(
const QPoint &)
const;
458 void updateGeometry_helper(
bool forceUpdate);
464 void updateContentsRect();
474 while (
w->focusProxy())
485 #if QT_CONFIG(graphicsview)
489 if (!bypassGraphicsProxyWidget(
widget) && ancestorProxy->
scene() !=
nullptr) {
508 return availableScreenGeometry(
widget,
QPoint(),
false);
538 redirectDev = replacement;
550 { redirectDev =
nullptr; }
557 if (extra->nativeChildrenForced)
559 extra->nativeChildrenForced = 1;
561 for (
int i = 0;
i < children.size(); ++
i) {
569 return extra ? extra->nativeChildrenForced :
false;
579 #if QT_CONFIG(graphicseffect)
580 if (graphicsEffect && graphicsEffect->isEnabled())
581 return graphicsEffect->boundingRectFor(
rect).toAlignedRect();
586 QSize adjustedSize()
const;
591 handleSoftwareInputPanel(clickCausedFocus);
597 if (
qApp->autoSipEnabled()) {
606 void setWSGeometry();
609 {
return p -
data.wrect.topLeft(); }
612 {
return p +
data.wrect.topLeft(); }
641 if (textureChildSeen)
643 textureChildSeen = 1;
645 if (!
q->isWindow()) {
651 static void sendComposeStatus(
QWidget *
w,
bool end);
662 static void setWidgetParentHelper(
QObject *widgetAsObject,
QObject *newParent);
682 #if !defined(QT_NO_IM)
685 #ifdef QT_KEYPAD_NAVIGATION
692 #if QT_CONFIG(tooltip)
696 #if QT_CONFIG(statustip)
699 #if QT_CONFIG(whatsthis)
702 #ifndef QT_NO_ACCESSIBILITY
710 decltype(std::declval<QPalette>().resolveMask()) directPaletteResolveMask;
716 signed char leftLayoutItemMargin;
717 signed char topLayoutItemMargin;
718 signed char rightLayoutItemMargin;
719 signed char bottomLayoutItemMargin;
720 static
int instanceCounter;
721 static
int maxInstances;
730 #ifndef QT_NO_GESTURES
759 #if defined(Q_OS_WIN)
760 uint noPaintOnScreen : 1;
761 #elif defined(Q_OS_MAC)
762 void macUpdateSizeAttribute();
764 void setNetWmWindowTypes(
bool skipIfMissing =
false);
766 bool stealKeyboardGrab(
bool grab);
767 bool stealMouseGrab(
bool grab);
781 QWidgetPrivate::DrawWidgetFlags
flags;
787 #if QT_CONFIG(graphicseffect)
796 { m_widget->d_func()->graphicsEffect =
nullptr; }
806 updateDueToGraphicsEffect =
true;
808 updateDueToGraphicsEffect =
false;
828 {
return m_widget->window()->rect(); }
838 bool updateDueToGraphicsEffect;
850 return extra->topextra.get();
855 return extra ?
extra->topextra.get() :
nullptr;
862 return x ?
x->sharedPainter :
nullptr;
876 ||
extra->mask.contains(
p));
883 return x ?
x->repaintManager.get() :
nullptr;
small capitals from c petite p scientific i
[1]
The QBackingStore class provides a drawing area for QWindow.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QCursor class provides a mouse cursor with an arbitrary shape.
The QEvent class is the base class of all event classes. Event objects contain event parameters.
The QFont class specifies a query for a font used for drawing text.
The QGraphicsEffect class is the base class for all graphics effects.
virtual const QStyleOption * styleOption() const =0
virtual bool isPixmap() const =0
QGraphicsEffectSourcePrivate()
virtual QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset=nullptr, QGraphicsEffect::PixmapPadMode mode=QGraphicsEffect::PadToTransparentBorder) const =0
virtual const QGraphicsItem * graphicsItem() const =0
virtual QRectF boundingRect(Qt::CoordinateSystem system) const =0
virtual const QWidget * widget() const =0
virtual void draw(QPainter *p)=0
virtual QRect deviceRect() const =0
virtual void effectBoundingRectChanged()=0
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
QGraphicsScene * scene() const
QList< QGraphicsView * > views() const
static QInputMethod * inputMethod()
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QLayout class is the base class of geometry managers.
bool empty() const noexcept
const_reference at(qsizetype i) const noexcept
The QMargins class defines the four margins of a rectangle.
The QObject class is the base class of all Qt objects.
static QObjectPrivate * get(QObject *o)
The QOpenGLContext class represents a native OpenGL context, enabling OpenGL rendering on a QSurface.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
The QPainter class performs low-level painting on widgets and other paint devices.
The QPalette class contains color groups for each widget state.
The QPixmap class is an off-screen image representation that can be used as a paint device.
The QPoint class defines a point in the plane using integer precision.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
constexpr QRect translated(int dx, int dy) const noexcept
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
The QScreen class is used to query screen properties. \inmodule QtGui.
QRect availableGeometry
the screen's available geometry in pixels
QRect geometry
the screen's geometry in pixels
QScreen * virtualSiblingAt(QPoint point)
The QSize class defines the size of a two-dimensional object using integer point precision.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QString class provides a Unicode character string.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
@ SH_RequestSoftwareInputPanel
RequestSoftwareInputPanel
The QStyleOption class stores the parameters used by QStyle functions.
QUpdateLaterEvent(const QRegion &paintRegion)
const QRegion & region() const
The QWindow class represents a window in the underlying windowing system.
@ BypassGraphicsProxyWidget
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld init[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLdouble GLdouble GLdouble GLdouble top
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count
GLsizei GLsizei GLchar * source
GLdouble GLdouble GLdouble GLdouble q
QT_BEGIN_NAMESPACE typedef QHash< WId, QWidget * > QWidgetMapper
QWidgetRepaintManager * repaintManager
QWidgetPaintContext(QPaintDevice *d, const QRegion &r, const QPoint &o, QWidgetPrivate::DrawWidgetFlags f, QPainter *p, QWidgetRepaintManager *rpm)
QWidgetPrivate::DrawWidgetFlags flags
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent