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

#include <TabBar.h>

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

Public Member Functions

 TabBar (Stack *tabWidget=nullptr)
 
virtual ~TabBar () override
 
void changeTabIcon (int index, const Icon &)
 change the tab's icon
 
DockWidgetcurrentDockWidget () const
 Returns the current dock widget.
 
int currentIndex () const
 Returns the index of the current tab.
 
DockWidgetdockWidgetAt (int index) const
 returns the dock widgets at tab number index
 
DockWidgetdockWidgetAt (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
 
Groupgroup () 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)
 
DockWidgetsingleDockWidget () const override final
 
Stackstack () 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 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 24 of file core/TabBar.h.

Constructor & Destructor Documentation

◆ TabBar()

KDDockWidgets::Core::TabBar::TabBar ( Stack tabWidget = nullptr)
explicit

◆ ~TabBar()

virtual KDDockWidgets::Core::TabBar::~TabBar ( )
overridevirtual

Member Function Documentation

◆ changeTabIcon()

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().

◆ currentDockWidget()

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().

◆ currentIndex()

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().

◆ dockWidgetAt() [1/2]

Core::DockWidget * Core::TabBar::dockWidgetAt ( int  index) const

returns the dock widgets at tab number index

Parameters
indexthe tab number from which we want the dock widget
Returns
the dock widget at tab number 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().

◆ dockWidgetAt() [2/2]

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.

◆ dptr()

TabBar::Private * TabBar::dptr ( ) const

◆ dragCanStart()

bool Core::TabBar::dragCanStart ( Point  pressPos,
Point  pos 
) const
override

◆ group()

Group * Core::TabBar::group ( ) const

◆ hasSingleDockWidget()

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().

◆ indexOfDockWidget()

int TabBar::indexOfDockWidget ( const Core::DockWidget dw) const

◆ insertDockWidget()

void TabBar::insertDockWidget ( int  index,
Core::DockWidget dw,
const Icon &  icon,
const QString title 
)

◆ isMDI()

bool Core::TabBar::isMDI ( ) const
override

Reimplemented for internal purposes.
.

Definition at line 245 of file core/TabBar.cpp.

References KDDockWidgets::Core::Group::isMDI().

◆ isMovingTab()

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().

◆ isWindow()

bool Core::TabBar::isWindow ( ) const
override

Definition at line 207 of file core/TabBar.cpp.

◆ makeWindow()

std::unique_ptr< WindowBeingDragged > Core::TabBar::makeWindow ( )
override

◆ moveTabTo()

void KDDockWidgets::Core::TabBar::moveTabTo ( int  from,
int  to 
)

◆ numDockWidgets()

int Core::TabBar::numDockWidgets ( ) const

◆ onMouseDoubleClick()

void Core::TabBar::onMouseDoubleClick ( Point  localPos)

◆ onMousePress()

void Core::TabBar::onMousePress ( Point  localPos)

◆ rectForTab()

Rect KDDockWidgets::Core::TabBar::rectForTab ( int  index) const

◆ removeDockWidget()

void TabBar::removeDockWidget ( Core::DockWidget dw)

◆ renameTab()

void TabBar::renameTab ( int  index,
const QString text 
)

◆ setCurrentDockWidget()

void TabBar::setCurrentDockWidget ( DockWidget dw)

◆ setCurrentIndex()

void TabBar::setCurrentIndex ( int  index)

◆ singleDockWidget()

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

Definition at line 240 of file core/TabBar.cpp.

Referenced by c_KDDockWidgets__Core__TabBar__singleDockWidget().

◆ stack()

Stack * TabBar::stack ( ) const

◆ tabsAreMovable()

bool Core::TabBar::tabsAreMovable ( ) const

◆ text()

QString KDDockWidgets::Core::TabBar::text ( int  index) 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