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

#include <DockAreaWidget.h>

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

Public Types

enum  eDockAreaFlag { HideSingleWidgetTitleBar = 0x0001, DefaultFlags = 0x0000 }
 
using Super = QFrame
 

Public Slots

void closeArea ()
 
void closeOtherAreas ()
 
void setCurrentIndex (int index)
 

Signals

void currentChanged (int index)
 
void currentChanging (int index)
 
void tabBarClicked (int index)
 
void viewToggled (bool Open)
 

Public Member Functions

DockWidgetAreas allowedAreas () const
 
 CDockAreaWidget (CDockManager *DockManager, CDockContainerWidget *parent)
 
QRect contentAreaGeometry () const
 
CDockWidgetcurrentDockWidget () const
 
int currentIndex () const
 
DockAreaFlags dockAreaFlags () const
 
CDockContainerWidgetdockContainer () const
 
CDockManagerdockManager () const
 
CDockWidgetdockWidget (int Index) const
 
QList< CDockWidget * > dockWidgets () const
 
int dockWidgetsCount () const
 
CDockWidget::DockWidgetFeatures features (eBitwiseOperator Mode=BitwiseAnd) const
 
int indexOfFirstOpenDockWidget () const
 
bool isCentralWidgetArea () const
 
virtual QSize minimumSizeHint () const override
 
int openDockWidgetsCount () const
 
QList< CDockWidget * > openedDockWidgets () const
 
void saveState (QXmlStreamWriter &Stream) const
 
void setAllowedAreas (DockWidgetAreas areas)
 
void setCurrentDockWidget (CDockWidget *DockWidget)
 
void setDockAreaFlag (eDockAreaFlag Flag, bool On)
 
void setDockAreaFlags (DockAreaFlags Flags)
 
virtual void setVisible (bool Visible) override
 
CDockAreaTitleBartitleBar () const
 
QAbstractButton * titleBarButton (TitleBarButton which) const
 
QRect titleBarGeometry () const
 
virtual ~CDockAreaWidget ()
 

Protected Slots

void toggleView (bool Open)
 

Protected Member Functions

void addDockWidget (CDockWidget *DockWidget)
 
void hideAreaWithNoVisibleContent ()
 
int index (CDockWidget *DockWidget)
 
void insertDockWidget (int index, CDockWidget *DockWidget, bool Activate=true)
 
void internalSetCurrentDockWidget (CDockWidget *DockWidget)
 
void markTitleBarMenuOutdated ()
 
CDockWidgetnextOpenDockWidget (CDockWidget *DockWidget) const
 
void removeDockWidget (CDockWidget *DockWidget)
 
void toggleDockWidgetView (CDockWidget *DockWidget, bool Open)
 
void updateTitleBarVisibility ()
 

Private Slots

void onTabCloseRequested (int Index)
 
void reorderDockWidget (int fromIndex, int toIndex)
 

Private Member Functions

void onDockWidgetFeaturesChanged ()
 

Private Attributes

DockAreaWidgetPrivated
 private data (pimpl) More...
 

Friends

class CDockContainerWidget
 
class CDockManager
 
class CDockWidget
 
class CDockWidgetTab
 
struct DockAreaWidgetPrivate
 
class DockContainerWidgetPrivate
 
struct DockManagerPrivate
 
struct DockWidgetPrivate
 

Detailed Description

DockAreaWidget manages multiple instances of DockWidgets. It displays a title tab, which is clickable and will switch to the contents associated to the title when clicked.

Definition at line 55 of file DockAreaWidget.h.

Member Typedef Documentation

Definition at line 145 of file DockAreaWidget.h.

Member Enumeration Documentation

Dock area related flags

Enumerator
HideSingleWidgetTitleBar 
DefaultFlags 

Definition at line 150 of file DockAreaWidget.h.

Constructor & Destructor Documentation

ads::CDockAreaWidget::CDockAreaWidget ( CDockManager DockManager,
CDockContainerWidget parent 
)

Default Constructor

Definition at line 368 of file DockAreaWidget.cpp.

ads::CDockAreaWidget::~CDockAreaWidget ( )
virtual

Virtual Destructor

Definition at line 387 of file DockAreaWidget.cpp.

Member Function Documentation

void ads::CDockAreaWidget::addDockWidget ( CDockWidget DockWidget)
protected

Add a new dock widget to dock area. All dockwidgets in the dock area tabified in a stacked layout with tabs

Definition at line 410 of file DockAreaWidget.cpp.

DockWidgetAreas ads::CDockAreaWidget::allowedAreas ( ) const

Returns flags with all allowed drop areas of this particular dock area

