Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 104 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 759 of file qmdiarea.cpp.

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

+ Here is the call graph for this function:

◆ _q_currentTabChanged()

void QMdiAreaPrivate::_q_currentTabChanged ( int index)

Definition at line 735 of file qmdiarea.cpp.

References activateWindow(), QList< T >::at(), childWindows, indexToLastActiveTab, 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 770 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 702 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 970 of file qmdiarea.cpp.

References isExplicitlyDeactivated().

+ Here is the call graph for this function:

◆ activateHighlightedWindow()

void QMdiAreaPrivate::activateHighlightedWindow ( )

Definition at line 979 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 941 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 931 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 1387 of file qmdiarea.cpp.

References QObject::disconnect().

+ Here is the call graph for this function:

◆ emitWindowActivated()

void QMdiAreaPrivate::emitWindowActivated ( QMdiSubWindow * activeWindow)

Definition at line 997 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 1454 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 1189 of file qmdiarea.cpp.

References child, QObject::children(), 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 212 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 1289 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 1400 of file qmdiarea.cpp.

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

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 836 of file qmdiarea.cpp.

References QList< T >::append(), child, childWindows, pendingPlacements, QMdi::Placer::place(), placer, 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 875 of file qmdiarea.cpp.

References activationOrder, QList< T >::append(), child, QMdi::Rearranger::IconTiler, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), isSubWindowsTiled, QLayoutItem::minimumSize(), QList< T >::move(), pendingRearrangements, QMdi::Rearranger::RegularTiler, resizeToMinimumTileSize(), sanityCheck(), QMdi::Rearranger::SimpleCascader, QList< T >::size(), subWindowList(), 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 1049 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 1217 of file qmdiarea.cpp.

References QSize::expandedTo(), frame, QRect::height(), QSize::height(), QWidget::height, 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 1323 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 1281 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 219 of file qmdiarea_p.h.

References active.

◆ setChildActivationEnabled()

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

Definition at line 1307 of file qmdiarea.cpp.

References childWindows.

◆ setViewMode()

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

Definition at line 1515 of file qmdiarea.cpp.

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

+ Here is the call graph for this function:

◆ startResizeTimer()

void QMdiAreaPrivate::startResizeTimer ( )
inline

Definition at line 189 of file qmdiarea_p.h.

References resizeTimerId.

◆ startTabToPreviousTimer()

void QMdiAreaPrivate::startTabToPreviousTimer ( )
inline

Definition at line 197 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 1344 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 1074 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 1123 of file qmdiarea.cpp.

References active, QWidget::geometry, QRect::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(), and QRect::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 205 of file qmdiarea_p.h.

References Qt::WindowStaysOnTopHint.

Referenced by _q_deactivateAllWindows(), and internalRaise().

+ Here is the caller graph for this function:

Member Data Documentation

◆ aboutToBecomeActive

QPointer<QMdiSubWindow> QMdiAreaPrivate::aboutToBecomeActive

Definition at line 124 of file qmdiarea_p.h.

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

◆ activationOrder

QMdiArea::WindowOrder QMdiAreaPrivate::activationOrder

Definition at line 126 of file qmdiarea_p.h.

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

◆ active

QPointer<QMdiSubWindow> QMdiAreaPrivate::active

◆ background

QBrush QMdiAreaPrivate::background

Definition at line 125 of file qmdiarea_p.h.

◆ cascader

QMdi::Rearranger* QMdiAreaPrivate::cascader

Definition at line 111 of file qmdiarea_p.h.

◆ childWindows

◆ iconTiler

QMdi::Rearranger* QMdiAreaPrivate::iconTiler

Definition at line 113 of file qmdiarea_p.h.

Referenced by arrangeMinimizedSubWindows().

◆ ignoreGeometryChange

bool QMdiAreaPrivate::ignoreGeometryChange

Definition at line 138 of file qmdiarea_p.h.

Referenced by updateScrollBars().

◆ ignoreWindowStateChange

bool QMdiAreaPrivate::ignoreWindowStateChange

Definition at line 139 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and _q_processWindowStateChanged().

◆ indexToHighlighted

int QMdiAreaPrivate::indexToHighlighted

◆ indexToLastActiveTab

int QMdiAreaPrivate::indexToLastActiveTab

Definition at line 149 of file qmdiarea_p.h.

Referenced by _q_currentTabChanged().

◆ indexToNextWindow

int QMdiAreaPrivate::indexToNextWindow

Definition at line 146 of file qmdiarea_p.h.

◆ indexToPreviousWindow

int QMdiAreaPrivate::indexToPreviousWindow

Definition at line 147 of file qmdiarea_p.h.

◆ indicesToActivatedChildren

QList<int> QMdiAreaPrivate::indicesToActivatedChildren

Definition at line 122 of file qmdiarea_p.h.

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

◆ inViewModeChange

bool QMdiAreaPrivate::inViewModeChange

Definition at line 145 of file qmdiarea_p.h.

◆ isActivated

bool QMdiAreaPrivate::isActivated

Definition at line 140 of file qmdiarea_p.h.

Referenced by resetActiveWindow().

◆ isSubWindowsTiled

bool QMdiAreaPrivate::isSubWindowsTiled

Definition at line 141 of file qmdiarea_p.h.

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

◆ options

QMdiArea::AreaOptions QMdiAreaPrivate::options

Definition at line 127 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and appendChild().

◆ pendingPlacements

QList<QPointer<QMdiSubWindow> > QMdiAreaPrivate::pendingPlacements

Definition at line 120 of file qmdiarea_p.h.

Referenced by place().

◆ pendingRearrangements

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

Definition at line 119 of file qmdiarea_p.h.

Referenced by rearrange().

◆ placer

QMdi::Placer* QMdiAreaPrivate::placer

Definition at line 114 of file qmdiarea_p.h.

Referenced by appendChild(), and place().

◆ regularTiler

QMdi::Rearranger* QMdiAreaPrivate::regularTiler

Definition at line 112 of file qmdiarea_p.h.

◆ resizeTimerId

int QMdiAreaPrivate::resizeTimerId

Definition at line 150 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 143 of file qmdiarea_p.h.

Referenced by resizeToMinimumTileSize().

◆ updatesDisabledByUs

bool QMdiAreaPrivate::updatesDisabledByUs

Definition at line 144 of file qmdiarea_p.h.

Referenced by _q_deactivateAllWindows(), and emitWindowActivated().

◆ viewMode

QMdiArea::ViewMode QMdiAreaPrivate::viewMode

Definition at line 128 of file qmdiarea_p.h.


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