20#include <QtWidgets/private/qtwidgetsglobal_p.h>
21#include "QtWidgets/qwidget.h"
22#include "private/qobject_p.h"
23#include "QtCore/qrect.h"
24#include "QtCore/qlocale.h"
25#include "QtCore/qset.h"
26#include "QtGui/qregion.h"
27#include "QtGui/qinputmethod.h"
28#include "QtGui/qsurfaceformat.h"
29#include "QtGui/qscreen.h"
30#include "QtWidgets/qsizepolicy.h"
31#include "QtWidgets/qstyle.h"
32#include "QtWidgets/qapplication.h"
33#if QT_CONFIG(graphicseffect)
34#include <private/qgraphicseffect_p.h>
36#if QT_CONFIG(graphicsview)
37#include "QtWidgets/qgraphicsproxywidget.h"
38#include "QtWidgets/qgraphicsscene.h"
39#include "QtWidgets/qgraphicsview.h"
41#include <private/qgesture_p.h>
42#include <qpa/qplatformbackingstore.h>
43#include <QtGui/private/qbackingstorerhisupport_p.h>
64class QUnifiedToolbarSurface;
92 std::unique_ptr<QIcon>
icon;
128#if QT_CONFIG(graphicsview)
173 p =
p->parentWidget();
187 DrawPaintOnScreen = 0x02,
188 DrawRecursive = 0x04,
189 DrawInvisible = 0x08,
190 DontSubtractOpaqueChildren = 0x10,
191 DontDrawOpaqueChildren = 0x20,
192 DontDrawNativeChildren = 0x40,
193 DontSetCompositionMode = 0x80,
194 UseEffectRegionBounds = 0x100
200 DirectionNorth = 0x01,
201 DirectionEast = 0x10,
202 DirectionSouth = 0x02,
214 static void checkRestoredGeometry(
const QRect &availableGeometry,
QRect *restoredGeometry,
229 QWindow *windowHandle(WindowHandleMode
mode = WindowHandleMode::Direct)
const;
230 QWindow *_q_closestWindowHandle()
const;
232 QScreen *associatedScreen()
const;
234 template <
typename T>
237 template <
typename T>
242 void createRecursively();
245 bool setScreenForPoint(
const QPoint &
pos);
248 void createTLExtra();
251 void createSysExtra();
252 void deleteSysExtra();
253 void createTLSysExtra();
254 void deleteTLSysExtra();
255 void updateSystemBackground();
256 void propagatePaletteChange();
258 void setPalette_helper(
const QPalette &);
259 void resolvePalette();
262 void setMask_sys(
const QRegion &);
266 void stackUnder_sys(
QWidget *);
268 QWidget *deepestFocusProxy()
const;
270 void updateFocusChild();
272 void updateFont(
const QFont &);
278 QFont localFont()
const;
280 QFont naturalWidgetFont(
uint inheritedMask)
const;
283 void resolveLayoutDirection();
286 void resolveLocale();
288 void setStyle_helper(
QStyle *newStyle,
bool propagate);
291 void setUpdatesEnabled_helper(
bool );
295 bool isAboutToShow()
const;
296 QRegion prepareToRender(
const QRegion ®ion, QWidget::RenderFlags renderFlags);
298 QWidget::RenderFlags renderFlags);
300 QWidget::RenderFlags renderFlags);
303 void sendPaintEvent(
const QRegion &toBePainted);
310#if QT_CONFIG(graphicsview)
313 bool shouldPaintOnScreen()
const;
314 void paintOnScreen(
const QRegion &rgn);
316 QRect clipRect()
const;
319 void subtractOpaqueChildren(
QRegion &rgn,
const QRect &clipRect)
const;
320 void subtractOpaqueSiblings(
QRegion &
source,
bool *hasDirtySiblingsAbove =
nullptr,
321 bool alsoNonOpaque =
false)
const;
322 void clipToEffectiveMask(
QRegion ®ion)
const;
323 void updateIsOpaque();
324 void setOpaque(
bool opaque);
325 void updateIsTranslucent();
326#if QT_CONFIG(graphicseffect)
327 void invalidateGraphicsEffectsRecursively();
330 const QRegion &getOpaqueChildren()
const;
331 void setDirtyOpaqueRegion();
337 CloseWithSpontaneousEvent
340 bool handleClose(CloseMode
mode);
342 void setWindowIcon_helper();
343 void setWindowIcon_sys();
344 void setWindowOpacity_sys(
qreal opacity);
345 void adjustQuitOnCloseAttribute();
347 void scrollChildren(
int dx,
int dy);
348 void moveRect(
const QRect &,
int dx,
int dy);
349 void scrollRect(
const QRect &,
int dx,
int dy);
350 void invalidateBackingStore_resizeHelper(
const QPoint &oldPos,
const QSize &oldSize);
353 void invalidateBackingStore(
const T &);
355 QRegion overlappedRegion(
const QRect &
rect,
bool breakAfterFirst =
false)
const;
357 void syncBackingStore();
358 void syncBackingStore(
const QRegion ®ion);
360 bool shouldDiscardSyncRequest()
const;
365 void reparentFocusWidgets(
QWidget *oldtlw);
368 void showChildren(
bool spontaneous);
369 void hideChildren(
bool spontaneous);
371 void scroll_sys(
int dx,
int dy);
372 void scroll_sys(
int dx,
int dy,
const QRect &
r);
373 void deactivateWidgetCleanup();
374 void setGeometry_sys(
int,
int,
int,
int,
bool);
375 void fixPosIncludesFrame();
376 void sendPendingMoveAndResizeEvents(
bool recursive =
false,
bool disableUpdates =
false);
377 void activateChildLayoutsRecursively();
378 void show_recursive();
383 void _q_showIfNotHidden();
384 void setVisible(
bool);
386 void setEnabled_helper(
bool);
387 static void adjustFlags(Qt::WindowFlags &
flags,
QWidget *
w =
nullptr);
389 void updateFrameStrut();
390 QRect frameStrut()
const;
392#ifdef QT_KEYPAD_NAVIGATION
393 static bool navigateToDirection(Direction
direction);
399 void setWindowIconText_sys(
const QString &
cap);
400 void setWindowIconText_helper(
const QString &
cap);
402 void setWindowFilePath_sys(
const QString &filePath);
406 void unsetCursor_sys();
409 void setWindowTitle_helper(
const QString &
cap);
410 void setWindowFilePath_helper(
const QString &filePath);
411 void setWindowModified_helper();
412 virtual void setWindowFlags(Qt::WindowFlags windowFlags);
414 bool setMinimumSize_helper(
int &minw,
int &minh);
415 bool setMaximumSize_helper(
int &maxw,
int &maxh);
416 void setConstraints_sys();
417 bool pointInsideRectAndMask(
const QPoint &)
const;
426 void updateContentsRect();
436 while (
w->focusProxy())
447#if QT_CONFIG(graphicsview)
470 return availableScreenGeometry(
widget,
QPoint(),
false);
500 redirectDev = replacement;
512 { redirectDev =
nullptr; }
519 if (extra->nativeChildrenForced)
521 extra->nativeChildrenForced = 1;
523 for (
int i = 0;
i < children.size(); ++
i) {
531 return extra ? extra->nativeChildrenForced :
false;
541#if QT_CONFIG(graphicseffect)
542 if (graphicsEffect && graphicsEffect->isEnabled())
543 return graphicsEffect->boundingRectFor(
rect).toAlignedRect();
548 QSize adjustedSize()
const;
553 handleSoftwareInputPanel(clickCausedFocus);
559 if (
qApp->autoSipEnabled()) {
568 void setWSGeometry();
571 {
return p -
data.wrect.topLeft(); }
574 {
return p +
data.wrect.topLeft(); }
582 virtual QObject *focusObject();
597 : QPlatformTextureList::Flags();
608 if (textureChildSeen)
610 textureChildSeen = 1;
612 if (!
q->isWindow()) {
618 static void sendComposeStatus(
QWidget *
w,
bool end);
633 static void setWidgetParentHelper(
QObject *widgetAsObject,
QObject *newParent);
655#if !defined(QT_NO_IM)
658#ifdef QT_KEYPAD_NAVIGATION
665#if QT_CONFIG(tooltip)
669#if QT_CONFIG(statustip)
672#if QT_CONFIG(whatsthis)
675#if QT_CONFIG(accessibility)
683 decltype(std::declval<QPalette>().resolveMask()) directPaletteResolveMask;
703#ifndef QT_NO_GESTURES
731 uint noPaintOnScreen : 1;
732#elif defined(Q_OS_MAC)
733 void macUpdateSizeAttribute();
735 void setNetWmWindowTypes(
bool skipIfMissing =
false);
737 bool stealKeyboardGrab(
bool grab);
738 bool stealMouseGrab(
bool grab);
752 QWidgetPrivate::DrawWidgetFlags
flags;
758#if QT_CONFIG(graphicseffect)
767 { m_widget->d_func()->graphicsEffect =
nullptr; }
777 updateDueToGraphicsEffect =
true;
779 updateDueToGraphicsEffect =
false;
799 {
return m_widget->window()->rect(); }
809 bool updateDueToGraphicsEffect;
821 return extra->topextra.get();
826 return extra ?
extra->topextra.get() :
nullptr;
833 return x ?
x->sharedPainter :
nullptr;
847 ||
extra->mask.contains(
p));
854 return x ?
x->repaintManager.get() :
nullptr;
The QBackingStore class provides a drawing area for QWindow.
The QCursor class provides a mouse cursor with an arbitrary shape.
Type
This enum type defines the valid event types in Qt.
virtual const QGraphicsItem * graphicsItem() const =0
virtual bool isPixmap() const =0
QGraphicsEffectSourcePrivate()
virtual QRectF boundingRect(Qt::CoordinateSystem system) const =0
virtual const QStyleOption * styleOption() const =0
virtual void draw(QPainter *p)=0
virtual QRect deviceRect() const =0
virtual void effectBoundingRectChanged()=0
virtual const QWidget * widget() const =0
The QGraphicsEffect class is the base class for all graphics effects.
PixmapPadMode
This enum describes how the pixmap returned from sourcePixmap should be padded.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
QGraphicsScene * scene() const
Returns the current scene for the item, or \nullptr if the item is not stored in a scene.
QList< QGraphicsView * > views() const
Returns a list of all the views that display this scene.
static QInputMethod * inputMethod()
returns the input method.
The QLayout class is the base class of geometry managers.
bool empty() const noexcept
const_reference at(qsizetype i) const noexcept
static QObjectPrivate * get(QObject *o)
virtual std::string flagsForDumping() const
The QPainter class performs low-level painting on widgets and other paint devices.
The QPalette class contains color groups for each widget state.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
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)
Returns the screen at point within the set of \l QScreen::virtualSiblings(), or nullptr if outside of...
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyleOption class stores the parameters used by QStyle functions.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
@ SH_RequestSoftwareInputPanel
RequestSoftwareInputPanel
This enum describes under what circumstances a software input panel will be requested by input capabl...
SubElement
This enum represents a sub-area of a widget.
const QRegion & region() const
QUpdateLaterEvent(const QRegion &paintRegion)
Combined button and popup list for selecting options.
@ BypassGraphicsProxyWidget
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
#define Q_DECLARE_LOGGING_CATEGORY(name)
static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir)
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
GLsizei GLsizei GLchar * source
GLdouble GLdouble GLdouble GLdouble q
void forceUpdate(QQuickItem *item)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
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