Qt 4.8
Public Functions | Public Variables | List of all members
QMdiAreaPrivate Class Reference

#include <qmdiarea_p.h>

Inheritance diagram for QMdiAreaPrivate:
QAbstractScrollAreaPrivate QFramePrivate QWidgetPrivate QObjectPrivate QObjectData

Public Functions

void _q_closeTab (int index)
 
void _q_currentTabChanged (int index)
 
void _q_deactivateAllWindows (QMdiSubWindow *aboutToActivate=0)
 
void _q_moveTab (int from, int to)
 
void _q_processWindowStateChanged (Qt::WindowStates oldState, Qt::WindowStates newState)
 
void activateCurrentWindow ()
 
void activateHighlightedWindow ()
 
void activateWindow (QMdiSubWindow *child)
 
void appendChild (QMdiSubWindow *child)
 
void arrangeMinimizedSubWindows ()
 Arranges all minimized windows at the bottom of the workspace. More...
 
void disconnectSubWindow (QObject *subWindow)
 
void emitWindowActivated (QMdiSubWindow *child)
 
void hideRubberBand ()
 
void highlightNextSubWindow (int increaseFactor)
 
void internalRaise (QMdiSubWindow *child) const
 
bool isExplicitlyDeactivated (QMdiSubWindow *subWindow) const
 
bool lastWindowAboutToBeDestroyed () const
 
QMdiSubWindownextVisibleSubWindow (int increaseFactor, QMdiArea::WindowOrder, int removed=-1, int fromIndex=-1) const
 
void place (QMdi::Placer *placer, QMdiSubWindow *child)
 
 QMdiAreaPrivate ()
 
void rearrange (QMdi::Rearranger *rearranger)
 
void refreshTabBar ()
 
void resetActiveWindow (QMdiSubWindow *child=0)
 
QRect resizeToMinimumTileSize (const QSize &minSubWindowSize, int subWindowCount)
 
void scrollBarPolicyChanged (Qt::Orientation, Qt::ScrollBarPolicy)
 
bool scrollBarsEnabled () const
 
void setActive (QMdiSubWindow *subWindow, bool active=true, bool changeFocus=true) const
 
void setChildActivationEnabled (bool enable=true, bool onlyNextActivationEvent=false) const
 
void setViewMode (QMdiArea::ViewMode mode)
 
void showRubberBandFor (QMdiSubWindow *subWindow)
 
void startResizeTimer ()
 
void startTabToPreviousTimer ()
 
QList< QMdiSubWindow * > subWindowList (QMdiArea::WindowOrder, bool reversed=false) const
 
void updateActiveWindow (int removedIndex, bool activeRemoved)
 
void updateScrollBars ()
 
void updateTabBarGeometry ()
 
bool windowStaysOnTop (QMdiSubWindow *subWindow) const
 
- Public Functions inherited from QAbstractScrollAreaPrivate
void _q_hslide (int)
 
void _q_showOrHideScrollBars ()
 
void _q_vslide (int)
 
virtual QPoint contentsOffset () const
 
void init ()
 
void layoutChildren ()
 
 QAbstractScrollAreaPrivate ()
 
void replaceScrollBar (QScrollBar *scrollBar, Qt::Orientation orientation)
 
void setSingleFingerPanEnabled (bool on=true)
 
bool viewportEvent (QEvent *event)
 
- Public Functions inherited from QFramePrivate
void init ()
 
 QFramePrivate ()
 
void updateFrameWidth ()
 Updated the frameWidth parameter. More...
 
void updateStyledFrameWidths ()
 Updates the frame widths from the style. More...
 
- 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
 

Public Variables

QPointer< QMdiSubWindowaboutToBecomeActive
 
QMdiArea::WindowOrder activationOrder
 
QPointer< QMdiSubWindowactive
 
QBrush background
 
QMdi::Rearrangercascader
 
QList< QPointer< QMdiSubWindow > > childWindows
 
bool documentMode
 
QMdi::RearrangericonTiler
 
bool ignoreGeometryChange
 
bool ignoreWindowStateChange
 
int indexToHighlighted
 
int indexToLastActiveTab
 
int indexToNextWindow
 
int indexToPreviousWindow
 
QList< int > indicesToActivatedChildren
 
bool inViewModeChange
 
bool isActivated
 
bool isSubWindowsTiled
 
QMdiArea::AreaOptions options
 
QList< QPointer< QMdiSubWindow > > pendingPlacements
 
QList< QMdi::Rearranger * > pendingRearrangements
 
QMdi::Placerplacer
 
QMdi::RearrangerregularTiler
 
int resizeTimerId
 
QRubberBandrubberBand
 
bool showActiveWindowMaximized
 
QMdiAreaTabBartabBar
 
QTabWidget::TabPosition tabPosition
 
bool tabsClosable
 
QTabWidget::TabShape tabShape
 
bool tabsMovable
 
int tabToPreviousTimerId
 
bool tileCalledFromResizeEvent
 
bool updatesDisabledByUs
 
QMdiArea::ViewMode viewMode
 
- Public Variables inherited from QAbstractScrollAreaPrivate
int bottom
 
QRect cornerPaintingRect
 
QWidgetcornerWidget
 
QScrollBarhbar
 
Qt::ScrollBarPolicy hbarpolicy
 
int left
 
QRect reverseCornerPaintingRect
 
int right
 
QAbstractScrollAreaScrollBarContainerscrollBarContainers [Qt::Vertical+1]
 
bool singleFingerPanEnabled
 
int top
 
QScrollBarvbar
 
Qt::ScrollBarPolicy vbarpolicy
 
QWidgetviewport
 
QScopedPointer< QObjectviewportFilter
 
int xoffset
 
int yoffset
 
- Public Variables inherited from QFramePrivate
short bottomFrameWidth
 
int frameStyle
 
short frameWidth
 
QRect frect
 
short leftFrameWidth
 
short lineWidth
 
short midLineWidth
 
short rightFrameWidth
 
short topFrameWidth
 
- 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 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)
 
- 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 141 of file qmdiarea_p.h.

Constructors and Destructors

◆ QMdiAreaPrivate()

QMdiAreaPrivate::QMdiAreaPrivate ( )
Warning
This function is not part of the public interface.

Definition at line 695 of file qmdiarea.cpp.

696  : cascader(0),
697  regularTiler(0),
698  iconTiler(0),
699  placer(0),
700 #ifndef QT_NO_RUBBERBAND
701  rubberBand(0),
702 #endif
703 #ifndef QT_NO_TABBAR
704  tabBar(0),
705 #endif
708 #ifndef QT_NO_TABBAR
709  documentMode(false),
710  tabsClosable(false),
711  tabsMovable(false),
712 #endif
713 #ifndef QT_NO_TABWIDGET
716 #endif
717  ignoreGeometryChange(false),
719  isActivated(false),
720  isSubWindowsTiled(false),
723  updatesDisabledByUs(false),
724  inViewModeChange(false),
725  indexToNextWindow(-1),
727  indexToHighlighted(-1),
729  resizeTimerId(-1),
731 {
732 }
bool updatesDisabledByUs
Definition: qmdiarea_p.h:181
QMdi::Rearranger * regularTiler
Definition: qmdiarea_p.h:149
bool showActiveWindowMaximized
Definition: qmdiarea_p.h:179
int indexToHighlighted
Definition: qmdiarea_p.h:185
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
bool ignoreWindowStateChange
Definition: qmdiarea_p.h:176
QMdiArea::ViewMode viewMode
Definition: qmdiarea_p.h:165
int indexToPreviousWindow
Definition: qmdiarea_p.h:184
bool tileCalledFromResizeEvent
Definition: qmdiarea_p.h:180
QMdi::Rearranger * cascader
Definition: qmdiarea_p.h:148
bool ignoreGeometryChange
Definition: qmdiarea_p.h:175
QTabWidget::TabShape tabShape
Definition: qmdiarea_p.h:172
QRubberBand * rubberBand
Definition: qmdiarea_p.h:153
QMdi::Rearranger * iconTiler
Definition: qmdiarea_p.h:150
bool isSubWindowsTiled
Definition: qmdiarea_p.h:178
bool inViewModeChange
Definition: qmdiarea_p.h:182
QTabWidget::TabPosition tabPosition
Definition: qmdiarea_p.h:173
QMdi::Placer * placer
Definition: qmdiarea_p.h:151
QMdiArea::WindowOrder activationOrder
Definition: qmdiarea_p.h:163
int indexToLastActiveTab
Definition: qmdiarea_p.h:186
int tabToPreviousTimerId
Definition: qmdiarea_p.h:188

Functions

◆ _q_closeTab()

void QMdiAreaPrivate::_q_closeTab ( int  index)

Definition at line 830 of file qmdiarea.cpp.

Referenced by setViewMode().

