Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QMdiAreaPrivate Class Reference

#include <qmdiarea_p.h>

+ Inheritance diagram for QMdiAreaPrivate:
+ Collaboration diagram for QMdiAreaPrivate:

Public Member Functions

 QMdiAreaPrivate ()
 
void _q_deactivateAllWindows (QMdiSubWindow *aboutToActivate=nullptr)
 
void _q_processWindowStateChanged (Qt::WindowStates oldState, Qt::WindowStates newState)
 
void _q_currentTabChanged (int index)
 
void _q_closeTab (int index)
 
void _q_moveTab (int from, int to)
 
void appendChild (QMdiSubWindow *child)
 
void place (QMdi::Placer *placer, QMdiSubWindow *child)
 
void rearrange (QMdi::Rearranger *rearranger)
 
void arrangeMinimizedSubWindows ()
 
void activateWindow (QMdiSubWindow *child)
 
void activateCurrentWindow ()
 
void activateHighlightedWindow ()
 
void emitWindowActivated (QMdiSubWindow *child)
 
void resetActiveWindow (QMdiSubWindow *child=nullptr)
 
void updateActiveWindow (int removedIndex, bool activeRemoved)
 
void updateScrollBars ()
 
void internalRaise (QMdiSubWindow *child) const
 
bool scrollBarsEnabled () const
 
bool lastWindowAboutToBeDestroyed () const
 
void setChildActivationEnabled (bool enable=true, bool onlyNextActivationEvent=false) const
 
QRect resizeToMinimumTileSize (const QSize &minSubWindowSize, int subWindowCount)
 
void scrollBarPolicyChanged (Qt::Orientation, Qt::ScrollBarPolicy) override
 
QMdiSubWindownextVisibleSubWindow (int increaseFactor, QMdiArea::WindowOrder, int removed=-1, int fromIndex=-1) const
 
void highlightNextSubWindow (int increaseFactor)
 
QList< QMdiSubWindow * > subWindowList (QMdiArea::WindowOrder, bool reversed=false) const
 
void disconnectSubWindow (QObject *subWindow)
 
void setViewMode (QMdiArea::ViewMode mode)
 
void startResizeTimer ()
 
void startTabToPreviousTimer ()
 
bool windowStaysOnTop (QMdiSubWindow *subWindow) const
 
bool isExplicitlyDeactivated (QMdiSubWindow *subWindow) const
 
void setActive (QMdiSubWindow *subWindow, bool active=true, bool changeFocus=true) const
 

Public Attributes

QMdi::Rearrangercascader
 
QMdi::RearrangerregularTiler
 
QMdi::RearrangericonTiler
 
QMdi::Placerplacer
 
QMdiAreaTabBar * tabBar
 
QList< QMdi::Rearranger * > pendingRearrangements
 
QList< QPointer< QMdiSubWindow > > pendingPlacements
 
QList< QPointer< QMdiSubWindow > > childWindows
 
QList< int > indicesToActivatedChildren
 
QPointer< QMdiSubWindowactive
 
QPointer< QMdiSubWindowaboutToBecomeActive
 
QBrush background
 
QMdiArea::WindowOrder activationOrder
 
QMdiArea::AreaOptions options
 
QMdiArea::ViewMode viewMode
 
bool ignoreGeometryChange
 
bool ignoreWindowStateChange
 
bool isActivated
 
bool isSubWindowsTiled
 
bool showActiveWindowMaximized
 
bool tileCalledFromResizeEvent
 
bool updatesDisabledByUs
 
bool inViewModeChange
 
int indexToNextWindow
 
int indexToPreviousWindow
 
int indexToHighlighted
 
int indexToLastActiveTab
 
int resizeTimerId
 
int tabToPreviousTimerId
 

Detailed Description

Definition at line 102 of file qmdiarea_p.h.

Constructor & Destructor Documentation

◆ QMdiAreaPrivate()

QMdiAreaPrivate::QMdiAreaPrivate ( )

Definition at line 620 of file qmdiarea.cpp.

Member Function Documentation

◆ _q_closeTab()

void QMdiAreaPrivate::_q_closeTab ( int  index)

Definition at line 755 of file qmdiarea.cpp.

References QList< T >::at(), childWindows, QWidget::close(), Q_ASSERT, and Q_UNUSED.

