Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
ads::CDockManager Class Reference

#include <DockManager.h>

Inheritance diagram for ads::CDockManager:
Inheritance graph
[legend]

Public Types

enum  eConfigFlag {
  ActiveTabHasCloseButton = 0x0001, DockAreaHasCloseButton = 0x0002, DockAreaCloseButtonClosesTab = 0x0004, OpaqueSplitterResize = 0x0008,
  XmlAutoFormattingEnabled = 0x0010, XmlCompressionEnabled = 0x0020, TabCloseButtonIsToolButton = 0x0040, AllTabsHaveCloseButton = 0x0080,
  RetainTabSizeWhenCloseButtonHidden = 0x0100, OpaqueUndocking = 0x0200, DragPreviewIsDynamic = 0x0400, DragPreviewShowsContentPixmap = 0x0800,
  DragPreviewHasWindowFrame = 0x1000, AlwaysShowTabs = 0x2000, DockAreaHasUndockButton = 0x4000, DockAreaHasTabsMenuButton = 0x8000,
  DockAreaHideDisabledButtons = 0x10000, DockAreaDynamicTabsMenuButtonVisibility = 0x20000, FloatingContainerHasWidgetTitle = 0x40000, FloatingContainerHasWidgetIcon = 0x80000,
  HideSingleCentralWidgetTitleBar = 0x100000, FocusHighlighting = 0x200000, EqualSplitOnInsertion = 0x400000, FloatingContainerForceNativeTitleBar = 0x800000,
  FloatingContainerForceQWidgetTitleBar = 0x1000000, DefaultDockAreaButtons, DefaultBaseConfig, DefaultOpaqueConfig,
  DefaultNonOpaqueConfig, NonOpaqueWithWindowFrame
}
 
enum  eViewMenuInsertionOrder { MenuSortedByInsertion, MenuAlphabeticallySorted }
 
using Super = CDockContainerWidget
 

Public Slots

void openPerspective (const QString &PerspectiveName)
 
void setDockWidgetFocused (CDockWidget *DockWidget)
 

Signals

void dockAreaCreated (ads::CDockAreaWidget *DockArea)
 
void dockWidgetAboutToBeRemoved (ads::CDockWidget *DockWidget)
 
void dockWidgetAdded (ads::CDockWidget *DockWidget)
 
void dockWidgetRemoved (ads::CDockWidget *DockWidget)
 
void floatingWidgetCreated (ads::CFloatingDockContainer *FloatingWidget)
 
void focusedDockWidgetChanged (ads::CDockWidget *old, ads::CDockWidget *now)
 
void openingPerspective (const QString &PerspectiveName)
 
void perspectiveListChanged ()
 
void perspectiveOpened (const QString &PerspectiveName)
 
void perspectivesRemoved ()
 
void restoringState ()
 
void stateRestored ()
 
- Signals inherited from ads::CDockContainerWidget
void dockAreasAdded ()
 
void dockAreasRemoved ()
 
void dockAreaViewToggled (ads::CDockAreaWidget *DockArea, bool Open)
 

Public Member Functions

CDockAreaWidgetaddDockWidget (DockWidgetArea area, CDockWidget *Dockwidget, CDockAreaWidget *DockAreaWidget=nullptr)
 
CFloatingDockContaineraddDockWidgetFloating (CDockWidget *Dockwidget)
 
CDockAreaWidgetaddDockWidgetTab (DockWidgetArea area, CDockWidget *Dockwidget)
 
CDockAreaWidgetaddDockWidgetTabToArea (CDockWidget *Dockwidget, CDockAreaWidget *DockAreaWidget)
 
void addPerspective (const QString &UniquePrespectiveName)
 
QAction * addToggleViewActionToMenu (QAction *ToggleViewAction, const QString &Group=QString(), const QIcon &GroupIcon=QIcon())
 
 CDockManager (QWidget *parent=nullptr)
 
CDockWidgetcentralWidget () const
 
const QList< CDockContainerWidget * > dockContainers () const
 