831 {
832 #ifdef QT_NO_TABBAR
833  Q_UNUSED(index);
834 #else
835  QMdiSubWindow *subWindow = childWindows.at(index);
836  Q_ASSERT(subWindow);
837  subWindow->close();
838 #endif // QT_NO_TABBAR
839 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
quint16 index
bool close()
Closes this widget.
Definition: qwidget.cpp:8305
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ _q_currentTabChanged()

void QMdiAreaPrivate::_q_currentTabChanged ( int  index)

Definition at line 806 of file qmdiarea.cpp.

Referenced by setViewMode().

807 {
808 #ifdef QT_NO_TABBAR
809  Q_UNUSED(index);
810 #else
811  if (!tabBar || index < 0)
812  return;
813 
814  // If the previous active sub-window was hidden, disable the tab.
815  if (indexToLastActiveTab >= 0 && indexToLastActiveTab < tabBar->count()
818  if (lastActive && lastActive->isHidden())
820  }
821 
824  QMdiSubWindow *subWindow = childWindows.at(index);
825  Q_ASSERT(subWindow);
826  activateWindow(subWindow);
827 #endif // QT_NO_TABBAR
828 }
void activateWindow(QMdiSubWindow *child)
Definition: qmdiarea.cpp:1022
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isHidden() const
Returns true if the widget is hidden, otherwise returns false.
Definition: qwidget.h:1008
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
void setTabEnabled(int index, bool)
If enabled is true then the tab at position index is enabled; otherwise the item at position index is...
Definition: qtabbar.cpp:989
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
quint16 index
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
int indexToLastActiveTab
Definition: qmdiarea_p.h:186
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ _q_deactivateAllWindows()

void QMdiAreaPrivate::_q_deactivateAllWindows ( QMdiSubWindow aboutToActivate = 0)
Warning
This function is not part of the public interface.

Definition at line 737 of file qmdiarea.cpp.

Referenced by appendChild(), and emitWindowActivated().

738 {
740  return;
741 
742  Q_Q(QMdiArea);
743  if (!aboutToActivate)
745  else
746  aboutToBecomeActive = aboutToActivate;
747  Q_ASSERT(aboutToBecomeActive);
748 
749  foreach (QMdiSubWindow *child, childWindows) {
750  if (!sanityCheck(child, "QMdiArea::deactivateAllWindows") || aboutToBecomeActive == child)
751  continue;
752  // We don't want to handle signals caused by child->showNormal().
755  showActiveWindowMaximized = child->isMaximized() && child->isVisible();
756  if (showActiveWindowMaximized && child->isMaximized()) {
757  if (q->updatesEnabled()) {
758  updatesDisabledByUs = true;
759  q->setUpdatesEnabled(false);
760  }
761  child->showNormal();
762  }
763  if (child->isMinimized() && !child->isShaded() && !windowStaysOnTop(child))
764  child->lower();
765  ignoreWindowStateChange = false;
766  child->d_func()->setActive(false);
767  }
768 }
T qobject_cast(QObject *object)
Definition: qobject.h:375
bool updatesDisabledByUs
Definition: qmdiarea_p.h:181
QPointer< QMdiSubWindow > aboutToBecomeActive
Definition: qmdiarea_p.h:161
bool showActiveWindowMaximized
Definition: qmdiarea_p.h:179
QMdiArea::AreaOptions options
Definition: qmdiarea_p.h:164
bool isVisible() const
Definition: qwidget.h:1005
bool ignoreWindowStateChange
Definition: qmdiarea_p.h:176
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void showNormal()
Restores the widget after it has been maximized or minimized.
Definition: qwidget.cpp:3250
#define Q_Q(Class)
Definition: qglobal.h:2483
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
Definition: qmdiarea.cpp:198
void lower()
Lowers the widget to the bottom of the parent widget&#39;s stack.
Definition: qwidget.cpp:11939
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
bool isShaded() const
Returns true if this window is shaded; otherwise returns false.
bool windowStaysOnTop(QMdiSubWindow *subWindow) const
Definition: qmdiarea_p.h:242
bool isMaximized() const
Definition: qwidget.cpp:3074
bool isMinimized() const
Definition: qwidget.cpp:3027
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ _q_moveTab()

void QMdiAreaPrivate::_q_moveTab ( int  from,
int  to 
)

Definition at line 841 of file qmdiarea.cpp.

Referenced by setViewMode().

842 {
843 #ifdef QT_NO_TABBAR
844  Q_UNUSED(from);
845  Q_UNUSED(to);
846 #else
847  childWindows.move(from, to);
848 #endif // QT_NO_TABBAR
849 }
void move(int from, int to)
Moves the item at index position from to index position to.
Definition: qlist.h:628
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ _q_processWindowStateChanged()

void QMdiAreaPrivate::_q_processWindowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)
Warning
This function is not part of the public interface.

Definition at line 773 of file qmdiarea.cpp.

Referenced by appendChild().

775 {
777  return;
778 
779  Q_Q(QMdiArea);
780  QMdiSubWindow *child = qobject_cast<QMdiSubWindow *>(q->sender());
781  if (!child)
782  return;
783 
784  // windowActivated
785  if (!(oldState & Qt::WindowActive) && (newState & Qt::WindowActive))
786  emitWindowActivated(child);
787  // windowDeactivated
788  else if ((oldState & Qt::WindowActive) && !(newState & Qt::WindowActive))
789  resetActiveWindow(child);
790 
791  // windowMinimized
792  if (!(oldState & Qt::WindowMinimized) && (newState & Qt::WindowMinimized)) {
793  isSubWindowsTiled = false;
795  // windowMaximized
796  } else if (!(oldState & Qt::WindowMaximized) && (newState & Qt::WindowMaximized)) {
797  internalRaise(child);
798  // windowRestored
799  } else if (!(newState & (Qt::WindowMaximized | Qt::WindowMinimized))) {
800  internalRaise(child);
801  if (oldState & Qt::WindowMinimized)
803  }
804 }
T qobject_cast(QObject *object)
Definition: qobject.h:375
bool ignoreWindowStateChange
Definition: qmdiarea_p.h:176
void internalRaise(QMdiSubWindow *child) const
Definition: qmdiarea.cpp:1267
#define Q_Q(Class)
Definition: qglobal.h:2483
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
void resetActiveWindow(QMdiSubWindow *child=0)
Definition: qmdiarea.cpp:1126
void arrangeMinimizedSubWindows()
Arranges all minimized windows at the bottom of the workspace.
Definition: qmdiarea.cpp:1012
bool isSubWindowsTiled
Definition: qmdiarea_p.h:178
void emitWindowActivated(QMdiSubWindow *child)
Definition: qmdiarea.cpp:1074
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ activateCurrentWindow()

void QMdiAreaPrivate::activateCurrentWindow ( )
Warning
This function is not part of the public interface.

Definition at line 1047 of file qmdiarea.cpp.

1048 {
1049  QMdiSubWindow *current = q_func()->currentSubWindow();
1050  if (current && !isExplicitlyDeactivated(current)) {
1051  current->d_func()->activationEnabled = true;
1052  current->d_func()->setActive(true, /*changeFocus=*/false);
1053  }
1054 }
bool isExplicitlyDeactivated(QMdiSubWindow *subWindow) const
Definition: qmdiarea_p.h:249
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ activateHighlightedWindow()

void QMdiAreaPrivate::activateHighlightedWindow ( )

Definition at line 1056 of file qmdiarea.cpp.

1057 {
1058  if (indexToHighlighted < 0)
1059  return;
1060 
1062  if (tabToPreviousTimerId != -1)
1064  else
1066 #ifndef QT_NO_RUBBERBAND
1067  hideRubberBand();
1068 #endif
1069 }
void activateWindow(QMdiSubWindow *child)
Definition: qmdiarea.cpp:1022
int indexToHighlighted
Definition: qmdiarea_p.h:185
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QMdiSubWindow * nextVisibleSubWindow(int increaseFactor, QMdiArea::WindowOrder, int removed=-1, int fromIndex=-1) const
Definition: qmdiarea.cpp:1469
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
void hideRubberBand()
Definition: qmdiarea_p.h:272
int tabToPreviousTimerId
Definition: qmdiarea_p.h:188

◆ activateWindow()

void QMdiAreaPrivate::activateWindow ( QMdiSubWindow child)
Warning
This function is not part of the public interface.

Definition at line 1022 of file qmdiarea.cpp.

Referenced by _q_currentTabChanged(), activateHighlightedWindow(), and updateActiveWindow().

