QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxDock::DockPanel类 参考

DockPanel manages multiple instances of DockWidgets. 更多...

#include <qxdock/dockpanel.h>

类 QxDock::DockPanel 继承关系图:

Public 类型

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

Public 成员函数

 DockPanel (DockWindow *window, DockContainer *parent)
 
 ~DockPanel ()
 
DockWindow * dockWindow () const
 
DockContainer * dockContainer () const
 
DockSplitter * parentSplitter () const
 
QRect titleBarGeometry () const
 
QRect contentAreaGeometry () const
 
int dockWidgetsCount () const
 
QList< DockWidget * > dockWidgets () const
 
int openDockWidgetsCount () const
 
QList< DockWidget * > openedDockWidgets () const
 
DockWidget * dockWidget (int index) const
 
int 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)
 
DockWidget * currentDockWidget () const
 
void setCurrentDockWidget (DockWidget *w)
 
DockWidget::DockWidgetFeatures features (Qx::DockBitwiseOperator mode=Qx::DockBitwiseAnd) const
 This functions returns the dock widget features of all dock widget in this panel.
 
QAbstractButton * titleBarButton (Qx::DockTitleBarButton which) const
 
virtual void setVisible (bool visible) override
 
Qx::DockWidgetAreas allowedAreas () const
 
void setAllowedAreas (Qx::DockWidgetAreas areas)
 
DockTitleBar * titleBar () const
 
DockAreaFlags dockAreaFlags () const
 Returns the dock area flags - a combination of flags that configure the appearance and features of the dock area.
 
void setDockAreaFlags (DockAreaFlags flags)
 Sets the dock area flags - a combination of flags that configure the appearance and features of the dock panel
 
void setDockAreaFlag (DockAreaFlag flag, bool on)
 
bool isCentralWidgetArea () const
 
bool containsCentralWidget () const
 
bool isTopLevelArea () const
 
DockAutoHideContainer * autoHideContainer () const
 
void setAutoHideContainer (DockAutoHideContainer *container)
 
bool isAutoHide () const
 
int indexOfFirstOpenDockWidget () const
 Returns the index of the first open dock widgets in the list of dock widgets.
 
void saveState (QXmlStreamWriter &s) const
 
virtual QSize minimumSizeHint () const override
 Returns the largest minimumSizeHint() of the dock widgets in this panel.
 
void setCurrentIndex (int index)
 
void closeArea ()
 
void closeOtherAreas ()
 
void setAutoHide (bool enable, Qx::DockSideBarArea area=Qx::DockSideBarNone, int tabIndex=-1)
 Sets the dock panel into auto hide mode or into normal mode.
 
void toggleAutoHide (Qx::DockSideBarArea area=Qx::DockSideBarNone)
 Switches the dock panel to auto hide mode or vice versa depending on its current state.
 
void setFloating ()
 
void toggleView (bool open)
 
void onTabCloseRequested (int index)
 
void reorderDockWidget (int fromIndex, int toIndex)
 Reorder the index position of DockWidget at fromIndx to toIndex if a tab in the tabbar is dragged from one index to another one
 
void updateAutoHideButtonCheckState ()
 
void updateTitleBarButtonsToolTips ()
 
Qx::DockSideBarArea calculateSideBarArea () const
 Calculate the auto hide side bar are depending on the dock area widget position in the container
 
void onDockWidgetFeaturesChanged ()
 
void currentChanging (int index)
 
void currentChanged (int index)
 
void viewToggled (bool open)
 
void tabBarClicked (int index)
 

静态 Public 成员函数

static bool restoreState (DockStateReader &s, DockPanel *&createdWidget, bool testing, DockContainer *parentContainer)
 

Protected 成员函数

void addDockWidget (DockWidget *w)
 Add a new dock widget to dock panel.
 
void insertDockWidget (int index, DockWidget *w, bool activate=true)
 Inserts a dock widget into dock panel.
 
void removeDockWidget (DockWidget *w)
 
DockWidget * nextOpenDockWidget (DockWidget *w) const
 This is a helper function to get the next open dock widget to activate if the given w will be closed or removed.
 
void toggleDockWidgetView (DockWidget *w, bool open)
 Called from dock widget if it is opened or closed
 
int indexOf (DockWidget *w) const
 
void hideAreaWithNoVisibleContent ()
 Call this function, if you already know, that the dock does not contain any visible content (any open dock widgets).
 
void updateTitleBarVisibility ()
 Updates the dock panel layout and components visibility
 
