Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QMainWindowPrivate Class Reference
Inheritance diagram for QMainWindowPrivate:
QWidgetPrivate QObjectPrivate QObjectData

Public Functions

void adjustCursor (const QPoint &pos)
 
void init ()
 
 QMainWindowPrivate ()
 
QCursor separatorCursor (const QList< int > &path) const
 
- Public Functions inherited from QWidgetPrivate
void _q_showIfNotHidden ()
 
virtual void aboutToDestroy ()
 
void activateChildLayoutsRecursively ()
 
QSize adjustedSize () const
 
void adjustQuitOnCloseAttribute ()
 
QInputContextassignedInputContext () const
 
QPainterbeginSharedPainter ()
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool, bool includeFrame=false) const
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void clipToEffectiveMask (QRegion &region) const
 
bool close_helper (CloseMode mode)
 
void create_sys (WId window, bool initializeWindow, bool destroyOldWindow)
 
QWindowSurfacecreateDefaultWindowSurface ()
 
QWindowSurfacecreateDefaultWindowSurface_sys ()
 
void createExtra ()
 Creates the widget extra data. More...
 
void createRecursively ()
 
void createSysExtra ()
 
void createTLExtra ()
 
void createTLSysExtra ()
 
void createWinId (WId id=0)
 
void deactivateWidgetCleanup ()
 
void deleteExtra ()
 Deletes the widget extra data. More...
 
void deleteSysExtra ()
 
void deleteTLSysExtra ()
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter=0, QWidgetBackingStore *backingStore=0)
 
QWidgeteffectiveFocusWidget ()
 
QRect effectiveRectFor (const QRect &rect) const
 
bool endSharedPainter ()
 
void enforceNativeChildren ()
 
QWExtraextraData () const
 
QRect frameStrut () const
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
const QRegiongetOpaqueChildren () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
virtual bool hasHeightForWidth () const
 
void hide_helper ()
 
void hide_sys ()
 Platform-specific part of QWidget::hide(). More...
 
void hideChildren (bool spontaneous)
 
void inheritStyle ()
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
QInputContextinputContext () const
 
void invalidateBuffer (const QRegion &)
 Invalidates the rgn (in widget's coordinates) of the backing store, i.e. More...
 
void invalidateBuffer (const QRect &)
 This function is equivalent to calling invalidateBuffer(QRegion(rect), ...), but is more efficient as it eliminates QRegion operations/allocations and can use the rect more precisely for additional cut-offs. More...
 
void invalidateBuffer_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the buffer when the widget is resized. More...
 
void invalidateGraphicsEffectsRecursively ()
 
bool isAboutToShow () const
 
bool isBackgroundInherited () const
 
bool isOverlapped (const QRect &) const
 
void lower_sys ()
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QWidgetBackingStoremaybeBackingStore () const
 
QTLWExtramaybeTopData () const
 
void moveRect (const QRect &, int dx, int dy)
 
bool nativeChildrenForced () const
 
QFont naturalWidgetFont (uint inheritedMask) const
 
QPalette naturalWidgetPalette (uint inheritedMask) const
 Returns the palette that the widget w inherits from its ancestors and QApplication::palette. More...
 
void paintBackground (QPainter *, const QRegion &, int flags=DrawAsRoot) const
 
bool paintOnScreen () const
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore)
 