1023 {
1024  if (childWindows.isEmpty()) {
1025  Q_ASSERT(!child);
1026  Q_ASSERT(!active);
1027  return;
1028  }
1029 
1030  if (!child) {
1031  if (active) {
1032  Q_ASSERT(active->d_func()->isActive);
1033  active->d_func()->setActive(false);
1035  }
1036  return;
1037  }
1038 
1039  if (child->isHidden() || child == active)
1040  return;
1041  child->d_func()->setActive(true);
1042 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
bool isHidden() const
Returns true if the widget is hidden, otherwise returns false.
Definition: qwidget.h:1008
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160
void resetActiveWindow(QMdiSubWindow *child=0)
Definition: qmdiarea.cpp:1126

◆ appendChild()

void QMdiAreaPrivate::appendChild ( QMdiSubWindow child)
Warning
This function is not part of the public interface.

Definition at line 854 of file qmdiarea.cpp.

855 {
856  Q_Q(QMdiArea);
857  Q_ASSERT(child && childWindows.indexOf(child) == -1);
858 
859  if (child->parent() != viewport)
860  child->setParent(viewport, child->windowFlags());
862 
863  if (!child->testAttribute(Qt::WA_Resized) && q->isVisible()) {
864  QSize newSize(child->sizeHint().boundedTo(viewport->size()));
865  child->resize(newSize.expandedTo(qSmartMinSize(child)));
866  }
867 
868  if (!placer)
869  placer = new MinOverlapPlacer;
870  place(placer, child);
871 
874  else
876 
879  else
881 
882  internalRaise(child);
885 
886 #ifndef QT_NO_TABBAR
887  if (tabBar) {
888  tabBar->addTab(child->windowIcon(), tabTextFor(child));
892  }
893 #endif
894 
895  if (!(child->windowFlags() & Qt::SubWindow))
897  child->installEventFilter(q);
898 
899  QObject::connect(child, SIGNAL(aboutToActivate()), q, SLOT(_q_deactivateAllWindows()));
900  QObject::connect(child, SIGNAL(windowStateChanged(Qt::WindowStates,Qt::WindowStates)),
901  q, SLOT(_q_processWindowStateChanged(Qt::WindowStates,Qt::WindowStates)));
902 }
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
Q_GUI_EXPORT QSize qSmartMinSize(const QSize &sizeHint, const QSize &minSizeHint, const QSize &minSize, const QSize &maxSize, const QSizePolicy &sizePolicy)
bool showActiveWindowMaximized
Definition: qmdiarea_p.h:179
QMdiArea::AreaOptions options
Definition: qmdiarea_p.h:164
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
QSize sizeHint() const
Reimplemented Function
#define SLOT(a)
Definition: qobjectdefs.h:226
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void setOption(SubWindowOption option, bool on=true)
If on is true, option is enabled on the subwindow; otherwise it is disabled.
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void internalRaise(QMdiSubWindow *child) const
Definition: qmdiarea.cpp:1267
QSize boundedTo(const QSize &) const
Returns a size holding the minimum width and height of this size and the given otherSize.
Definition: qsize.h:192
#define Q_Q(Class)
Definition: qglobal.h:2483
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QIcon windowIcon() const
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
void setWindowFlags(Qt::WindowFlags type)
Definition: qwidget.cpp:10399
QSize size
the size of the widget excluding any window frame
Definition: qwidget.h:165
void place(QMdi::Placer *placer, QMdiSubWindow *child)
Definition: qmdiarea.cpp:907
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
void resize(int w, int h)
This corresponds to resize(QSize(w, h)).
Definition: qwidget.h:1014
QList< int > indicesToActivatedChildren
Definition: qmdiarea_p.h:159
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
Definition: qobject.cpp:2070
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
void _q_deactivateAllWindows(QMdiSubWindow *aboutToActivate=0)
Definition: qmdiarea.cpp:737
void _q_processWindowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState)
Definition: qmdiarea.cpp:773
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
void updateTabBarGeometry()
Definition: qmdiarea.cpp:1641
static QString tabTextFor(QMdiSubWindow *subWindow)
Definition: qmdiarea.cpp:289
int addTab(const QString &text)
Adds a new tab with text text.
Definition: qtabbar.cpp:819
QMdi::Placer * placer
Definition: qmdiarea_p.h:151

◆ arrangeMinimizedSubWindows()

void QMdiAreaPrivate::arrangeMinimizedSubWindows ( )

Arranges all minimized windows at the bottom of the workspace.

Warning
This function is not part of the public interface.

Definition at line 1012 of file qmdiarea.cpp.

Referenced by _q_processWindowStateChanged().

1013 {
1014  if (!iconTiler)
1015  iconTiler = new IconTiler;
1017 }
void rearrange(QMdi::Rearranger *rearranger)
Definition: qmdiarea.cpp:945
QMdi::Rearranger * iconTiler
Definition: qmdiarea_p.h:150

◆ disconnectSubWindow()

void QMdiAreaPrivate::disconnectSubWindow ( QObject subWindow)
Warning
This function is not part of the public interface.

Definition at line 1456 of file qmdiarea.cpp.

1457 {
1458  if (!subWindow)
1459  return;
1460 
1461  Q_Q(QMdiArea);
1462  QObject::disconnect(subWindow, 0, q, 0);
1463  subWindow->removeEventFilter(q);
1464 }
void removeEventFilter(QObject *)
Removes an event filter object obj from this object.
Definition: qobject.cpp:2099
#define Q_Q(Class)
Definition: qglobal.h:2483
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895

◆ emitWindowActivated()

void QMdiAreaPrivate::emitWindowActivated ( QMdiSubWindow activeWindow)
Warning
This function is not part of the public interface.

Definition at line 1074 of file qmdiarea.cpp.

Referenced by _q_processWindowStateChanged().

1075 {
1076  Q_Q(QMdiArea);
1077  Q_ASSERT(activeWindow);
1078  if (activeWindow == active)
1079  return;
1080  Q_ASSERT(activeWindow->d_func()->isActive);
1081 
1082  if (!aboutToBecomeActive)
1083  _q_deactivateAllWindows(activeWindow);
1085 
1086  // This is true only if 'DontMaximizeSubWindowOnActivation' is disabled
1087  // and the previous active window was maximized.
1089  if (!activeWindow->isMaximized())
1090  activeWindow->showMaximized();
1091  showActiveWindowMaximized = false;
1092  }
1093 
1094  // Put in front to update activation order.
1095  const int indexToActiveWindow = childWindows.indexOf(activeWindow);
1096  Q_ASSERT(indexToActiveWindow != -1);
1097  const int index = indicesToActivatedChildren.indexOf(indexToActiveWindow);
1098  Q_ASSERT(index != -1);
1099  indicesToActivatedChildren.move(index, 0);
1100  internalRaise(activeWindow);
1101 
1102  if (updatesDisabledByUs) {
1103  q->setUpdatesEnabled(true);
1104  updatesDisabledByUs = false;
1105  }
1106 
1107  Q_ASSERT(aboutToBecomeActive == activeWindow);
1108  active = activeWindow;
1109  aboutToBecomeActive = 0;
1110  Q_ASSERT(active->d_func()->isActive);
1111 
1112 #ifndef QT_NO_TABBAR
1113  if (tabBar && tabBar->currentIndex() != indexToActiveWindow)
1114  tabBar->setCurrentIndex(indexToActiveWindow);
1115 #endif
1116 
1117  if (active->isMaximized() && scrollBarsEnabled())
1118  updateScrollBars();
1119 
1120  emit q->subWindowActivated(active);
1121 }
void showMaximized()
Shows the widget maximized.
Definition: qwidget.cpp:3218
bool updatesDisabledByUs
Definition: qmdiarea_p.h:181
QPointer< QMdiSubWindow > aboutToBecomeActive
Definition: qmdiarea_p.h:161
bool showActiveWindowMaximized
Definition: qmdiarea_p.h:179
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
void setCurrentIndex(int index)
Definition: qtabbar.cpp:1238
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void internalRaise(QMdiSubWindow *child) const
Definition: qmdiarea.cpp:1267
#define Q_Q(Class)
Definition: qglobal.h:2483
void move(int from, int to)
Moves the item at index position from to index position to.
Definition: qlist.h:628
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
bool scrollBarsEnabled() const
Definition: qmdiarea.cpp:1354
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
#define emit
Definition: qobjectdefs.h:76
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160
bool isMaximized() const
Definition: qwidget.cpp:3074
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
QList< int > indicesToActivatedChildren
Definition: qmdiarea_p.h:159
void _q_deactivateAllWindows(QMdiSubWindow *aboutToActivate=0)
Definition: qmdiarea.cpp:737
quint16 index
void updateScrollBars()
Definition: qmdiarea.cpp:1201
int currentIndex() const

◆ hideRubberBand()

void QMdiAreaPrivate::hideRubberBand ( )
inline

Definition at line 272 of file qmdiarea_p.h.

Referenced by activateHighlightedWindow(), and updateActiveWindow().

273  {
274  if (rubberBand && rubberBand->isVisible())
275  rubberBand->hide();
276  indexToHighlighted = -1;
277  }
int indexToHighlighted
Definition: qmdiarea_p.h:185
bool isVisible() const
Definition: qwidget.h:1005
void hide()
Hides the widget.
Definition: qwidget.h:501
QRubberBand * rubberBand
Definition: qmdiarea_p.h:153

◆ highlightNextSubWindow()

void QMdiAreaPrivate::highlightNextSubWindow ( int  increaseFactor)
Warning
This function is not part of the public interface.

Definition at line 1523 of file qmdiarea.cpp.

1524 {
1525  if (childWindows.size() == 1)
1526  return;
1527 
1528  Q_Q(QMdiArea);
1529  // There's no highlighted sub-window atm, use current.
1530  if (indexToHighlighted < 0) {
1531  QMdiSubWindow *current = q->currentSubWindow();
1532  if (!current)
1533  return;
1535  }
1536 
1539 
1540  QMdiSubWindow *highlight = nextVisibleSubWindow(increaseFactor, activationOrder, -1, indexToHighlighted);
1541  if (!highlight)
1542  return;
1543 
1544 #ifndef QT_NO_RUBBERBAND
1545  if (!rubberBand) {
1547  // For accessibility to identify this special widget.
1548  rubberBand->setObjectName(QLatin1String("qt_rubberband"));
1550  }
1551 #endif
1552 
1553  // Only highlight if we're not switching back to the previously active window (Ctrl-Tab once).
1554 #ifndef QT_NO_RUBBERBAND
1555  if (tabToPreviousTimerId == -1)
1556  showRubberBandFor(highlight);
1557 #endif
1558 
1561 }
int indexToHighlighted
Definition: qmdiarea_p.h:185
void showRubberBandFor(QMdiSubWindow *subWindow)
Definition: qmdiarea_p.h:263
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
#define Q_Q(Class)
Definition: qglobal.h:2483
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
void setWindowFlags(Qt::WindowFlags type)
Definition: qwidget.cpp:10399
QRubberBand * rubberBand
Definition: qmdiarea_p.h:153
QMdiSubWindow * nextVisibleSubWindow(int increaseFactor, QMdiArea::WindowOrder, int removed=-1, int fromIndex=-1) const
Definition: qmdiarea.cpp:1469
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary...
Definition: qrubberband.h:58
QMdiArea::WindowOrder activationOrder
Definition: qmdiarea_p.h:163
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60
int tabToPreviousTimerId
Definition: qmdiarea_p.h:188