void internalSetCurrentDockWidget (DockWidget *w)
 This is the internal private function for setting the current widget.
 
void updateTitleBarButtonVisibility (bool isTopLevel)
 
void markTitleBarMenuOutdated ()
 Marks tabs menu to update
 

友元

class DockContainerPrivate
 
class DockWidget
 
class DockWidgetPrivate
 
class DockContainer
 
class DockAutoHideContainer
 
class DockWindow
 
class DockWindowPrivate
 

详细描述

DockPanel 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.

在文件 dockpanel.h 第 30 行定义.

成员类型定义说明

◆ Super

using QxDock::DockPanel::Super = QFrame

在文件 dockpanel.h 第 34 行定义.

成员枚举类型说明

◆ DockAreaFlag

枚举值
HideSingleWidgetTitleBar 
DefaultFlags 

在文件 dockpanel.h 第 36 行定义.

构造及析构函数说明

◆ DockPanel()

QxDock::DockPanel::DockPanel ( DockWindow *  window,
DockContainer *  parent 
)
explicit

在文件 dockpanel.cpp 第 284 行定义.

◆ ~DockPanel()

QxDock::DockPanel::~DockPanel ( )

在文件 dockpanel.cpp 第 295 行定义.

成员函数说明

◆ addDockWidget()

void QxDock::DockPanel::addDockWidget ( DockWidget *  w)
protected

Add a new dock widget to dock panel.

All dockwidgets in the dock panel tabified in a stacked layout with tabs

在文件 dockpanel.cpp 第 820 行定义.

◆ allowedAreas()

Qx::DockWidgetAreas QxDock::DockPanel::allowedAreas ( ) const

在文件 dockpanel.cpp 第 446 行定义.

◆ autoHideContainer()

DockAutoHideContainer * QxDock::DockPanel::autoHideContainer ( ) const

在文件 dockpanel.cpp 第 1096 行定义.

◆ calculateSideBarArea()

Qx::DockSideBarArea QxDock::DockPanel::calculateSideBarArea ( ) const

Calculate the auto hide side bar are depending on the dock area widget position in the container

在文件 dockpanel.cpp 第 706 行定义.

◆ closeArea()

void QxDock::DockPanel::closeArea ( )

在文件 dockpanel.cpp 第 549 行定义.

◆ closeOtherAreas()

void QxDock::DockPanel::closeOtherAreas ( )

在文件 dockpanel.cpp 第 572 行定义.

◆ containsCentralWidget()

bool QxDock::DockPanel::containsCentralWidget ( ) const

在文件 dockpanel.cpp 第 505 行定义.

◆ contentAreaGeometry()

QRect QxDock::DockPanel::contentAreaGeometry ( ) const

在文件 dockpanel.cpp 第 324 行定义.

◆ currentChanged()

void QxDock::DockPanel::currentChanged ( int  index)

◆ currentChanging()

void QxDock::DockPanel::currentChanging ( int  index)

◆ currentDockWidget()

DockWidget * QxDock::DockPanel::currentDockWidget ( ) const

在文件 dockpanel.cpp 第 388 行定义.

◆ currentIndex()

int QxDock::DockPanel::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)

在文件 dockpanel.cpp 第 382 行定义.

◆ dockAreaFlags()

DockPanel::DockAreaFlags QxDock::DockPanel::dockAreaFlags ( ) const

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

参见
setDockAreaFlasg()

在文件 dockpanel.cpp 第 469 行定义.

◆ dockContainer()

DockContainer * QxDock::DockPanel::dockContainer ( ) const

在文件 dockpanel.cpp 第 306 行定义.

◆ dockWidget()

DockWidget * QxDock::DockPanel::dockWidget ( int  index) const

在文件 dockpanel.cpp 第 372 行定义.

◆ dockWidgets()

QList< DockWidget * > QxDock::DockPanel::dockWidgets ( ) const

在文件 dockpanel.cpp 第 336 行定义.

◆ dockWidgetsCount()

int QxDock::DockPanel::dockWidgetsCount ( ) const

在文件 dockpanel.cpp 第 330 行定义.

◆ dockWindow()

DockWindow * QxDock::DockPanel::dockWindow ( ) const

在文件 dockpanel.cpp 第 300 行定义.

◆ features()

DockWidget::DockWidgetFeatures QxDock::DockPanel::features ( Qx::DockBitwiseOperator  mode = Qx::DockBitwiseAnd) const

This functions returns the dock widget features of all dock widget in this panel.

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 panel is not closable, the whole dock are is not closable.