QMap< QString, CDockWidget * > dockWidgetsMap () const
 
CDockWidgetfindDockWidget (const QString &ObjectName) const
 
const QList< CFloatingDockContainer * > floatingWidgets () const
 
CDockWidgetfocusedDockWidget () const
 
bool isRestoringState () const
 
void loadPerspectives (QSettings &Settings)
 
QStringList perspectiveNames () const
 
void removeDockWidget (CDockWidget *Dockwidget)
 
void removePerspective (const QString &Name)
 
void removePerspectives (const QStringList &Names)
 
bool restoreState (const QByteArray &state, int version=0)
 
void savePerspectives (QSettings &Settings) const
 
QByteArray saveState (int version=0) const
 
CDockAreaWidgetsetCentralWidget (CDockWidget *widget)
 
void setSplitterSizes (CDockAreaWidget *ContainedArea, const QList< int > &sizes)
 
void setViewMenuInsertionOrder (eViewMenuInsertionOrder Order)
 
QList< int > splitterSizes (CDockAreaWidget *ContainedArea) const
 
QMenu * viewMenu () const
 
unsigned int zOrderIndex () const override
 
virtual ~CDockManager () override
 
- Public Member Functions inherited from ads::CDockContainerWidget
CDockAreaWidgetaddDockWidget (DockWidgetArea area, CDockWidget *Dockwidget, CDockAreaWidget *DockAreaWidget=nullptr)
 
 CDockContainerWidget (CDockManager *DockManager, QWidget *parent=0)
 
void closeOtherAreas (CDockAreaWidget *KeepOpenArea)
 
CDockAreaWidgetdockArea (int Index) const
 
CDockAreaWidgetdockAreaAt (const QPoint &GlobalPos) const
 
int dockAreaCount () const
 
void dumpLayout ()
 
CDockWidget::DockWidgetFeatures features () const
 
CFloatingDockContainerfloatingWidget () 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 ~CDockContainerWidget ()
 

Static Public Member Functions

static ConfigFlags configFlags ()
 
static CIconProvidericonProvider ()
 
static void setConfigFlag (eConfigFlag Flag, bool On=true)
 
static void setConfigFlags (const ConfigFlags Flags)
 
template<class QWidgetPtr >
static void setWidgetFocus (QWidgetPtr widget)
 
static int startDragDistance ()
 
static bool testConfigFlag (eConfigFlag Flag)
 

Protected Member Functions

CDockOverlay * containerOverlay () const
 
CDockOverlay * dockAreaOverlay () const
 
void notifyFloatingWidgetDrop (CFloatingDockContainer *FloatingWidget)
 
void notifyWidgetOrAreaRelocation (QWidget *RelocatedWidget)
 
void registerDockContainer (CDockContainerWidget *DockContainer)
 
void registerFloatingWidget (CFloatingDockContainer *FloatingWidget)
 
void removeDockContainer (CDockContainerWidget *DockContainer)
 
void removeFloatingWidget (CFloatingDockContainer *FloatingWidget)
 
virtual void showEvent (QShowEvent *event) override
 
- Protected Member Functions inherited from ads::CDockContainerWidget
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
 
CDockAreaWidgetlastAddedDockAreaWidget (DockWidgetArea area) const
 
void removeDockArea (CDockAreaWidget *area)
 
bool restoreState (CDockingStateReader &Stream, bool Testing)
 
void saveState (QXmlStreamWriter &Stream) const
 
CDockAreaWidgettopLevelDockArea () const
 
CDockWidgettopLevelDockWidget () const
 
void updateSplitterHandles (QSplitter *splitter)
 

Private Attributes

DockManagerPrivated
 private data (pimpl) More...
 

Friends

class CDockAreaTabBar
 
class CDockAreaTitleBar
 
class CDockContainerWidget
 
class CDockWidgetTab
 
class CFloatingDockContainer
 
class CFloatingDragPreview
 
struct DockAreaWidgetPrivate
 
class DockContainerWidgetPrivate
 