◆ internalRaise()

void QMdiAreaPrivate::internalRaise ( QMdiSubWindow mdiChild) const
Warning
This function is not part of the public interface.

Definition at line 1267 of file qmdiarea.cpp.

Referenced by _q_processWindowStateChanged(), appendChild(), and emitWindowActivated().

1268 {
1269  if (!sanityCheck(mdiChild, "QMdiArea::internalRaise") || childWindows.size() < 2)
1270  return;
1271 
1272  QMdiSubWindow *stackUnderChild = 0;
1273  if (!windowStaysOnTop(mdiChild)) {
1274  foreach (QObject *object, viewport->children()) {
1275  QMdiSubWindow *child = qobject_cast<QMdiSubWindow *>(object);
1276  if (!child || !childWindows.contains(child))
1277  continue;
1278  if (!child->isHidden() && windowStaysOnTop(child)) {
1279  if (stackUnderChild)
1280  child->stackUnder(stackUnderChild);
1281  else
1282  child->raise();
1283  stackUnderChild = child;
1284  }
1285  }
1286  }
1287 
1288  if (stackUnderChild)
1289  mdiChild->stackUnder(stackUnderChild);
1290  else
1291  mdiChild->raise();
1292 }
T qobject_cast(QObject *object)
Definition: qobject.h:375
void stackUnder(QWidget *)
Places the widget under w in the parent widget&#39;s stack.
Definition: qwidget.cpp:11972
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
bool isHidden() const
Returns true if the widget is hidden, otherwise returns false.
Definition: qwidget.h:1008
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
Definition: qmdiarea.cpp:198
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
void raise()
Raises this widget to the top of the parent widget&#39;s stack.
Definition: qwidget.cpp:11901
bool windowStaysOnTop(QMdiSubWindow *subWindow) const
Definition: qmdiarea_p.h:242
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
const QObjectList & children() const
Returns a list of child objects.
Definition: qobject.h:197
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ isExplicitlyDeactivated()

bool QMdiAreaPrivate::isExplicitlyDeactivated ( QMdiSubWindow subWindow) const
inline

Definition at line 249 of file qmdiarea_p.h.

Referenced by activateCurrentWindow(), and resetActiveWindow().

250  {
251  if (!subWindow)
252  return true;
253  return subWindow->d_func()->isExplicitlyDeactivated;
254  }

◆ lastWindowAboutToBeDestroyed()

bool QMdiAreaPrivate::lastWindowAboutToBeDestroyed ( ) const
Warning
This function is not part of the public interface.

Definition at line 1362 of file qmdiarea.cpp.

Referenced by resetActiveWindow().

1363 {
1364  if (childWindows.count() != 1)
1365  return false;
1366 
1367  QMdiSubWindow *last = childWindows.at(0);
1368  if (!last)
1369  return true;
1370 
1371  if (!last->testAttribute(Qt::WA_DeleteOnClose))
1372  return false;
1373 
1374  return last->d_func()->data.is_closing;
1375 }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ nextVisibleSubWindow()

QMdiSubWindow * QMdiAreaPrivate::nextVisibleSubWindow ( int  increaseFactor,
QMdiArea::WindowOrder  order,
int  removedIndex = -1,
int  fromIndex = -1 
) const
Warning
This function is not part of the public interface.

Definition at line 1469 of file qmdiarea.cpp.

Referenced by activateHighlightedWindow(), highlightNextSubWindow(), and updateActiveWindow().

