Qt 4.8
qwidget_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QWIDGET_P_H
43 #define QWIDGET_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists for the convenience
50 // of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
51 // file may change from version to version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "QtGui/qwidget.h"
57 #include "private/qobject_p.h"
58 #include "QtCore/qrect.h"
59 #include "QtCore/qlocale.h"
60 #include "QtCore/qset.h"
61 #include "QtGui/qregion.h"
62 #include "QtGui/qsizepolicy.h"
63 #include "QtGui/qstyle.h"
64 #include "QtGui/qapplication.h"
65 #include <private/qgraphicseffect_p.h>
66 #include "QtGui/qgraphicsproxywidget.h"
67 #include "QtGui/qgraphicsscene.h"
68 #include "QtGui/qgraphicsview.h"
69 #include <private/qgesture_p.h>
70 
71 #ifdef Q_WS_WIN
72 #include "QtCore/qt_windows.h"
73 #include <private/qdnd_p.h>
74 #endif // Q_WS_WIN
75 
76 #ifdef Q_WS_X11
77 #include "QtGui/qx11info_x11.h"
78 #endif
79 
80 #ifdef Q_WS_MAC
81 #include <private/qt_mac_p.h>
82 #endif
83 
84 #if defined(Q_WS_QWS)
85 #include "QtGui/qinputcontext.h"
86 #include "QtGui/qscreen_qws.h"
87 #endif
88 
89 #if defined(Q_OS_SYMBIAN)
90 class RDrawableWindow;
91 class CCoeControl;
92 #endif
93 
95 
96 // Extra QWidget data
97 // - to minimize memory usage for members that are seldom used.
98 // - top-level widgets have extra extra data to reduce cost further
99 #if defined(Q_WS_QWS)
100 class QWSManager;
101 #endif
102 #if defined(Q_WS_MAC)
104 #endif
105 #if defined(Q_WS_QPA)
106 class QPlatformWindow;
107 #endif
108 class QPaintEngine;
109 class QPixmap;
110 class QWidgetBackingStore;
112 class QWidgetItemV2;
113 
114 class QStyle;
115 
116 class QUnifiedToolbarSurface;
117 
119 {
120 
121 public:
124 
125  void create(QWidget *tlw);
126  void destroy();
127 
128  void registerWidget(QWidget *w);
129  void unregisterWidget(QWidget *w);
130  void unregisterWidgetSubtree(QWidget *w);
131 
133  {
134  return m_ptr;
135  }
136 
138  {
139  return m_ptr;
140  }
141 
143  {
144  return *m_ptr;
145  }
146 
147  inline operator bool() const
148  {
149  return (0 != m_ptr);
150  }
151 
152 private:
154 
155 private:
158 };
159 
160 struct QTLWExtra {
161  // *************************** Cross-platform variables *****************************
162 
163  // Regular pointers (keep them together to avoid gaps on 64 bits architectures).
164  QIcon *icon; // widget icon
169 
170  // Implicit pointers (shared_null).
171  QString caption; // widget caption
172  QString iconText; // widget icon text
173  QString role; // widget role
174  QString filePath; // widget file path
175 
176  // Other variables.
177  short incw, inch; // size increments
178  short basew, baseh; // base sizes
179  // frame strut, don't use these directly, use QWidgetPrivate::frameStrut() instead.
181  QRect normalGeometry; // used by showMin/maximized/FullScreen
182  Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen
183 
184  // *************************** Cross-platform bit fields ****************************
191 
192  // *************************** Platform specific values (bit fields first) **********
193 #if defined(Q_WS_X11) // <----------------------------------------------------------- X11
194  uint spont_unmapped: 1; // window was spontaneously unmapped
195  uint dnd : 1; // DND properties installed
196  uint validWMState : 1; // is WM_STATE valid?
197  uint waitingForMapNotify : 1; // show() has been called, haven't got the MapNotify yet
198  WId parentWinId; // parent window Id (valid after reparenting)
199  WId userTimeWindow; // window id that contains user-time timestamp when WM supports a _NET_WM_USER_TIME_WINDOW atom
201 #ifndef QT_NO_XSYNC
206 #endif
207 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
208  uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
209  HICON winIconBig; // internal big Windows icon
210  HICON winIconSmall; // internal small Windows icon
211 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
212  uint resizer : 4;
213  uint isSetGeometry : 1;
214  uint isMove : 1;
215  quint32 wattr;
216  quint32 wclass;
217  WindowGroupRef group;
218  IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys.
219  quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys()
220 #ifdef QT_MAC_USE_COCOA
221  // This value is just to make sure we maximize and restore to the right location, yet we allow apps to be maximized and
222  // manually resized.
223  // The name is misleading, since this is set when maximizing the window. It is a hint to saveGeometry(..) to record the
224  // starting position as 0,0 instead of the normal starting position.
225  bool wasMaximized;
226 #endif // QT_MAC_USE_COCOA
227 
228 #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
229 #ifndef QT_NO_QWS_MANAGER
230  QWSManager *qwsManager;
231 #endif
232 #elif defined(Q_OS_SYMBIAN)
233  uint inExpose : 1; // Prevents drawing recursion
234  uint nativeWindowTransparencyEnabled : 1; // Tracks native window transparency
235  uint forcedToRaster : 1;
236  uint noSystemRotationDisabled : 1;
237 #elif defined(Q_WS_QPA)
238  QPlatformWindow *platformWindow;
239  QPlatformWindowFormat platformWindowFormat;
240  quint32 screenIndex; // index in qplatformscreenlist
241 #endif
242 };
243 
244 struct QWExtra {
245  // *************************** Cross-platform variables *****************************
246 
247  // Regular pointers (keep them together to avoid gaps on 64 bits architectures).
248  void *glContext; // if the widget is hijacked by QGLWindowSurface
249  QTLWExtra *topextra; // only useful for TLWs
250 #ifndef QT_NO_GRAPHICSVIEW
251  QGraphicsProxyWidget *proxyWidget; // if the widget is embedded
252 #endif
253 #ifndef QT_NO_CURSOR
255 #endif
258 
259  // Implicit pointers (shared_empty/shared_null).
260  QRegion mask; // widget mask
262 
263  // Other variables.
265  qint32 minh; // minimum size
267  qint32 maxh; // maximum size
271 
272  // *************************** Cross-platform bit fields ****************************
279 
280  // *************************** Platform specific values (bit fields first) **********
281 #if defined(Q_WS_WIN) // <----------------------------------------------------------- WIN
282 #ifndef QT_NO_DRAGANDDROP
283  QOleDropTarget *dropTarget; // drop target
285 #endif
286 #elif defined(Q_WS_X11) // <--------------------------------------------------------- X11
287  uint compress_events : 1;
288  WId xDndProxy; // XDND forwarding to embedded windows
289 #elif defined(Q_WS_MAC) // <------------------------------------------------------ MAC
290 #ifdef QT_MAC_USE_COCOA
291  // Cocoa Mask stuff
292  QImage maskBits;
293  CGImageRef imageMask;
294 #endif
295 #elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
296  uint activated : 1; // RWindowBase::Activated has been called
297 
305  uint receiveNativePaintEvents : 1;
306 
310  enum NativePaintMode {
315  Blit,
316 
320  Disable,
321 
327  ZeroFill,
328 
332  BlitWriteAlpha,
333 
334  Default = Blit
335  };
336 
337  NativePaintMode nativePaintMode;
338 
339 #endif
340 };
341 
353 static inline bool bypassGraphicsProxyWidget(const QWidget *p)
354 {
355  while (p) {
357  return true;
358  p = p->parentWidget();
359  }
360  return false;
361 }
362 
364 {
366 
367 public:
368  // *************************** Cross-platform ***************************************
370  DrawAsRoot = 0x01,
371  DrawPaintOnScreen = 0x02,
372  DrawRecursive = 0x04,
373  DrawInvisible = 0x08,
374  DontSubtractOpaqueChildren = 0x10,
375  DontSetCompositionMode = 0x20,
376  DontDrawOpaqueChildren = 0x40,
377  DontDrawNativeChildren = 0x80
378  };
379 
380  enum CloseMode {
383  CloseWithSpontaneousEvent
384  };
385 
386  enum Direction {
387  DirectionNorth = 0x01,
388  DirectionEast = 0x10,
389  DirectionSouth = 0x02,
390  DirectionWest = 0x20
391  };
392 
393  // Functions.
394  explicit QWidgetPrivate(int version = QObjectPrivateVersion);
395  ~QWidgetPrivate();
396 
397  QWExtra *extraData() const;
398  QTLWExtra *topData() const;
399  QTLWExtra *maybeTopData() const;
400  QPainter *sharedPainter() const;
401  void setSharedPainter(QPainter *painter);
402  QWidgetBackingStore *maybeBackingStore() const;
403  void init(QWidget *desktopWidget, Qt::WindowFlags f);
404  void create_sys(WId window, bool initializeWindow, bool destroyOldWindow);
405  void createRecursively();
406  void createWinId(WId id = 0);
407 
408  void createTLExtra();
409  void createExtra();
410  void deleteExtra();
411  void createSysExtra();
412  void deleteSysExtra();
413  void createTLSysExtra();
414  void deleteTLSysExtra();
415  void updateSystemBackground();
416  void propagatePaletteChange();
417 
418  void setPalette_helper(const QPalette &);
419  void resolvePalette();
420  QPalette naturalWidgetPalette(uint inheritedMask) const;
421 
422  void setMask_sys(const QRegion &);
423 #ifdef Q_OS_SYMBIAN
424  void setSoftKeys_sys(const QList<QAction*> &softkeys);
425  void activateSymbianWindow(WId wid = 0);
426  void _q_cleanupWinIds();
427 #endif
428 
429  void raise_sys();
430  void lower_sys();
431  void stackUnder_sys(QWidget *);
432 
433  void setFocus_sys();
434 
435  void updateFont(const QFont &);
436  inline void setFont_helper(const QFont &font) {
437  if (data.fnt == font && data.fnt.resolve() == font.resolve())
438  return;
439  updateFont(font);
440  }
441  void resolveFont();
442  QFont naturalWidgetFont(uint inheritedMask) const;
443 
444  void setLayoutDirection_helper(Qt::LayoutDirection);
445  void resolveLayoutDirection();
446 
447  void setLocale_helper(const QLocale &l, bool forceUpdate = false);
448  void resolveLocale();
449 
450  void setStyle_helper(QStyle *newStyle, bool propagate, bool metalHack = false);
451  void inheritStyle();
452 
453  void setUpdatesEnabled_helper(bool );
454 
455  void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const;
456  bool isAboutToShow() const;
457  QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
458  void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,
459  QWidget::RenderFlags renderFlags);
460  void render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion,
461  QWidget::RenderFlags renderFlags, bool readyToRender);
462  void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags,
463  QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0);
464 
465 
466  void paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& children, int index,
467  const QRegion &rgn, const QPoint &offset, int flags
468 #ifdef Q_BACKINGSTORE_SUBSURFACES
469  , const QWindowSurface *currentSurface
470 #endif
471  , QPainter *sharedPainter, QWidgetBackingStore *backingStore);
472 
473 
474  QPainter *beginSharedPainter();
475  bool endSharedPainter();
476 #ifndef QT_NO_GRAPHICSVIEW
477  static QGraphicsProxyWidget * nearestGraphicsProxyWidget(const QWidget *origin);
478 #endif
479  QWindowSurface *createDefaultWindowSurface();
480  QWindowSurface *createDefaultWindowSurface_sys();
481  void repaint_sys(const QRegion &rgn);
482 
483  QRect clipRect() const;
484  QRegion clipRegion() const;
485  void subtractOpaqueChildren(QRegion &rgn, const QRect &clipRect) const;
486  void subtractOpaqueSiblings(QRegion &source, bool *hasDirtySiblingsAbove = 0,
487  bool alsoNonOpaque = false) const;
488  void clipToEffectiveMask(QRegion &region) const;
489  void updateIsOpaque();
490  void setOpaque(bool opaque);
491  void updateIsTranslucent();
492  bool paintOnScreen() const;
493 #ifndef QT_NO_GRAPHICSEFFECT
494  void invalidateGraphicsEffectsRecursively();
495 #endif //QT_NO_GRAPHICSEFFECT
496 
497  const QRegion &getOpaqueChildren() const;
498  void setDirtyOpaqueRegion();
499 
500  bool close_helper(CloseMode mode);
501 
502  void setWindowIcon_helper();
503  void setWindowIcon_sys(bool forceReset = false);
504  void setWindowOpacity_sys(qreal opacity);
505  void adjustQuitOnCloseAttribute();
506 
507  void scrollChildren(int dx, int dy);
508  void moveRect(const QRect &, int dx, int dy);
509  void scrollRect(const QRect &, int dx, int dy);
510  void invalidateBuffer_resizeHelper(const QPoint &oldPos, const QSize &oldSize);
511  // ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore).
512  void invalidateBuffer(const QRegion &);
513  void invalidateBuffer(const QRect &);
514  bool isOverlapped(const QRect&) const;
515  void syncBackingStore();
516  void syncBackingStore(const QRegion &region);
517 
518  void reparentFocusWidgets(QWidget *oldtlw);
519 
520  static int pointToRect(const QPoint &p, const QRect &r);
521 
522  void setWinId(WId);
523  void showChildren(bool spontaneous);
524  void hideChildren(bool spontaneous);
525  void setParent_sys(QWidget *parent, Qt::WindowFlags);
526  void scroll_sys(int dx, int dy);
527  void scroll_sys(int dx, int dy, const QRect &r);
528  void deactivateWidgetCleanup();
529  void setGeometry_sys(int, int, int, int, bool);
530  void sendPendingMoveAndResizeEvents(bool recursive = false, bool disableUpdates = false);
531  void activateChildLayoutsRecursively();
532  void show_recursive();
533  void show_helper();
534  void show_sys();
535  void hide_sys();
536  void hide_helper();
537  void _q_showIfNotHidden();
538 
539  void setEnabled_helper(bool);
540  void registerDropSite(bool);
541  static void adjustFlags(Qt::WindowFlags &flags, QWidget *w = 0);
542 
543  void updateFrameStrut();
544  QRect frameStrut() const;
545 
546 #ifdef QT_KEYPAD_NAVIGATION
547  static bool navigateToDirection(Direction direction);
548  static QWidget *widgetInNavigationDirection(Direction direction);
549  static bool canKeypadNavigate(Qt::Orientation orientation);
550  static bool inTabWidget(QWidget *widget);
551 #endif
552 
553  void setWindowIconText_sys(const QString &cap);
554  void setWindowIconText_helper(const QString &cap);
555  void setWindowTitle_sys(const QString &cap);
556 
557 #ifndef QT_NO_CURSOR
558  void setCursor_sys(const QCursor &cursor);
559  void unsetCursor_sys();
560 #endif
561 
562  void setWindowTitle_helper(const QString &cap);
563  void setWindowFilePath_helper(const QString &filePath);
564 
565  bool setMinimumSize_helper(int &minw, int &minh);
566  bool setMaximumSize_helper(int &maxw, int &maxh);
567  virtual bool hasHeightForWidth() const;
568  void setConstraints_sys();
569  bool pointInsideRectAndMask(const QPoint &) const;
570  QWidget *childAt_helper(const QPoint &, bool) const;
571  QWidget *childAtRecursiveHelper(const QPoint &p, bool, bool includeFrame = false) const;
572  void updateGeometry_helper(bool forceUpdate);
573 
574  void getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const;
575  void setLayoutItemMargins(int left, int top, int right, int bottom);
576  void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0);
577 
578  // aboutToDestroy() is called just before the contents of
579  // QWidget::destroy() is executed. It's used to signal QWidget
580  // sub-classes that their internals are about to be released.
581  virtual void aboutToDestroy() {}
582 
583 #ifndef QT_NO_IM
584  QInputContext *assignedInputContext() const;
585  QInputContext *inputContext() const;
586 #endif
588  QWidget *w = q_func();
589  while (w->focusProxy())
590  w = w->focusProxy();
591  return w;
592  }
593 
594  void setModal_sys();
595 
596  // This is an helper function that return the available geometry for
597  // a widget and takes care is this one is in QGraphicsView.
598  // If the widget is not embed in a scene then the geometry available is
599  // null, we let QDesktopWidget decide for us.
600  static QRect screenGeometry(const QWidget *widget)
601  {
602  QRect screen;
603 #ifndef QT_NO_GRAPHICSVIEW
604  QGraphicsProxyWidget *ancestorProxy = widget->d_func()->nearestGraphicsProxyWidget(widget);
605  //It's embedded if it has an ancestor
606  if (ancestorProxy) {
607  if (!bypassGraphicsProxyWidget(widget) && ancestorProxy->scene() != 0) {
608  // One view, let be smart and return the viewport rect then the popup is aligned
609  if (ancestorProxy->scene()->views().size() == 1) {
610  QGraphicsView *view = ancestorProxy->scene()->views().at(0);
611  screen = view->mapToScene(view->viewport()->rect()).boundingRect().toRect();
612  } else {
613  screen = ancestorProxy->scene()->sceneRect().toRect();
614  }
615  }
616  }
617 #endif
618  return screen;
619  }
620 
621  inline void setRedirected(QPaintDevice *replacement, const QPoint &offset)
622  {
623  Q_ASSERT(q_func()->testAttribute(Qt::WA_WState_InPaintEvent));
624  redirectDev = replacement;
625  redirectOffset = offset;
626  }
627 
628  inline QPaintDevice *redirected(QPoint *offset) const
629  {
630  if (offset)
631  *offset = redirectDev ? redirectOffset : QPoint();
632  return redirectDev;
633  }
634 
635  inline void restoreRedirected()
636  { redirectDev = 0; }
637 
638  inline void enforceNativeChildren()
639  {
640  if (!extra)
641  createExtra();
642 
643  if (extra->nativeChildrenForced)
644  return;
645  extra->nativeChildrenForced = 1;
646 
647  for (int i = 0; i < children.size(); ++i) {
648  if (QWidget *child = qobject_cast<QWidget *>(children.at(i)))
649  child->setAttribute(Qt::WA_NativeWindow);
650  }
651  }
652 
653  inline bool nativeChildrenForced() const
654  {
655  return extra ? extra->nativeChildrenForced : false;
656  }
657 
658  inline QRect effectiveRectFor(const QRect &rect) const
659  {
660 #ifndef QT_NO_GRAPHICSEFFECT
661  if (graphicsEffect && graphicsEffect->isEnabled())
662  return graphicsEffect->boundingRectFor(rect).toAlignedRect();
663 #endif //QT_NO_GRAPHICSEFFECT
664  return rect;
665  }
666 
667  QSize adjustedSize() const;
668 
669  inline void handleSoftwareInputPanel(Qt::MouseButton button, bool clickCausedFocus)
670  {
671  Q_Q(QWidget);
672  if (button == Qt::LeftButton && qApp->autoSipEnabled()) {
674  q->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
675  if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
677  QApplication::sendEvent(q, &event);
678  }
679  }
680  }
681 
682 #ifndef Q_WS_QWS // Almost cross-platform :-)
683  void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect());
684 
685  inline QPoint mapToWS(const QPoint &p) const
686  { return p - data.wrect.topLeft(); }
687 
688  inline QPoint mapFromWS(const QPoint &p) const
689  { return p + data.wrect.topLeft(); }
690 
691  inline QRect mapToWS(const QRect &r) const
692  { QRect rr(r); rr.translate(-data.wrect.topLeft()); return rr; }
693 
694  inline QRect mapFromWS(const QRect &r) const
695  { QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; }
696 #endif
697 
698  // Variables.
699  // Regular pointers (keep them together to avoid gaps on 64 bit architectures).
709  mutable const QMetaObject *polished;
711  // All widgets are added into the allWidgets set. Once
712  // they receive a window id they are also added to the mapper.
713  // This should just ensure that all widgets are deleted by QApplication
716 #if !defined(QT_NO_IM)
718  Qt::InputMethodHints imHints;
719 #endif
720 #ifdef QT_KEYPAD_NAVIGATION
721  static QPointer<QWidget> editingWidget;
722 #endif
723 
724  // Implicit pointers (shared_null/shared_empty).
727 #ifndef QT_NO_TOOLTIP
729 #endif
730 #ifndef QT_NO_STATUSTIP
732 #endif
733 #ifndef QT_NO_WHATSTHIS
735 #endif
736 #ifndef QT_NO_ACCESSIBILITY
739 #endif
740 
741  // Other variables.
744  short leftmargin;
745  short topmargin;
746  short rightmargin;
748  signed char leftLayoutItemMargin;
749  signed char topLayoutItemMargin;
752  static int instanceCounter; // Current number of widget instances
753  static int maxInstances; // Maximum number of widget instances
759 #ifndef QT_NO_ACTION
761 #endif
762 #ifndef QT_NO_GESTURES
764 #endif
765 
766  // Bit fields.
767  uint high_attributes[4]; // the low ones are in QWidget::widget_attributes
777 #ifndef QT_NO_IM
779 #endif
781 
782  // *************************** Platform specific ************************************
783 #if defined(Q_WS_X11) // <----------------------------------------------------------- X11
788 
789  void setWindowRole();
790  void sendStartupMessage(const char *message) const;
791  void setNetWmWindowTypes();
792  void x11UpdateIsOpaque();
793  bool isBackgroundInherited() const;
794  void updateX11AcceptFocus();
795  QPoint mapToGlobal(const QPoint &pos) const;
796  QPoint mapFromGlobal(const QPoint &pos) const;
797 #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
798  uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine()
799 #ifndef QT_NO_GESTURES
800  uint nativeGesturePanEnabled : 1;
801 #endif
802  bool shouldShowMaximizeButton();
803  void winUpdateIsOpaque();
804  void reparentChildren();
805 #ifndef QT_NO_DRAGANDDROP
806  QOleDropTarget *registerOleDnd(QWidget *widget);
807  void unregisterOleDnd(QWidget *widget, QOleDropTarget *target);
808 #endif
809  void grabMouseWhileInWindow();
810  void registerTouchWindow();
811  void winSetupGestures();
812 #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
813  // This is new stuff
814  uint needWindowChange : 1;
815 
816  // Each wiget keeps a list of all its child and grandchild OpenGL widgets.
817  // This list is used to update the gl context whenever a parent and a granparent
818  // moves, and also to check for intersections with gl widgets within the window
819  // when a widget moves.
820  struct GlWidgetInfo
821  {
822  GlWidgetInfo(QWidget *widget) : widget(widget), lastUpdateWidget(0) { }
823  bool operator==(const GlWidgetInfo &other) const { return (widget == other.widget); }
824  QWidget * widget;
825  QWidget * lastUpdateWidget;
826  };
827 
828  // dirtyOnWidget contains the areas in the widget that needs to be repained,
829  // in the same way as dirtyOnScreen does for the window. Areas are added in
830  // dirtyWidget_sys and cleared in the paint event. In scroll_sys we then use
831  // this information repaint invalid areas when widgets are scrolled.
832  QRegion dirtyOnWidget;
833  EventHandlerRef window_event;
834  QList<GlWidgetInfo> glWidgets;
835 
836  //these are here just for code compat (HIViews)
837  Qt::HANDLE qd_hd;
838 
839  void macUpdateSizeAttribute();
840  void macUpdateHideOnSuspend();
841  void macUpdateOpaqueSizeGrip();
842  void macUpdateIgnoreMouseEvents();
843  void macUpdateMetalAttribute();
844  void macUpdateIsOpaque();
845  void macSetNeedsDisplay(QRegion region);
846  void setEnabled_helper_sys(bool enable);
847  bool isRealWindow() const;
848  void adjustWithinMaxAndMinSize(int &w, int &h);
849  void applyMaxAndMinSizeOnWindow();
850  void update_sys(const QRect &rect);
851  void update_sys(const QRegion &rgn);
852  void setGeometry_sys_helper(int, int, int, int, bool);
853  void setWindowModified_sys(bool b);
854  void updateMaximizeButton_sys();
855  void setWindowFilePath_sys(const QString &filePath);
856  void createWindow_sys();
857  void recreateMacWindow();
858 #ifndef QT_MAC_USE_COCOA
859  void initWindowPtr();
860  void finishCreateWindow_sys_Carbon(OSWindowRef windowRef);
861 #else
862  void setSubWindowStacking(bool set);
863  void setWindowLevel();
864  void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef);
865  void syncCocoaMask();
866  void finishCocoaMaskSetup();
867  void syncUnifiedMode();
868  // Did we add the drawRectOriginal method?
869  bool drawRectOriginalAdded;
870  // Is the original drawRect method available?
871  bool originalDrawMethod;
872  // Do we need to change the methods?
873  bool changeMethods;
874 
875  // Unified toolbar variables
876  bool isInUnifiedToolbar;
877  QUnifiedToolbarSurface *unifiedSurface;
878  QPoint toolbar_offset;
879  QWidget *toolbar_ancestor;
880  bool flushRequested;
881  bool touchEventsEnabled;
882 #endif // QT_MAC_USE_COCOA
883  void determineWindowClass();
884  void transferChildren();
885  bool qt_mac_dnd_event(uint, DragRef);
886  void toggleDrawers(bool);
887  //mac event functions
888  static bool qt_create_root_win();
889  static void qt_clean_root_win();
890  static bool qt_mac_update_sizer(QWidget *, int up = 0);
891  static OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *);
892  static OSStatus qt_widget_event(EventHandlerCallRef er, EventRef event, void *);
893  static bool qt_widget_rgn(QWidget *, short, RgnHandle, bool);
894  void registerTouchWindow(bool enable = true);
895 #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
896  void setMaxWindowState_helper();
897  void setFullScreenSize_helper();
898  void moveSurface(QWindowSurface *surface, const QPoint &offset);
899  QRegion localRequestedRegion() const;
900  QRegion localAllocatedRegion() const;
901 
902  friend class QWSManager;
903  friend class QWSManagerPrivate;
904  friend class QDecoration;
905 #ifndef QT_NO_CURSOR
906  void updateCursor() const;
907 #endif
908  QScreen* getScreen() const;
909 #elif defined(Q_WS_QPA) // <--------------------------------------------------------- QPA
910  void setMaxWindowState_helper();
911  void setFullScreenSize_helper();
912 #ifndef QT_NO_CURSOR
913  void updateCursor() const;
914 #endif
915 #elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
916  static QWidget *mouseGrabber;
917  static QWidget *keyboardGrabber;
918  int symbianScreenNumber; // only valid for desktop widget and top-levels
919  bool fixNativeOrientationCalled;
920  void s60UpdateIsOpaque();
921  void reparentChildren();
922  void registerTouchWindow();
923  QList<WId> widCleanupList;
924  uint isGLGlobalShareWidget : 1;
925 #endif
926 
927 };
928 
930 {
931  inline QWidgetPaintContext(QPaintDevice *d, const QRegion &r, const QPoint &o, int f,
933  : pdev(d), rgn(r), offset(o), flags(f), sharedPainter(p), backingStore(b), painter(0) {}
934 
938  int flags;
942 };
943 
944 #ifndef QT_NO_GRAPHICSEFFECT
946 {
947 public:
949  : QGraphicsEffectSourcePrivate(), m_widget(widget), context(0), updateDueToGraphicsEffect(false)
950  {}
951 
952  inline void detach()
953  { m_widget->d_func()->graphicsEffect = 0; }
954 
955  inline const QGraphicsItem *graphicsItem() const
956  { return 0; }
957 
958  inline const QWidget *widget() const
959  { return m_widget; }
960 
961  inline void update()
962  {
963  updateDueToGraphicsEffect = true;
964  m_widget->update();
965  updateDueToGraphicsEffect = false;
966  }
967 
968  inline bool isPixmap() const
969  { return false; }
970 
972  {
973  // ### This function should take a rect parameter; then we can avoid
974  // updating too much on the parent widget.
975  if (QWidget *parent = m_widget->parentWidget())
976  parent->update();
977  else
978  update();
979  }
980 
981  inline const QStyleOption *styleOption() const
982  { return 0; }
983 
984  inline QRect deviceRect() const
985  { return m_widget->window()->rect(); }
986 
988  void draw(QPainter *p);
989  QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset,
990  QGraphicsEffect::PixmapPadMode mode) const;
991 
996 };
997 #endif //QT_NO_GRAPHICSEFFECT
998 
1000 {
1001  return extra;
1002 }
1003 
1005 {
1006  const_cast<QWidgetPrivate *>(this)->createTLExtra();
1007  return extra->topextra;
1008 }
1009 
1011 {
1012  return extra ? extra->topextra : 0;
1013 }
1014 
1016 {
1017  Q_Q(const QWidget);
1018  QTLWExtra *x = q->window()->d_func()->maybeTopData();
1019  return x ? x->sharedPainter : 0;
1020 }
1021 
1023 {
1024  Q_Q(QWidget);
1025  QTLWExtra *x = q->window()->d_func()->topData();
1026  x->sharedPainter = painter;
1027 }
1028 
1030 {
1031  Q_Q(const QWidget);
1032  return q->rect().contains(p) && (!extra || !extra->hasMask || q->testAttribute(Qt::WA_MouseNoMask)
1033  || extra->mask.contains(p));
1034 }
1035 
1037 {
1038  Q_Q(const QWidget);
1039  QTLWExtra *x = q->window()->d_func()->maybeTopData();
1040  return x ? x->backingStore.data() : 0;
1041 }
1042 
1044 
1045 #endif // QWIDGET_P_H
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
void setSharedPainter(QPainter *painter)
Definition: qwidget_p.h:1022
double d
Definition: qnumeric_p.h:62
The QMetaObject class contains meta-information about Qt objects.
Definition: qobjectdefs.h:304
CoordinateSystem
Definition: qnamespace.h:1733
QPaintDevice * redirected(QPoint *offset) const
Definition: qwidget_p.h:628
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
QPainter * painter
Definition: qwidget_p.h:941
unsigned long WId
Definition: qwindowdefs.h:119
double qreal
Definition: qglobal.h:1193
The QCursor class provides a mouse cursor with an arbitrary shape.
Definition: qcursor.h:89
short rightmargin
Definition: qwidget_p.h:746
QPointF mapToScene(const QPoint &point) const
Returns the viewport coordinate point mapped to scene coordinates.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
const QStyleOption * styleOption() const
Definition: qwidget_p.h:981
int qint32
Definition: qglobal.h:937
EventRef event
QPointer< QWidget > widget
QRect frameStrut
Definition: qwidget_p.h:180
ColorRole
The ColorRole enum defines the different symbolic color roles used in current GUIs.
Definition: qpalette.h:93
QRegion dirty
Definition: qwidget_p.h:726
Qt::InputMethodHints imHints
Definition: qwidget_p.h:718
short topmargin
Definition: qwidget_p.h:745
QWidget * effectiveFocusWidget()
Definition: qwidget_p.h:587
Qt::HANDLE hd
Definition: qwidget_p.h:754
void restoreRedirected()
Definition: qwidget_p.h:635
QLayout * layout
Definition: qwidget_p.h:704
static QScreen * getScreen(const QWidget *w)
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
static QWidget * keyboardGrabber
Definition: qwidget_p.h:787
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
QWindowSurface * windowSurface
Definition: qwidget_p.h:167
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
Definition: qgraphicsitem.h:89
QCursor * curs
Definition: qwidget_p.h:254
QString role
Definition: qwidget_p.h:173
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
The QPlatformWindowFormat class specifies the display format of an OpenGL rendering context and if po...
uint inheritsInputMethodHints
Definition: qwidget_p.h:778
QPainter * sharedPainter
Definition: qwidget_p.h:939
uint inTopLevelResize
Definition: qwidget_p.h:188
QWidgetEffectSourcePrivate(QWidget *widget)
Definition: qwidget_p.h:948
struct CGImage * CGImageRef
QPointer< QWidget > focus_proxy
Definition: qwidget_p.h:257
quint16 customDpiY
Definition: qwidget_p.h:269
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Definition: qglobal.h:2523
QSizePolicy size_policy
Definition: qwidget_p.h:756
static bool bypassGraphicsProxyWidget(const QWidget *p)
Returns true if p or any of its parents enable the Qt::BypassGraphicsProxyWidget window flag...
Definition: qwidget_p.h:353
QWidgetBackingStore & operator*()
Definition: qwidget_p.h:142
WId userTimeWindow
Definition: qwidget_p.h:199
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
const QMetaObject * polished
Definition: qwidget_p.h:709
The QPlatformWindow class provides an abstraction for top-level windows.
QString styleSheet
Definition: qwidget_p.h:261
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QLocale locale
Definition: qwidget_p.h:757
QTLWExtra * maybeTopData() const
Definition: qwidget_p.h:1010
QPointer< QStyle > style
Definition: qwidget_p.h:256
signed char topLayoutItemMargin
Definition: qwidget_p.h:749
signed char bottomLayoutItemMargin
Definition: qwidget_p.h:751
QWidget * focusProxy() const
Returns the focus proxy, or 0 if there is no focus proxy.
Definition: qwidget.cpp:6561
RequestSoftwareInputPanel
This enum describes under what circumstances a software input panel will be requested by input capabl...
Definition: qstyle.h:635
QString accessibleDescription
Definition: qwidget_p.h:738
QPaintDevice * redirectDev
Definition: qwidget_p.h:706
qint32 minw
Definition: qwidget_p.h:264
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
QPaintDevice * pdev
Definition: qwidget_p.h:935
uint embedded
Definition: qwidget_p.h:190
Class which allows tracking of which widgets are using a given backing store.
Definition: qwidget_p.h:118
QPaintEngine * extraPaintEngine
Definition: qwidget_p.h:708
#define Q_Q(Class)
Definition: qglobal.h:2483
static const uint Default
Definition: qsplitter_p.h:61
The QDecoration class is a base class for window decorations in Qt for Embedded Linux.
uint spont_unmapped
Definition: qwidget_p.h:194
QWidgetData data
Definition: qwidget_p.h:755
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
static const QRectF boundingRect(const QPointF *points, int pointCount)
QGraphicsProxyWidget * proxyWidget
Definition: qwidget_p.h:251
QWidget * viewport() const
Returns the viewport widget.
QOleDropTarget * dropTarget
Definition: qwidget_p.h:283
QFont resolve(const QFont &) const
Returns a new QFont that has attributes copied from other that have not been previously set on this f...
Definition: qfont.cpp:1983
NSWindow * window
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
Definition: qwidget_p.h:763
QGraphicsEffect * graphicsEffect
Definition: qwidget_p.h:710
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QRect normalGeometry
Definition: qwidget_p.h:181
const QWidget * widget() const
Definition: qwidget_p.h:958
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
QString toolTip
Definition: qwidget_p.h:728
QRect deviceRect() const
Definition: qwidget_p.h:984
QList< QGraphicsView * > views() const
Returns a list of all the views that display this scene.
WindowRef OSWindowRef
The QStyleOption class stores the parameters used by QStyle functions.
Definition: qstyleoption.h:67
qint32 maxw
Definition: qwidget_p.h:266
#define qApp
static bool init
QPalette::ColorRole bg_role
Definition: qwidget_p.h:769
QSize staticContentsSize
Definition: qwidget_p.h:270
The QLayout class is the base class of geometry managers.
Definition: qlayout.h:90
qint32 maxh
Definition: qwidget_p.h:267
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
uint inSetParent
Definition: qwidget_p.h:780
LayoutDirection
Definition: qnamespace.h:1580
unsigned short quint16
Definition: qglobal.h:936
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
bool contains(const QPoint &p) const
Returns true if the region contains the point p; otherwise returns false.
Definition: qregion.cpp:4104
static const char * data(const QByteArray &arr)
unsigned int uint
Definition: qglobal.h:996
uint inRepaint
Definition: qwidget_p.h:189
uint inRenderWithPainter
Definition: qwidget_p.h:277
void handleSoftwareInputPanel(Qt::MouseButton button, bool clickCausedFocus)
Definition: qwidget_p.h:669
short leftmargin
Definition: qwidget_p.h:744
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
QRectF sceneRect
the scene rectangle; the bounding rectangle of the scene
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
quint32 newCounterValueLo
Definition: qwidget_p.h:205
Qt::WindowFlags savedFlags
Definition: qwidget_p.h:182
void * HANDLE
Definition: qnamespace.h:1671
QTLWExtra * topData() const
Definition: qwidget_p.h:1004
unsigned long ulong
Definition: qglobal.h:997
signed long OSStatus
PixmapPadMode
This enum describes how the pixmap returned from sourcePixmap should be padded.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
Definition: qpaintengine.h:90
qint32 newCounterValueHi
Definition: qwidget_p.h:204
static QWidgetSet * allWidgets
Definition: qwidget_p.h:715
struct OpaqueRgnHandle * RgnHandle
short incw
Definition: qwidget_p.h:177
QRect toRect() const
Returns a QRect based on the values of this rectangle.
Definition: qrect.h:845
QWidget * focus_child
Definition: qwidget_p.h:703
The QWindowSurface class provides the drawing area for top-level windows.
struct OpaqueEventRef * EventRef
QPainter * sharedPainter
Definition: qwidget_p.h:168
QWidget * focus_next
Definition: qwidget_p.h:701
uint inDirtyList
Definition: qwidget_p.h:772
WId parentWinId
Definition: qwidget_p.h:198
The QGraphicsProxyWidget class provides a proxy layer for embedding a QWidget in a QGraphicsScene...
QPalette::ColorRole fg_role
Definition: qwidget_p.h:768
uint explicitMaxSize
Definition: qwidget_p.h:274
uint dirtyOpaqueChildren
Definition: qwidget_p.h:770
QList< QPointer< QWidget > > oleDropWidgets
Definition: qwidget_p.h:284
uint inheritedPaletteResolveMask
Definition: qwidget_p.h:743
WId syncUpdateCounter
Definition: qwidget_p.h:202
bool pointInsideRectAndMask(const QPoint &) const
Definition: qwidget_p.h:1029
QRegion * needsFlush
Definition: qwidget_p.h:705
QString filePath
Definition: qwidget_p.h:174
static QWidget * mouseGrabber
Definition: qwidget_p.h:786
QRegion mask
Definition: qwidget_p.h:260
The QX11Info class provides information about the X display configuration.
Definition: qx11info_x11.h:63
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
QTLWExtra * topextra
Definition: qwidget_p.h:249
void enforceNativeChildren()
Definition: qwidget_p.h:638
QWidget * focus_prev
Definition: qwidget_p.h:702
QWidgetItemV2 * widgetItem
Definition: qwidget_p.h:707
QRect rect
the internal geometry of the widget excluding any window frame
Definition: qwidget.h:168
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
uint dnd
Definition: qwidget_p.h:195
QPoint fullScreenOffset
Definition: qwidget_p.h:200
QString iconText
Definition: qwidget_p.h:172
QWidgetBackingStore * data()
Definition: qwidget_p.h:132
static QRect screenGeometry(const QWidget *widget)
Definition: qwidget_p.h:600
signed char rightLayoutItemMargin
Definition: qwidget_p.h:750
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
virtual void aboutToDestroy()
Definition: qwidget_p.h:581
QPainter * sharedPainter() const
Definition: qwidget_p.h:1015
unsigned int quint32
Definition: qglobal.h:938
void * glContext
Definition: qwidget_p.h:248
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
uint opacity
Definition: qwidget_p.h:185
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
Definition: qstyle.h:68
QWidgetPaintContext * context
Definition: qwidget_p.h:993
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
signed char leftLayoutItemMargin
Definition: qwidget_p.h:748
#define Q_AUTOTEST_EXPORT
Definition: qglobal.h:1510
QList< QAction * > actions
Definition: qwidget_p.h:760
uint inheritedFontResolveMask
Definition: qwidget_p.h:742
QFactoryLoader * l
QPixmap * iconPixmap
Definition: qwidget_p.h:165
Qt::HANDLE picture
Definition: qwidget_p.h:785
QWExtra * extra
Definition: qwidget_p.h:700
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition: qscreen_qws.h:191
uint hasMask
Definition: qwidget_p.h:278
uint nativeChildrenForced
Definition: qwidget_p.h:276
QString caption
Definition: qwidget_p.h:171
uint usesDoubleBufferedGLContext
Definition: qwidget_p.h:776
QWidgetBackingStore * backingStore
Definition: qwidget_p.h:940
quint16 index
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
short bottommargin
Definition: qwidget_p.h:747
static QWSWindow * keyboardGrabber
uint autoFillBackground
Definition: qwidget_p.h:275
QX11Info xinfo
Definition: qwidget_p.h:784
QTransform lastEffectTransform
Definition: qwidget_p.h:994
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
Definition: qgraphicsview.h:64
static QWidgetMapper * mapper
Definition: qwidget_p.h:714
qint32 minh
Definition: qwidget_p.h:265
short basew
Definition: qwidget_p.h:178
uint posFromMove
Definition: qwidget_p.h:186
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
QWidgetBackingStore * operator->()
Definition: qwidget_p.h:137
struct OpaqueEventHandlerCallRef * EventHandlerCallRef
QGraphicsScene * scene() const
Returns the current scene for the item, or 0 if the item is not stored in a scene.
QWExtra * extraData() const
Definition: qwidget_p.h:999
QSet< QWidget * > m_widgets
Definition: qwidget_p.h:157
QString whatsThis
Definition: qwidget_p.h:734
quint16 customDpiX
Definition: qwidget_p.h:268
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
QPointer< QInputContext > ic
Definition: qwidget_p.h:717
QString statusTip
Definition: qwidget_p.h:731
The QInputContext class abstracts the input method dependent data and composing state.
Definition: qinputcontext.h:83
QWidgetBackingStoreTracker backingStore
Definition: qwidget_p.h:166
QIcon * icon
Definition: qwidget_p.h:164
QWidgetBackingStore * maybeBackingStore() const
Definition: qwidget_p.h:1036
bool nativeChildrenForced() const
Definition: qwidget_p.h:653
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
Definition: qrect.h:312
void setRedirected(QPaintDevice *replacement, const QPoint &offset)
Definition: qwidget_p.h:621
Orientation
Definition: qnamespace.h:174
static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir)
static int instanceCounter
Definition: qwidget_p.h:752
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
QString accessibleName
Definition: qwidget_p.h:737
QRegion opaqueChildren
Definition: qwidget_p.h:725
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
QWidgetBackingStore * m_ptr
Definition: qwidget_p.h:156
ulong syncRequestTimestamp
Definition: qwidget_p.h:203
bool operator==(QBool b1, bool b2)
Definition: qglobal.h:2023
uint sizeAdjusted
Definition: qwidget_p.h:187
void setFont_helper(const QFont &font)
Definition: qwidget_p.h:436
QWidgetPaintContext(QPaintDevice *d, const QRegion &r, const QPoint &o, int f, QPainter *p, QWidgetBackingStore *b)
Definition: qwidget_p.h:931
uint validWMState
Definition: qwidget_p.h:196
const QGraphicsItem * graphicsItem() const
Definition: qwidget_p.h:955
QRect effectiveRectFor(const QRect &rect) const
Definition: qwidget_p.h:658
uint waitingForMapNotify
Definition: qwidget_p.h:197
The QGraphicsEffect class is the base class for all graphics effects.
SubElement
This enum represents a sub-area of a widget.
Definition: qstyle.h:289
QPoint redirectOffset
Definition: qwidget_p.h:758
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
uint explicitMinSize
Definition: qwidget_p.h:273
struct OpaqueIconRef * IconRef
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
Qt::LayoutDirection direction
MouseButton
Definition: qnamespace.h:150
static int maxInstances
Definition: qwidget_p.h:753
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60