Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | Friends | List of all members
ads::CDockAreaTabBar Class Reference

#include <DockAreaTabBar.h>

Inheritance diagram for ads::CDockAreaTabBar:
Inheritance graph
[legend]

Public Types

using Super = QScrollArea
 

Public Slots

void closeTab (int Index)
 
void setCurrentIndex (int Index)
 

Signals

void currentChanged (int Index)
 
void currentChanging (int Index)
 
void elidedChanged (bool elided)
 
void removingTab (int index)
 
void tabBarClicked (int index)
 
void tabClosed (int index)
 
void tabCloseRequested (int index)
 
void tabInserted (int index)
 
void tabMoved (int from, int to)
 
void tabOpened (int index)
 

Public Member Functions

 CDockAreaTabBar (CDockAreaWidget *parent)
 
int count () const
 
int currentIndex () const
 
CDockWidgetTabcurrentTab () const
 
virtual bool eventFilter (QObject *watched, QEvent *event) override
 
void insertTab (int Index, CDockWidgetTab *Tab)
 
bool isTabOpen (int Index) const
 
virtual QSize minimumSizeHint () const override
 
void removeTab (CDockWidgetTab *Tab)
 
virtual QSize sizeHint () const override
 
CDockWidgetTabtab (int Index) const
 
virtual ~CDockAreaTabBar ()
 

Protected Member Functions

virtual void wheelEvent (QWheelEvent *Event) override
 

Private Slots

void onCloseOtherTabsRequested ()
 
void onTabClicked ()
 
void onTabCloseRequested ()
 
void onTabWidgetMoved (const QPoint &GlobalPos)
 

Private Attributes

DockAreaTabBarPrivated
 private data (pimpl) More...
 

Friends

class CDockAreaTitleBar
 
struct DockAreaTabBarPrivate
 

Detailed Description

Custom tabbar implementation for tab area that is shown on top of a dock area 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

Definition at line 53 of file DockAreaTabBar.h.

Member Typedef Documentation

◆ Super

using ads::CDockAreaTabBar::Super = QScrollArea

Definition at line 72 of file DockAreaTabBar.h.

Constructor & Destructor Documentation

◆ CDockAreaTabBar()

ads::CDockAreaTabBar::CDockAreaTabBar ( CDockAreaWidget parent)

Default Constructor

Definition at line 121 of file DockAreaTabBar.cpp.

◆ ~CDockAreaTabBar()

ads::CDockAreaTabBar::~CDockAreaTabBar ( )
virtual

Virtual Destructor

Definition at line 147 of file DockAreaTabBar.cpp.

Member Function Documentation

◆ closeTab

void ads::CDockAreaTabBar::closeTab ( int  Index)
slot

This function will close the tab given in Index param. Closing a tab means, the tab will be hidden, it will not be removed

Definition at line 423 of file DockAreaTabBar.cpp.

◆ count()

int ads::CDockAreaTabBar::count ( ) const

Returns the number of tabs in this tabbar

Definition at line 192 of file DockAreaTabBar.cpp.

◆ currentChanged

void ads::CDockAreaTabBar::currentChanged ( int  Index)
signal

This signal is emitted when the tab bar's current tab changes. The new current has the given index, or -1 if there isn't a new one

◆ currentChanging

void ads::CDockAreaTabBar::currentChanging ( int  Index)
signal

This signal is emitted when the tab bar's current tab is about to be changed. The new current has the given index, or -1 if there isn't a new one.

◆ currentIndex()

int ads::CDockAreaTabBar::currentIndex ( ) const

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

Definition at line 288 of file DockAreaTabBar.cpp.

◆ currentTab()

CDockWidgetTab * ads::CDockAreaTabBar::currentTab ( ) const

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

Definition at line 295 of file DockAreaTabBar.cpp.

◆ elidedChanged

void ads::CDockAreaTabBar::elidedChanged ( bool  elided)
signal

This signal is emitted when a tab title elide state has been changed

◆ eventFilter()

bool ads::CDockAreaTabBar::eventFilter ( QObject *  watched,
QEvent *  event 
)
overridevirtual

Filters the tab widget events