struct DockManagerPrivate
 
struct DockWidgetTabPrivate
 
struct FloatingDockContainerPrivate
 
struct FloatingDragPreviewPrivate
 

Detailed Description

The central dock manager that maintains the complete docking system. With the configuration flags you can globally control the functionality of the docking system. The dock manager 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.

DockManager->setStyleSheet("");

Definition at line 69 of file DockManager.h.

Member Typedef Documentation

Definition at line 144 of file DockManager.h.

Member Enumeration Documentation

These global configuration flags configure some global dock manager settings. Set the dock manager flags, before you create the dock manager instance.

Enumerator
ActiveTabHasCloseButton 

If this flag is set, the active tab in a tab area has a close button.

DockAreaHasCloseButton 

If the flag is set each dock area has a close button.

DockAreaCloseButtonClosesTab 

If the flag is set, the dock area close button closes the active tab, if not set, it closes the complete dock area.

OpaqueSplitterResize 

See QSplitter::setOpaqueResize() documentation.

XmlAutoFormattingEnabled 

If enabled, the XML writer automatically adds line-breaks and indentation to empty sections between elements (ignorable whitespace).

XmlCompressionEnabled 

If enabled, the XML output will be compressed and is not human readable anymore.

TabCloseButtonIsToolButton 
AllTabsHaveCloseButton 

If enabled the tab close buttons will be QToolButtons instead of QPushButtons - disabled by default.

if this flag is set, then all tabs that are closable show a close button

RetainTabSizeWhenCloseButtonHidden 

if this flag is set, the space for the close button is reserved even if the close button is not visible

OpaqueUndocking 

If enabled, the widgets are immediately undocked into floating widgets, if disabled, only a draw preview is undocked and the real undocking is deferred until the mouse is released.

DragPreviewIsDynamic 

If opaque undocking is disabled, this flag defines the behavior of the drag preview window, if this flag is enabled, the preview will be adjusted dynamically to the drop area.

DragPreviewShowsContentPixmap 

If opaque undocking is disabled, the created drag preview window shows a copy of the content of the dock widget / dock are that is dragged.

DragPreviewHasWindowFrame 

If opaque undocking is disabled, then this flag configures if the drag preview is frameless or looks like a real window.

AlwaysShowTabs 

If this option is enabled, the tab of a dock widget is always displayed - even if it is the only visible dock widget in a floating widget.

DockAreaHasUndockButton 

If the flag is set each dock area has an undock button.

DockAreaHasTabsMenuButton 

If the flag is set each dock area has a tabs menu button.

DockAreaHideDisabledButtons 

If the flag is set disabled dock area buttons will not appear on the toolbar at all (enabling them will bring them back)

DockAreaDynamicTabsMenuButtonVisibility 

If the flag is set, the tabs menu button will be shown only when it is required - that means, if the tabs are elided. If the tabs are not elided, it is hidden.

FloatingContainerHasWidgetTitle 

If set, the Floating Widget window title reflects the title of the current dock widget otherwise it displays application name as window title.

FloatingContainerHasWidgetIcon 

If set, the Floating Widget icon reflects the icon of the current dock widget otherwise it displays application icon.

HideSingleCentralWidgetTitleBar 

If there is only one single visible dock widget in the main dock container (the dock manager) and if this flag is set, then the titlebar of this dock widget will be hidden this only makes sense for non draggable and non floatable widgets and enables the creation of some kind of "central" widget

FocusHighlighting 

enables styling of focused dock widget tabs or floating widget titlebar

EqualSplitOnInsertion 
FloatingContainerForceNativeTitleBar 

!< if enabled, the space is equally distributed to all widgets in a splitter

Linux only ! Forces all FloatingContainer to use the native title bar. This might break docking for FloatinContainer on some Window Managers (like Kwin/KDE). If neither this nor FloatingContainerForceCustomTitleBar is set (the default) native titlebars are used except on known bad systems. Users can overwrite this by setting the environment variable ADS_UseNativeTitle to "1" or "0".