bool pointInsideRectAndMask (const QPoint &) const
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void propagatePaletteChange ()
 Propagate this widget's palette to all children, except style sheet widgets, and windows that don't enable window propagation (palettes don't normally propagate to windows). More...
 
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
void raise_sys ()
 
QPaintDeviceredirected (QPoint *offset) const
 
void registerDropSite (bool)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void repaint_sys (const QRegion &rgn)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void resolveFont ()
 Determine which font is implicitly imposed on this widget by its ancestors and QApplication::font, resolve this against its own font (attributes from the implicit font are copied over). More...
 
void resolveLayoutDirection ()
 
void resolveLocale ()
 
void resolvePalette ()
 Determine which palette is inherited from this widget's ancestors and QApplication::palette, resolve this against this widget's palette (attributes from the inherited palette are copied over this widget's palette). More...
 
void restoreRedirected ()
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void scrollChildren (int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void sendStartupMessage (const char *message) const
 Platform-specific part of QWidget::show(). More...
 
void setConstraints_sys ()
 
void setCursor_sys (const QCursor &cursor)
 
void setDirtyOpaqueRegion ()
 
void setEnabled_helper (bool)
 
void setFocus_sys ()
 
void setFont_helper (const QFont &font)
 
void setGeometry_sys (int, int, int, int, bool)
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=0)
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void setMask_sys (const QRegion &)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
void setModal_sys ()
 
void setNetWmWindowTypes ()
 
void setOpaque (bool opaque)
 
void setPalette_helper (const QPalette &)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
void setSharedPainter (QPainter *painter)
 
void setStyle_helper (QStyle *newStyle, bool propagate, bool metalHack=false)
 
void setUpdatesEnabled_helper (bool)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys (bool forceReset=false)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowOpacity_sys (qreal opacity)
 
void setWindowRole ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWinId (WId)
 
QPaintersharedPainter () const
 
void show_helper ()
 
void show_recursive ()
 Makes the widget visible in the isVisible() meaning of the word. More...
 
void show_sys ()
 Platform-specific part of QWidget::show(). More...
 
void showChildren (bool spontaneous)
 
void stackUnder_sys (QWidget *)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=0, bool alsoNonOpaque=false) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
QTLWExtratopData () const
 
void unsetCursor_sys ()
 
void updateFont (const QFont &)
 Assign font to this widget, and propagate it to all children, except style sheet widgets (handled differently) and windows that don't enable window propagation. More...
 
void updateFrameStrut ()
 Computes the frame rectangle when needed. More...
 
void updateGeometry_helper (bool forceUpdate)
 
void updateIsOpaque ()
 
void updateIsTranslucent ()
 
void updateSystemBackground ()
 
void updateX11AcceptFocus ()
 
void x11UpdateIsOpaque ()
 
 ~QWidgetPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Static Public Functions

static QMainWindowLayoutmainWindowLayout (const QMainWindow *mainWindow)
 
- Static Public Functions inherited from QWidgetPrivate
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=0)
 
static QGraphicsProxyWidgetnearestGraphicsProxyWidget (const QWidget *origin)
 Finds the nearest widget embedded in a graphics proxy widget along the chain formed by this widget and its ancestors. More...
 
static int pointToRect (const QPoint &p, const QRect &r)
 
static QRect screenGeometry (const QWidget *widget)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Public Variables

uint cursorAdjusted: 1
 
bool explicitIconSize
 
uint hasOldCursor: 1
 
QPoint hoverPos
 
QList< int > hoverSeparator
 
QSize iconSize
 
QMainWindowLayoutlayout
 
QCursor oldCursor
 
Qt::ToolButtonStyle toolButtonStyle
 
bool useHIToolBar
 
- Public Variables inherited from QWidgetPrivate
QString accessibleDescription
 
QString accessibleName
 
QList< QAction * > actions
 
QPalette::ColorRole bg_role: 8
 
signed char bottomLayoutItemMargin
 
short bottommargin
 
QWidgetData data
 
QRegion dirty
 
uint dirtyOpaqueChildren: 1
 
QWExtraextra
 
QPaintEngineextraPaintEngine
 
QPalette::ColorRole fg_role: 8
 
QWidgetfocus_child
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
QGraphicsEffectgraphicsEffect
 
Qt::HANDLE hd
 
uint high_attributes [4]
 
QPointer< QInputContextic
 
Qt::InputMethodHints imHints
 
uint inDirtyList: 1
 
uint inheritedFontResolveMask
 
uint inheritedPaletteResolveMask
 
uint inheritsInputMethodHints: 1
 
uint inSetParent: 1
 
uint isGLWidget: 1
 
uint isMoved: 1
 
uint isOpaque: 1
 
uint isScrolled: 1
 
QLayoutlayout
 
signed char leftLayoutItemMargin
 
short leftmargin
 
QLocale locale
 
QRegionneedsFlush
 
QRegion opaqueChildren
 
Qt::HANDLE picture
 
const QMetaObjectpolished
 
QPaintDeviceredirectDev
 
QPoint redirectOffset
 
signed char rightLayoutItemMargin
 
short rightmargin
 
QSizePolicy size_policy
 
QString statusTip
 
QString toolTip
 