1471 {
1472  if (childWindows.isEmpty())
1473  return 0;
1474 
1475  Q_Q(const QMdiArea);
1476  const QList<QMdiSubWindow *> subWindows = q->subWindowList(order);
1477  QMdiSubWindow *current = 0;
1478 
1479  if (removedIndex < 0) {
1480  if (fromIndex >= 0 && fromIndex < subWindows.size())
1481  current = childWindows.at(fromIndex);
1482  else
1483  current = q->currentSubWindow();
1484  }
1485 
1486  // There's no current sub-window (removed or deactivated),
1487  // so we have to pick the last active or the next in creation order.
1488  if (!current) {
1489  if (removedIndex >= 0 && order == QMdiArea::CreationOrder) {
1490  int candidateIndex = -1;
1491  setIndex(&candidateIndex, removedIndex, 0, subWindows.size() - 1, true);
1492  current = childWindows.at(candidateIndex);
1493  } else {
1494  current = subWindows.back();
1495  }
1496  }
1497  Q_ASSERT(current);
1498 
1499  // Find the index for the current sub-window in the given activation order
1500  const int indexToCurrent = subWindows.indexOf(current);
1501  const bool increasing = increaseFactor > 0 ? true : false;
1502 
1503  // and use that index + increseFactor as a candidate.
1504  int index = -1;
1505  setIndex(&index, indexToCurrent + increaseFactor, 0, subWindows.size() - 1, increasing);
1506  Q_ASSERT(index != -1);
1507 
1508  // Try to find another window if the candidate is hidden.
1509  while (subWindows.at(index)->isHidden()) {
1510  setIndex(&index, index + increaseFactor, 0, subWindows.size() - 1, increasing);
1511  if (index == indexToCurrent)
1512  break;
1513  }
1514 
1515  if (!subWindows.at(index)->isHidden())
1516  return subWindows.at(index);
1517  return 0;
1518 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
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
bool isHidden() const
Returns true if the widget is hidden, otherwise returns false.
Definition: qwidget.h:1008
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
T & back()
This function is provided for STL compatibility.
Definition: qlist.h:300
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
static void setIndex(int *index, int candidate, int min, int max, bool isIncreasing)
Definition: qmdiarea.cpp:226
quint16 index
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ place()

void QMdiAreaPrivate::place ( QMdi::Placer placer,
QMdiSubWindow child 
)
Warning
This function is not part of the public interface.

Definition at line 907 of file qmdiarea.cpp.

Referenced by appendChild().

908 {
909  if (!placer || !child)
910  return;
911 
912  Q_Q(QMdiArea);
913  if (!q->isVisible()) {
914  // The window is only laid out when it's added to QMdiArea,
915  // so there's no need to check that we don't have it in the
916  // list already. appendChild() ensures that.
917  pendingPlacements.append(child);
918  return;
919  }
920 
921  QList<QRect> rects;
922  QRect parentRect = q->rect();
923  foreach (QMdiSubWindow *window, childWindows) {
924  if (!sanityCheck(window, "QMdiArea::place") || window == child || !window->isVisibleTo(q)
925  || !window->testAttribute(Qt::WA_Moved)) {
926  continue;
927  }
928  QRect occupiedGeometry;
929  if (window->isMaximized()) {
930  occupiedGeometry = QRect(window->d_func()->oldGeometry.topLeft(),
931  window->d_func()->restoreSize);
932  } else {
933  occupiedGeometry = window->geometry();
934  }
935  rects.append(QStyle::visualRect(child->layoutDirection(), parentRect, occupiedGeometry));
936  }
937  QPoint newPos = placer->place(child->size(), rects, parentRect);
938  QRect newGeometry = QRect(newPos.x(), newPos.y(), child->width(), child->height());
939  child->setGeometry(QStyle::visualRect(child->layoutDirection(), parentRect, newGeometry));
940 }
QSize size() const
bool isVisibleTo(QWidget *) const
Returns true if this widget would become visible if ancestor is shown; otherwise returns false...
Definition: qwidget.cpp:8371
QList< QPointer< QMdiSubWindow > > pendingPlacements
Definition: qmdiarea_p.h:157
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
int height() const
#define Q_Q(Class)
Definition: qglobal.h:2483
virtual QPoint place(const QSize &size, const QList< QRect > &rects, const QRect &domain) const =0
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
NSWindow * window
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
Definition: qmdiarea.cpp:198
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
int width() const
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
bool isMaximized() const
Definition: qwidget.cpp:3074
static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction...
Definition: qstyle.cpp:2087
Qt::LayoutDirection layoutDirection() const
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128
const QRect & geometry() const
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ rearrange()

void QMdiAreaPrivate::rearrange ( QMdi::Rearranger rearranger)
Warning
This function is not part of the public interface.

Definition at line 945 of file qmdiarea.cpp.

Referenced by arrangeMinimizedSubWindows().

946 {
947  if (!rearranger)
948  return;
949 
950  Q_Q(QMdiArea);
951  if (!q->isVisible()) {
952  // Compress if we already have the rearranger in the list.
953  int index = pendingRearrangements.indexOf(rearranger);
954  if (index != -1)
956  else
957  pendingRearrangements.append(rearranger);
958  return;
959  }
960 
961  QList<QWidget *> widgets;
962  const bool reverseList = rearranger->type() == Rearranger::RegularTiler;
963  const QList<QMdiSubWindow *> subWindows = subWindowList(activationOrder, reverseList);
964  QSize minSubWindowSize;
965  foreach (QMdiSubWindow *child, subWindows) {
966  if (!sanityCheck(child, "QMdiArea::rearrange") || !child->isVisible())
967  continue;
968  if (rearranger->type() == Rearranger::IconTiler) {
969  if (child->isMinimized() && !child->isShaded() && !(child->windowFlags() & Qt::FramelessWindowHint))
970  widgets.append(child);
971  } else {
972  if (child->isMinimized() && !child->isShaded())
973  continue;
974  if (child->isMaximized() || child->isShaded())
975  child->showNormal();
976  minSubWindowSize = minSubWindowSize.expandedTo(child->minimumSize())
977  .expandedTo(child->d_func()->internalMinimumSize);
978  widgets.append(child);
979  }
980  }
981 
982  if (active && rearranger->type() == Rearranger::RegularTiler) {
983  // Move active window in front if necessary. That's the case if we
984  // have any windows with staysOnTopHint set.
985  int indexToActive = widgets.indexOf((QWidget *)active);
986  if (indexToActive > 0)
987  widgets.move(indexToActive, 0);
988  }
989 
990  QRect domain = viewport->rect();
991  if (rearranger->type() == Rearranger::RegularTiler && !widgets.isEmpty())
992  domain = resizeToMinimumTileSize(minSubWindowSize, widgets.count());
993 
994  rearranger->rearrange(widgets, domain);
995 
996  if (rearranger->type() == Rearranger::RegularTiler && !widgets.isEmpty()) {
997  isSubWindowsTiled = true;
999  } else if (rearranger->type() == Rearranger::SimpleCascader) {
1000  isSubWindowsTiled = false;
1001  }
1002 }
QList< QMdi::Rearranger * > pendingRearrangements
Definition: qmdiarea_p.h:156
bool isVisible() const
Definition: qwidget.h:1005
virtual void rearrange(QList< QWidget *> &widgets, const QRect &domain) const =0
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
QSize expandedTo(const QSize &) const
Returns a size holding the maximum width and height of this size and the given otherSize.
Definition: qsize.h:187
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void showNormal()
Restores the widget after it has been maximized or minimized.
Definition: qwidget.cpp:3250
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
void move(int from, int to)
Moves the item at index position from to index position to.
Definition: qlist.h:628
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
Definition: qmdiarea.cpp:198
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
bool isShaded() const
Returns true if this window is shaded; otherwise returns false.
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160
virtual Type type() const =0
bool isMaximized() const
Definition: qwidget.cpp:3074
QList< QMdiSubWindow * > subWindowList(QMdiArea::WindowOrder, bool reversed=false) const
Definition: qmdiarea.cpp:1413
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
QRect rect
the internal geometry of the widget excluding any window frame
Definition: qwidget.h:168
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QSize minimumSize() const
quint16 index
bool isMinimized() const
Definition: qwidget.cpp:3027
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
void updateScrollBars()
Definition: qmdiarea.cpp:1201
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
QRect resizeToMinimumTileSize(const QSize &minSubWindowSize, int subWindowCount)
Definition: qmdiarea.cpp:1294
bool isSubWindowsTiled
Definition: qmdiarea_p.h:178
QMdiArea::WindowOrder activationOrder
Definition: qmdiarea_p.h:163
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ refreshTabBar()

void QMdiAreaPrivate::refreshTabBar ( )
Warning
This function is not part of the public interface.

Definition at line 1696 of file qmdiarea.cpp.

1697 {
1698  if (!tabBar)
1699  return;
1700 
1704 #ifndef QT_NO_TABWIDGET
1706 #endif
1708 }
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
void setTabsClosable(bool closable)
Definition: qtabbar.cpp:2158
void setDocumentMode(bool set)
Definition: qtabbar.cpp:2325
void setShape(Shape shape)
Definition: qtabbar.cpp:778
void setMovable(bool movable)
Definition: qtabbar.cpp:2299
QTabWidget::TabShape tabShape
Definition: qmdiarea_p.h:172
static QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
Definition: qmdiarea.cpp:274
void updateTabBarGeometry()
Definition: qmdiarea.cpp:1641
QTabWidget::TabPosition tabPosition
Definition: qmdiarea_p.h:173

◆ resetActiveWindow()

void QMdiAreaPrivate::resetActiveWindow ( QMdiSubWindow deactivatedWindow = 0)
Warning
This function is not part of the public interface.

Definition at line 1126 of file qmdiarea.cpp.

Referenced by _q_processWindowStateChanged(), activateWindow(), and updateActiveWindow().

1127 {
1128  Q_Q(QMdiArea);
1129  if (deactivatedWindow) {
1130  if (deactivatedWindow != active)
1131  return;
1132  active = 0;
1134  && !isExplicitlyDeactivated(deactivatedWindow) && !q->window()->isMinimized()) {
1135  return;
1136  }
1137  emit q->subWindowActivated(0);
1138  return;
1139  }
1140 
1141  if (aboutToBecomeActive)
1142  return;
1143 
1144  active = 0;
1145  emit q->subWindowActivated(0);
1146 }
QPointer< QMdiSubWindow > aboutToBecomeActive
Definition: qmdiarea_p.h:161
bool lastWindowAboutToBeDestroyed() const
Definition: qmdiarea.cpp:1362
#define Q_Q(Class)
Definition: qglobal.h:2483
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
#define emit
Definition: qobjectdefs.h:76
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160
bool isExplicitlyDeactivated(QMdiSubWindow *subWindow) const
Definition: qmdiarea_p.h:249

◆ resizeToMinimumTileSize()

QRect QMdiAreaPrivate::resizeToMinimumTileSize ( const QSize minSubWindowSize,
int  subWindowCount 
)

Definition at line 1294 of file qmdiarea.cpp.

Referenced by rearrange().

1295 {
1296  Q_Q(QMdiArea);
1297  if (!minSubWindowSize.isValid() || subWindowCount <= 0)
1298  return viewport->rect();
1299 
1300  // Calculate minimum size.
1301  const int columns = qMax(qCeil(qSqrt(qreal(subWindowCount))), 1);
1302  const int rows = qMax((subWindowCount % columns) ? (subWindowCount / columns + 1)
1303  : (subWindowCount / columns), 1);
1304  const int minWidth = minSubWindowSize.width() * columns;
1305  const int minHeight = minSubWindowSize.height() * rows;
1306 
1307  // Increase area size if necessary. Scroll bars are provided if we're not able
1308  // to resize to the minimum size.
1310  QWidget *topLevel = q;
1311  // Find the topLevel for this area, either a real top-level or a sub-window.
1312  while (topLevel && !topLevel->isWindow() && topLevel->windowType() != Qt::SubWindow)
1313  topLevel = topLevel->parentWidget();
1314  // We don't want sub-subwindows to be placed at the edge, thus add 2 pixels.
1315  int minAreaWidth = minWidth + left + right + 2;
1316  int minAreaHeight = minHeight + top + bottom + 2;
1317  if (hbar->isVisible())
1318  minAreaHeight += hbar->height();
1319  if (vbar->isVisible())
1320  minAreaWidth += vbar->width();
1321  if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, 0, q)) {
1322  const int frame = q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, q);
1323  minAreaWidth += 2 * frame;
1324  minAreaHeight += 2 * frame;
1325  }
1326  const QSize diff = QSize(minAreaWidth, minAreaHeight).expandedTo(q->size()) - q->size();
1327  topLevel->resize(topLevel->size() + diff);
1328  }
1329 
1330  QRect domain = viewport->rect();
1331 
1332  // Adjust domain width and provide horizontal scroll bar.
1333  if (domain.width() < minWidth) {
1334  domain.setWidth(minWidth);
1336  q->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
1337  else
1338  hbar->setValue(0);
1339  }
1340  // Adjust domain height and provide vertical scroll bar.
1341  if (domain.height() < minHeight) {
1342  domain.setHeight(minHeight);
1344  q->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
1345  else
1346  vbar->setValue(0);
1347  }
1348  return domain;
1349 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
void setHeight(int h)
Sets the height of the rectangle to the given height.
Definition: qrect.h:445
double qreal
Definition: qglobal.h:1193
int qCeil(qreal v)
Definition: qmath.h:63
bool isWindow() const
Returns true if the widget is an independent window, otherwise returns false.
Definition: qwidget.h:945
bool isVisible() const
Definition: qwidget.h:1005
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
QSize expandedTo(const QSize &) const
Returns a size holding the maximum width and height of this size and the given otherSize.
Definition: qsize.h:187
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int height() const
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
int width() const
Returns the width.
Definition: qsize.h:126
bool tileCalledFromResizeEvent
Definition: qmdiarea_p.h:180
int width() const
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
static Bigint * diff(Bigint *a, Bigint *b)
QSize size
the size of the widget excluding any window frame
Definition: qwidget.h:165
void resize(int w, int h)
This corresponds to resize(QSize(w, h)).
Definition: qwidget.h:1014
QRect rect
the internal geometry of the widget excluding any window frame
Definition: qwidget.h:168
void setWidth(int w)
Sets the width of the rectangle to the given width.
Definition: qrect.h:442
int height() const
Returns the height.
Definition: qsize.h:129
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
Definition: qsize.h:123
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
Qt::WindowType windowType() const
Returns the window type of this widget.
Definition: qwidget.h:937
qreal qSqrt(qreal v)
Definition: qmath.h:205