FloatingContainerForceQWidgetTitleBar 

Linux only ! Forces all FloatingContainer to use a QWidget based title bar. If neither this nor FloatingContainerForceNativeTitleBar is set (the default) native titlebars are used except on known bad systems. Users can overwrite this by setting the environment variable ADS_UseNativeTitle to "1" or "0".

DefaultDockAreaButtons 

default configuration of dock area title bar buttons

DefaultBaseConfig 

default base configuration settings

DefaultOpaqueConfig 

the default configuration with opaque operations - this may cause issues if ActiveX or Qt 3D windows are involved

DefaultNonOpaqueConfig 

the default configuration for non opaque operations

NonOpaqueWithWindowFrame 

the default configuration for non opaque operations that show a real window with frame

Definition at line 157 of file DockManager.h.

Enumerator
MenuSortedByInsertion 
MenuAlphabeticallySorted 

Definition at line 146 of file DockManager.h.

Constructor & Destructor Documentation

ads::CDockManager::CDockManager ( QWidget *  parent = nullptr)

Default Constructor. If the given parent is a QMainWindow, the dock manager sets itself as the central widget. Before you create any dock widgets, you should properly setup the configuration flags via setConfigFlags().

Definition at line 478 of file DockManager.cpp.

ads::CDockManager::~CDockManager ( )
overridevirtual

Virtual Destructor

Definition at line 506 of file DockManager.cpp.

Member Function Documentation

CDockAreaWidget * ads::CDockManager::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. If you would like to add a dock widget tabified, then you need to add it to an existing dock area object into the CenterDockWidgetArea. The following code shows this:

DockManager->addDockWidget(ads::CenterDockWidgetArea, NewDockWidget,
ExisitingDockArea);
Returns
Returns the dock area widget that contains the new DockWidget

Definition at line 758 of file DockManager.cpp.

CFloatingDockContainer * ads::CDockManager::addDockWidgetFloating ( CDockWidget Dockwidget)

Adds the given DockWidget floating and returns the created CFloatingDockContainer instance.

Definition at line 715 of file DockManager.cpp.

CDockAreaWidget * ads::CDockManager::addDockWidgetTab ( DockWidgetArea  area,
CDockWidget Dockwidget 
)

This function will add the given Dockwidget to the given dock area as a new tab. If no dock area widget exists for the given area identifier, a new dock area widget is created.

Definition at line 770 of file DockManager.cpp.

CDockAreaWidget * ads::CDockManager::addDockWidgetTabToArea ( CDockWidget Dockwidget,
CDockAreaWidget DockAreaWidget 
)

This function will add the given Dockwidget to the given DockAreaWidget as a new tab.

Definition at line 790 of file DockManager.cpp.

void ads::CDockManager::addPerspective ( const QString &  UniquePrespectiveName)

Saves the current perspective to the internal list of perspectives. A perspective is the current state of the dock manager 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.

Definition at line 821 of file DockManager.cpp.

QAction * ads::CDockManager::addToggleViewActionToMenu ( QAction *  ToggleViewAction,
const QString &  Group = QString(),
const QIcon &  GroupIcon = QIcon() 
)

Adds a toggle view action to the the internal view menu. You can either manage the insertion of the toggle view actions in your application or you can add the actions to the internal view menu and then simply insert the menu object into your.

Parameters
[in]ToggleViewActionThe action to insert. If no group is provided the action is directly inserted into the menu. If a group is provided, the action is inserted into the group and the group is inserted into the menu if it is not existing yet.
[in]GroupThis is the text used for the group menu item
[in]GroupIconThe icon used for grouping the workbenches in the view menu. I.e. if there is a workbench for each device like for spectrometer devices, it is good to group all these workbenches under a menu item
Returns
If Group is not empty, this function returns the GroupAction for this group. If the group is empty, the function returns the given ToggleViewAction.

Definition at line 962 of file DockManager.cpp.

CDockWidget * ads::CDockManager::centralWidget ( ) const

