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>.
|
#include <qdockarealayout_p.h>
Public Types | |
enum | { EmptyDropAreaSize = 80 } |
enum | { DockWidgetStateMarker = 0xfd , FloatingDockWidgetTabMarker = 0xf9 } |
Static Public Member Functions | |
static QRect | constrainedRect (QRect rect, QWidget *widget) |
Public Attributes | |
Qt::DockWidgetArea | corners [4] |
QRect | rect |
QLayoutItem * | centralWidgetItem |
QMainWindow * | mainWindow |
QRect | centralWidgetRect |
QDockAreaLayoutInfo | docks [4] |
int | sep |
bool | fallbackToSizeHints |
QList< QWidget * > | separatorWidgets |
Definition at line 196 of file qdockarealayout_p.h.
anonymous enum |
Enumerator | |
---|---|
EmptyDropAreaSize |
Definition at line 199 of file qdockarealayout_p.h.
anonymous enum |
Enumerator | |
---|---|
DockWidgetStateMarker | |
FloatingDockWidgetTabMarker |
Definition at line 214 of file qdockarealayout_p.h.
QDockAreaLayout::QDockAreaLayout | ( | QMainWindow * | win | ) |
Definition at line 2325 of file qdockarealayout.cpp.
References QInternal::BottomDock, Qt::BottomDockWidgetArea, Qt::BottomLeftCorner, Qt::BottomRightCorner, centralWidgetItem, corners, docks, Qt::Horizontal, QInternal::LeftDock, mainWindow, QStyle::pixelMetric(), QStyle::PM_DockWidgetSeparatorExtent, QInternal::RightDock, QTabBar::RoundedSouth, sep, QWidget::style(), QInternal::TopDock, Qt::TopDockWidgetArea, Qt::TopLeftCorner, Qt::TopRightCorner, Qt::Vertical, and win.
void QDockAreaLayout::addDockWidget | ( | QInternal::DockPosition | pos, |
QDockWidget * | dockWidget, | ||
Qt::Orientation | orientation ) |
Definition at line 3120 of file qdockarealayout.cpp.
References docks, dockWidget, info, mainWindow, QObject::objectName, pos, removePlaceHolder(), and sep.
void QDockAreaLayout::apply | ( | bool | animate | ) |
Definition at line 3232 of file qdockarealayout.cpp.
References QWidgetAnimator::animate(), apply(), centralWidgetItem, centralWidgetRect, QInternal::DockCount, docks, i, QLayoutItem::isEmpty(), mainWindow, qt_mainwindow_layout(), sep, QLayoutItem::widget(), and QMainWindowLayout::widgetAnimator.
Referenced by apply(), and separatorMove().
void QDockAreaLayout::clear | ( | ) |
Definition at line 2975 of file qdockarealayout.cpp.
References centralWidgetRect, clear(), QInternal::DockCount, docks, i, and rect.
Referenced by clear().
Try to fit the given rectangle rect on the screen which contains the window widget. Used to compute the geometry of a dragged a dock widget that should be shown with rect, but needs to be visible on the screen
Definition at line 3062 of file qdockarealayout.cpp.
References QRect::bottom(), QScreen::geometry, QRect::height(), QRect::isValid(), QRect::left(), QRect::moveBottom(), QRect::moveLeft(), QRect::moveRight(), QRect::moveTop(), QGuiApplication::primaryScreen, qMax(), qMin(), rect, QRect::right(), screen, QWidget::screen(), QGuiApplication::screenAt(), QRect::setHeight(), QRect::setWidth(), QRect::top(), QRect::topLeft(), widget, and QRect::width().
Referenced by restoreDockWidget(), QMainWindowLayoutState::restoreState(), and QDockAreaLayoutInfo::restoreState().
void QDockAreaLayout::deleteAllLayoutItems | ( | ) |
Definition at line 3414 of file qdockarealayout.cpp.
References deleteAllLayoutItems(), QInternal::DockCount, docks, and i.
Referenced by deleteAllLayoutItems().
Definition at line 2531 of file qdockarealayout.cpp.
References QRect::adjust(), QRect::contains(), QInternal::DockCount, docks, QDockAreaLayoutInfo::findSeparator(), i, info, QRect::isNull(), pos, QList< T >::prepend(), rect, sep, and separatorRect().
void QDockAreaLayout::fitLayout | ( | ) |
Definition at line 2963 of file qdockarealayout.cpp.
References getGrid(), QRect::height(), QRect::left(), qGeomCalc(), rect, sep, setGrid(), QRect::top(), and QRect::width().
Referenced by styleChangedEvent().
Definition at line 2444 of file qdockarealayout.cpp.
References QMainWindow::AllowNestedDocks, QMainWindow::AllowTabbedDocks, QDockAreaLayoutInfo::AllowTabs, QInternal::DockCount, QMainWindow::dockOptions, docks, QMainWindow::ForceTabbedDocks, QDockAreaLayoutInfo::ForceTabs, QDockAreaLayoutInfo::gapIndex(), gapRect(), i, info, mainWindow, QDockAreaLayoutInfo::NoTabs, pos, QList< T >::prepend(), and QMainWindow::VerticalTabs.
Definition at line 3447 of file qdockarealayout.cpp.
References info.
Referenced by gapIndex().
QRect QDockAreaLayout::gapRect | ( | QInternal::DockPosition | dockPos | ) | const |
Definition at line 2494 of file qdockarealayout.cpp.
References QRect::bottom(), QInternal::BottomDock, QInternal::DockCount, EmptyDropAreaSize, QRect::height(), QWidget::height, QRect::left(), QInternal::LeftDock, mainWindow, Q_ASSERT_X, qCWarning, rect, QRect::right(), QInternal::RightDock, sep, QWidget::size, QRect::top(), QInternal::TopDock, QRect::width(), and QWidget::width.
void QDockAreaLayout::getGrid | ( | QList< QLayoutStruct > * | ver_struct_list, |
QList< QLayoutStruct > * | hor_struct_list ) |
Definition at line 2689 of file qdockarealayout.cpp.
References QRect::bottom(), QInternal::BottomDock, Qt::BottomDockWidgetArea, Qt::BottomLeftCorner, Qt::BottomRightCorner, QSize::boundedTo(), centralWidgetItem, centralWidgetRect, corners, docks, fallbackToSizeHints, QRect::height(), i, QDockAreaLayoutInfo::isEmpty(), QLayoutItem::isEmpty(), QRect::left(), QInternal::LeftDock, Qt::LeftDockWidgetArea, QDockAreaLayoutInfo::maximumSize(), QLayoutItem::maximumSize(), QDockAreaLayoutInfo::minimumSize(), minimumSize(), QLayoutItem::minimumSize(), qMax(), QWIDGETSIZE_MAX, QDockAreaLayoutInfo::rect, rect, QRect::right(), QInternal::RightDock, Qt::RightDockWidgetArea, sep, QRect::setLeft(), QDockAreaLayoutInfo::size(), QRect::size(), QDockAreaLayoutInfo::sizeHint(), sizeHint(), QLayoutItem::sizeHint(), QRect::top(), QInternal::TopDock, Qt::TopDockWidgetArea, Qt::TopLeftCorner, Qt::TopRightCorner, and QRect::width().
Referenced by fitLayout(), and separatorMove().
Definition at line 2432 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, dockWidget, i, QDockAreaLayoutInfo::indexOf(), and QList< T >::prepend().
Referenced by keepSize(), resizeDocks(), and splitDockWidget().
Definition at line 2420 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, i, QDockAreaLayoutInfo::indexOfPlaceHolder(), and QList< T >::prepend().
Referenced by removePlaceHolder(), and restoreDockWidget().
QDockAreaLayoutInfo * QDockAreaLayout::info | ( | const QList< int > & | path | ) |
Definition at line 2566 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, QDockAreaLayoutInfo::info(), and Q_ASSERT.
const QDockAreaLayoutInfo * QDockAreaLayout::info | ( | const QList< int > & | path | ) | const |
Definition at line 2578 of file qdockarealayout.cpp.
References info.
QDockAreaLayoutInfo * QDockAreaLayout::info | ( | QWidget * | widget | ) |
Definition at line 2556 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, i, info, and widget.
bool QDockAreaLayout::insertGap | ( | const QList< int > & | path, |
QLayoutItem * | dockWidgetItem ) |
Definition at line 2633 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, QDockAreaLayoutInfo::insertGap(), and Q_ASSERT.
bool QDockAreaLayout::isValid | ( | ) | const |
Definition at line 2351 of file qdockarealayout.cpp.
References QRect::isValid(), and rect.
Referenced by styleChangedEvent().
QDockAreaLayoutItem & QDockAreaLayout::item | ( | const QList< int > & | path | ) |
Definition at line 2583 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, QDockAreaLayoutInfo::item(), and Q_ASSERT.
QLayoutItem * QDockAreaLayout::itemAt | ( | int * | x, |
int | index ) const |
Definition at line 3379 of file qdockarealayout.cpp.
References centralWidgetItem, QInternal::DockCount, docks, i, Q_ASSERT, and ret.
Definition at line 2591 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, QDockAreaLayoutInfo::itemRect(), and Q_ASSERT.
void QDockAreaLayout::keepSize | ( | QDockWidget * | w | ) |
Definition at line 3458 of file qdockarealayout.cpp.
References QGraphicsItem::flags(), indexOf(), item, and QDockAreaLayoutItem::KeepSize.
QSize QDockAreaLayout::minimumSize | ( | ) | const |
Definition at line 3041 of file qdockarealayout.cpp.
References QDockAreaLayoutInfo::minimumSize(), QLayoutItem::minimumSize(), and size_helper().
Referenced by getGrid().
QSize QDockAreaLayout::minimumStableSize | ( | ) | const |
Returns the smallest size that doesn't change the size of any of the dock areas.
Definition at line 3051 of file qdockarealayout.cpp.
References QLayoutItem::minimumSize(), QDockAreaLayoutInfo::size(), and size_helper().
void QDockAreaLayout::paintSeparators | ( | QPainter * | p, |
QWidget * | widget, | ||
const QRegion & | clip, | ||
const QPoint & | mouse ) const |
Definition at line 3248 of file qdockarealayout.cpp.
References QRegion::contains(), QInternal::DockCount, docks, Qt::Horizontal, i, paintSep(), separatorRect(), Qt::Vertical, and widget.
QLayoutItem * QDockAreaLayout::plug | ( | const QList< int > & | path | ) |
Definition at line 2641 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, item, mainWindow, QDockAreaLayoutInfo::plug(), and Q_ASSERT.
Definition at line 2663 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, Q_ASSERT, and QDockAreaLayoutInfo::remove().
Referenced by removePlaceHolder().
Definition at line 2671 of file qdockarealayout.cpp.
References QObject::findChildren(), Qt::FindDirectChildrenOnly, indexOfPlaceHolder(), mainWindow, and remove().
Referenced by addDockWidget(), and splitDockWidget().
void QDockAreaLayout::resizeDocks | ( | const QList< QDockWidget * > & | docks, |
const QList< int > & | sizes, | ||
Qt::Orientation | o ) |
Definition at line 3168 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, fallbackToSizeHints, i, indexOf(), info, item, o, pick(), Q_ASSERT, Q_UNLIKELY, qWarning, rpick(), sep, and QDockAreaLayoutInfo::size().
bool QDockAreaLayout::restoreDockWidget | ( | QDockWidget * | dockWidget | ) |
Definition at line 3083 of file qdockarealayout.cpp.
References constrainedRect(), dockWidget, QObject::findChildren(), Qt::FindDirectChildrenOnly, indexOfPlaceHolder(), item, mainWindow, QObject::objectName, Q_ASSERT, QWidget::setParent(), QWidget::setVisible(), and QWidget::setWindowState().
bool QDockAreaLayout::restoreState | ( | QDataStream & | stream, |
const QList< QDockWidget * > & | widgets, | ||
bool | testing = false ) |
Definition at line 2378 of file qdockarealayout.cpp.
References centralWidgetRect, corners, docks, fallbackToSizeHints, i, ok, pos, QDockAreaLayoutInfo::rect, and restoreState().
Referenced by restoreState().
void QDockAreaLayout::saveState | ( | QDataStream & | stream | ) | const |
Definition at line 2356 of file qdockarealayout.cpp.
References centralWidgetRect, corners, QInternal::DockCount, docks, DockWidgetStateMarker, i, QDockAreaLayoutInfo::isEmpty(), QDockAreaLayoutInfo::rect, QDockAreaLayoutInfo::saveState(), and QRect::size().
int QDockAreaLayout::separatorMove | ( | const QList< int > & | separator, |
const QPoint & | origin, | ||
const QPoint & | dest ) |
Definition at line 3282 of file qdockarealayout.cpp.
References apply(), fallbackToSizeHints, getGrid(), Qt::Horizontal, info, QInternal::LeftDock, list, o, pick(), QInternal::RightDock, sep, separatorMoveHelper(), setGrid(), QInternal::TopDock, and Qt::Vertical.
Definition at line 2620 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, Q_ASSERT, QDockAreaLayoutInfo::separatorRect(), and separatorRect().
QRect QDockAreaLayout::separatorRect | ( | int | index | ) | const |
Definition at line 2599 of file qdockarealayout.cpp.
References QInternal::BottomDock, docks, QInternal::LeftDock, QInternal::RightDock, sep, and QInternal::TopDock.
Referenced by findSeparator(), paintSeparators(), separatorRect(), and separatorRegion().
QRegion QDockAreaLayout::separatorRegion | ( | ) | const |
Definition at line 3267 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, i, and separatorRect().
void QDockAreaLayout::setGrid | ( | QList< QLayoutStruct > * | ver_struct_list, |
QList< QLayoutStruct > * | hor_struct_list ) |
Definition at line 2867 of file qdockarealayout.cpp.
References QRect::bottom(), QInternal::BottomDock, Qt::BottomDockWidgetArea, Qt::BottomLeftCorner, Qt::BottomRightCorner, centralWidgetRect, corners, docks, QDockAreaLayoutInfo::fitItems(), QRect::left(), QInternal::LeftDock, Qt::LeftDockWidgetArea, QDockAreaLayoutInfo::rect, rect, QRect::right(), QInternal::RightDock, Qt::RightDockWidgetArea, sep, QRect::setHeight(), QRect::setLeft(), QRect::setTop(), QRect::setWidth(), QRect::top(), QInternal::TopDock, Qt::TopDockWidgetArea, Qt::TopLeftCorner, and Qt::TopRightCorner.
Referenced by fitLayout(), and separatorMove().
QSize QDockAreaLayout::size_helper | ( | SizePMF | sizeFn, |
CenterPMF | centerFn ) const |
Definition at line 2985 of file qdockarealayout.cpp.
References QInternal::BottomDock, Qt::BottomLeftCorner, Qt::BottomRightCorner, centralWidgetItem, corners, docks, QDockAreaLayoutInfo::isEmpty(), QInternal::LeftDock, Qt::LeftDockWidgetArea, qMax(), QInternal::RightDock, Qt::RightDockWidgetArea, sep, QInternal::TopDock, Qt::TopLeftCorner, and Qt::TopRightCorner.
Referenced by minimumSize(), minimumStableSize(), and sizeHint().
QSize QDockAreaLayout::sizeHint | ( | ) | const |
Definition at line 3036 of file qdockarealayout.cpp.
References size_helper(), QDockAreaLayoutInfo::sizeHint(), and QLayoutItem::sizeHint().
Referenced by getGrid().
void QDockAreaLayout::splitDockWidget | ( | QDockWidget * | after, |
QDockWidget * | dockWidget, | ||
Qt::Orientation | orientation ) |
Definition at line 3217 of file qdockarealayout.cpp.
References dockWidget, indexOf(), info, QObject::objectName, Q_ASSERT, and removePlaceHolder().
void QDockAreaLayout::styleChangedEvent | ( | ) |
Definition at line 3468 of file qdockarealayout.cpp.
References fitLayout(), isValid(), mainWindow, QStyle::pixelMetric(), QStyle::PM_DockWidgetSeparatorExtent, sep, and QWidget::style().
QLayoutItem * QDockAreaLayout::takeAt | ( | int * | x, |
int | index ) |
Definition at line 3395 of file qdockarealayout.cpp.
References centralWidgetItem, QInternal::DockCount, docks, i, Q_ASSERT, and ret.
QLayoutItem * QDockAreaLayout::unplug | ( | const QList< int > & | path | ) |
Definition at line 2655 of file qdockarealayout.cpp.
References QInternal::DockCount, docks, Q_ASSERT, and QDockAreaLayoutInfo::unplug().
QLayoutItem* QDockAreaLayout::centralWidgetItem |
Definition at line 203 of file qdockarealayout_p.h.
Referenced by QDockAreaLayout(), apply(), getGrid(), itemAt(), size_helper(), and takeAt().
QRect QDockAreaLayout::centralWidgetRect |
Definition at line 205 of file qdockarealayout_p.h.
Referenced by apply(), clear(), getGrid(), restoreState(), saveState(), and setGrid().
Qt::DockWidgetArea QDockAreaLayout::corners[4] |
Definition at line 201 of file qdockarealayout_p.h.
Referenced by QDockAreaLayout(), getGrid(), restoreState(), saveState(), setGrid(), and size_helper().
QDockAreaLayoutInfo QDockAreaLayout::docks[4] |
Definition at line 207 of file qdockarealayout_p.h.
Referenced by QDockAreaLayout(), addDockWidget(), apply(), clear(), deleteAllLayoutItems(), findSeparator(), gapIndex(), getGrid(), indexOf(), indexOfPlaceHolder(), info(), info(), insertGap(), item(), itemAt(), itemRect(), paintSeparators(), plug(), remove(), resizeDocks(), restoreState(), saveState(), separatorRect(), separatorRect(), separatorRegion(), setGrid(), size_helper(), takeAt(), and unplug().
bool QDockAreaLayout::fallbackToSizeHints |
Definition at line 209 of file qdockarealayout_p.h.
Referenced by getGrid(), resizeDocks(), restoreState(), and separatorMove().
QMainWindow* QDockAreaLayout::mainWindow |
Definition at line 204 of file qdockarealayout_p.h.
Referenced by QDockAreaLayout(), addDockWidget(), apply(), gapIndex(), gapRect(), plug(), removePlaceHolder(), restoreDockWidget(), and styleChangedEvent().
QRect QDockAreaLayout::rect |
Definition at line 202 of file qdockarealayout_p.h.
Referenced by clear(), constrainedRect(), findSeparator(), fitLayout(), gapRect(), getGrid(), isValid(), and setGrid().
int QDockAreaLayout::sep |
Definition at line 208 of file qdockarealayout_p.h.
Referenced by QDockAreaLayout(), addDockWidget(), apply(), findSeparator(), fitLayout(), gapRect(), getGrid(), resizeDocks(), separatorMove(), separatorRect(), setGrid(), size_helper(), and styleChangedEvent().
Definition at line 210 of file qdockarealayout_p.h.