Definition at line 884 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::closeArea ( )
slot

Closes the dock area and all dock widgets in this area

Definition at line 926 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::closeOtherAreas ( )
slot

This function closes all other areas except of this area

Definition at line 949 of file DockAreaWidget.cpp.

QRect ads::CDockAreaWidget::contentAreaGeometry ( ) const

Returns the rectangle of the content

Definition at line 630 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::currentChanged ( int  index)
signal

This signal is emitted when the tab bar's current tab changes. The new current has the given index, or -1 if there isn't a new one

Parameters
index
void ads::CDockAreaWidget::currentChanging ( int  index)
signal

This signal is emitted when the tab bar's current tab is about to be changed. The new current has the given index, or -1 if there isn't a new one.

Parameters
index
CDockWidget * ads::CDockAreaWidget::currentDockWidget ( ) const

Returns the current active dock widget or a nullptr if there is no active dock widget (i.e. if all dock widgets are closed)

Definition at line 554 of file DockAreaWidget.cpp.

int ads::CDockAreaWidget::currentIndex ( ) const

Returns the index of the current active dock widget or -1 if there are is no active dock widget (ie.e if all dock widgets are closed)

Definition at line 617 of file DockAreaWidget.cpp.

CDockAreaWidget::DockAreaFlags ads::CDockAreaWidget::dockAreaFlags ( ) const

Returns the dock area flags - a combination of flags that configure the appearance and features of the dock area.

See also
setDockAreaFlasg()

Definition at line 891 of file DockAreaWidget.cpp.

CDockContainerWidget * ads::CDockAreaWidget::dockContainer ( ) const

Returns the dock container widget this dock area widget belongs to or 0 if there is no

Definition at line 403 of file DockAreaWidget.cpp.

CDockManager * ads::CDockAreaWidget::dockManager ( ) const

Returns the dock manager object this dock area belongs to

Definition at line 396 of file DockAreaWidget.cpp.

CDockWidget * ads::CDockAreaWidget::dockWidget ( int  Index) const

Returns a dock widget by its index

Definition at line 709 of file DockAreaWidget.cpp.

QList< CDockWidget * > ads::CDockAreaWidget::dockWidgets ( ) const

Returns a list of all dock widgets in this dock area. This list contains open and closed dock widgets.

Definition at line 644 of file DockAreaWidget.cpp.

int ads::CDockAreaWidget::dockWidgetsCount ( ) const

Returns the number of dock widgets in this area

Definition at line 702 of file DockAreaWidget.cpp.

CDockWidget::DockWidgetFeatures ads::CDockAreaWidget::features ( eBitwiseOperator  Mode = BitwiseAnd) const

This functions returns the dock widget features of all dock widget in this area. A bitwise and is used to combine the flags of all dock widgets. That means, if only one single dock widget does not support a certain flag, the whole dock are does not support the flag. I.e. if one single dock widget in this area is not closable, the whole dock are is not closable.

Definition at line 833 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::hideAreaWithNoVisibleContent ( )
protected

Call this function, if you already know, that the dock does not contain any visible content (any open dock widgets).

Definition at line 504 of file DockAreaWidget.cpp.

int ads::CDockAreaWidget::index ( CDockWidget DockWidget)
protected

Returns the index of the given DockWidget in the internal layout

Definition at line 637 of file DockAreaWidget.cpp.

int ads::CDockAreaWidget::indexOfFirstOpenDockWidget ( ) const

Returns the index of the first open dock widgets in the list of dock widgets. This function is here for performance reasons. Normally it would be possible to take the first dock widget from the list returned by openedDockWidgets() function. But that function enumerates all dock widgets while this functions stops after the first open dock widget. If there are no open dock widgets, the function returns -1.

Definition at line 687 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::insertDockWidget ( int  index,
CDockWidget DockWidget,
bool  Activate = true 
)
protected

Inserts a dock widget into dock area. All dockwidgets in the dock area tabified in a stacked layout with tabs. The index indicates the index of the new dockwidget in the tabbar and in the stacked layout. If the Activate parameter is true, the new DockWidget will be the active one in the stacked layout

Definition at line 417 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::internalSetCurrentDockWidget ( CDockWidget DockWidget)
protected

This is the internal private function for setting the current widget. This function is called by the public setCurrentDockWidget() function and by the dock manager when restoring the state

Definition at line 579 of file DockAreaWidget.cpp.

bool ads::CDockAreaWidget::isCentralWidgetArea ( ) const

Returns true if the area contains the central widget of it's manager.

Definition at line 963 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::markTitleBarMenuOutdated ( )
protected

Marks tabs menu to update

Definition at line 767 of file DockAreaWidget.cpp.

