#include <DockContainerWidget.h>
Signals | |
void | dockAreasAdded () |
void | dockAreasRemoved () |
void | dockAreaViewToggled (ads::CDockAreaWidget *DockArea, bool Open) |
Public Member Functions | |
CDockAreaWidget * | addDockWidget (DockWidgetArea area, CDockWidget *Dockwidget, CDockAreaWidget *DockAreaWidget=nullptr) |
CDockContainerWidget (CDockManager *DockManager, QWidget *parent=0) | |
void | closeOtherAreas (CDockAreaWidget *KeepOpenArea) |
CDockAreaWidget * | dockArea (int Index) const |
CDockAreaWidget * | dockAreaAt (const QPoint &GlobalPos) const |
int | dockAreaCount () const |
void | dumpLayout () |
CDockWidget::DockWidgetFeatures | features () const |
CFloatingDockContainer * | floatingWidget () const |
bool | hasTopLevelDockWidget () const |
bool | isFloating () const |
bool | isInFrontOf (CDockContainerWidget *Other) const |
QList< CDockAreaWidget * > | openedDockAreas () const |
void | removeDockWidget (CDockWidget *Dockwidget) |
QSplitter * | rootSplitter () const |
int | visibleDockAreaCount () const |
virtual unsigned int | zOrderIndex () const |
virtual | ~CDockContainerWidget () |
Protected Member Functions | |
void | addDockArea (CDockAreaWidget *DockAreaWidget, DockWidgetArea area=CenterDockWidgetArea) |
void | createRootSplitter () |
QList< CDockWidget * > | dockWidgets () const |
void | dropFloatingWidget (CFloatingDockContainer *FloatingWidget, const QPoint &TargetPos) |
void | dropWidget (QWidget *Widget, DockWidgetArea DropArea, CDockAreaWidget *TargetAreaWidget) |
virtual bool | event (QEvent *e) override |
CDockAreaWidget * | lastAddedDockAreaWidget (DockWidgetArea area) const |
void | removeDockArea (CDockAreaWidget *area) |
bool | restoreState (CDockingStateReader &Stream, bool Testing) |
void | saveState (QXmlStreamWriter &Stream) const |
CDockAreaWidget * | topLevelDockArea () const |
CDockWidget * | topLevelDockWidget () const |
void | updateSplitterHandles (QSplitter *splitter) |
Private Attributes | |
DockContainerWidgetPrivate * | d |
private data (pimpl) More... | |
Friends | |
class | CDockAreaWidget |
class | CDockManager |
class | CDockWidget |
class | CFloatingDockContainer |
class | CFloatingDragPreview |
struct | DockAreaWidgetPrivate |
class | DockContainerWidgetPrivate |
struct | DockManagerPrivate |
struct | FloatingDockContainerPrivate |
struct | FloatingDragPreviewPrivate |
Container that manages a number of dock areas with single dock widgets or tabyfied dock widgets in each area. Each window that support docking has a DockContainerWidget. That means the main application window and all floating windows contain a DockContainerWidget instance.
Definition at line 61 of file DockContainerWidget.h.
ads::CDockContainerWidget::CDockContainerWidget | ( | CDockManager * | DockManager, |
QWidget * | parent = 0 |
||
) |
Default Constructor
Definition at line 1281 of file DockContainerWidget.cpp.
|
virtual |
Virtual Destructor
Definition at line 1306 of file DockContainerWidget.cpp.
|
protected |
Adds the given dock area to this container widget
Definition at line 1379 of file DockContainerWidget.cpp.
CDockAreaWidget * ads::CDockContainerWidget::addDockWidget | ( | DockWidgetArea | area, |
CDockWidget * | Dockwidget, | ||
CDockAreaWidget * | DockAreaWidget = nullptr |
||
) |
Adds dockwidget into the given area. If DockAreaWidget is not null, then the area parameter indicates the area into the DockAreaWidget. If DockAreaWidget is null, the Dockwidget will be dropped into the container.
Definition at line 1317 of file DockContainerWidget.cpp.
void ads::CDockContainerWidget::closeOtherAreas | ( | CDockAreaWidget * | KeepOpenArea | ) |
Call this function to close all dock areas except the KeepOpenArea
Definition at line 1838 of file DockContainerWidget.cpp.
|
protected |
Helper function for creation of the root splitter
Definition at line 1720 of file DockContainerWidget.cpp.
CDockAreaWidget * ads::CDockContainerWidget::dockArea | ( | int | Index | ) | const |
Returns the dock area at the given Index or 0 if the index is out of range
Definition at line 1487 of file DockContainerWidget.cpp.
CDockAreaWidget * ads::CDockContainerWidget::dockAreaAt | ( | const QPoint & | GlobalPos | ) | const |
Returns the dock area at the given global position or 0 if there is no dock area at this position
Definition at line 1472 of file DockContainerWidget.cpp.
int ads::CDockContainerWidget::dockAreaCount | ( | ) | const |
Returns the number of dock areas in this container
Definition at line 1501 of file DockContainerWidget.cpp.
|
signal |
This signal is emitted if one or multiple dock areas has been added to the internal list of dock areas. If multiple dock areas are inserted, this signal is emitted only once
|
signal |
This signal is emitted if one or multiple dock areas has been removed
|
signal |
This signal is emitted if a dock area is opened or closed via toggleView() function
|
protected |
This function returns a list of all dock widgets in this floating widget. It may be possible, depending on the implementation, that dock widgets, that are not visible to the user have no parent widget. Therefore simply calling findChildren() would not work here. Therefore this function iterates over all dock areas and creates a list that contains all dock widgets returned from all dock areas.
Definition at line 1798 of file DockContainerWidget.cpp.
|
protected |
Drop floating widget into the container
Definition at line 1525 of file DockContainerWidget.cpp.
|
protected |
Drop a dock area or a dock widget given in widget parameter. If the TargetAreaWidget is a nullptr, then the DropArea indicates the drop area for the container. If the given TargetAreaWidget is not a nullptr, then the DropArea indicates the drop area in the given TargetAreaWidget
Definition at line 1590 of file DockContainerWidget.cpp.
void ads::CDockContainerWidget::dumpLayout | ( | ) |
Dumps the layout for debugging purposes
Definition at line 1732 of file DockContainerWidget.cpp.
|
overrideprotectedvirtual |
Handles activation events to update zOrderIndex
Definition at line 1362 of file DockContainerWidget.cpp.
CDockWidget::DockWidgetFeatures ads::CDockContainerWidget::features | ( | ) | const |
This functions returns the dock widget features of all dock widget in this container. A bitwise and is used to combine the flags of all dock widgets. That means, if only dock widget does not support a certain flag, the whole dock are does not support the flag.
Definition at line 1818 of file DockContainerWidget.cpp.
CFloatingDockContainer * ads::CDockContainerWidget::floatingWidget | ( | ) | const |
If this dock container is in a floating widget, this function returns the floating widget. Else, it returns a nullptr.
Definition at line 1831 of file DockContainerWidget.cpp.
bool ads::CDockContainerWidget::hasTopLevelDockWidget | ( | ) | const |
This function returns true if this dock area has only one single visible dock widget. A top level widget is a real floating widget. Only the isFloating() function of top level widgets may returns true.
Definition at line 1752 of file DockContainerWidget.cpp.
bool ads::CDockContainerWidget::isFloating | ( | ) | const |
This function returns true, if this container is in a floating widget
Definition at line 1494 of file DockContainerWidget.cpp.
bool ads::CDockContainerWidget::isInFrontOf | ( | CDockContainerWidget * | 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
Definition at line 1355 of file DockContainerWidget.cpp.
|
protected |
This function returns the last added dock area widget for the given area identifier or 0 if no dock area widget has been added for the given area
Definition at line 1745 of file DockContainerWidget.cpp.
QList< CDockAreaWidget * > ads::CDockContainerWidget::openedDockAreas | ( | ) | const |
Returns the list of dock areas that are not closed If all dock widgets in a dock area are closed, the dock area will be closed
Definition at line 1612 of file DockContainerWidget.cpp.
|
protected |
Removes the given dock area from this container
Definition at line 1393 of file DockContainerWidget.cpp.
void ads::CDockContainerWidget::removeDockWidget | ( | CDockWidget * | Dockwidget | ) |
Removes dockwidget
Definition at line 1338 of file DockContainerWidget.cpp.
|
protected |
Restores the state from given stream. If Testing is true, the function only parses the data from the given stream but does not restore anything. You can use this check for faulty files before you start restoring the state
Definition at line 1651 of file DockContainerWidget.cpp.
QSplitter * ads::CDockContainerWidget::rootSplitter | ( | ) | const |
Access function for the internal root splitter
Definition at line 1713 of file DockContainerWidget.cpp.
|
protected |
Saves the state into the given stream
Definition at line 1628 of file DockContainerWidget.cpp.
|
protected |
Returns the top level dock area.
Definition at line 1785 of file DockContainerWidget.cpp.
|
protected |
If hasSingleVisibleDockWidget() returns true, this function returns the one and only visible dock widget. Otherwise it returns a nullptr.
Definition at line 1765 of file DockContainerWidget.cpp.
|
protected |
This function forces the dock container widget to update handles of splitters based on resize modes of dock widgets contained in the container.
Definition at line 1811 of file DockContainerWidget.cpp.
int ads::CDockContainerWidget::visibleDockAreaCount | ( | ) | const |
Returns the number of visible dock areas
Definition at line 1508 of file DockContainerWidget.cpp.
|
virtual |
Returns the current zOrderIndex
Reimplemented in ads::CDockManager.
Definition at line 1348 of file DockContainerWidget.cpp.
|
friend |
Definition at line 69 of file DockContainerWidget.h.
|
friend |
Definition at line 67 of file DockContainerWidget.h.
|
friend |
Definition at line 73 of file DockContainerWidget.h.
|
friend |
Definition at line 71 of file DockContainerWidget.h.
|
friend |
Definition at line 74 of file DockContainerWidget.h.
|
friend |
Definition at line 70 of file DockContainerWidget.h.
|
friend |
Definition at line 66 of file DockContainerWidget.h.
|
friend |
Definition at line 68 of file DockContainerWidget.h.
|
friend |
Definition at line 72 of file DockContainerWidget.h.
|
friend |
Definition at line 75 of file DockContainerWidget.h.
|
private |
private data (pimpl)
Definition at line 65 of file DockContainerWidget.h.