This function returns managers central widget or nullptr if no central widget is set.

Definition at line 919 of file DockManager.cpp.

CDockManager::ConfigFlags ads::CDockManager::configFlags ( )
static

This function returns the global configuration flags

Definition at line 1021 of file DockManager.cpp.

CDockOverlay * ads::CDockManager::containerOverlay ( ) const
protected

Overlay for containers

Definition at line 615 of file DockManager.cpp.

void ads::CDockManager::dockAreaCreated ( ads::CDockAreaWidget DockArea)
signal

This signal is emitted, if a new DockArea has been created. An application can use this signal to set custom icons or custom tooltips for the DockArea buttons.

CDockOverlay * ads::CDockManager::dockAreaOverlay ( ) const
protected

Overlay for dock areas

Definition at line 622 of file DockManager.cpp.

const QList< CDockContainerWidget * > ads::CDockManager::dockContainers ( ) const

Returns the list of all active and visible dock containers Dock containers are the main dock manager and all floating widgets

Definition at line 629 of file DockManager.cpp.

void ads::CDockManager::dockWidgetAboutToBeRemoved ( ads::CDockWidget DockWidget)
signal

This signal is emitted just before the given dock widget is removed from the dock manager

void ads::CDockManager::dockWidgetAdded ( ads::CDockWidget DockWidget)
signal

This signal is emitted if a dock widget has been added to this dock manager instance.

void ads::CDockManager::dockWidgetRemoved ( ads::CDockWidget DockWidget)
signal

This signal is emitted if a dock widget has been removed with the remove removeDockWidget() function. If this signal is emitted, the dock widget has been removed from the docking system but it is not deleted yet.

QMap< QString, CDockWidget * > ads::CDockManager::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

Definition at line 814 of file DockManager.cpp.

CDockWidget * ads::CDockManager::findDockWidget ( const QString &  ObjectName) const

Searches for a registered doc widget with the given ObjectName

Returns
Return the found dock widget or nullptr if a dock widget with the given name is not registered

Definition at line 798 of file DockManager.cpp.

void ads::CDockManager::floatingWidgetCreated ( ads::CFloatingDockContainer FloatingWidget)
signal

This signal is emitted, if a new floating widget has been created. An application can use this signal to e.g. subscribe to events of the newly created window.

const QList< CFloatingDockContainer * > ads::CDockManager::floatingWidgets ( ) const

Returns the list of all floating widgets

Definition at line 636 of file DockManager.cpp.

CDockWidget * ads::CDockManager::focusedDockWidget ( ) const

Returns the dock widget that has focus style in the ui or a nullptr if not dock widget is painted focused. If the flag FocusHighlighting is disabled, this function always returns nullptr.

Definition at line 1086 of file DockManager.cpp.

void ads::CDockManager::focusedDockWidgetChanged ( ads::CDockWidget old,
ads::CDockWidget now 
)
signal

This signal is emitted if the focused dock widget changed. Both old and now can be nullptr. The focused dock widget is the one that is highlighted in the GUI

CIconProvider & ads::CDockManager::iconProvider ( )
static

Returns the global icon provider. The icon provider enables the use of custom icons in case using styleheets for icons is not an option.

Definition at line 1048 of file DockManager.cpp.

bool ads::CDockManager::isRestoringState ( ) const

This function returns true between the restoringState() and stateRestored() signals.

Definition at line 1007 of file DockManager.cpp.

void ads::CDockManager::loadPerspectives ( QSettings &  Settings)

Loads the perspectives from the given settings file

Definition at line 891 of file DockManager.cpp.

void ads::CDockManager::notifyFloatingWidgetDrop ( CFloatingDockContainer FloatingWidget)
protected

This function is called, if a floating widget has been dropped into an new position. When this function is called, all dock widgets of the FloatingWidget are already inserted into its new position

Definition at line 1066 of file DockManager.cpp.

void ads::CDockManager::notifyWidgetOrAreaRelocation ( QWidget *  RelocatedWidget)
protected