QSize ads::CDockAreaWidget::minimumSizeHint ( ) const
overridevirtual

Returns the largest minimumSizeHint() of the dock widgets in this area. The minimum size hint is updated if a dock widget is removed or added.

Definition at line 975 of file DockAreaWidget.cpp.

CDockWidget * ads::CDockAreaWidget::nextOpenDockWidget ( CDockWidget DockWidget) const
protected

This is a helper function to get the next open dock widget to activate if the given DockWidget will be closed or removed. The function returns the next widget that should be activated or nullptr in case there are no more open widgets in this area.

Definition at line 807 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::onDockWidgetFeaturesChanged ( )
private

Definition at line 982 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::onTabCloseRequested ( int  Index)
privateslot

Definition at line 538 of file DockAreaWidget.cpp.

int ads::CDockAreaWidget::openDockWidgetsCount ( ) const

Returns the number of open dock widgets in this area

Definition at line 656 of file DockAreaWidget.cpp.

QList< CDockWidget * > ads::CDockAreaWidget::openedDockWidgets ( ) const

Returns a list of dock widgets that are not closed.

Definition at line 671 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::removeDockWidget ( CDockWidget DockWidget)
protected

Removes the given dock widget from the dock area

Definition at line 449 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::reorderDockWidget ( int  fromIndex,
int  toIndex 
)
privateslot

Reorder the index position of DockWidget at fromIndx to toIndex if a tab in the tabbar is dragged from one index to another one

Definition at line 716 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::saveState ( QXmlStreamWriter &  Stream) const

Saves the state into the given stream

Definition at line 778 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setAllowedAreas ( DockWidgetAreas  areas)

Configures the areas of this particular dock area that are allowed for docking

Definition at line 877 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setCurrentDockWidget ( CDockWidget DockWidget)

Shows the tab with the given dock widget

Definition at line 567 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setCurrentIndex ( int  index)
slot

This activates the tab for the given tab index. If the dock widget for the given tab is not visible, the this function call will make it visible.

Definition at line 592 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setDockAreaFlag ( eDockAreaFlag  Flag,
bool  On 
)

Sets the dock area flag Flag on this widget if on is true; otherwise clears the flag.

Definition at line 910 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setDockAreaFlags ( DockAreaFlags  Flags)

Sets the dock area flags - a combination of flags that configure the appearance and features of the dock area

Definition at line 898 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::setVisible ( bool  Visible)
overridevirtual

Update the close button if visibility changed

Definition at line 866 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::tabBarClicked ( int  index)
signal

This signal is emitted when user clicks on a tab at an index.

CDockAreaTitleBar * ads::CDockAreaWidget::titleBar ( ) const

Returns the title bar of this dock area

Definition at line 956 of file DockAreaWidget.cpp.

QAbstractButton * ads::CDockAreaWidget::titleBarButton ( TitleBarButton  which) const

Returns the title bar button corresponding to the given title bar button identifier

Definition at line 919 of file DockAreaWidget.cpp.

QRect ads::CDockAreaWidget::titleBarGeometry ( ) const

Returns the rectangle of the title area

Definition at line 624 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::toggleDockWidgetView ( CDockWidget DockWidget,
bool  Open 
)
protected

Called from dock widget if it is opened or closed

Definition at line 734 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::toggleView ( bool  Open)
protectedslot

Definition at line 857 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::updateTitleBarVisibility ( )
protected

Updates the dock area layout and components visibility

Definition at line 743 of file DockAreaWidget.cpp.

void ads::CDockAreaWidget::viewToggled ( bool  Open)
signal

This signal is emitted if the visibility of this dock area is toggled via toggle view function

Friends And Related Function Documentation

friend class CDockContainerWidget
friend

Definition at line 61 of file DockAreaWidget.h.

friend class CDockManager
friend

Definition at line 67 of file DockAreaWidget.h.

friend class CDockWidget
friend

Definition at line 65 of file DockAreaWidget.h.

friend class CDockWidgetTab
friend

Definition at line 63 of file DockAreaWidget.h.

friend struct DockAreaWidgetPrivate
friend

Definition at line 60 of file DockAreaWidget.h.

friend class DockContainerWidgetPrivate
friend

Definition at line 62 of file DockAreaWidget.h.

friend struct DockManagerPrivate
friend

Definition at line 66 of file DockAreaWidget.h.

friend struct DockWidgetPrivate
friend

Definition at line 64 of file DockAreaWidget.h.

Member Data Documentation

DockAreaWidgetPrivate* ads::CDockAreaWidget::d
private

private data (pimpl)

Definition at line 59 of file DockAreaWidget.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