+ Here is the call graph for this function:

◆ _q_currentTabChanged()

void QMdiAreaPrivate::_q_currentTabChanged ( int  index)

Definition at line 731 of file qmdiarea.cpp.

References activateWindow(), QList< T >::at(), childWindows, indexToLastActiveTab, QWidget::isHidden(), Q_ASSERT, Q_UNUSED, QList< T >::size(), and tabBar.

+ Here is the call graph for this function:

◆ _q_deactivateAllWindows()

void QMdiAreaPrivate::_q_deactivateAllWindows ( QMdiSubWindow aboutToActivate = nullptr)

Definition at line 662 of file qmdiarea.cpp.

References aboutToBecomeActive, child, childWindows, QMdiArea::DontMaximizeSubWindowOnActivation, ignoreWindowStateChange, options, Q_ASSERT, sanityCheck(), showActiveWindowMaximized, updatesDisabledByUs, and windowStaysOnTop().

Referenced by appendChild(), and emitWindowActivated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _q_moveTab()

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

Definition at line 766 of file qmdiarea.cpp.

References childWindows, QList< T >::move(), and Q_UNUSED.

+ Here is the call graph for this function:

◆ _q_processWindowStateChanged()

void QMdiAreaPrivate::_q_processWindowStateChanged ( Qt::WindowStates  oldState,
Qt::WindowStates  newState 
)

Definition at line 698 of file qmdiarea.cpp.

References arrangeMinimizedSubWindows(), child, emitWindowActivated(), ignoreWindowStateChange, internalRaise(), isSubWindowsTiled, newState(), resetActiveWindow(), Qt::WindowActive, Qt::WindowMaximized, and Qt::WindowMinimized.

Referenced by appendChild().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ activateCurrentWindow()

void QMdiAreaPrivate::activateCurrentWindow ( )

Definition at line 966 of file qmdiarea.cpp.

References isExplicitlyDeactivated().

+ Here is the call graph for this function:

◆ activateHighlightedWindow()

void QMdiAreaPrivate::activateHighlightedWindow ( )

Definition at line 975 of file qmdiarea.cpp.

References activateWindow(), QMdiArea::ActivationHistoryOrder, QList< T >::at(), childWindows, indexToHighlighted, nextVisibleSubWindow(), Q_ASSERT, QList< T >::size(), and tabToPreviousTimerId.

+ Here is the call graph for this function:

◆ activateWindow()

void QMdiAreaPrivate::activateWindow ( QMdiSubWindow child)

Definition at line 937 of file qmdiarea.cpp.

References active, child, childWindows, QList< T >::isEmpty(), Q_ASSERT, and resetActiveWindow().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendChild()

◆ arrangeMinimizedSubWindows()

void QMdiAreaPrivate::arrangeMinimizedSubWindows ( )

Arranges all minimized windows at the bottom of the workspace.

Definition at line 927 of file qmdiarea.cpp.

References iconTiler, and rearrange().

Referenced by _q_processWindowStateChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disconnectSubWindow()

void QMdiAreaPrivate::disconnectSubWindow ( QObject subWindow)

Definition at line 1379 of file qmdiarea.cpp.

References QObject::disconnect(), and QObject::removeEventFilter().

+ Here is the call graph for this function:

◆ emitWindowActivated()

void QMdiAreaPrivate::emitWindowActivated ( QMdiSubWindow activeWindow)

Definition at line 993 of file qmdiarea.cpp.

References _q_deactivateAllWindows(), aboutToBecomeActive, active, childWindows, emit, QListSpecialMethodsBase< T >::indexOf(), indicesToActivatedChildren, internalRaise(), QWidget::isMaximized(), QList< T >::move(), Q_ASSERT, scrollBarsEnabled(), showActiveWindowMaximized, QWidget::showMaximized(), tabBar, updateScrollBars(), and updatesDisabledByUs.

Referenced by _q_processWindowStateChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ highlightNextSubWindow()

void QMdiAreaPrivate::highlightNextSubWindow ( int  increaseFactor)

Definition at line 1446 of file qmdiarea.cpp.

References activationOrder, childWindows, QListSpecialMethodsBase< T >::indexOf(), indexToHighlighted, nextVisibleSubWindow(), Q_ASSERT, QRubberBand::Rectangle, QList< T >::size(), tabToPreviousTimerId, and Qt::WindowStaysOnTopHint.