A container needs to call this function if a widget has been dropped into it

Definition at line 1056 of file DockManager.cpp.

void ads::CDockManager::openingPerspective ( const QString &  PerspectiveName)
signal

This signal is emitted, if the dock manager starts opening a perspective. Opening a perspective may take more than a second if there are many complex widgets. The application may use this signal to show some progress indicator or to change the mouse cursor into a busy cursor.

void ads::CDockManager::openPerspective ( const QString &  PerspectiveName)
slot

Opens the perspective with the given name.

Definition at line 860 of file DockManager.cpp.

void ads::CDockManager::perspectiveListChanged ( )
signal

This signal is emitted if the list of perspectives changed

QStringList ads::CDockManager::perspectiveNames ( ) const

Returns the names of all available perspectives

Definition at line 853 of file DockManager.cpp.

void ads::CDockManager::perspectiveOpened ( const QString &  PerspectiveName)
signal

This signal is emitted if the dock manager finished opening a perspective.

void ads::CDockManager::perspectivesRemoved ( )
signal

This signal is emitted if perspectives have been removed

void ads::CDockManager::registerDockContainer ( CDockContainerWidget DockContainer)
protected

Registers the given dock container widget

Definition at line 598 of file DockManager.cpp.

void ads::CDockManager::registerFloatingWidget ( CFloatingDockContainer FloatingWidget)
protected

Registers the given floating widget in the internal list of floating widgets

Definition at line 582 of file DockManager.cpp.

void ads::CDockManager::removeDockContainer ( CDockContainerWidget DockContainer)
protected

Remove dock container from the internal list of registered dock containers

Definition at line 605 of file DockManager.cpp.

void ads::CDockManager::removeDockWidget ( CDockWidget Dockwidget)

Remove the given Dock from the dock manager

Definition at line 804 of file DockManager.cpp.

void ads::CDockManager::removeFloatingWidget ( CFloatingDockContainer FloatingWidget)
protected

Remove the given floating widget from the list of registered floating widgets

Definition at line 591 of file DockManager.cpp.

void ads::CDockManager::removePerspective ( const QString &  Name)

Removes the perspective with the given name from the list of perspectives

Definition at line 829 of file DockManager.cpp.

void ads::CDockManager::removePerspectives ( const QStringList &  Names)

Removes the given perspectives from the dock manager

Definition at line 836 of file DockManager.cpp.

bool ads::CDockManager::restoreState ( const QByteArray &  state,
int  version = 0 
)

Restores the state of this dockmanagers 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.

See also
saveState()

Definition at line 679 of file DockManager.cpp.

void ads::CDockManager::restoringState ( )
signal

This signal is emitted, if the restore function is called, just before the dock manager starts restoring the state. If this function is called, nothing has changed yet

void ads::CDockManager::savePerspectives ( QSettings &  Settings) const

Saves the perspectives to the given settings file.

Definition at line 875 of file DockManager.cpp.

QByteArray ads::CDockManager::saveState ( int  version = 0) const

Saves the current state of the dockmanger 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().

See also
restoreState()

Definition at line 650 of file DockManager.cpp.

