KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDDockWidgets::Core::Stack Class Reference

#include <Stack.h>

Inheritance diagram for KDDockWidgets::Core::Stack:
Inheritance graph
[legend]
Collaboration diagram for KDDockWidgets::Core::Stack:
Collaboration graph
[legend]

Public Member Functions

 Stack (Group *, StackOptions)
 
virtual ~Stack () override
 
void addDockWidget (DockWidget *)
 appends a dock widget into this TabWidget
 
bool buttonHidesIfDisabled (TitleBarButtonType) const
 
bool contains (DockWidget *dw) const
 Returns whether dockwidget dw is contained in this tab widget Equivalent to indexOf(dw) != -1.
 
Groupgroup () const
 getter for the group
 
bool insertDockWidget (DockWidget *dockwidget, int index)
 inserts dockwidget into the TabWidget, at index
 
bool isMDI () const override
 
bool isPositionDraggable (Point p) const override
 
bool isWindow () const override
 
std::unique_ptr< WindowBeingDragged > makeWindow () override
 
int numDockWidgets () const
 returns the number of dock widgets in this TabWidget
 
bool onMouseDoubleClick (Point localPos)
 
StackOptions options () const
 
void setDocumentMode (bool)
 Enables document mode. Default is false.
 
void setHideDisabledButtons (TitleBarButtonTypes)
 
void setTabBarAutoHide (bool)
 
DockWidgetsingleDockWidget () const override final
 
Core::TabBartabBar () const
 Returns the tab bar.
 
bool tabBarAutoHide () const
 
- Public Member Functions inherited from KDDockWidgets::Core::Controller
 Controller (ViewType type, View *)
 
virtual ~Controller ()
 
bool close ()
 
void destroyLater ()
 
Controller::Private * dptr () const
 
Rect geometry () const
 
int height () const
 
bool inDtor () const
 
bool is (ViewType) const
 Returns whether this controller is of the specified type.
 
bool isFixedHeight () const
 
bool isFixedWidth () const
 
bool isVisible () const
 
Point mapToGlobal (Point) const
 
Point pos () const
 
Rect rect () const
 
void setParentView (View *parent)
 
void setVisible (bool)
 
void show () const
 
Size size () const
 
ViewType type () const
 Returns the type of this controller.
 
Viewview () const
 Returns the view associated with this controller, if any.
 
int width () const
 
std::shared_ptr< Viewwindow () const
 
int x () const
 
int y () const
 

Additional Inherited Members

- Protected Member Functions inherited from KDDockWidgets::Core::Controller
virtual void setParentView_impl (View *parent)
 
- Protected Attributes inherited from KDDockWidgets::Core::Controller
bool m_inDtor = false
 

Detailed Description

Definition at line 34 of file core/Stack.h.

Constructor & Destructor Documentation

◆ Stack()

Stack::Stack ( Group group,
StackOptions  options 
)
explicit

◆ ~Stack()

Stack::~Stack ( )
overridevirtual

Definition at line 44 of file core/Stack.cpp.

Member Function Documentation

◆ addDockWidget()

void Stack::addDockWidget ( DockWidget dock)

◆ buttonHidesIfDisabled()

bool Stack::buttonHidesIfDisabled ( TitleBarButtonType  type) const

Definition at line 228 of file core/Stack.cpp.

References KDDockWidgets::Core::Controller::type().

◆ contains()

bool Stack::contains ( DockWidget dw) const

Returns whether dockwidget dw is contained in this tab widget Equivalent to indexOf(dw) != -1.

Definition at line 103 of file core/Stack.cpp.

Referenced by c_KDDockWidgets__Core__Stack__contains_DockWidget(), and insertDockWidget().

◆ group()

Group * Stack::group ( ) const

◆ insertDockWidget()

bool Stack::insertDockWidget ( DockWidget dockwidget,
int  index 
)

inserts dockwidget into the TabWidget, at index

Parameters
dockwidgetthe dockwidget to insert
indexThe index to where to put it

Definition at line 68 of file core/Stack.cpp.

References contains(), KDDockWidgets::Core::DockWidget::d, KDDockWidgets::Core::DockWidget::icon(), numDockWidgets(), KDDockWidgets::TabBar, and KDDockWidgets::Core::DockWidget::title().

Referenced by addDockWidget(), c_KDDockWidgets__Core__Stack__insertDockWidget_DockWidget_int(), and KDDockWidgets::Core::GroupViewInterface::insertDockWidget().

◆ isMDI()

bool Stack::isMDI ( ) const
override

Definition at line 158 of file core/Stack.cpp.

◆ isPositionDraggable()

bool Stack::isPositionDraggable ( Point  p) const
override

Definition at line 55 of file core/Stack.cpp.

References KDDockWidgets::Core::Controller::view().

◆ isWindow()

bool Stack::isWindow ( ) const
override

Definition at line 138 of file core/Stack.cpp.

References KDDockWidgets::Core::Controller::view().

◆ makeWindow()

std::unique_ptr< WindowBeingDragged > Stack::makeWindow ( )
override

◆ numDockWidgets()

int Stack::numDockWidgets ( ) const

returns the number of dock widgets in this TabWidget

Definition at line 210 of file core/Stack.cpp.

Referenced by addDockWidget(), c_KDDockWidgets__Core__Stack__numDockWidgets(), KDDockWidgets::Core::Group::dockWidgetCount(), and insertDockWidget().

◆ onMouseDoubleClick()

bool Stack::onMouseDoubleClick ( Point  localPos)

◆ options()

StackOptions Stack::options ( ) const

Definition at line 50 of file core/Stack.cpp.

◆ setDocumentMode()

void Stack::setDocumentMode ( bool  is)

◆ setHideDisabledButtons()

void Stack::setHideDisabledButtons ( TitleBarButtonTypes  types)

The specified buttons, if disabled, will be hidden as well for example, with non-closable dock widgets we disable the close button this allows to hide it as well. Only relevant with Flag_ShowButtonsOnTabBarIfTitleBarHidden

Definition at line 220 of file core/Stack.cpp.

◆ setTabBarAutoHide()

void Stack::setTabBarAutoHide ( bool  is)

Sets whether the tab bar should be hidden when there's only 1 tab shown Default is true. See Config::Flag_AlwaysShowTabs to change this behaviour

Definition at line 191 of file core/Stack.cpp.

References KDDockWidgets::Core::Controller::is().

Referenced by KDDockWidgets::Core::Group::Group(), c_KDDockWidgets__Core__Stack__setTabBarAutoHide_bool(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::setTabBarAutoHide().

◆ singleDockWidget()

Core::DockWidget * Stack::singleDockWidget ( ) const
finaloverride

Definition at line 148 of file core/Stack.cpp.

Referenced by c_KDDockWidgets__Core__Stack__singleDockWidget().

◆ tabBar()

Core::TabBar * Stack::tabBar ( ) const

◆ tabBarAutoHide()

bool Stack::tabBarAutoHide ( ) const

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

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8