signed char topLayoutItemMargin
 
short topmargin
 
uint usesDoubleBufferedGLContext: 1
 
QString whatsThis
 
QWidgetItemV2widgetItem
 
QX11Info xinfo
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
enum  CloseMode { CloseNoEvent, CloseWithEvent, CloseWithSpontaneousEvent }
 
enum  Direction { DirectionNorth = 0x01, DirectionEast = 0x10, DirectionSouth = 0x02, DirectionWest = 0x20 }
 
enum  DrawWidgetFlags {
  DrawAsRoot = 0x01, DrawPaintOnScreen = 0x02, DrawRecursive = 0x04, DrawInvisible = 0x08,
  DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, DontDrawOpaqueChildren = 0x40, DontDrawNativeChildren = 0x80
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Variables inherited from QWidgetPrivate
static QWidgetSetallWidgets = 0
 
static int instanceCounter = 0
 
static QWidgetkeyboardGrabber = 0
 
static QWidgetMappermapper = 0
 
static int maxInstances = 0
 
static QWidgetmouseGrabber = 0
 

Detailed Description

Definition at line 73 of file qmainwindow.cpp.

Constructors and Destructors

◆ QMainWindowPrivate()

QMainWindowPrivate::QMainWindowPrivate ( )
inline

Definition at line 77 of file qmainwindow.cpp.

79 #ifdef Q_WS_MAC
80  , useHIToolBar(false)
81 #endif
82 #if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
83  , hasOldCursor(false) , cursorAdjusted(false)
84 #endif
85  { }
QMainWindowLayout * layout
Definition: qmainwindow.cpp:86
Qt::ToolButtonStyle toolButtonStyle
Definition: qmainwindow.cpp:89

Functions

◆ adjustCursor()

void QMainWindowPrivate::adjustCursor ( const QPoint pos)

Definition at line 1350 of file qmainwindow.cpp.

1351 {
1352  Q_Q(QMainWindow);
1353 
1354  hoverPos = pos;
1355 
1356  if (pos == QPoint(0, 0)) {
1357  if (!hoverSeparator.isEmpty())
1360 
1361  if (cursorAdjusted) {
1362  cursorAdjusted = false;
1363  if (hasOldCursor)
1364  q->setCursor(oldCursor);
1365  else
1366  q->unsetCursor();
1367  }
1368  } else {
1369  QList<int> pathToSeparator
1371 
1372  if (pathToSeparator != hoverSeparator) {
1373  if (!hoverSeparator.isEmpty())
1375 
1376  hoverSeparator = pathToSeparator;
1377 
1378  if (hoverSeparator.isEmpty()) {
1379  if (cursorAdjusted) {
1380  cursorAdjusted = false;
1381  if (hasOldCursor)
1382  q->setCursor(oldCursor);
1383  else
1384  q->unsetCursor();
1385  }
1386  } else {
1388  if (!cursorAdjusted) {
1389  oldCursor = q->cursor();
1390  hasOldCursor = q->testAttribute(Qt::WA_SetCursor);
1391  }
1393  cursorAdjusted = false; //to not reset the oldCursor in event(CursorChange)
1394  q->setCursor(cursor);
1395  cursorAdjusted = true;
1396  }
1397  }
1398  }
1399 }
The QCursor class provides a mouse cursor with an arbitrary shape.
Definition: qcursor.h:89
QMainWindowLayoutState layoutState
QDockAreaLayout dockAreaLayout
QList< int > findSeparator(const QPoint &pos) const
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
#define Q_Q(Class)
Definition: qglobal.h:2483
QCursor separatorCursor(const QList< int > &path) const
void clear()
Removes all items from the list.
Definition: qlist.h:764
QRect separatorRect(int index) const
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QMainWindow class provides a main application window.
Definition: qmainwindow.h:63
QMainWindowLayout * layout
Definition: qmainwindow.cpp:86
QList< int > hoverSeparator
Definition: qmainwindow.cpp:94

◆ init()

void QMainWindowPrivate::init ( )

Definition at line 153 of file qmainwindow.cpp.

154 {
155  Q_Q(QMainWindow);
156 
157 #ifdef QT_EXPERIMENTAL_CLIENT_DECORATIONS
158  QGridLayout *topLayout = new QGridLayout(q);
159  topLayout->setContentsMargins(0, 0, 0, 0);
160 
161  layout = new QMainWindowLayout(q, topLayout);
162 
163  topLayout->addItem(layout, 1, 1);
164 #else
165  layout = new QMainWindowLayout(q, 0);
166 #endif
167 
168  const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q);
169  iconSize = QSize(metric, metric);
170  q->setAttribute(Qt::WA_Hover);
171 }
#define Q_Q(Class)
Definition: qglobal.h:2483
The QGridLayout class lays out widgets in a grid.
Definition: qgridlayout.h:60
The QMainWindow class provides a main application window.
Definition: qmainwindow.h:63
void setContentsMargins(int left, int top, int right, int bottom)
Sets the left, top, right, and bottom margins to use around the layout.
Definition: qlayout.cpp:502
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
QMainWindowLayout * layout
Definition: qmainwindow.cpp:86
void addItem(QLayoutItem *item, int row, int column, int rowSpan=1, int columnSpan=1, Qt::Alignment=0)
Adds item at position row, column, spanning rowSpan rows and columnSpan columns, and aligns it accord...