◆ scrollBarPolicyChanged()

void QMdiAreaPrivate::scrollBarPolicyChanged ( Qt::Orientation  orientation,
Qt::ScrollBarPolicy  policy 
)
virtual
Warning
This function is not part of the public interface. Reimplemented Function

Reimplemented from QAbstractScrollAreaPrivate.

Definition at line 1396 of file qmdiarea.cpp.

1397 {
1398  if (childWindows.isEmpty())
1399  return;
1400 
1401  const QMdiSubWindow::SubWindowOption option = orientation == Qt::Horizontal ?
1403  const bool enable = policy != Qt::ScrollBarAlwaysOff;
1404  foreach (QMdiSubWindow *child, childWindows) {
1405  if (!sanityCheck(child, "QMdiArea::scrollBarPolicyChanged"))
1406  continue;
1407  child->setOption(option, enable);
1408  }
1409  updateScrollBars();
1410 }
void setOption(SubWindowOption option, bool on=true)
If on is true, option is enabled on the subwindow; otherwise it is disabled.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
static bool sanityCheck(const QMdiSubWindow *const child, const char *where)
Definition: qmdiarea.cpp:198
void updateScrollBars()
Definition: qmdiarea.cpp:1201
SubWindowOption
This enum describes options that customize the behavior of QMdiSubWindow.
Definition: qmdisubwindow.h:66
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ scrollBarsEnabled()

bool QMdiAreaPrivate::scrollBarsEnabled ( ) const
Warning
This function is not part of the public interface.

Definition at line 1354 of file qmdiarea.cpp.

Referenced by emitWindowActivated(), and updateScrollBars().

◆ setActive()

void QMdiAreaPrivate::setActive ( QMdiSubWindow subWindow,
bool  active = true,
bool  changeFocus = true 
) const
inline

Definition at line 256 of file qmdiarea_p.h.

257  {
258  if (subWindow)
259  subWindow->d_func()->setActive(active, changeFocus);
260  }
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160

◆ setChildActivationEnabled()

void QMdiAreaPrivate::setChildActivationEnabled ( bool  enable = true,
bool  onlyNextActivationEvent = false 
) const
Warning
This function is not part of the public interface.

Definition at line 1380 of file qmdiarea.cpp.

1381 {
1382  foreach (QMdiSubWindow *subWindow, childWindows) {
1383  if (!subWindow || !subWindow->isVisible())
1384  continue;
1385  if (onlyNextActivationEvent)
1386  subWindow->d_func()->ignoreNextActivationEvent = !enable;
1387  else
1388  subWindow->d_func()->activationEnabled = enable;
1389  }
1390 }
bool isVisible() const
Definition: qwidget.h:1005
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ setViewMode()

void QMdiAreaPrivate::setViewMode ( QMdiArea::ViewMode  mode)
Warning
This function is not part of the public interface.
Since
4.4

Definition at line 1567 of file qmdiarea.cpp.

1568 {
1569  Q_Q(QMdiArea);
1570  if (viewMode == mode || inViewModeChange)
1571  return;
1572 
1573  // Just a guard since we cannot set viewMode = mode here.
1574  inViewModeChange = true;
1575 
1576 #ifndef QT_NO_TABBAR
1577  if (mode == QMdiArea::TabbedView) {
1578  Q_ASSERT(!tabBar);
1579  tabBar = new QMdiAreaTabBar(q);
1583 #ifndef QT_NO_TABWIDGET
1585 #endif
1586 
1587  isSubWindowsTiled = false;
1588 
1589  foreach (QMdiSubWindow *subWindow, childWindows)
1590  tabBar->addTab(subWindow->windowIcon(), tabTextFor(subWindow));
1591 
1592  QMdiSubWindow *current = q->currentSubWindow();
1593  if (current) {
1595  // Restore sub-window (i.e. cleanup buttons in menu bar and window title).
1596  if (current->isMaximized())
1597  current->showNormal();
1598 
1599  viewMode = mode;
1600 
1601  // Now, maximize it.
1602  if (!q->testOption(QMdiArea::DontMaximizeSubWindowOnActivation)) {
1603  current->showMaximized();
1604  }
1605  } else {
1606  viewMode = mode;
1607  }
1608 
1609  if (q->isVisible())
1610  tabBar->show();
1612 
1613  QObject::connect(tabBar, SIGNAL(currentChanged(int)), q, SLOT(_q_currentTabChanged(int)));
1614  QObject::connect(tabBar, SIGNAL(tabCloseRequested(int)), q, SLOT(_q_closeTab(int)));
1615  QObject::connect(tabBar, SIGNAL(tabMoved(int,int)), q, SLOT(_q_moveTab(int,int)));
1616  } else
1617 #endif // QT_NO_TABBAR
1618  { // SubWindowView
1619 #ifndef QT_NO_TABBAR
1620  delete tabBar;
1621  tabBar = 0;
1622 #endif // QT_NO_TABBAR
1623 
1624  viewMode = mode;
1625  q->setViewportMargins(0, 0, 0, 0);
1626  indexToLastActiveTab = -1;
1627 
1628  QMdiSubWindow *current = q->currentSubWindow();
1629  if (current && current->isMaximized())
1630  current->showNormal();
1631  }
1632 
1633  Q_ASSERT(viewMode == mode);
1634  inViewModeChange = false;
1635 }
void showMaximized()
Shows the widget maximized.
Definition: qwidget.cpp:3218
void _q_closeTab(int index)
Definition: qmdiarea.cpp:830
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
#define SLOT(a)
Definition: qobjectdefs.h:226
void setCurrentIndex(int index)
Definition: qtabbar.cpp:1238
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void showNormal()
Restores the widget after it has been maximized or minimized.
Definition: qwidget.cpp:3250
QMdiArea::ViewMode viewMode
Definition: qmdiarea_p.h:165
#define Q_Q(Class)
Definition: qglobal.h:2483
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
#define SIGNAL(a)
Definition: qobjectdefs.h:227
QIcon windowIcon() const
void _q_currentTabChanged(int index)
Definition: qmdiarea.cpp:806
void setTabsClosable(bool closable)
Definition: qtabbar.cpp:2158
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
void setDocumentMode(bool set)
Definition: qtabbar.cpp:2325
void setShape(Shape shape)
Definition: qtabbar.cpp:778
void show()
Shows the widget and its child widgets.
void setMovable(bool movable)
Definition: qtabbar.cpp:2299
QTabWidget::TabShape tabShape
Definition: qmdiarea_p.h:172
bool isMaximized() const
Definition: qwidget.cpp:3074
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
static QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
Definition: qmdiarea.cpp:274
void _q_moveTab(int from, int to)
Definition: qmdiarea.cpp:841
void updateTabBarGeometry()
Definition: qmdiarea.cpp:1641
bool isSubWindowsTiled
Definition: qmdiarea_p.h:178
bool inViewModeChange
Definition: qmdiarea_p.h:182
static QString tabTextFor(QMdiSubWindow *subWindow)
Definition: qmdiarea.cpp:289
QTabWidget::TabPosition tabPosition
Definition: qmdiarea_p.h:173
int addTab(const QString &text)
Adds a new tab with text text.
Definition: qtabbar.cpp:819
int indexToLastActiveTab
Definition: qmdiarea_p.h:186
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ showRubberBandFor()

void QMdiAreaPrivate::showRubberBandFor ( QMdiSubWindow subWindow)
inline

Definition at line 263 of file qmdiarea_p.h.

Referenced by highlightNextSubWindow().

264  {
265  if (!subWindow || !rubberBand)
266  return;
267  rubberBand->setGeometry(subWindow->geometry());
268  rubberBand->raise();
269  rubberBand->show();
270  }
void setGeometry(const QRect &r)
Sets the geometry of the rubber band to rect, specified in the coordinate system of its parent widget...
void raise()
Raises this widget to the top of the parent widget&#39;s stack.
Definition: qwidget.cpp:11901
void show()
Shows the widget and its child widgets.
QRubberBand * rubberBand
Definition: qmdiarea_p.h:153
const QRect & geometry() const

◆ startResizeTimer()

void QMdiAreaPrivate::startResizeTimer ( )
inline

Definition at line 226 of file qmdiarea_p.h.

227  {
228  Q_Q(QMdiArea);
229  if (resizeTimerId > 0)
230  q->killTimer(resizeTimerId);
231  resizeTimerId = q->startTimer(200);
232  }
#define Q_Q(Class)
Definition: qglobal.h:2483
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59

◆ startTabToPreviousTimer()

void QMdiAreaPrivate::startTabToPreviousTimer ( )
inline

Definition at line 234 of file qmdiarea_p.h.

