|
QtCanpool 3.3.0
|
The central dock window that maintains the complete docking system. 更多...
#include <qxdock/dockwindow.h>

Public 类型 | |
| using | Super = DockContainer |
Public 类型 继承自 QxDock::DockContainer | |
| using | Super = QFrame |
Public 成员函数 | |
| DockWindow (QWidget *parent=nullptr) | |
| virtual | ~DockWindow () |
| DockPanel * | addDockWidget (Qx::DockWidgetArea area, DockWidget *w, DockPanel *p=nullptr, int index=-1) |
| Adds dockwidget into the given area. | |
| DockPanel * | addDockWidgetTab (Qx::DockWidgetArea area, DockWidget *w) |
| This function will add the given DockWidget to the given dock area as a new tab. | |
| DockPanel * | addDockWidgetTab (DockWidget *w, DockPanel *p, int index=-1) |
| This function will add the given DockWidget to the given DockPanel as a new tab. | |
| DockPanel * | addDockWidgetToContainer (Qx::DockWidgetArea area, DockWidget *w, DockContainer *container) |
| Adds dockwidget into the given container. | |
| void | removeDockWidget (DockWidget *w) |
| DockWidget * | findDockWidget (const QString &objectName) const |
| Searches for a registered dock widget with the given objectName | |
| DockAutoHideContainer * | addAutoHideDockWidget (Qx::DockSideBarArea area, DockWidget *w) |
| Adds an Auto-Hide widget to the dock window container pinned to the given side bar area. | |
| DockAutoHideContainer * | addAutoHideDockWidgetToContainer (Qx::DockSideBarArea area, DockWidget *w, DockContainer *container) |
| Adds an Auto-Hide widget to the given container pinned to the given side bar area in this container. | |
| DockFloatingContainer * | addDockWidgetFloating (DockWidget *w) |
| Adds the given DockWidget floating and returns the created DockFloatingContainer instance. | |
| const QList< DockContainer * > | dockContainers () const |
| Returns the list of all active and visible dock containers Dock containers are the main dock manager and all floating widgets | |
| QMap< QString, DockWidget * > | dockWidgetsMap () const |
| This function returns a readable reference to the internal dock widgets map so that it is possible to iterate over all dock widgets | |
| DockWidget * | centralWidget () const |
| DockPanel * | setCentralWidget (DockWidget *widget) |
| Adds dockwidget widget into the central area and marks it as central widget. | |
| bool | isLeavingMinimizedState () const |
| This function returns true, if the DockWindow window is restoring from minimized state. | |
| Qt::ToolButtonStyle | dockWidgetToolBarStyle (DockWidget::State state) const |
| void | setDockWidgetToolBarStyle (Qt::ToolButtonStyle style, DockWidget::State state) |
| This function sets the tool button style for the given dock widget state. | |
| QSize | dockWidgetToolBarIconSize (DockWidget::State state) const |
| void | setDockWidgetToolBarIconSize (const QSize &iconSize, DockWidget::State state) |
| This function sets the tool button icon size for the given state. | |
| DockWidget::DockWidgetFeatures | globallyLockedDockWidgetFeatures () const |
| Returns all dock widget features that are globally locked by the dock window. | |
| void | lockDockWidgetFeaturesGlobally (DockWidget::DockWidgetFeatures features=DockWidget::GloballyLockableFeatures) |
| Globally Lock features of all dock widgets to "freeze" the current workspace layout. | |
| QList< int > | splitterSizes (DockPanel *panel) const |
| Returns the sizes of the splitter that contains the dock panel. | |
| void | setSplitterSizes (DockPanel *panel, const QList< int > &sizes) |
| Update the sizes of a splitter Programmatically updates the sizes of a given splitter by calling QSplitter::setSizes(). | |
| QByteArray | saveState (int version=0) const |
| Saves the current state of the dockwindow and all its dock widgets into the returned QByteArray. | |
| bool | restoreState (const QByteArray &state, int version=0) |
| Restores the state of this dockwindow dockwidgets. | |
| bool | isRestoringState () const |
| This function returns true between the restoringState() and stateRestored() signals. | |
| void | addPerspective (const QString &uniquePrespectiveName) |
| Saves the current perspective to the internal list of perspectives. | |
| void | removePerspective (const QString &name) |
| void | removePerspectives (const QStringList &names) |
| QStringList | perspectiveNames () const |
| void | savePerspectives (QSettings &settings) const |
| void | loadPerspectives (QSettings &settings) |
| void | dockWidgetAdded (DockWidget *w) |
| void | dockWidgetAboutToBeRemoved (DockWidget *w) |
| void | dockWidgetRemoved (DockWidget *w) |
| void | floatingWidgetCreated (DockFloatingContainer *floatingWidget) |
| void | focusedDockWidgetChanged (DockWidget *old, DockWidget *now) |
| void | restoringState () |
| void | stateRestored () |
| void | perspectiveListChanged () |
| void | perspectiveListLoaded () |
| void | perspectivesRemoved () |
| void | openingPerspective (const QString &perspectiveName) |
| void | perspectiveOpened (const QString &perspectiveName) |
| void | setDockWidgetFocused (DockWidget *w) |
| Request a focus change to the given dock widget. | |
| void | endLeavingMinimizedState () |
| void | openPerspective (const QString &perspectiveName) |
| void | hideWindowAndFloatingWidgets () |
| hide DockWindow and all floating widgets. | |
Public 成员函数 继承自 QxDock::DockContainer | |
| DockContainer (DockWindow *window, QWidget *parent=nullptr) | |
| virtual | ~DockContainer () |
| DockPanel * | addDockWidget (Qx::DockWidgetArea area, DockWidget *w, DockPanel *p=nullptr, int index=-1) |
| Adds dockwidget into the given area. | |
| void | removeDockWidget (DockWidget *w) |
| virtual unsigned int | zOrderIndex () const |
| bool | isInFrontOf (DockContainer *other) const |
| This function returns true if this container widgets z order index is higher than the index of the container widget given in other parameter | |
| DockWindow * | dockWindow () const |
| DockPanel * | dockPanelAt (const QPoint &globalPos) const |
| DockPanel * | dockPanel (int index) const |
| QList< DockPanel * > | openedDockPanels () const |
| Returns the list of dock panels that are not closed If all dock widgets in a dock panel are closed, the dock panel will be closed | |
| QList< DockWidget * > | openedDockWidgets () const |
| Returns a list for all open dock widgets in all open dock panels | |
| bool | hasOpenDockPanels () const |
| This function returns true, if the container has open dock panels. | |
| bool | hasTopLevelDockWidget () const |
| This function returns true if this dock panel has only one single visible dock widget. | |
| int | dockPanelCount () const |
| int | visibleDockPanelCount () const |
| DockWidget::DockWidgetFeatures | features () const |
| This functions returns the dock widget features of all dock widget in this container. | |
| bool | isFloating () const |
| DockFloatingContainer * | floatingWidget () const |
| If this dock container is in a floating widget, this function returns the floating widget. | |
| void | closeOtherAreas (DockPanel *keepOpenPanel) |
| DockSideBar * | autoHideSideBar (Qx::DockSideBarArea area) const |
| QList< DockAutoHideContainer * > | autoHideWidgets () const |
| QRect | contentRect () const |
| Returns the content rectangle mapped to global space. | |
| void | dockAreasAdded () |
| void | dockAreasRemoved () |
| void | autoHideWidgetCreated (DockAutoHideContainer *autoHideWidget) |
| void | dockAreaViewToggled (DockPanel *panel, bool open) |
Protected 成员函数 | |
| void | registerDockContainer (DockContainer *container) |
| void | removeDockContainer (DockContainer *container) |
| void | registerFloatingWidget (DockFloatingContainer *floatingWidget) |
| void | removeFloatingWidget (DockFloatingContainer *floatingWidget) |
| DockOverlay * | containerOverlay () const |
| DockOverlay * | panelOverlay () const |
| void | notifyDockAreaRelocation (QWidget *droppedWidget) |
| void | notifyFloatingWidgetDrop (DockFloatingContainer *floatingWidget) |
| DockFocusController * | dockFocusController () const |
| void | restoreHiddenFloatingWidgets () |
| bool | eventFilter (QObject *obj, QEvent *e) override |
| virtual void | showEvent (QShowEvent *e) override |
Protected 成员函数 继承自 QxDock::DockContainer | |
| DockSplitter * | rootSplitter () const |
| Access function for the internal root splitter | |
| void | createRootSplitter () |
| void | addDockPanel (DockPanel *panel, Qx::DockWidgetArea area=Qx::CenterDockWidgetArea) |
| void | removeDockPanel (DockPanel *panel) |
| QList< QPointer< DockPanel > > | removeAllDockPanels () |
| Remove all dock panles and returns the list of removed dock panles | |
| DockWidget * | topLevelDockWidget () const |
| If hasTopLevelDockWidget() returns true, this function returns the one and only visible dock widget. | |
| DockPanel * | topLevelDockPanel () const |
| DockPanel * | lastAddedDockPanel (Qx::DockWidgetArea area) const |
| This function returns the last added dock panel for the given area identifier or 0 if no dock panel has been added for the given area | |
| QList< DockWidget * > | dockWidgets () const |
| This function returns a list of all dock widgets in this container. | |
| void | updateSplitterHandles (QSplitter *splitter) |
| This function forces the dock container widget to update handles of splitters based on resize modes of dock widgets contained in the container. | |
| void | dropFloatingWidget (DockFloatingContainer *floatingWidget, const QPoint &targetPos) |
| Drop floating widget into the container | |
| void | dropWidget (QWidget *widget, Qx::DockWidgetArea dropArea, DockPanel *targetPanel, int tabIndex=-1) |
| Drop a dock panel or a dock widget given in widget parameter. | |
| void | createSideTabBarWidgets () |
| DockAutoHideContainer * | createAndSetupAutoHideContainer (Qx::DockSideBarArea area, DockWidget *w, int tabIndex=-1) |
| Creates and initializes a dockwidget auto hide container into the given area. | |
| void | registerAutoHideWidget (DockAutoHideContainer *autoHideWidget) |
| void | removeAutoHideWidget (DockAutoHideContainer *autoHideWidget) |
| void | handleAutoHideWidgetEvent (QEvent *e, QWidget *w) |
| void | saveState (QXmlStreamWriter &s) const |
| bool | restoreState (DockStateReader &s, bool testing) |
| virtual bool | event (QEvent *e) override |
| Handles activation events to update zOrderIndex | |
友元 | |
| class | DockContainer |
| class | DockContainerPrivate |
| class | DockFloatingContainer |
| class | DockFloatingContainerPrivate |
| class | DockTitleBar |
| class | DockFloatingPreview |
| class | DockFloatingPreviewPrivate |
| class | DockTabPrivate |
| class | DockSideBar |
| class | DockSideTabPrivate |
The central dock window that maintains the complete docking system.
The dock window uses an internal stylesheet to style its components like splitters, tabs and buttons. If you want to disable this stylesheet because your application uses its own, just call the function for settings the stylesheet with an empty string.
在文件 dockwindow.h 第 35 行定义.
在文件 dockwindow.h 第 39 行定义.
|
explicit |
在文件 dockwindow.cpp 第 339 行定义.
|
virtual |
在文件 dockwindow.cpp 第 362 行定义.
| DockAutoHideContainer * QxDock::DockWindow::addAutoHideDockWidget | ( | Qx::DockSideBarArea | area, |
| DockWidget * | w | ||
| ) |
Adds an Auto-Hide widget to the dock window container pinned to the given side bar area.
在文件 dockwindow.cpp 第 495 行定义.
| DockAutoHideContainer * QxDock::DockWindow::addAutoHideDockWidgetToContainer | ( | Qx::DockSideBarArea | area, |
| DockWidget * | w, | ||
| DockContainer * | container | ||
| ) |
Adds an Auto-Hide widget to the given container pinned to the given side bar area in this container.
在文件 dockwindow.cpp 第 505 行定义.
| DockPanel * QxDock::DockWindow::addDockWidget | ( | Qx::DockWidgetArea | area, |
| DockWidget * | w, | ||
| DockPanel * | p = nullptr, |
||
| int | index = -1 |
||
| ) |
Adds dockwidget into the given area.
If DockPanel is not null, then the area parameter indicates the area into the DockPanel. If DockPanel is null, the DockWidget will be dropped into the container. If you would like to add a dock widget tabified, then you need to add it to an existing dock panel object into the CenterDockWidgetArea. The following code shows this:
| area | The dock area the dock widget is added to |
| w | The dock widget to add |
| p | The dock panel to add the dock widget into, or null to use the container itself |
| index | Tab index, used only when DockPanel is not null and area is CenterDockWidgetArea |
在文件 dockwindow.cpp 第 414 行定义.
| DockFloatingContainer * QxDock::DockWindow::addDockWidgetFloating | ( | DockWidget * | w | ) |
Adds the given DockWidget floating and returns the created DockFloatingContainer instance.
在文件 dockwindow.cpp 第 524 行定义.
| DockPanel * QxDock::DockWindow::addDockWidgetTab | ( | DockWidget * | w, |
| DockPanel * | p, | ||
| int | index = -1 |
||
| ) |
This function will add the given DockWidget to the given DockPanel as a new tab.
If index is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.
在文件 dockwindow.cpp 第 449 行定义.
| DockPanel * QxDock::DockWindow::addDockWidgetTab | ( | Qx::DockWidgetArea | area, |
| DockWidget * | w | ||
| ) |
This function will add the given DockWidget to the given dock area as a new tab.
If no DockPanel exists for the given area identifier, a new DockPanel is created.
在文件 dockwindow.cpp 第 434 行定义.
| DockPanel * QxDock::DockWindow::addDockWidgetToContainer | ( | Qx::DockWidgetArea | area, |
| DockWidget * | w, | ||
| DockContainer * | container | ||
| ) |
Adds dockwidget into the given container.
This allows you to place the dock widget into a container, even if that container does not yet contain a DockWidget.
在文件 dockwindow.cpp 第 460 行定义.
| void QxDock::DockWindow::addPerspective | ( | const QString & | uniquePrespectiveName | ) |
Saves the current perspective to the internal list of perspectives.
A perspective is the current state of the dock window assigned with a certain name. This makes it possible for the user, to switch between different perspectives quickly. If a perspective with the given name already exists, then it will be overwritten with the new state.
在文件 dockwindow.cpp 第 874 行定义.
| DockWidget * QxDock::DockWindow::centralWidget | ( | ) | const |
在文件 dockwindow.cpp 第 565 行定义.
|
protected |
在文件 dockwindow.cpp 第 1042 行定义.
| const QList< DockContainer * > QxDock::DockWindow::dockContainers | ( | ) | const |
Returns the list of all active and visible dock containers Dock containers are the main dock manager and all floating widgets
在文件 dockwindow.cpp 第 549 行定义.
|
protected |
在文件 dockwindow.cpp 第 1070 行定义.
| void QxDock::DockWindow::dockWidgetAboutToBeRemoved | ( | DockWidget * | w | ) |
| void QxDock::DockWindow::dockWidgetAdded | ( | DockWidget * | w | ) |
| void QxDock::DockWindow::dockWidgetRemoved | ( | DockWidget * | w | ) |
| QMap< QString, DockWidget * > QxDock::DockWindow::dockWidgetsMap | ( | ) | const |
This function returns a readable reference to the internal dock widgets map so that it is possible to iterate over all dock widgets
在文件 dockwindow.cpp 第 559 行定义.
| QSize QxDock::DockWindow::dockWidgetToolBarIconSize | ( | DockWidget::State | state | ) | const |
在文件 dockwindow.cpp 第 665 行定义.
| Qt::ToolButtonStyle QxDock::DockWindow::dockWidgetToolBarStyle | ( | DockWidget::State | state | ) | const |
在文件 dockwindow.cpp 第 637 行定义.
| void QxDock::DockWindow::endLeavingMinimizedState | ( | ) |
在文件 dockwindow.cpp 第 958 行定义.
|
overrideprotected |
在文件 dockwindow.cpp 第 1165 行定义.
| DockWidget * QxDock::DockWindow::findDockWidget | ( | const QString & | objectName | ) | const |
Searches for a registered dock widget with the given objectName
在文件 dockwindow.cpp 第 484 行定义.
| void QxDock::DockWindow::floatingWidgetCreated | ( | DockFloatingContainer * | floatingWidget | ) |
| void QxDock::DockWindow::focusedDockWidgetChanged | ( | DockWidget * | old, |
| DockWidget * | now | ||
| ) |
| DockWidget::DockWidgetFeatures QxDock::DockWindow::globallyLockedDockWidgetFeatures | ( | ) | const |
Returns all dock widget features that are globally locked by the dock window.
Globally locked features are removed from the features of all dock widgets.
在文件 dockwindow.cpp 第 695 行定义.
| void QxDock::DockWindow::hideWindowAndFloatingWidgets | ( | ) |
hide DockWindow and all floating widgets.
Calling regular QWidget::hide() hides the DockWindow but not the floating widgets;
在文件 dockwindow.cpp 第 982 行定义.
| bool QxDock::DockWindow::isLeavingMinimizedState | ( | ) | const |
This function returns true, if the DockWindow window is restoring from minimized state.
The DockWindow is in this state starting from the QWindowStateChangeEvent that signals the state change from minimized to normal until endLeavingMinimizedState() function is called.
在文件 dockwindow.cpp 第 631 行定义.
| bool QxDock::DockWindow::isRestoringState | ( | ) | const |
This function returns true between the restoringState() and stateRestored() signals.
在文件 dockwindow.cpp 第 860 行定义.
| void QxDock::DockWindow::loadPerspectives | ( | QSettings & | settings | ) |
在文件 dockwindow.cpp 第 919 行定义.
| void QxDock::DockWindow::lockDockWidgetFeaturesGlobally | ( | DockWidget::DockWidgetFeatures | features = DockWidget::GloballyLockableFeatures | ) |
Globally Lock features of all dock widgets to "freeze" the current workspace layout.
For example, it is now possible to lock the workspace to avoid accidentally dragging a docked view. Locking wasn’t possible before. So, users had to manually dock it back to the desired place after each accidental undock. You can use a combination of the following feature flags:
To clear the locked features, you can use DockWidget::NoDockWidgetFeatures The following code shows how to lock and unlock dock widget features globally.
在文件 dockwindow.cpp 第 722 行定义.
|
protected |
在文件 dockwindow.cpp 第 1054 行定义.
|
protected |
在文件 dockwindow.cpp 第 1062 行定义.
| void QxDock::DockWindow::openingPerspective | ( | const QString & | perspectiveName | ) |
| void QxDock::DockWindow::openPerspective | ( | const QString & | perspectiveName | ) |
在文件 dockwindow.cpp 第 965 行定义.
|
protected |
在文件 dockwindow.cpp 第 1048 行定义.
| void QxDock::DockWindow::perspectiveListChanged | ( | ) |
| void QxDock::DockWindow::perspectiveListLoaded | ( | ) |
| QStringList QxDock::DockWindow::perspectiveNames | ( | ) | const |
在文件 dockwindow.cpp 第 900 行定义.
| void QxDock::DockWindow::perspectiveOpened | ( | const QString & | perspectiveName | ) |
| void QxDock::DockWindow::perspectivesRemoved | ( | ) |
|
protected |
在文件 dockwindow.cpp 第 1011 行定义.
|
protected |
在文件 dockwindow.cpp 第 1029 行定义.
|
protected |
在文件 dockwindow.cpp 第 1017 行定义.
| void QxDock::DockWindow::removeDockWidget | ( | DockWidget * | w | ) |
在文件 dockwindow.cpp 第 469 行定义.
|
protected |
在文件 dockwindow.cpp 第 1036 行定义.
| void QxDock::DockWindow::removePerspective | ( | const QString & | name | ) |
在文件 dockwindow.cpp 第 881 行定义.
| void QxDock::DockWindow::removePerspectives | ( | const QStringList & | names | ) |
在文件 dockwindow.cpp 第 886 行定义.
|
protected |
在文件 dockwindow.cpp 第 1076 行定义.
| bool QxDock::DockWindow::restoreState | ( | const QByteArray & | state, |
| int | version = 0 |
||
| ) |
Restores the state of this dockwindow dockwidgets.
The version number is compared with that stored in state. If they do not match, the dockmanager's state is left unchanged, and this function returns false; otherwise, the state is restored, and this function returns true.
在文件 dockwindow.cpp 第 824 行定义.
| void QxDock::DockWindow::restoringState | ( | ) |
| void QxDock::DockWindow::savePerspectives | ( | QSettings & | settings | ) | const |
在文件 dockwindow.cpp 第 906 行定义.
| QByteArray QxDock::DockWindow::saveState | ( | int | version = 0 | ) | const |
Saves the current state of the dockwindow and all its dock widgets into the returned QByteArray.
The XmlMode enables / disables the auto formatting for the XmlStreamWriter. If auto formatting is enabled, the output is intended and line wrapped. The XmlMode XmlAutoFormattingDisabled is better if you would like to have a more compact XML output - i.e. for storage in ini files. The version number is stored as part of the data. To restore the saved state, pass the return value and version number to restoreState().
在文件 dockwindow.cpp 第 789 行定义.
| DockPanel * QxDock::DockWindow::setCentralWidget | ( | DockWidget * | widget | ) |
Adds dockwidget widget into the central area and marks it as central widget.
If central widget is set, it will be the only dock widget that will resize with the dock container. A central widget if not movable, floatable or closable and the titlebar of the central dock panel is not visible.
If the given widget could be set as central widget, the function returns the created dock panel. If the widget could not be set, because there is already a central widget, this function returns a nullptr.
To clear the central widget, pass a nullptr to the function.
| != | 0 The dock panel that contains the central widget |
| nullptr | Indicates that the given widget can not be set as central widget because there is already a central widget. |
在文件 dockwindow.cpp 第 592 行定义.
| void QxDock::DockWindow::setDockWidgetFocused | ( | DockWidget * | w | ) |
Request a focus change to the given dock widget.
This function only has an effect, if the flag DockManager::FocusHighlighting is enabled
在文件 dockwindow.cpp 第 950 行定义.
| void QxDock::DockWindow::setDockWidgetToolBarIconSize | ( | const QSize & | iconSize, |
| DockWidget::State | state | ||
| ) |
This function sets the tool button icon size for the given state.
If a dock widget is floating, there is more space and increasing the icon size is possible. For docked widgets, small icon sizes, eg. 16 x 16 might be better.
在文件 dockwindow.cpp 第 681 行定义.
| void QxDock::DockWindow::setDockWidgetToolBarStyle | ( | Qt::ToolButtonStyle | style, |
| DockWidget::State | state | ||
| ) |
This function sets the tool button style for the given dock widget state.
It is possible to switch the tool button style depending on the state. If a dock widget is floating, then here are more space and it is possible to select a style that requires more space like Qt::ToolButtonTextUnderIcon. For the docked state Qt::ToolButtonIconOnly might be better.
在文件 dockwindow.cpp 第 655 行定义.
| void QxDock::DockWindow::setSplitterSizes | ( | DockPanel * | panel, |
| const QList< int > & | sizes | ||
| ) |
Update the sizes of a splitter Programmatically updates the sizes of a given splitter by calling QSplitter::setSizes().
The splitter will be the splitter that contains the supplied dock panel widget. If there is not splitter that contains the dock panel, or the sizes supplied does not match the number of children of the splitter, this method will have no effect.
在文件 dockwindow.cpp 第 765 行定义.
|
overrideprotectedvirtual |
在文件 dockwindow.cpp 第 1179 行定义.
| QList< int > QxDock::DockWindow::splitterSizes | ( | DockPanel * | panel | ) | const |
Returns the sizes of the splitter that contains the dock panel.
If there is no splitter that contains the panel, an empty list will be returned.
在文件 dockwindow.cpp 第 745 行定义.
| void QxDock::DockWindow::stateRestored | ( | ) |
|
friend |
在文件 dockwindow.h 第 126 行定义.
|
friend |
在文件 dockwindow.h 第 127 行定义.
|
friend |
在文件 dockwindow.h 第 128 行定义.
|
friend |
在文件 dockwindow.h 第 129 行定义.
|
friend |
在文件 dockwindow.h 第 131 行定义.
|
friend |
在文件 dockwindow.h 第 132 行定义.
|
friend |
在文件 dockwindow.h 第 134 行定义.
|
friend |
在文件 dockwindow.h 第 135 行定义.
|
friend |
在文件 dockwindow.h 第 133 行定义.
|
friend |
在文件 dockwindow.h 第 130 行定义.