Definition at line 440 of file DockAreaTabBar.cpp.

◆ insertTab()

void ads::CDockAreaTabBar::insertTab ( int  Index,
CDockWidgetTab Tab 
)

Inserts the given dock widget 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.

Definition at line 200 of file DockAreaTabBar.cpp.

◆ isTabOpen()

bool ads::CDockAreaTabBar::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

Definition at line 475 of file DockAreaTabBar.cpp.

◆ minimumSizeHint()

QSize ads::CDockAreaTabBar::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 speace is reserved in the minimumSizeHint(). This override simply returns sizeHint();

Definition at line 487 of file DockAreaTabBar.cpp.

◆ onCloseOtherTabsRequested

void ads::CDockAreaTabBar::onCloseOtherTabsRequested ( )
privateslot

Definition at line 337 of file DockAreaTabBar.cpp.

◆ onTabClicked

void ads::CDockAreaTabBar::onTabClicked ( )
privateslot

Definition at line 309 of file DockAreaTabBar.cpp.

◆ onTabCloseRequested

void ads::CDockAreaTabBar::onTabCloseRequested ( )
privateslot

Definition at line 328 of file DockAreaTabBar.cpp.

◆ onTabWidgetMoved

void ads::CDockAreaTabBar::onTabWidgetMoved ( const QPoint &  GlobalPos)
privateslot

Definition at line 376 of file DockAreaTabBar.cpp.

◆ removeTab()

void ads::CDockAreaTabBar::removeTab ( CDockWidgetTab Tab)

Removes the given DockWidgetTab from the tabbar

Definition at line 224 of file DockAreaTabBar.cpp.

◆ removingTab

void ads::CDockAreaTabBar::removingTab ( int  index)
signal

This signal is emitted, just before the tab with the given index is removed

◆ setCurrentIndex

void ads::CDockAreaTabBar::setCurrentIndex ( int  Index)
slot

This property sets the index of the tab bar's visible tab

Definition at line 170 of file DockAreaTabBar.cpp.

◆ sizeHint()

QSize ads::CDockAreaTabBar::sizeHint ( ) const
overridevirtual

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

Definition at line 496 of file DockAreaTabBar.cpp.

◆ tab()

CDockWidgetTab * ads::CDockAreaTabBar::tab ( int  Index) const

Returns the tab with the given index

Definition at line 365 of file DockAreaTabBar.cpp.

◆ tabBarClicked

void ads::CDockAreaTabBar::tabBarClicked ( int  index)
signal

This signal is emitted when user clicks on a tab

◆ tabClosed

void ads::CDockAreaTabBar::tabClosed ( int  index)
signal

This signal is emitted if a tab has been closed

◆ tabCloseRequested

void ads::CDockAreaTabBar::tabCloseRequested ( int  index)
signal

This signal is emitted when the close button on a tab is clicked. The index is the index that should be closed.

◆ tabInserted

void ads::CDockAreaTabBar::tabInserted ( int  index)
signal

This signal is emitted if a tab has been inserted

◆ tabMoved

void ads::CDockAreaTabBar::tabMoved ( int  from,
int  to 
)
signal

This signal is emitted when the tab has moved the tab at index position from to index position to.

◆ tabOpened

void ads::CDockAreaTabBar::tabOpened ( int  index)
signal

This signal is emitted if a tab has been opened. A tab is opened if it has been made visible

◆ wheelEvent()

void ads::CDockAreaTabBar::wheelEvent ( QWheelEvent *  Event)
overrideprotectedvirtual

Definition at line 154 of file DockAreaTabBar.cpp.

Friends And Related Function Documentation

◆ CDockAreaTitleBar

friend class CDockAreaTitleBar
friend

Definition at line 59 of file DockAreaTabBar.h.

◆ DockAreaTabBarPrivate

friend struct DockAreaTabBarPrivate
friend

Definition at line 58 of file DockAreaTabBar.h.

Member Data Documentation

◆ d

DockAreaTabBarPrivate* ads::CDockAreaTabBar::d
private

private data (pimpl)

Definition at line 57 of file DockAreaTabBar.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51