+ Here is the call graph for this function:

◆ internalRaise()

void QMdiAreaPrivate::internalRaise ( QMdiSubWindow mdiChild) const

Definition at line 1185 of file qmdiarea.cpp.

References child, childWindows, QListSpecialMethodsBase< T >::contains(), QWidget::raise(), sanityCheck(), QList< T >::size(), QWidget::stackUnder(), viewport(), and windowStaysOnTop().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isExplicitlyDeactivated()

bool QMdiAreaPrivate::isExplicitlyDeactivated ( QMdiSubWindow subWindow) const
inline

Definition at line 210 of file qmdiarea_p.h.

Referenced by activateCurrentWindow(), and resetActiveWindow().

+ Here is the caller graph for this function:

◆ lastWindowAboutToBeDestroyed()

bool QMdiAreaPrivate::lastWindowAboutToBeDestroyed ( ) const

Definition at line 1285 of file qmdiarea.cpp.

References QList< T >::at(), childWindows, QList< T >::size(), QWidget::testAttribute(), and Qt::WA_DeleteOnClose.

Referenced by resetActiveWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nextVisibleSubWindow()

QMdiSubWindow * QMdiAreaPrivate::nextVisibleSubWindow ( int  increaseFactor,
QMdiArea::WindowOrder  order,
int  removedIndex = -1,
int  fromIndex = -1 
) const

Definition at line 1392 of file qmdiarea.cpp.

References QList< T >::at(), QList< T >::back(), childWindows, QMdiArea::CreationOrder, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), Q_ASSERT, setIndex(), and QList< T >::size().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ place()

void QMdiAreaPrivate::place ( QMdi::Placer placer,
QMdiSubWindow child 
)

Definition at line 832 of file qmdiarea.cpp.

References QList< T >::append(), child, childWindows, pendingPlacements, QMdi::Placer::place(), placer, QList< T >::reserve(), sanityCheck(), QLayoutItem::setGeometry(), QList< T >::size(), QStyle::visualRect(), Qt::WA_Moved, window(), QPoint::x(), and QPoint::y().

Referenced by appendChild().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rearrange()

void QMdiAreaPrivate::rearrange ( QMdi::Rearranger rearranger)

Definition at line 871 of file qmdiarea.cpp.

References activationOrder, QList< T >::append(), child, QSize::expandedTo(), QMdi::Rearranger::IconTiler, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), isSubWindowsTiled, QLayoutItem::minimumSize(), QList< T >::move(), pendingRearrangements, QMdi::Rearranger::rearrange(), QMdi::Rearranger::RegularTiler, resizeToMinimumTileSize(), sanityCheck(), QMdi::Rearranger::SimpleCascader, QList< T >::size(), subWindowList(), QMdi::Rearranger::type(), updateScrollBars(), viewport(), and widgets.

Referenced by arrangeMinimizedSubWindows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetActiveWindow()

void QMdiAreaPrivate::resetActiveWindow ( QMdiSubWindow deactivatedWindow = nullptr)

Definition at line 1045 of file qmdiarea.cpp.

References aboutToBecomeActive, active, emit, isActivated, isExplicitlyDeactivated(), and lastWindowAboutToBeDestroyed().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resizeToMinimumTileSize()

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

Definition at line 1213 of file qmdiarea.cpp.

References QSize::expandedTo(), frame, QRect::height(), QSize::height(), QWidget::height, QSize::isValid(), QWidget::isWindow(), QWidget::parentWidget(), QStyle::pixelMetric(), QStyle::PM_DefaultFrameWidth, qCeil(), qMax(), qSqrt(), QWidget::resize(), Qt::ScrollBarAlwaysOff, Qt::ScrollBarAsNeeded, QRect::setHeight(), QRect::setWidth(), QStyle::SH_ScrollView_FrameOnlyAroundContents, QWidget::size, QWidget::style(), Qt::SubWindow, tileCalledFromResizeEvent, viewport(), QRect::width(), QSize::width(), and QWidget::windowType().

Referenced by rearrange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scrollBarPolicyChanged()

void QMdiAreaPrivate::scrollBarPolicyChanged ( Qt::Orientation  orientation,
Qt::ScrollBarPolicy  policy 
)
override