235  {
236  Q_Q(QMdiArea);
237  if (tabToPreviousTimerId > 0)
238  q->killTimer(tabToPreviousTimerId);
240  }
static int keyboardInputInterval()
#define Q_Q(Class)
Definition: qglobal.h:2483
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
int tabToPreviousTimerId
Definition: qmdiarea_p.h:188

◆ subWindowList()

QList< QMdiSubWindow * > QMdiAreaPrivate::subWindowList ( QMdiArea::WindowOrder  order,
bool  reversed = false 
) const

Definition at line 1413 of file qmdiarea.cpp.

Referenced by rearrange().

1414 {
1416  if (childWindows.isEmpty())
1417  return list;
1418 
1419  if (order == QMdiArea::CreationOrder) {
1420  foreach (QMdiSubWindow *child, childWindows) {
1421  if (!child)
1422  continue;
1423  if (!reversed)
1424  list.append(child);
1425  else
1426  list.prepend(child);
1427  }
1428  } else if (order == QMdiArea::StackingOrder) {
1429  foreach (QObject *object, viewport->children()) {
1430  QMdiSubWindow *child = qobject_cast<QMdiSubWindow *>(object);
1431  if (!child || !childWindows.contains(child))
1432  continue;
1433  if (!reversed)
1434  list.append(child);
1435  else
1436  list.prepend(child);
1437  }
1438  } else { // ActivationHistoryOrder
1440  for (int i = indicesToActivatedChildren.count() - 1; i >= 0; --i) {
1442  if (!child)
1443  continue;
1444  if (!reversed)
1445  list.append(child);
1446  else
1447  list.prepend(child);
1448  }
1449  }
1450  return list;
1451 }
T qobject_cast(QObject *object)
Definition: qobject.h:375
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QList< int > indicesToActivatedChildren
Definition: qmdiarea_p.h:159
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
const QObjectList & children() const
Returns a list of child objects.
Definition: qobject.h:197
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ updateActiveWindow()

void QMdiAreaPrivate::updateActiveWindow ( int  removedIndex,
bool  activeRemoved 
)
Warning
This function is not part of the public interface.

Definition at line 1151 of file qmdiarea.cpp.

1152 {
1154 
1155 #ifndef QT_NO_TABBAR
1156  if (tabBar && removedIndex >= 0) {
1157  tabBar->blockSignals(true);
1158  tabBar->removeTab(removedIndex);
1160  tabBar->blockSignals(false);
1161  }
1162 #endif
1163 
1164  if (childWindows.isEmpty()) {
1165  showActiveWindowMaximized = false;
1167  return;
1168  }
1169 
1170  if (indexToHighlighted >= 0) {
1171 #ifndef QT_NO_RUBBERBAND
1172  // Hide rubber band if highlighted window is removed.
1173  if (indexToHighlighted == removedIndex)
1174  hideRubberBand();
1175  else
1176 #endif
1177  // or update index if necessary.
1178  if (indexToHighlighted > removedIndex)
1180  }
1181 
1182  // Update indices list
1183  for (int i = 0; i < indicesToActivatedChildren.size(); ++i) {
1184  int *index = &indicesToActivatedChildren[i];
1185  if (*index > removedIndex)
1186  --*index;
1187  }
1188 
1189  if (!activeRemoved)
1190  return;
1191 
1192  // Activate next window.
1193  QMdiSubWindow *next = nextVisibleSubWindow(0, activationOrder, removedIndex);
1194  if (next)
1195  activateWindow(next);
1196 }
void activateWindow(QMdiSubWindow *child)
Definition: qmdiarea.cpp:1022
bool blockSignals(bool b)
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke...
Definition: qobject.cpp:1406
bool showActiveWindowMaximized
Definition: qmdiarea_p.h:179
int indexToHighlighted
Definition: qmdiarea_p.h:185
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void removeTab(int index)
Removes the tab at position index.
Definition: qtabbar.cpp:902
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
QList< QPointer< QMdiSubWindow > > childWindows
Definition: qmdiarea_p.h:158
QMdiSubWindow * nextVisibleSubWindow(int increaseFactor, QMdiArea::WindowOrder, int removed=-1, int fromIndex=-1) const
Definition: qmdiarea.cpp:1469
QList< int > indicesToActivatedChildren
Definition: qmdiarea_p.h:159
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
void resetActiveWindow(QMdiSubWindow *child=0)
Definition: qmdiarea.cpp:1126
quint16 index
void hideRubberBand()
Definition: qmdiarea_p.h:272
void updateTabBarGeometry()
Definition: qmdiarea.cpp:1641
QMdiArea::WindowOrder activationOrder
Definition: qmdiarea_p.h:163
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Definition: qmdisubwindow.h:60

◆ updateScrollBars()

void QMdiAreaPrivate::updateScrollBars ( )
Warning
This function is not part of the public interface.

Definition at line 1201 of file qmdiarea.cpp.

Referenced by emitWindowActivated(), rearrange(), and scrollBarPolicyChanged().

1202 {
1204  return;
1205 
1206  Q_Q(QMdiArea);
1207  QSize maxSize = q->maximumViewportSize();
1208  QSize hbarExtent = hbar->sizeHint();
1209  QSize vbarExtent = vbar->sizeHint();
1210 
1211  if (q->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, 0, q)) {
1212  const int doubleFrameWidth = frameWidth * 2;
1214  maxSize.rheight() -= doubleFrameWidth;
1216  maxSize.rwidth() -= doubleFrameWidth;
1217  hbarExtent.rheight() += doubleFrameWidth;
1218  vbarExtent.rwidth() += doubleFrameWidth;
1219  }
1220 
1221  const QRect childrenRect = active && active->isMaximized()
1223  bool useHorizontalScrollBar = useScrollBar(childrenRect, maxSize, Qt::Horizontal);
1224  bool useVerticalScrollBar = useScrollBar(childrenRect, maxSize, Qt::Vertical);
1225 
1226  if (useHorizontalScrollBar && !useVerticalScrollBar) {
1227  const QSize max = maxSize - QSize(0, hbarExtent.height());
1228  useVerticalScrollBar = useScrollBar(childrenRect, max, Qt::Vertical);
1229  }
1230 
1231  if (useVerticalScrollBar && !useHorizontalScrollBar) {
1232  const QSize max = maxSize - QSize(vbarExtent.width(), 0);
1233  useHorizontalScrollBar = useScrollBar(childrenRect, max, Qt::Horizontal);
1234  }
1235 
1236  if (useHorizontalScrollBar && hbarpolicy != Qt::ScrollBarAlwaysOn)
1237  maxSize.rheight() -= hbarExtent.height();
1238  if (useVerticalScrollBar && vbarpolicy != Qt::ScrollBarAlwaysOn)
1239  maxSize.rwidth() -= vbarExtent.width();
1240 
1241  QRect viewportRect(QPoint(0, 0), maxSize);
1242  const int startX = q->isLeftToRight() ? childrenRect.left() : viewportRect.right()
1243  - childrenRect.right();
1244 
1245  // Horizontal scroll bar.
1246  if (isSubWindowsTiled && hbar->value() != 0)
1247  hbar->setValue(0);
1248  const int xOffset = startX + hbar->value();
1249  hbar->setRange(qMin(0, xOffset),
1250  qMax(0, xOffset + childrenRect.width() - viewportRect.width()));
1251  hbar->setPageStep(childrenRect.width());
1252  hbar->setSingleStep(childrenRect.width() / 20);
1253 
1254  // Vertical scroll bar.
1255  if (isSubWindowsTiled && vbar->value() != 0)
1256  vbar->setValue(0);
1257  const int yOffset = childrenRect.top() + vbar->value();
1258  vbar->setRange(qMin(0, yOffset),
1259  qMax(0, yOffset + childrenRect.height() - viewportRect.height()));
1260  vbar->setPageStep(childrenRect.height());
1261  vbar->setSingleStep(childrenRect.height() / 20);
1262 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
QRect childrenRect
the bounding rectangle of the widget&#39;s children
Definition: qwidget.h:169
int left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:240
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
void setRange(int min, int max)
Sets the slider&#39;s minimum to min and its maximum to max.
#define Q_Q(Class)
Definition: qglobal.h:2483
int width() const
Returns the width.
Definition: qsize.h:126
int value() const
short frameWidth
Definition: qframe_p.h:74
bool scrollBarsEnabled() const
Definition: qmdiarea.cpp:1354
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
QPointer< QMdiSubWindow > active
Definition: qmdiarea_p.h:160
bool ignoreGeometryChange
Definition: qmdiarea_p.h:175
static bool useScrollBar(const QRect &childrenRect, const QSize &maxViewportSize, Qt::Orientation orientation)
Definition: qmdiarea.cpp:245
bool isMaximized() const
Definition: qwidget.cpp:3074
int top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:243
int right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:246
QSize sizeHint() const
Reimplemented Function
Definition: qscrollbar.cpp:490
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
int & rheight()
Returns a reference to the height.
Definition: qsize.h:144
int height() const
Returns the height.
Definition: qsize.h:129
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
bool isSubWindowsTiled
Definition: qmdiarea_p.h:178
const QRect & geometry() const
int & rwidth()
Returns a reference to the width.
Definition: qsize.h:141

◆ updateTabBarGeometry()

void QMdiAreaPrivate::updateTabBarGeometry ( )
Warning
This function is not part of the public interface.

Definition at line 1641 of file qmdiarea.cpp.

Referenced by appendChild(), refreshTabBar(), setViewMode(), and updateActiveWindow().

1642 {
1643  if (!tabBar)
1644  return;
1645 
1646  Q_Q(QMdiArea);
1647 #ifndef QT_NO_TABWIDGET
1649 #endif
1650  const QSize tabBarSizeHint = tabBar->sizeHint();
1651 
1652  int areaHeight = q->height();
1653  if (hbar && hbar->isVisible())
1654  areaHeight -= hbar->height();
1655 
1656  int areaWidth = q->width();
1657  if (vbar && vbar->isVisible())
1658  areaWidth -= vbar->width();
1659 
1660  QRect tabBarRect;
1661 #ifndef QT_NO_TABWIDGET
1662  switch (tabPosition) {
1663  case QTabWidget::North:
1664  q->setViewportMargins(0, tabBarSizeHint.height(), 0, 0);
1665  tabBarRect = QRect(0, 0, areaWidth, tabBarSizeHint.height());
1666  break;
1667  case QTabWidget::South:
1668  q->setViewportMargins(0, 0, 0, tabBarSizeHint.height());
1669  tabBarRect = QRect(0, areaHeight - tabBarSizeHint.height(), areaWidth, tabBarSizeHint.height());
1670  break;
1671  case QTabWidget::East:
1672  if (q->layoutDirection() == Qt::LeftToRight)
1673  q->setViewportMargins(0, 0, tabBarSizeHint.width(), 0);
1674  else
1675  q->setViewportMargins(tabBarSizeHint.width(), 0, 0, 0);
1676  tabBarRect = QRect(areaWidth - tabBarSizeHint.width(), 0, tabBarSizeHint.width(), areaHeight);
1677  break;
1678  case QTabWidget::West:
1679  if (q->layoutDirection() == Qt::LeftToRight)
1680  q->setViewportMargins(tabBarSizeHint.width(), 0, 0, 0);
1681  else
1682  q->setViewportMargins(0, 0, tabBarSizeHint.width(), 0);
1683  tabBarRect = QRect(0, 0, tabBarSizeHint.width(), areaHeight);
1684  break;
1685  default:
1686  break;
1687  }
1688 #endif // QT_NO_TABWIDGET
1689 
1690  tabBar->setGeometry(QStyle::visualRect(q->layoutDirection(), q->contentsRect(), tabBarRect));
1691 }
bool isVisible() const
Definition: qwidget.h:1005
QMdiAreaTabBar * tabBar
Definition: qmdiarea_p.h:155
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QSize sizeHint() const
em>Reimplemented Function
Definition: qtabbar.cpp:1317
int height() const
#define Q_Q(Class)
Definition: qglobal.h:2483
int width() const
The QMdiArea widget provides an area in which MDI windows are displayed.
Definition: qmdiarea.h:59
QTabWidget::TabShape tabShape
Definition: qmdiarea_p.h:172
static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction...
Definition: qstyle.cpp:2087
int height() const
Returns the height.
Definition: qsize.h:129
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
static QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
Definition: qmdiarea.cpp:274
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
Shape shape() const
QTabWidget::TabPosition tabPosition
Definition: qmdiarea_p.h:173

◆ windowStaysOnTop()

bool QMdiAreaPrivate::windowStaysOnTop ( QMdiSubWindow subWindow) const
inline

Definition at line 242 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and internalRaise().

243  {
244  if (!subWindow)
245  return false;
246  return subWindow->windowFlags() & Qt::WindowStaysOnTopHint;
247  }
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939

Properties

◆ aboutToBecomeActive

QPointer<QMdiSubWindow> QMdiAreaPrivate::aboutToBecomeActive

Definition at line 161 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), emitWindowActivated(), and resetActiveWindow().

◆ activationOrder

QMdiArea::WindowOrder QMdiAreaPrivate::activationOrder

Definition at line 163 of file qmdiarea_p.h.

Referenced by highlightNextSubWindow(), rearrange(), and updateActiveWindow().

◆ active

QPointer<QMdiSubWindow> QMdiAreaPrivate::active

◆ background

QBrush QMdiAreaPrivate::background

Definition at line 162 of file qmdiarea_p.h.

◆ cascader

QMdi::Rearranger* QMdiAreaPrivate::cascader

Definition at line 148 of file qmdiarea_p.h.

◆ childWindows

QList< QPointer<QMdiSubWindow> > QMdiAreaPrivate::childWindows

◆ documentMode

bool QMdiAreaPrivate::documentMode

Definition at line 167 of file qmdiarea_p.h.

Referenced by refreshTabBar(), and setViewMode().

◆ iconTiler

QMdi::Rearranger* QMdiAreaPrivate::iconTiler

Definition at line 150 of file qmdiarea_p.h.

Referenced by arrangeMinimizedSubWindows().

◆ ignoreGeometryChange

bool QMdiAreaPrivate::ignoreGeometryChange

Definition at line 175 of file qmdiarea_p.h.

Referenced by updateScrollBars().

◆ ignoreWindowStateChange

bool QMdiAreaPrivate::ignoreWindowStateChange

Definition at line 176 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and _q_processWindowStateChanged().

◆ indexToHighlighted

int QMdiAreaPrivate::indexToHighlighted

◆ indexToLastActiveTab

int QMdiAreaPrivate::indexToLastActiveTab

Definition at line 186 of file qmdiarea_p.h.

Referenced by _q_currentTabChanged(), and setViewMode().

◆ indexToNextWindow

int QMdiAreaPrivate::indexToNextWindow

Definition at line 183 of file qmdiarea_p.h.

◆ indexToPreviousWindow

int QMdiAreaPrivate::indexToPreviousWindow

Definition at line 184 of file qmdiarea_p.h.

◆ indicesToActivatedChildren

QList<int> QMdiAreaPrivate::indicesToActivatedChildren

Definition at line 159 of file qmdiarea_p.h.

Referenced by appendChild(), emitWindowActivated(), subWindowList(), and updateActiveWindow().

◆ inViewModeChange

bool QMdiAreaPrivate::inViewModeChange

Definition at line 182 of file qmdiarea_p.h.

Referenced by setViewMode().

◆ isActivated

bool QMdiAreaPrivate::isActivated

Definition at line 177 of file qmdiarea_p.h.

Referenced by resetActiveWindow().

◆ isSubWindowsTiled

bool QMdiAreaPrivate::isSubWindowsTiled

◆ options

QMdiArea::AreaOptions QMdiAreaPrivate::options

Definition at line 164 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and appendChild().

◆ pendingPlacements

QList< QPointer<QMdiSubWindow> > QMdiAreaPrivate::pendingPlacements

Definition at line 157 of file qmdiarea_p.h.

Referenced by place().

◆ pendingRearrangements

QList<QMdi::Rearranger *> QMdiAreaPrivate::pendingRearrangements

Definition at line 156 of file qmdiarea_p.h.

Referenced by rearrange().

◆ placer

QMdi::Placer* QMdiAreaPrivate::placer

Definition at line 151 of file qmdiarea_p.h.

Referenced by appendChild().

◆ regularTiler

QMdi::Rearranger* QMdiAreaPrivate::regularTiler

Definition at line 149 of file qmdiarea_p.h.

◆ resizeTimerId

int QMdiAreaPrivate::resizeTimerId

Definition at line 187 of file qmdiarea_p.h.

◆ rubberBand

QRubberBand* QMdiAreaPrivate::rubberBand

Definition at line 153 of file qmdiarea_p.h.

Referenced by highlightNextSubWindow().

◆ showActiveWindowMaximized

bool QMdiAreaPrivate::showActiveWindowMaximized

◆ tabBar

QMdiAreaTabBar* QMdiAreaPrivate::tabBar

◆ tabPosition

QTabWidget::TabPosition QMdiAreaPrivate::tabPosition

Definition at line 173 of file qmdiarea_p.h.

Referenced by refreshTabBar(), setViewMode(), and updateTabBarGeometry().

◆ tabsClosable

bool QMdiAreaPrivate::tabsClosable

Definition at line 168 of file qmdiarea_p.h.

Referenced by refreshTabBar(), and setViewMode().

◆ tabShape

QTabWidget::TabShape QMdiAreaPrivate::tabShape

Definition at line 172 of file qmdiarea_p.h.

Referenced by refreshTabBar(), setViewMode(), and updateTabBarGeometry().

◆ tabsMovable

bool QMdiAreaPrivate::tabsMovable

Definition at line 169 of file qmdiarea_p.h.

Referenced by refreshTabBar(), and setViewMode().

◆ tabToPreviousTimerId

int QMdiAreaPrivate::tabToPreviousTimerId

Definition at line 188 of file qmdiarea_p.h.

Referenced by activateHighlightedWindow(), and highlightNextSubWindow().

◆ tileCalledFromResizeEvent

bool QMdiAreaPrivate::tileCalledFromResizeEvent

Definition at line 180 of file qmdiarea_p.h.

Referenced by resizeToMinimumTileSize().

◆ updatesDisabledByUs

bool QMdiAreaPrivate::updatesDisabledByUs

Definition at line 181 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and emitWindowActivated().

◆ viewMode

QMdiArea::ViewMode QMdiAreaPrivate::viewMode

Definition at line 165 of file qmdiarea_p.h.

Referenced by setViewMode().


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