![]() |
KDDockWidgets API Documentation 2.0
|
#include <TabBar.h>


Public Member Functions | |
| TabBar (Stack *tabWidget=nullptr) | |
| virtual | ~TabBar () override |
| void | changeTabIcon (int index, const Icon &) |
| change the tab's icon | |
| DockWidget * | currentDockWidget () const |
| Returns the current dock widget. | |
| int | currentIndex () const |
| Returns the index of the current tab. | |
| DockWidget * | dockWidgetAt (int index) const |
returns the dock widgets at tab number index | |
| DockWidget * | dockWidgetAt (Point localPos) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Private * | dptr () const |
| bool | dragCanStart (Point pressPos, Point pos) const override |
| Group * | group () const |
| bool | hasSingleDockWidget () const |
| returns whether there's only 1 tab | |
| int | indexOfDockWidget (const Core::DockWidget *dw) const |
| Returns the tab index of the specified dock widget. | |
| void | insertDockWidget (int index, Core::DockWidget *dw, const Icon &icon, const QString &title) |
| bool | isMDI () const override |
| Reimplemented for internal purposes. . | |
| bool | isMovingTab () const |
| Returns whether we're inside Core::TabBar::moveTab() | |
| bool | isWindow () const override |
| std::unique_ptr< WindowBeingDragged > | makeWindow () override |
| void | moveTabTo (int from, int to) |
| int | numDockWidgets () const |
| void | onMouseDoubleClick (Point localPos) |
| void | onMousePress (Point localPos) |
| Rect | rectForTab (int index) const |
| void | removeDockWidget (Core::DockWidget *dw) |
| void | renameTab (int index, const QString &) |
| rename's the tab's text | |
| void | setCurrentDockWidget (DockWidget *dw) |
| void | setCurrentIndex (int index) |
| DockWidget * | singleDockWidget () const override final |
| Stack * | stack () const |
| bool | tabsAreMovable () const |
| QString | text (int index) 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 | 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. | |
| View * | view () const |
| Returns the view associated with this controller, if any. | |
| int | width () const |
| std::shared_ptr< View > | window () 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 |
Definition at line 24 of file core/TabBar.h.
|
explicit |
|
overridevirtual |
| void TabBar::changeTabIcon | ( | int | index, |
| const Icon & | icon | ||
| ) |
change the tab's icon
Definition at line 347 of file core/TabBar.cpp.
References KDDockWidgets::Core::Controller::view().
Referenced by KDDockWidgets::Core::Group::changeTabIcon().
| DockWidget * TabBar::currentDockWidget | ( | ) | const |
Returns the current dock widget.
Definition at line 295 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__currentDockWidget(), and KDDockWidgets::Core::Group::currentDockWidget().
| int TabBar::currentIndex | ( | ) | const |
Returns the index of the current tab.
Definition at line 311 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__currentIndex(), and KDDockWidgets::Core::Group::currentIndex().
| Core::DockWidget * Core::TabBar::dockWidgetAt | ( | int | index | ) | const |
returns the dock widgets at tab number index
| index | the tab number from which we want the dock widget |
index Definition at line 91 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__dockWidgetAt_int(), c_KDDockWidgets__Core__TabBar__dockWidgetAt_Point(), KDDockWidgets::Core::Group::dockWidgetAt(), KDDockWidgets::QtWidgets::Stack::init(), and setCurrentIndex().
| Core::DockWidget * Core::TabBar::dockWidgetAt | ( | Point | localPos | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 99 of file core/TabBar.cpp.
| TabBar::Private * TabBar::dptr | ( | ) | const |
Definition at line 358 of file core/TabBar.cpp.
Referenced by KDDockWidgets::Core::Group::Group(), and KDDockWidgets::Core::DockWidget::startDragging().
|
override |
Definition at line 54 of file core/TabBar.cpp.
References KDDockWidgets::Core::Platform::instance(), and KDDockWidgets::Core::Platform::startDragDistance().
| Group * Core::TabBar::group | ( | ) | const |
Definition at line 251 of file core/TabBar.cpp.
References KDDockWidgets::Core::Stack::group(), and KDDockWidgets::Core::Group::m_stack.
Referenced by c_KDDockWidgets__Core__TabBar__group(), insertDockWidget(), KDDockWidgets::flutter::TabBar::insertDockWidget(), removeDockWidget(), KDDockWidgets::flutter::TabBar::removeDockWidget(), and KDDockWidgets::Core::DockWidget::startDragging().
| bool Core::TabBar::hasSingleDockWidget | ( | ) | const |
returns whether there's only 1 tab
Definition at line 230 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__hasSingleDockWidget().
| int TabBar::indexOfDockWidget | ( | const Core::DockWidget * | dw | ) | const |
Returns the tab index of the specified dock widget.
Definition at line 107 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__indexOfDockWidget_DockWidget(), KDDockWidgets::Core::Group::indexOfDockWidget(), KDDockWidgets::QtWidgets::TabBar::removeDockWidget(), and setCurrentDockWidget().
| void TabBar::insertDockWidget | ( | int | index, |
| Core::DockWidget * | dw, | ||
| const Icon & | icon, | ||
| const QString & | title | ||
| ) |
Definition at line 141 of file core/TabBar.cpp.
References KDDockWidgets::Core::DockWidget::d, KDDockWidgets::Core::DockWidget::dptr(), group(), insertDockWidget(), KDDockWidgets::Core::Group::onDockWidgetCountChanged(), removeDockWidget(), setCurrentDockWidget(), and KDDockWidgets::Core::Controller::view().
Referenced by KDDockWidgets::QtQuick::Group::insertDockWidget(), and insertDockWidget().
|
override |
Reimplemented for internal purposes.
.
Definition at line 245 of file core/TabBar.cpp.
References KDDockWidgets::Core::Group::isMDI().
| bool TabBar::isMovingTab | ( | ) | const |
Returns whether we're inside Core::TabBar::moveTab()
Definition at line 353 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__isMovingTab().
|
override |
Definition at line 207 of file core/TabBar.cpp.
|
override |
Definition at line 165 of file core/TabBar.cpp.
References KDDockWidgets::Config::Flag_AlwaysShowTabs, KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible, KDDockWidgets::Config::flags(), and KDDockWidgets::Config::self().
| void KDDockWidgets::Core::TabBar::moveTabTo | ( | int | from, |
| int | to | ||
| ) |
| int Core::TabBar::numDockWidgets | ( | ) | const |
Definition at line 235 of file core/TabBar.cpp.
References KDDockWidgets::Core::Controller::size().
Referenced by c_KDDockWidgets__Core__TabBar__numDockWidgets().
| void Core::TabBar::onMouseDoubleClick | ( | Point | localPos | ) |
Definition at line 224 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__onMouseDoubleClick_Point(), KDDockWidgets::QtQuick::TabBar::event(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::onMouseDoubleClick().
| void Core::TabBar::onMousePress | ( | Point | localPos | ) |
Definition at line 213 of file core/TabBar.cpp.
References KDDockWidgets::Config::Flag_TitleBarIsFocusable, Qt::MouseFocusReason, and KDDockWidgets::Config::self().
Referenced by c_KDDockWidgets__Core__TabBar__onMousePress_Point(), KDDockWidgets::QtQuick::TabBar::event(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::onMousePress(), and KDDockWidgets::flutter::TabBar::onMousePress().
| Rect KDDockWidgets::Core::TabBar::rectForTab | ( | int | index | ) | const |
Referenced by c_KDDockWidgets__Core__TabBar__rectForTab_int().
| void TabBar::removeDockWidget | ( | Core::DockWidget * | dw | ) |
Definition at line 112 of file core/TabBar.cpp.
References group(), KDDockWidgets::Core::Controller::m_inDtor, KDDockWidgets::Core::Group::onDockWidgetCountChanged(), setCurrentIndex(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__TabBar__removeDockWidget_DockWidget(), insertDockWidget(), KDDockWidgets::QtQuick::Group::removeDockWidget(), KDDockWidgets::Core::GroupViewInterface::removeDockWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::removeDockWidget().
| void TabBar::renameTab | ( | int | index, |
| const QString & | text | ||
| ) |
rename's the tab's text
Definition at line 341 of file core/TabBar.cpp.
References text(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__TabBar__renameTab_int_QString(), KDDockWidgets::Core::Group::renameTab(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::renameTab().
| void TabBar::setCurrentDockWidget | ( | DockWidget * | dw | ) |
Definition at line 300 of file core/TabBar.cpp.
References indexOfDockWidget(), and setCurrentIndex().
Referenced by c_KDDockWidgets__Core__TabBar__setCurrentDockWidget_DockWidget(), insertDockWidget(), KDDockWidgets::Core::Group::setCurrentDockWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::setCurrentDockWidget().
| void TabBar::setCurrentIndex | ( | int | index | ) |
Definition at line 319 of file core/TabBar.cpp.
References dockWidgetAt(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__TabBar__setCurrentIndex_int(), KDDockWidgets::QtWidgets::TabBar::init(), removeDockWidget(), setCurrentDockWidget(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::setCurrentIndex(), and KDDockWidgets::Core::Group::setCurrentTabIndex().
|
finaloverride |
Definition at line 240 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__singleDockWidget().
| Stack * TabBar::stack | ( | ) | const |
Definition at line 256 of file core/TabBar.cpp.
Referenced by c_KDDockWidgets__Core__TabBar__stack(), KDDockWidgets::QtQuick::TabBar::init(), KDDockWidgets::QtWidgets::TabBar::insertDockWidget(), KDDockWidgets::QtWidgets::TabBar::removeDockWidget(), KDDockWidgets::QtQuick::TabBar::stackView(), and KDDockWidgets::QtQuick::TabBar::tabBarAutoHide().
| bool Core::TabBar::tabsAreMovable | ( | ) | const |
Definition at line 49 of file core/TabBar.cpp.
References KDDockWidgets::Config::Flag_AllowReorderTabs, KDDockWidgets::Config::flags(), and KDDockWidgets::Config::self().
Referenced by c_KDDockWidgets__Core__TabBar__tabsAreMovable().
| QString KDDockWidgets::Core::TabBar::text | ( | int | index | ) | const |
Referenced by c_KDDockWidgets__Core__TabBar__text_int(), and renameTab().
KDDockWidgets