|
QtCanpool 3.3.0
|
Custom tabbar implementation for tab area that is shown on top of a dock panel widget. 更多...
#include <qxdock/docktabbar.h>

Public 类型 | |
| using | Super = QScrollArea |
Public 成员函数 | |
| DockTabBar (DockPanel *parent=nullptr) | |
| virtual | ~DockTabBar () |
| void | insertTab (int index, DockTab *tab) |
| Inserts the given dock tab at the given position. | |
| void | removeTab (DockTab *tab) |
| int | count () const |
| int | currentIndex () const |
| Returns the current index or -1 if no tab is selected | |
| DockTab * | currentTab () const |
| Returns the current tab or a nullptr if no tab is selected. | |
| DockTab * | tab (int index) const |
| int | tabAt (const QPoint &pos) const |
| Returns the tab at the given pos. | |
| int | tabInsertIndexAt (const QPoint &pos) const |
| bool | isTabOpen (int index) const |
| This function returns true if the tab is open, that means if it is visible to the user. | |
| virtual QSize | minimumSizeHint () const override |
| Overrides the minimumSizeHint() function of QScrollArea The minimumSizeHint() is bigger than the sizeHint () for the scroll area because even if the scrollbars are invisible, the required space is reserved in the minimumSizeHint(). | |
| virtual QSize | sizeHint () const override |
| The function provides a sizeHint that matches the height of the internal viewport. | |
| bool | areTabsOverflowing () const |
| This function returns true, if the tabs need more space than the size of the tab bar. | |
| void | setCurrentIndex (int index) |
| void | closeTab (int index) |
| This function will close the tab given in index param. | |
| void | onTabClicked () |
| void | onTabCloseRequested () |
| void | onCloseOtherTabsRequested () |
| void | onTabWidgetMoved (const QPoint &globalPos) |
| void | currentChanging (int index) |
| void | currentChanged (int index) |
| void | tabBarClicked (int index) |
| void | tabCloseRequested (int index) |
| void | tabClosed (int index) |
| void | tabOpened (int index) |
| void | tabMoved (int from, int to) |
| void | removingTab (int index) |
| void | tabInserted (int index) |
| void | elidedChanged (bool elided) |
Protected 成员函数 | |
| virtual bool | eventFilter (QObject *watched, QEvent *event) override |
| virtual void | wheelEvent (QWheelEvent *event) override |
Custom tabbar implementation for tab area that is shown on top of a dock panel widget.
The tabbar displays the tab widgets of the contained dock widgets. We cannot use QTabBar here because it does a lot of fancy animations that will crash the application if a tab is removed while the animation has not finished. And we need to remove a tab, if the user drags a a dock widget out of a group of tabbed widgets
在文件 docktabbar.h 第 26 行定义.
| using QxDock::DockTabBar::Super = QScrollArea |
在文件 docktabbar.h 第 30 行定义.
|
explicit |
在文件 docktabbar.cpp 第 84 行定义.
|
virtual |
在文件 docktabbar.cpp 第 100 行定义.
| bool QxDock::DockTabBar::areTabsOverflowing | ( | ) | const |
This function returns true, if the tabs need more space than the size of the tab bar.
在文件 docktabbar.cpp 第 297 行定义.
| void QxDock::DockTabBar::closeTab | ( | int | index | ) |
This function will close the tab given in index param.
Closing a tab means, the tab will be hidden, it will not be removed
在文件 docktabbar.cpp 第 324 行定义.
| int QxDock::DockTabBar::count | ( | ) | const |
在文件 docktabbar.cpp 第 178 行定义.
| void QxDock::DockTabBar::currentChanged | ( | int | index | ) |
| void QxDock::DockTabBar::currentChanging | ( | int | index | ) |
| int QxDock::DockTabBar::currentIndex | ( | ) | const |
Returns the current index or -1 if no tab is selected
在文件 docktabbar.cpp 第 188 行定义.
| DockTab * QxDock::DockTabBar::currentTab | ( | ) | const |
Returns the current tab or a nullptr if no tab is selected.
在文件 docktabbar.cpp 第 197 行定义.
| void QxDock::DockTabBar::elidedChanged | ( | bool | elided | ) |
|
overrideprotectedvirtual |
在文件 docktabbar.cpp 第 423 行定义.
| void QxDock::DockTabBar::insertTab | ( | int | index, |
| DockTab * | tab | ||
| ) |
Inserts the given dock tab at the given position.
Inserting a new tab at an index less than or equal to the current index will increment the current index, but keep the current tab.
在文件 docktabbar.cpp 第 110 行定义.
| bool QxDock::DockTabBar::isTabOpen | ( | int | index | ) | const |
This function returns true if the tab is open, that means if it is visible to the user.
If the function returns false, the tab is closed
在文件 docktabbar.cpp 第 257 行定义.
|
overridevirtual |
Overrides the minimumSizeHint() function of QScrollArea The minimumSizeHint() is bigger than the sizeHint () for the scroll area because even if the scrollbars are invisible, the required space is reserved in the minimumSizeHint().
This override simply returns sizeHint();
在文件 docktabbar.cpp 第 273 行定义.
| void QxDock::DockTabBar::onCloseOtherTabsRequested | ( | ) |
在文件 docktabbar.cpp 第 360 行定义.
| void QxDock::DockTabBar::onTabClicked | ( | ) |
在文件 docktabbar.cpp 第 337 行定义.
| void QxDock::DockTabBar::onTabCloseRequested | ( | ) |
在文件 docktabbar.cpp 第 352 行定义.
| void QxDock::DockTabBar::onTabWidgetMoved | ( | const QPoint & | globalPos | ) |
在文件 docktabbar.cpp 第 382 行定义.
| void QxDock::DockTabBar::removeTab | ( | DockTab * | tab | ) |
在文件 docktabbar.cpp 第 129 行定义.
| void QxDock::DockTabBar::removingTab | ( | int | index | ) |
| void QxDock::DockTabBar::setCurrentIndex | ( | int | index | ) |
在文件 docktabbar.cpp 第 303 行定义.
|
overridevirtual |
The function provides a sizeHint that matches the height of the internal viewport.
在文件 docktabbar.cpp 第 284 行定义.
| DockTab * QxDock::DockTabBar::tab | ( | int | index | ) | const |
在文件 docktabbar.cpp 第 207 行定义.
| int QxDock::DockTabBar::tabAt | ( | const QPoint & | pos | ) | const |
Returns the tab at the given pos.
Returns -1 if the pos is left of the first tab and count() if the pos is right of the last tab. Returns -2 to indicate an invalid value.
在文件 docktabbar.cpp 第 221 行定义.
| void QxDock::DockTabBar::tabBarClicked | ( | int | index | ) |
| void QxDock::DockTabBar::tabClosed | ( | int | index | ) |
| void QxDock::DockTabBar::tabCloseRequested | ( | int | index | ) |
| void QxDock::DockTabBar::tabInserted | ( | int | index | ) |
| int QxDock::DockTabBar::tabInsertIndexAt | ( | const QPoint & | pos | ) | const |
在文件 docktabbar.cpp 第 242 行定义.
| void QxDock::DockTabBar::tabMoved | ( | int | from, |
| int | to | ||
| ) |
| void QxDock::DockTabBar::tabOpened | ( | int | index | ) |
|
overrideprotectedvirtual |
在文件 docktabbar.cpp 第 463 行定义.