在文件 dockpanel.cpp 第 414 行定义.

◆ hideAreaWithNoVisibleContent()

void QxDock::DockPanel::hideAreaWithNoVisibleContent ( )
protected

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

在文件 dockpanel.cpp 第 984 行定义.

◆ indexOf()

int QxDock::DockPanel::indexOf ( DockWidget *  w) const
protected

在文件 dockpanel.cpp 第 974 行定义.

◆ indexOfFirstOpenDockWidget()

int QxDock::DockPanel::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.

在文件 dockpanel.cpp 第 1129 行定义.

◆ insertDockWidget()

void QxDock::DockPanel::insertDockWidget ( int  index,
DockWidget *  w,
bool  activate = true 
)
protected

Inserts a dock widget into dock panel.

All dockwidgets in the dock panel 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 w will be the active one in the stacked layout

在文件 dockpanel.cpp 第 833 行定义.

◆ internalSetCurrentDockWidget()

void QxDock::DockPanel::internalSetCurrentDockWidget ( DockWidget *  w)
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 window when restoring the state

在文件 dockpanel.cpp 第 1045 行定义.

◆ isAutoHide()

bool QxDock::DockPanel::isAutoHide ( ) const

在文件 dockpanel.cpp 第 1114 行定义.

◆ isCentralWidgetArea()

bool QxDock::DockPanel::isCentralWidgetArea ( ) const

在文件 dockpanel.cpp 第 496 行定义.

◆ isTopLevelArea()

bool QxDock::DockPanel::isTopLevelArea ( ) const

在文件 dockpanel.cpp 第 517 行定义.

◆ markTitleBarMenuOutdated()

void QxDock::DockPanel::markTitleBarMenuOutdated ( )
protected

Marks tabs menu to update

在文件 dockpanel.cpp 第 1068 行定义.

◆ minimumSizeHint()

QSize QxDock::DockPanel::minimumSizeHint ( ) const
overridevirtual

Returns the largest minimumSizeHint() of the dock widgets in this panel.

The minimum size hint is updated if a dock widget is removed or added.

在文件 dockpanel.cpp 第 1239 行定义.

◆ nextOpenDockWidget()

DockWidget * QxDock::DockPanel::nextOpenDockWidget ( DockWidget *  w) const
protected

This is a helper function to get the next open dock widget to activate if the given w 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.

在文件 dockpanel.cpp 第 921 行定义.

◆ onDockWidgetFeaturesChanged()

void QxDock::DockPanel::onDockWidgetFeaturesChanged ( )

在文件 dockpanel.cpp 第 808 行定义.

◆ onTabCloseRequested()

void QxDock::DockPanel::onTabCloseRequested ( int  index)

在文件 dockpanel.cpp 第 641 行定义.

◆ openDockWidgetsCount()

int QxDock::DockPanel::openDockWidgetsCount ( ) const

在文件 dockpanel.cpp 第 346 行定义.

◆ openedDockWidgets()

QList< DockWidget * > QxDock::DockPanel::openedDockWidgets ( ) const

在文件 dockpanel.cpp 第 359 行定义.

◆ parentSplitter()

DockSplitter * QxDock::DockPanel::parentSplitter ( ) const

在文件 dockpanel.cpp 第 312 行定义.

◆ removeDockWidget()

void QxDock::DockPanel::removeDockWidget ( DockWidget *  w)
protected

在文件 dockpanel.cpp 第 868 行定义.

◆ reorderDockWidget()

void QxDock::DockPanel::reorderDockWidget ( int  fromIndex,
int  toIndex 
)

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

在文件 dockpanel.cpp 第 650 行定义.

◆ restoreState()

bool QxDock::DockPanel::restoreState ( DockStateReader &  s,
DockPanel *&  createdWidget,
bool  testing,
DockContainer *  parentContainer 
)
static

在文件 dockpanel.cpp 第 1164 行定义.

◆ saveState()

void QxDock::DockPanel::saveState ( QXmlStreamWriter &  s) const

在文件 dockpanel.cpp 第 1142 行定义.

◆ setAllowedAreas()

void QxDock::DockPanel::setAllowedAreas ( Qx::DockWidgetAreas  areas)

在文件 dockpanel.cpp 第 452 行定义.

◆ setAutoHide()

void QxDock::DockPanel::setAutoHide ( bool  enable,
Qx::DockSideBarArea  area = Qx::DockSideBarNone,
int  tabIndex = -1 
)