\reimp

Definition at line 1319 of file qmdiarea.cpp.

References QMdiSubWindow::AllowOutsideAreaHorizontally, QMdiSubWindow::AllowOutsideAreaVertically, child, childWindows, Qt::Horizontal, QList< T >::isEmpty(), policy, sanityCheck(), Qt::ScrollBarAlwaysOff, and updateScrollBars().

+ Here is the call graph for this function:

◆ scrollBarsEnabled()

bool QMdiAreaPrivate::scrollBarsEnabled ( ) const

Definition at line 1277 of file qmdiarea.cpp.

References Qt::ScrollBarAlwaysOff.

Referenced by emitWindowActivated(), and updateScrollBars().

+ Here is the caller graph for this function:

◆ setActive()

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

Definition at line 217 of file qmdiarea_p.h.

References active.

◆ setChildActivationEnabled()

void QMdiAreaPrivate::setChildActivationEnabled ( bool  enable = true,
bool  onlyNextActivationEvent = false 
) const

Definition at line 1303 of file qmdiarea.cpp.

References childWindows, and QWidget::isVisible().

+ Here is the call graph for this function:

◆ setViewMode()

void QMdiAreaPrivate::setViewMode ( QMdiArea::ViewMode  mode)
Since
4.4

Definition at line 1507 of file qmdiarea.cpp.

References _q_tb_tabBarShapeFrom(), QObject::connect(), QMdiArea::DontMaximizeSubWindowOnActivation, QWidget::isMaximized(), Q_ASSERT, QWidget::showMaximized(), QWidget::showNormal(), SIGNAL, SLOT, QMdiArea::TabbedView, tabTextFor(), and QWidget::windowIcon.

+ Here is the call graph for this function:

◆ startResizeTimer()

void QMdiAreaPrivate::startResizeTimer ( )
inline

Definition at line 187 of file qmdiarea_p.h.

References resizeTimerId.

◆ startTabToPreviousTimer()

void QMdiAreaPrivate::startTabToPreviousTimer ( )
inline

Definition at line 195 of file qmdiarea_p.h.

References QApplication::keyboardInputInterval, and tabToPreviousTimerId.

◆ subWindowList()

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

Definition at line 1336 of file qmdiarea.cpp.

References QList< T >::append(), QList< T >::at(), child, childWindows, QListSpecialMethodsBase< T >::contains(), QMdiArea::CreationOrder, i, indicesToActivatedChildren, QList< T >::isEmpty(), list, QList< T >::prepend(), Q_ASSERT, QList< T >::size(), QMdiArea::StackingOrder, and viewport().

Referenced by rearrange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateActiveWindow()

void QMdiAreaPrivate::updateActiveWindow ( int  removedIndex,
bool  activeRemoved 
)

Definition at line 1070 of file qmdiarea.cpp.

References activateWindow(), activationOrder, childWindows, i, indexToHighlighted, indicesToActivatedChildren, QList< T >::isEmpty(), next, nextVisibleSubWindow(), Q_ASSERT, resetActiveWindow(), showActiveWindowMaximized, QList< T >::size(), and tabBar.

+ Here is the call graph for this function:

◆ updateScrollBars()

void QMdiAreaPrivate::updateScrollBars ( )

Definition at line 1119 of file qmdiarea.cpp.

References active, QWidget::geometry, QRect::height(), QSize::height(), Qt::Horizontal, ignoreGeometryChange, QWidget::isMaximized(), isSubWindowsTiled, QRect::left(), qMax(), qMin(), QSize::rheight(), QRect::right(), QSize::rwidth(), Qt::ScrollBarAlwaysOn, scrollBarsEnabled(), QStyle::SH_ScrollView_FrameOnlyAroundContents, QRect::top(), useScrollBar(), Qt::Vertical, viewport(), QRect::width(), and QSize::width().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ windowStaysOnTop()

bool QMdiAreaPrivate::windowStaysOnTop ( QMdiSubWindow subWindow) const
inline

Definition at line 203 of file qmdiarea_p.h.

References QWidget::windowFlags(), and Qt::WindowStaysOnTopHint.

Referenced by _q_deactivateAllWindows(), and internalRaise().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ aboutToBecomeActive

