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

Custom tabbar implementation for tab area that is shown on top of a dock panel widget. 更多...

#include <qxdock/docktabbar.h>

类 QxDock::DockTabBar 继承关系图:

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 行定义.

成员类型定义说明

◆ Super

using QxDock::DockTabBar::Super = QScrollArea

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

构造及析构函数说明

◆ DockTabBar()

QxDock::DockTabBar::DockTabBar ( DockPanel *  parent = nullptr)
explicit

在文件 docktabbar.cpp 第 84 行定义.

◆ ~DockTabBar()

QxDock::DockTabBar::~DockTabBar ( )
virtual

在文件 docktabbar.cpp 第 100 行定义.

成员函数说明

◆ areTabsOverflowing()

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 行定义.

◆ closeTab()

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 行定义.

◆ count()

int QxDock::DockTabBar::count ( ) const

在文件 docktabbar.cpp 第 178 行定义.

◆ currentChanged()

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

◆ currentChanging()

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

◆ currentIndex()

int QxDock::DockTabBar::currentIndex ( ) const

Returns the current index or -1 if no tab is selected

在文件 docktabbar.cpp 第 188 行定义.

◆ currentTab()

DockTab * QxDock::DockTabBar::currentTab ( ) const

Returns the current tab or a nullptr if no tab is selected.

在文件 docktabbar.cpp 第 197 行定义.

◆ elidedChanged()

void QxDock::DockTabBar::elidedChanged ( bool  elided)

◆ eventFilter()

bool QxDock::DockTabBar::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotectedvirtual

在文件 docktabbar.cpp 第 423 行定义.

◆ insertTab()

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 行定义.

◆ isTabOpen()

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 行定义.

◆ minimumSizeHint()

QSize QxDock::DockTabBar::minimumSizeHint ( ) const
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 行定义.

◆ onCloseOtherTabsRequested()

void QxDock::DockTabBar::onCloseOtherTabsRequested ( )

在文件 docktabbar.cpp 第 360 行定义.

◆ onTabClicked()

void QxDock::DockTabBar::onTabClicked ( )

在文件 docktabbar.cpp 第 337 行定义.

◆ onTabCloseRequested()

void QxDock::DockTabBar::onTabCloseRequested ( )

在文件 docktabbar.cpp 第 352 行定义.

◆ onTabWidgetMoved()

void QxDock::DockTabBar::onTabWidgetMoved ( const QPoint &  globalPos)

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

◆ removeTab()

void QxDock::DockTabBar::removeTab ( DockTab *  tab)

在文件 docktabbar.cpp 第 129 行定义.

◆ removingTab()

void QxDock::DockTabBar::removingTab ( int  index)

◆ setCurrentIndex()

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

在文件 docktabbar.cpp 第 303 行定义.

◆ sizeHint()

QSize QxDock::DockTabBar::sizeHint ( ) const
overridevirtual

The function provides a sizeHint that matches the height of the internal viewport.

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

◆ tab()

DockTab * QxDock::DockTabBar::tab ( int  index) const

在文件 docktabbar.cpp 第 207 行定义.

◆ tabAt()

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 行定义.

◆ tabBarClicked()

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

◆ tabClosed()

void QxDock::DockTabBar::tabClosed ( int  index)

◆ tabCloseRequested()

void QxDock::DockTabBar::tabCloseRequested ( int  index)

◆ tabInserted()

void QxDock::DockTabBar::tabInserted ( int  index)

◆ tabInsertIndexAt()

int QxDock::DockTabBar::tabInsertIndexAt ( const QPoint &  pos) const

在文件 docktabbar.cpp 第 242 行定义.

◆ tabMoved()

void QxDock::DockTabBar::tabMoved ( int  from,
int  to 
)

◆ tabOpened()

void QxDock::DockTabBar::tabOpened ( int  index)

◆ wheelEvent()

void QxDock::DockTabBar::wheelEvent ( QWheelEvent *  event)
overrideprotectedvirtual

在文件 docktabbar.cpp 第 463 行定义.


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