◆ mainWindowLayout()

static QMainWindowLayout* QMainWindowPrivate::mainWindowLayout ( const QMainWindow mainWindow)
inlinestatic

Definition at line 105 of file qmainwindow.cpp.

Referenced by qt_mainwindow_layout().

106  {
107  return mainWindow ? mainWindow->d_func()->layout : static_cast<QMainWindowLayout *>(0);
108  }
QLayout * layout() const
Returns the layout manager that is installed on this widget, or 0 if no layout manager is installed...
Definition: qwidget.cpp:10073

◆ separatorCursor()

QCursor QMainWindowPrivate::separatorCursor ( const QList< int > &  path) const

Definition at line 1326 of file qmainwindow.cpp.

1327 {
1329  Q_ASSERT(info != 0);
1330  if (path.size() == 1) { // is this the "top-level" separator which separates a dock area
1331  // from the central widget?
1332  switch (path.first()) {
1333  case QInternal::LeftDock:
1334  case QInternal::RightDock:
1335  return Qt::SplitHCursor;
1336  case QInternal::TopDock:
1337  case QInternal::BottomDock:
1338  return Qt::SplitVCursor;
1339  default:
1340  break;
1341  }
1342  }
1343 
1344  // no, it's a splitter inside a dock area, separating two dock widgets
1345 
1346  return info->o == Qt::Horizontal
1348 }
static mach_timebase_info_data_t info
QMainWindowLayoutState layoutState
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QDockAreaLayout dockAreaLayout
QDockAreaLayoutInfo * info(const QList< int > &path)
T & first()
Returns a reference to the first item in the list.
Definition: qlist.h:282
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QMainWindowLayout * layout
Definition: qmainwindow.cpp:86

Properties

◆ cursorAdjusted

uint QMainWindowPrivate::cursorAdjusted

Definition at line 102 of file qmainwindow.cpp.

◆ explicitIconSize

bool QMainWindowPrivate::explicitIconSize

Definition at line 88 of file qmainwindow.cpp.

◆ hasOldCursor

uint QMainWindowPrivate::hasOldCursor

Definition at line 101 of file qmainwindow.cpp.

◆ hoverPos

QPoint QMainWindowPrivate::hoverPos

Definition at line 95 of file qmainwindow.cpp.

◆ hoverSeparator

QList<int> QMainWindowPrivate::hoverSeparator

Definition at line 94 of file qmainwindow.cpp.

◆ iconSize

QSize QMainWindowPrivate::iconSize

Definition at line 87 of file qmainwindow.cpp.

Referenced by init().

◆ layout

QMainWindowLayout* QMainWindowPrivate::layout

Definition at line 86 of file qmainwindow.cpp.

Referenced by init().

◆ oldCursor

QCursor QMainWindowPrivate::oldCursor

Definition at line 100 of file qmainwindow.cpp.

◆ toolButtonStyle

Qt::ToolButtonStyle QMainWindowPrivate::toolButtonStyle

Definition at line 89 of file qmainwindow.cpp.

◆ useHIToolBar

bool QMainWindowPrivate::useHIToolBar

Definition at line 91 of file qmainwindow.cpp.


The documentation for this class was generated from the following file: