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
QDockAreaLayoutInfo Class Reference

#include <qdockarealayout_p.h>

+ Collaboration diagram for QDockAreaLayoutInfo:

Public Types

enum  TabMode { NoTabs , AllowTabs , ForceTabs }
 
enum  { SequenceMarker = 0xfc , TabMarker = 0xfa , WidgetMarker = 0xfb }
 

Public Member Functions

 QDockAreaLayoutInfo ()
 
 QDockAreaLayoutInfo (const int *_sep, QInternal::DockPosition _dockPos, Qt::Orientation _o, int tbhape, QMainWindow *window)
 
QSize minimumSize () const
 
QSize maximumSize () const
 
QSize sizeHint () const
 
QSize size () const
 
bool insertGap (const QList< int > &path, QLayoutItem *dockWidgetItem)
 
QLayoutItemplug (const QList< int > &path)
 
QLayoutItemunplug (const QList< int > &path)
 
QList< int > gapIndex (const QPoint &pos, bool nestingEnabled, TabMode tabMode) const
 
void remove (const QList< int > &path)
 
void remove (QWidget *widget)
 
void unnest (int index)
 
void split (int index, Qt::Orientation orientation, QLayoutItem *dockWidgetItem)
 
QDockAreaLayoutItemitem (const QList< int > &path)
 
QDockAreaLayoutInfoinfo (const QList< int > &path)
 
QDockAreaLayoutInfoinfo (QWidget *widget)
 
void saveState (QDataStream &stream) const
 
bool restoreState (QDataStream &stream, QList< QDockWidget * > &widgets, bool testing)
 
void fitItems ()
 
bool expansive (Qt::Orientation o) const
 
int changeSize (int index, int size, bool below)
 
QRect itemRect (int index, bool isGap=false) const
 
QRect itemRect (const QList< int > &path) const
 
QRect separatorRect (int index) const
 
QRect separatorRect (const QList< int > &path) const
 
void clear ()
 
bool isEmpty () const
 
bool hasGapItem (const QList< int > &path) const
 
bool onlyHasPlaceholders () const
 
bool hasFixedSize () const
 
QList< int > findSeparator (const QPoint &pos) const
 
int next (int idx) const
 
int prev (int idx) const
 
QList< int > indexOf (QWidget *widget) const
 
QList< int > indexOfPlaceHolder (const QString &objectName) const
 
QDockWidgetapply (bool animate)
 
void paintSeparators (QPainter *p, QWidget *widget, const QRegion &clip, const QPoint &mouse) const
 
QRegion separatorRegion () const
 
int separatorMove (int index, int delta)
 
int separatorMove (const QList< int > &separator, const QPoint &origin, const QPoint &dest)
 
QLayoutItemitemAt (int *x, int index) const
 
QLayoutItemtakeAt (int *x, int index)
 
void add (QWidget *widget)
 
void deleteAllLayoutItems ()
 
QMainWindowLayoutmainWindowLayout () const
 

Public Attributes

const int * sep
 
QList< QWidget * > separatorWidgets
 
QInternal::DockPosition dockPos
 
Qt::Orientation o
 
QRect rect
 
QMainWindowmainWindow
 
QList< QDockAreaLayoutItemitem_list
 

Detailed Description

Definition at line 92 of file qdockarealayout_p.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SequenceMarker 
TabMarker 
WidgetMarker 

Definition at line 121 of file qdockarealayout_p.h.

◆ TabMode

Enumerator
NoTabs 
AllowTabs 
ForceTabs 

Definition at line 107 of file qdockarealayout_p.h.

Constructor & Destructor Documentation

◆ QDockAreaLayoutInfo() [1/2]

QDockAreaLayoutInfo::QDockAreaLayoutInfo ( )

Definition at line 221 of file qdockarealayout.cpp.

Referenced by insertGap(), restoreState(), and split().

+ Here is the caller graph for this function:

◆ QDockAreaLayoutInfo() [2/2]

QDockAreaLayoutInfo::QDockAreaLayoutInfo ( const int * _sep,
QInternal::DockPosition _dockPos,
Qt::Orientation _o,
int tbhape,
QMainWindow * window )

Definition at line 229 of file qdockarealayout.cpp.

References Q_UNUSED.

Member Function Documentation

◆ add()

void QDockAreaLayoutInfo::add ( QWidget * widget)

Definition at line 1788 of file qdockarealayout.cpp.

References QList< T >::append(), dockWidget, indexOf(), isEmpty(), item_list, qFatal, and widget.

+ Here is the call graph for this function:

◆ apply()

QDockWidget * QDockAreaLayoutInfo::apply ( bool animate)

◆ changeSize()

int QDockAreaLayoutInfo::changeSize ( int index,
int size,
bool below )

◆ clear()

void QDockAreaLayoutInfo::clear ( )

Definition at line 247 of file qdockarealayout.cpp.

References QList< T >::clear(), item_list, and rect.

Referenced by QMainWindowLayout::animationFinished(), and QMainWindowLayout::restore().

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

◆ deleteAllLayoutItems()

void QDockAreaLayoutInfo::deleteAllLayoutItems ( )

Definition at line 1807 of file qdockarealayout.cpp.

References i, item, item_list, and QList< T >::size().

+ Here is the call graph for this function:

◆ expansive()

bool QDockAreaLayoutInfo::expansive ( Qt::Orientation o) const

Definition at line 470 of file qdockarealayout.cpp.

References QList< T >::at(), QDockAreaLayoutItem::expansive(), i, item_list, o, and QList< T >::size().

Referenced by QDockAreaLayoutItem::expansive().

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

◆ findSeparator()

QList< int > QDockAreaLayoutInfo::findSeparator ( const QPoint & pos) const

Definition at line 1405 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, i, item, item_list, next, o, pick(), pos, QGraphicsItem::pos(), sep, separatorRect(), and QList< T >::size().

Referenced by QDockAreaLayout::findSeparator().

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

◆ fitItems()

void QDockAreaLayoutInfo::fitItems ( )

Definition at line 539 of file qdockarealayout.cpp.

References QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, QDockAreaLayoutItem::hasFixedSize(), i, QLayoutStruct::init(), item, item_list, itemRect(), j, QDockAreaLayoutItem::KeepSize, o, pick(), QGraphicsItem::pos(), qGeomCalc(), qMax(), QWIDGETSIZE_MAX, realMaxSize(), realMinSize(), rect, sep, QList< T >::size(), QRect::size(), and QRect::topLeft().

Referenced by QDockAreaLayout::setGrid().

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

◆ gapIndex()

QList< int > QDockAreaLayoutInfo::gapIndex ( const QPoint & pos,
bool nestingEnabled,
TabMode tabMode ) const

Definition at line 748 of file qdockarealayout.cpp.

References QList< T >::at(), QInternal::BottomDock, QInternal::DockCount, dockPosHelper(), Qt::Horizontal, i, item, item_list, itemRect(), QInternal::LeftDock, o, pick(), pos, QGraphicsItem::pos(), Q_ASSERT, QT_CONFIG, QInternal::RightDock, QList< T >::size(), and QInternal::TopDock.

Referenced by QDockAreaLayout::gapIndex().

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

◆ hasFixedSize()

bool QDockAreaLayoutInfo::hasFixedSize ( ) const

Definition at line 1506 of file qdockarealayout.cpp.

References maximumSize(), minimumSize(), o, and perp().

+ Here is the call graph for this function:

◆ hasGapItem()

bool QDockAreaLayoutInfo::hasGapItem ( const QList< int > & path) const

Definition at line 1133 of file qdockarealayout.cpp.

References QList< T >::count(), QDockAreaLayoutItem::GapItem, and item_list.

+ Here is the call graph for this function:

◆ indexOf()

QList< int > QDockAreaLayoutInfo::indexOf ( QWidget * widget) const

Definition at line 1472 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::GapItem, i, item, item_list, QList< T >::size(), and widget.

Referenced by add(), QMainWindowLayout::animationFinished(), QDockAreaLayout::indexOf(), remove(), and QMainWindowLayout::revert().

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

◆ indexOfPlaceHolder()

QList< int > QDockAreaLayoutInfo::indexOfPlaceHolder ( const QString & objectName) const

Definition at line 1448 of file qdockarealayout.cpp.

References QList< T >::at(), i, item, item_list, and QList< T >::size().

Referenced by QDockAreaLayout::indexOfPlaceHolder().

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

◆ info() [1/2]

QDockAreaLayoutInfo * QDockAreaLayoutInfo::info ( const QList< int > & path)

Definition at line 1302 of file qdockarealayout.cpp.

References item_list, and QList< T >::size().

Referenced by QDockAreaLayout::info().

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

◆ info() [2/2]

QDockAreaLayoutInfo * QDockAreaLayoutInfo::info ( QWidget * widget)

Definition at line 1278 of file qdockarealayout.cpp.

References QList< T >::at(), i, item, item_list, QList< T >::size(), and widget.

+ Here is the call graph for this function:

◆ insertGap()

bool QDockAreaLayoutInfo::insertGap ( const QList< int > & path,
QLayoutItem * dockWidgetItem )

Definition at line 1148 of file qdockarealayout.cpp.

References QDockAreaLayoutInfo(), QList< T >::at(), QInternal::BottomDock, dockedGeometry(), dockPos, QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, Qt::Horizontal, i, QList< T >::insert(), isEmpty(), item, item_list, QInternal::LeftDock, mainWindow, next, o, pick(), prev(), Q_ASSERT, Q_ASSERT_X, qCDebug, QT_CONFIG, rect, QInternal::RightDock, sep, QList< T >::size(), QRect::size(), QInternal::TopDock, QPlaceHolderItem::topLevelRect, Qt::Vertical, and QLayoutItem::widget().

Referenced by QDockAreaLayout::insertGap().

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

◆ isEmpty()

bool QDockAreaLayoutInfo::isEmpty ( ) const

Definition at line 257 of file qdockarealayout.cpp.

References next.

Referenced by add(), QDockAreaLayout::getGrid(), insertGap(), maximumSize(), minimumSize(), paintSeparators(), QDockAreaLayout::saveState(), separatorRegion(), size(), QDockAreaLayout::size_helper(), and sizeHint().

+ Here is the caller graph for this function:

◆ item()

QDockAreaLayoutItem & QDockAreaLayoutInfo::item ( const QList< int > & path)

Definition at line 1733 of file qdockarealayout.cpp.

References item, item_list, and Q_ASSERT.

Referenced by QDockAreaLayout::item().

+ Here is the caller graph for this function:

◆ itemAt()

QLayoutItem * QDockAreaLayoutInfo::itemAt ( int * x,
int index ) const

Definition at line 1745 of file qdockarealayout.cpp.

References QList< T >::at(), i, item, item_list, ret, and QList< T >::size().

+ Here is the call graph for this function:

◆ itemRect() [1/2]

QRect QDockAreaLayoutInfo::itemRect ( const QList< int > & path) const

Definition at line 1359 of file qdockarealayout.cpp.