CDockAreaWidget * ads::CDockManager::setCentralWidget ( CDockWidget 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 area is not visible. If the given widget could be set as central widget, the function returns the created dock area. 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.

Note
Setting a central widget is only possible if no other dock widgets have been registered before. That means, this function should be the first function that you call before you add other dock widgets.
Return values
!=0 The dock area that contains the central widget
nullptrIndicates that the given widget can not be set as central widget because there is already a central widget.

Definition at line 926 of file DockManager.cpp.

void ads::CDockManager::setConfigFlag ( eConfigFlag  Flag,
bool  On = true 
)
static

Set a certain config flag.

See also
setConfigFlags()

Definition at line 1035 of file DockManager.cpp.

void ads::CDockManager::setConfigFlags ( const ConfigFlags  Flags)
static

Sets the global configuration flags for the whole docking system. Call this function before you create the dock manager and before your create the first dock widget.

Definition at line 1028 of file DockManager.cpp.

void ads::CDockManager::setDockWidgetFocused ( CDockWidget DockWidget)
slot

Request a focus change to the given dock widget. This function only has an effect, if the flag CDockManager::FocusStyling is enabled

Definition at line 1076 of file DockManager.cpp.

void ads::CDockManager::setSplitterSizes ( CDockAreaWidget ContainedArea,
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 area widget. If there is not splitter that contains the dock area, or the sizes supplied does not match the number of children of the splitter, this method will have no effect.

Definition at line 1113 of file DockManager.cpp.

void ads::CDockManager::setViewMenuInsertionOrder ( eViewMenuInsertionOrder  Order)

Define the insertion order for toggle view menu items. The order defines how the actions are added to the view menu. The default insertion order is MenuAlphabeticallySorted to make it easier for users to find the menu entry for a certain dock widget. You need to call this function befor you insert the first menu item into the view menu.

Definition at line 1000 of file DockManager.cpp.

template<class QWidgetPtr >
static void ads::CDockManager::setWidgetFocus ( QWidgetPtr  widget)
inlinestatic

Helper function to set focus depending on the configuration of the FocusStyling flag

Definition at line 468 of file DockManager.h.

void ads::CDockManager::showEvent ( QShowEvent *  event)
overrideprotectedvirtual

Show the floating widgets that has been created floating

Definition at line 741 of file DockManager.cpp.

QList< int > ads::CDockManager::splitterSizes ( CDockAreaWidget ContainedArea) const

Returns the sizes of the splitter that contains the dock area.

If there is no splitter that contains the area, an empty list will be returned.

Definition at line 1099 of file DockManager.cpp.

int ads::CDockManager::startDragDistance ( )
static

The distance the user needs to move the mouse with the left button hold down before a dock widget start floating

Definition at line 1014 of file DockManager.cpp.

void ads::CDockManager::stateRestored ( )
signal

This signal is emitted if the state changed in restoreState. The signal is emitted if the restoreState() function is called or if the openPerspective() function is called

bool ads::CDockManager::testConfigFlag ( eConfigFlag  Flag)
static

Returns true if the given config flag is set

Definition at line 1041 of file DockManager.cpp.

QMenu * ads::CDockManager::viewMenu ( ) const

This function returns the internal view menu. To fill the view menu, you can use the addToggleViewActionToMenu() function.

Definition at line 993 of file DockManager.cpp.

unsigned int ads::CDockManager::zOrderIndex ( ) const
overridevirtual

This function always return 0 because the main window is always behind any floating widget

Reimplemented from ads::CDockContainerWidget.

Definition at line 643 of file DockManager.cpp.

Friends And Related Function Documentation

friend class CDockAreaTabBar
friend

Definition at line 79 of file DockManager.h.

friend class CDockAreaTitleBar
friend

Definition at line 85 of file DockManager.h.

friend class CDockContainerWidget
friend

Definition at line 77 of file DockManager.h.

friend class CDockWidgetTab
friend

Definition at line 80 of file DockManager.h.

friend class CFloatingDockContainer
friend

Definition at line 75 of file DockManager.h.

friend class CFloatingDragPreview
friend

Definition at line 83 of file DockManager.h.

friend struct DockAreaWidgetPrivate
friend

Definition at line 81 of file DockManager.h.

friend class DockContainerWidgetPrivate
friend

Definition at line 78 of file DockManager.h.

friend struct DockManagerPrivate
friend

Definition at line 74 of file DockManager.h.

friend struct DockWidgetTabPrivate
friend

Definition at line 82 of file DockManager.h.

friend struct FloatingDockContainerPrivate
friend

Definition at line 76 of file DockManager.h.

friend struct FloatingDragPreviewPrivate
friend

Definition at line 84 of file DockManager.h.

Member Data Documentation

DockManagerPrivate* ads::CDockManager::d
private

private data (pimpl)

Definition at line 73 of file DockManager.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:51