QPointer<QMdiSubWindow> QMdiAreaPrivate::aboutToBecomeActive

Definition at line 122 of file qmdiarea_p.h.

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

◆ activationOrder

QMdiArea::WindowOrder QMdiAreaPrivate::activationOrder

Definition at line 124 of file qmdiarea_p.h.

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

◆ active

QPointer<QMdiSubWindow> QMdiAreaPrivate::active

◆ background

QBrush QMdiAreaPrivate::background

Definition at line 123 of file qmdiarea_p.h.

◆ cascader

QMdi::Rearranger* QMdiAreaPrivate::cascader

Definition at line 109 of file qmdiarea_p.h.

◆ childWindows

◆ iconTiler

QMdi::Rearranger* QMdiAreaPrivate::iconTiler

Definition at line 111 of file qmdiarea_p.h.

Referenced by arrangeMinimizedSubWindows().

◆ ignoreGeometryChange

bool QMdiAreaPrivate::ignoreGeometryChange

Definition at line 136 of file qmdiarea_p.h.

Referenced by updateScrollBars().

◆ ignoreWindowStateChange

bool QMdiAreaPrivate::ignoreWindowStateChange

Definition at line 137 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and _q_processWindowStateChanged().

◆ indexToHighlighted

int QMdiAreaPrivate::indexToHighlighted

◆ indexToLastActiveTab

int QMdiAreaPrivate::indexToLastActiveTab

Definition at line 147 of file qmdiarea_p.h.

Referenced by _q_currentTabChanged().

◆ indexToNextWindow

int QMdiAreaPrivate::indexToNextWindow

Definition at line 144 of file qmdiarea_p.h.

◆ indexToPreviousWindow

int QMdiAreaPrivate::indexToPreviousWindow

Definition at line 145 of file qmdiarea_p.h.

◆ indicesToActivatedChildren

QList<int> QMdiAreaPrivate::indicesToActivatedChildren

Definition at line 120 of file qmdiarea_p.h.

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

◆ inViewModeChange

bool QMdiAreaPrivate::inViewModeChange

Definition at line 143 of file qmdiarea_p.h.

◆ isActivated

bool QMdiAreaPrivate::isActivated

Definition at line 138 of file qmdiarea_p.h.

Referenced by resetActiveWindow().

◆ isSubWindowsTiled

bool QMdiAreaPrivate::isSubWindowsTiled

Definition at line 139 of file qmdiarea_p.h.

Referenced by _q_processWindowStateChanged(), rearrange(), and updateScrollBars().

◆ options

QMdiArea::AreaOptions QMdiAreaPrivate::options

Definition at line 125 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and appendChild().

◆ pendingPlacements

QList<QPointer<QMdiSubWindow> > QMdiAreaPrivate::pendingPlacements

Definition at line 118 of file qmdiarea_p.h.

Referenced by place().

◆ pendingRearrangements

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

Definition at line 117 of file qmdiarea_p.h.

Referenced by rearrange().

◆ placer

QMdi::Placer* QMdiAreaPrivate::placer

Definition at line 112 of file qmdiarea_p.h.

Referenced by appendChild(), and place().

◆ regularTiler

QMdi::Rearranger* QMdiAreaPrivate::regularTiler

Definition at line 110 of file qmdiarea_p.h.

◆ resizeTimerId

int QMdiAreaPrivate::resizeTimerId

Definition at line 148 of file qmdiarea_p.h.

Referenced by startResizeTimer().

◆ showActiveWindowMaximized

bool QMdiAreaPrivate::showActiveWindowMaximized

◆ tabBar

QMdiAreaTabBar* QMdiAreaPrivate::tabBar

◆ tabToPreviousTimerId

int QMdiAreaPrivate::tabToPreviousTimerId

◆ tileCalledFromResizeEvent

bool QMdiAreaPrivate::tileCalledFromResizeEvent

Definition at line 141 of file qmdiarea_p.h.

Referenced by resizeToMinimumTileSize().

◆ updatesDisabledByUs

bool QMdiAreaPrivate::updatesDisabledByUs

Definition at line 142 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and emitWindowActivated().

◆ viewMode

QMdiArea::ViewMode QMdiAreaPrivate::viewMode

Definition at line 126 of file qmdiarea_p.h.


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