References QList< T >::at(), item, item_list, itemRect(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ itemRect() [2/2]

QRect QDockAreaLayoutInfo::itemRect ( int index,
bool isGap = false ) const

Definition at line 1314 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, item, item_list, next, o, perp(), pos, QGraphicsItem::pos(), prev(), rect, rperp(), rpick(), sep, size(), QRect::size(), and QRect::topLeft().

Referenced by apply(), fitItems(), gapIndex(), itemRect(), QDockAreaLayout::itemRect(), and separatorMove().

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

◆ mainWindowLayout()

QMainWindowLayout * QDockAreaLayoutInfo::mainWindowLayout ( ) const

Definition at line 1499 of file qdockarealayout.cpp.

References mainWindow, Q_ASSERT, and qt_mainwindow_layout().

Referenced by apply().

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

◆ maximumSize()

QSize QDockAreaLayoutInfo::maximumSize ( ) const

Definition at line 331 of file qdockarealayout.cpp.

References QList< T >::at(), i, isEmpty(), item, item_list, o, perp(), pick(), qMax(), qMin(), QWIDGETSIZE_MAX, QTabBar::RoundedEast, QTabBar::RoundedNorth, QTabBar::RoundedSouth, QTabBar::RoundedWest, rperp(), rpick(), sep, and QList< T >::size().

Referenced by QDockAreaLayout::getGrid(), hasFixedSize(), and QDockAreaLayoutItem::maximumSize().

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

◆ minimumSize()

QSize QDockAreaLayoutInfo::minimumSize ( ) const

Definition at line 272 of file qdockarealayout.cpp.

References QList< T >::at(), i, isEmpty(), item, item_list, o, perp(), pick(), qMax(), QTabBar::RoundedEast, QTabBar::RoundedNorth, QTabBar::RoundedSouth, QTabBar::RoundedWest, rperp(), rpick(), sep, QList< T >::size(), QTabBar::TriangularEast, QTabBar::TriangularNorth, QTabBar::TriangularSouth, and QTabBar::TriangularWest.

Referenced by QDockAreaLayout::getGrid(), hasFixedSize(), QDockAreaLayoutItem::minimumSize(), and QDockAreaLayout::minimumSize().

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

◆ next()

int QDockAreaLayoutInfo::next ( int idx) const

Definition at line 1676 of file qdockarealayout.cpp.

References QList< T >::at(), i, item_list, QList< T >::size(), and QDockAreaLayoutItem::skip().

+ Here is the call graph for this function:

◆ onlyHasPlaceholders()

bool QDockAreaLayoutInfo::onlyHasPlaceholders ( ) const

Definition at line 262 of file qdockarealayout.cpp.

References item, and item_list.

◆ paintSeparators()

void QDockAreaLayoutInfo::paintSeparators ( QPainter * p,
QWidget * widget,
const QRegion & clip,
const QPoint & mouse ) const

Definition at line 1641 of file qdockarealayout.cpp.

References QList< T >::at(), QRegion::contains(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, i, isEmpty(), item, item_list, next, o, paintSep(), separatorRect(), QList< T >::size(), and widget.

+ Here is the call graph for this function:

◆ plug()

QLayoutItem * QDockAreaLayoutInfo::plug ( const QList< int > & path)

Definition at line 1029 of file qdockarealayout.cpp.

References QGraphicsItem::flags(), QDockAreaLayoutItem::GapItem, item, item_list, and Q_ASSERT.

Referenced by QDockAreaLayout::plug().

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

◆ prev()

int QDockAreaLayoutInfo::prev ( int idx) const

Definition at line 1685 of file qdockarealayout.cpp.

References QList< T >::at(), i, item_list, and QDockAreaLayoutItem::skip().

Referenced by insertGap(), itemRect(), and unplug().

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

◆ remove() [1/2]

void QDockAreaLayoutInfo::remove ( const QList< int > & path)

Definition at line 1005 of file qdockarealayout.cpp.

References item, item_list, Q_ASSERT, QList< T >::removeAt(), and unnest().

Referenced by QDockAreaLayout::remove(), remove(), and QMainWindowLayout::takeAt().

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

◆ remove() [2/2]

void QDockAreaLayoutInfo::remove ( QWidget * widget)

Definition at line 1021 of file qdockarealayout.cpp.

References indexOf(), remove(), and widget.

+ Here is the call graph for this function:

◆ restoreState()

bool QDockAreaLayoutInfo::restoreState ( QDataStream & stream,
QList< QDockWidget * > & widgets,
bool testing )

Definition at line 1904 of file qdockarealayout.cpp.

References QDockAreaLayoutInfo(), QList< T >::append(), QList< T >::at(), QDockAreaLayout::constrainedRect(), dockPos, emit, QGraphicsItem::flags(), QWidget::hide(), i, item, item_list, j, QDockAreaLayoutItem::KeepSize, QList< T >::last(), mainWindow, o, QObject::objectName, QGraphicsItem::pos(), restoreState(), sep, SequenceMarker, QWidget::setGeometry(), QWidget::setVisible(), QList< T >::size(), StateFlagFloating, StateFlagVisible, QDockAreaLayoutItem::subinfo, TabMarker, QList< T >::takeAt(), toDockWidgetArea(), widget, WidgetMarker, and widgets.

Referenced by restoreState().

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

◆ saveState()

void QDockAreaLayoutInfo::saveState ( QDataStream & stream) const

Definition at line 1820 of file qdockarealayout.cpp.

References QList< T >::at(), QRect::height(), i, item, item_list, o, pick(), QGraphicsItem::pos(), Q_UNLIKELY, qUtf16Printable, qWarning, SequenceMarker, QList< T >::size(), StateFlagFloating, StateFlagVisible, TabMarker, WidgetMarker, QRect::width(), QGraphicsItem::window(), QGraphicsItem::x(), QRect::x(), and QRect::y().

Referenced by QDockAreaLayout::saveState().

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

◆ separatorMove() [1/2]

int QDockAreaLayoutInfo::separatorMove ( const QList< int > & separator,
const QPoint & origin,
const QPoint & dest )

Definition at line 3325 of file qdockarealayout.cpp.

References info, and pick().

+ Here is the call graph for this function:

◆ separatorMove() [2/2]

int QDockAreaLayoutInfo::separatorMove ( int index,
int delta )

Definition at line 935 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::GapItem, i, item, item_list, itemRect(), list, o, pick(), QGraphicsItem::pos(), Q_ASSERT, sep, separatorMoveHelper(), and QList< T >::size().

+ Here is the call graph for this function:

◆ separatorRect() [1/2]

QRect QDockAreaLayoutInfo::separatorRect ( const QList< int > & path) const

Definition at line 1392 of file qdockarealayout.cpp.

References QList< T >::at(), item, item_list, Q_ASSERT, and separatorRect().

+ Here is the call graph for this function:

◆ separatorRect() [2/2]

QRect QDockAreaLayoutInfo::separatorRect ( int index) const

Definition at line 1373 of file qdockarealayout.cpp.

References QList< T >::at(), item, item_list, o, pos, QGraphicsItem::pos(), rect, rpick(), sep, QRect::size(), and QRect::topLeft().

Referenced by findSeparator(), paintSeparators(), separatorRect(), QDockAreaLayout::separatorRect(), and separatorRegion().

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

◆ separatorRegion()

QRegion QDockAreaLayoutInfo::separatorRegion ( ) const

Definition at line 1611 of file qdockarealayout.cpp.

References QList< T >::at(), i, isEmpty(), item, item_list, next, separatorRect(), QList< T >::size(), and QDockAreaLayoutItem::subinfo.

+ Here is the call graph for this function:

◆ size()

QSize QDockAreaLayoutInfo::size ( ) const

Definition at line 242 of file qdockarealayout.cpp.

References isEmpty(), rect, and QRect::size().

Referenced by QDockAreaLayout::getGrid(), itemRect(), QDockAreaLayout::minimumStableSize(), and QDockAreaLayout::resizeDocks().

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

◆ sizeHint()

QSize QDockAreaLayoutInfo::sizeHint ( ) const

Definition at line 398 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, QDockAreaLayoutItem::hasFixedSize(), i, isEmpty(), item, item_list, o, perp(), pick(), qMax(), qMin(), QWIDGETSIZE_MAX, QTabBar::RoundedEast, QTabBar::RoundedNorth, QTabBar::RoundedSouth, QTabBar::RoundedWest, rperp(), rpick(), sep, QList< T >::size(), QTabBar::TriangularEast, QTabBar::TriangularNorth, QTabBar::TriangularSouth, and QTabBar::TriangularWest.

Referenced by QDockAreaLayout::getGrid(), QDockAreaLayoutItem::sizeHint(), and QDockAreaLayout::sizeHint().

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

◆ split()

void QDockAreaLayoutInfo::split ( int index,
Qt::Orientation orientation,
QLayoutItem * dockWidgetItem )

Definition at line 1715 of file qdockarealayout.cpp.

References QDockAreaLayoutInfo(), QList< T >::append(), QList< T >::at(), dockPos, QList< T >::insert(), item_list, mainWindow, o, sep, and QDockAreaLayoutItem::widgetItem.

+ Here is the call graph for this function:

◆ takeAt()

QLayoutItem * QDockAreaLayoutInfo::takeAt ( int * x,
int index )

Definition at line 1762 of file qdockarealayout.cpp.

References QGraphicsItem::flags(), i, item, item_list, QDockAreaLayoutItem::KeepSize, ret, QList< T >::size(), and unnest().

+ Here is the call graph for this function:

◆ unnest()

void QDockAreaLayoutInfo::unnest ( int index)

Definition at line 979 of file qdockarealayout.cpp.

References child, QList< T >::clear(), item, item_list, and QList< T >::removeAt().

Referenced by remove(), and takeAt().

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

◆ unplug()

QLayoutItem * QDockAreaLayoutInfo::unplug ( const QList< int > & path)

Definition at line 1051 of file qdockarealayout.cpp.

References QList< T >::at(), QGraphicsItem::flags(), QDockAreaLayoutItem::flags, QDockAreaLayoutItem::GapItem, item, item_list, next, QGraphicsItem::pos(), prev(), Q_ASSERT, and sep.

Referenced by QDockAreaLayout::unplug().

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

Member Data Documentation

◆ dockPos

QInternal::DockPosition QDockAreaLayoutInfo::dockPos

Definition at line 166 of file qdockarealayout_p.h.

Referenced by insertGap(), restoreState(), and split().

◆ item_list

◆ mainWindow

QMainWindow* QDockAreaLayoutInfo::mainWindow

Definition at line 169 of file qdockarealayout_p.h.

Referenced by insertGap(), mainWindowLayout(), restoreState(), and split().

◆ o

◆ rect

◆ sep

◆ separatorWidgets

QList<QWidget *> QDockAreaLayoutInfo::separatorWidgets
mutable

Definition at line 165 of file qdockarealayout_p.h.


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