Sets the dock panel into auto hide mode or into normal mode.

If the dock panel is switched to auto hide mode, then all dock widgets that are pinable will be added to the sidebar

在文件 dockpanel.cpp 第 582 行定义.

◆ setAutoHideContainer()

void QxDock::DockPanel::setAutoHideContainer ( DockAutoHideContainer *  container)

在文件 dockpanel.cpp 第 1102 行定义.

◆ setCurrentDockWidget()

void QxDock::DockPanel::setCurrentDockWidget ( DockWidget *  w)

在文件 dockpanel.cpp 第 397 行定义.

◆ setCurrentIndex()

void QxDock::DockPanel::setCurrentIndex ( int  index)

在文件 dockpanel.cpp 第 527 行定义.

◆ setDockAreaFlag()

void QxDock::DockPanel::setDockAreaFlag ( DockPanel::DockAreaFlag  flag,
bool  on 
)

在文件 dockpanel.cpp 第 489 行定义.

◆ setDockAreaFlags()

void QxDock::DockPanel::setDockAreaFlags ( DockAreaFlags  flags)

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

在文件 dockpanel.cpp 第 479 行定义.

◆ setFloating()

void QxDock::DockPanel::setFloating ( )

在文件 dockpanel.cpp 第 629 行定义.

◆ setVisible()

void QxDock::DockPanel::setVisible ( bool  visible)
overridevirtual

在文件 dockpanel.cpp 第 437 行定义.

◆ tabBarClicked()

void QxDock::DockPanel::tabBarClicked ( int  index)

◆ titleBar()

DockTitleBar * QxDock::DockPanel::titleBar ( ) const

在文件 dockpanel.cpp 第 458 行定义.

◆ titleBarButton()

QAbstractButton * QxDock::DockPanel::titleBarButton ( Qx::DockTitleBarButton  which) const

在文件 dockpanel.cpp 第 431 行定义.

◆ titleBarGeometry()

QRect QxDock::DockPanel::titleBarGeometry ( ) const

在文件 dockpanel.cpp 第 318 行定义.

◆ toggleAutoHide()

void QxDock::DockPanel::toggleAutoHide ( Qx::DockSideBarArea  area = Qx::DockSideBarNone)

Switches the dock panel to auto hide mode or vice versa depending on its current state.

在文件 dockpanel.cpp 第 620 行定义.

◆ toggleDockWidgetView()

void QxDock::DockPanel::toggleDockWidgetView ( DockWidget *  w,
bool  open 
)
protected

Called from dock widget if it is opened or closed

在文件 dockpanel.cpp 第 967 行定义.

◆ toggleView()

void QxDock::DockPanel::toggleView ( bool  open)

在文件 dockpanel.cpp 第 635 行定义.

◆ updateAutoHideButtonCheckState()

void QxDock::DockPanel::updateAutoHideButtonCheckState ( )

在文件 dockpanel.cpp 第 667 行定义.

◆ updateTitleBarButtonsToolTips()

void QxDock::DockPanel::updateTitleBarButtonsToolTips ( )

在文件 dockpanel.cpp 第 675 行定义.

◆ updateTitleBarButtonVisibility()

void QxDock::DockPanel::updateTitleBarButtonVisibility ( bool  isTopLevel)
protected

在文件 dockpanel.cpp 第 1059 行定义.

◆ updateTitleBarVisibility()

void QxDock::DockPanel::updateTitleBarVisibility ( )
protected

Updates the dock panel layout and components visibility

在文件 dockpanel.cpp 第 1017 行定义.

◆ viewToggled()

void QxDock::DockPanel::viewToggled ( bool  open)

友元及相关函数文档

◆ DockAutoHideContainer

friend class DockAutoHideContainer
friend

在文件 dockpanel.h 第 141 行定义.

◆ DockContainer

friend class DockContainer
friend

在文件 dockpanel.h 第 140 行定义.

◆ DockContainerPrivate

friend class DockContainerPrivate
friend

在文件 dockpanel.h 第 137 行定义.

◆ DockWidget

friend class DockWidget
friend

在文件 dockpanel.h 第 138 行定义.

◆ DockWidgetPrivate

friend class DockWidgetPrivate
friend

在文件 dockpanel.h 第 139 行定义.

◆ DockWindow

friend class DockWindow
friend

在文件 dockpanel.h 第 142 行定义.

◆ DockWindowPrivate

friend class DockWindowPrivate
friend

在文件 dockpanel.h 第 143 行定义.


该类的文档由以下文件生成: