QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
QgsTabWidget Class Reference

A QTabWidget with additional methods to temporarily hide/show tabs. More...

#include <qgstabwidget.h>

Inheritance diagram for QgsTabWidget:

Public Member Functions

 QgsTabWidget (QWidget *parent=nullptr)
 Create a new QgsTabWidget with the optionally provided parent.
void hideTab (QWidget *tab)
 Hides the tab with the given widget.
int realTabIndex (QWidget *widget)
 Returns the index of the tab with the given widget.
void setTabStyle (int tabIndex, const QgsAttributeEditorElement::LabelStyle &labelStyle)
 Sets the optional custom labelStyle for the tab identified by tabIndex.
void setTabVisible (QWidget *tab, bool visible)
 Control the visibility for the tab with the given widget.
void showTab (QWidget *tab)
 Shows the tab with the given widget.
void tabInserted (int index) override
 Is called internally whenever a new tab has been inserted.
void tabRemoved (int index) override
 Is called internally whenever a tab has been removed.

Detailed Description

A QTabWidget with additional methods to temporarily hide/show tabs.

Definition at line 29 of file qgstabwidget.h.

Constructor & Destructor Documentation

◆ QgsTabWidget()

QgsTabWidget::QgsTabWidget ( QWidget * parent = nullptr)

Create a new QgsTabWidget with the optionally provided parent.

Definition at line 26 of file qgstabwidget.cpp.

Member Function Documentation

◆ hideTab()

void QgsTabWidget::hideTab ( QWidget * tab)

Hides the tab with the given widget.

Definition at line 36 of file qgstabwidget.cpp.

◆ realTabIndex()

int QgsTabWidget::realTabIndex ( QWidget * widget)

Returns the index of the tab with the given widget.

This index is not the same as the one provided to insertTab and removeTab since these methods are not aware of hidden tabs.

Definition at line 70 of file qgstabwidget.cpp.

◆ setTabStyle()

void QgsTabWidget::setTabStyle ( int tabIndex,
const QgsAttributeEditorElement::LabelStyle & labelStyle )

Sets the optional custom labelStyle for the tab identified by tabIndex.

Since
QGIS 3.26

Definition at line 83 of file qgstabwidget.cpp.

◆ setTabVisible()

void QgsTabWidget::setTabVisible ( QWidget * tab,
bool visible )

Control the visibility for the tab with the given widget.

Definition at line 62 of file qgstabwidget.cpp.

◆ showTab()

void QgsTabWidget::showTab ( QWidget * tab)

Shows the tab with the given widget.

Definition at line 49 of file qgstabwidget.cpp.

◆ tabInserted()

void QgsTabWidget::tabInserted ( int index)
override

Is called internally whenever a new tab has been inserted.

Is used to keep track of currently available and visible tabs.

Definition at line 88 of file qgstabwidget.cpp.

◆ tabRemoved()

void QgsTabWidget::tabRemoved ( int index)
override

Is called internally whenever a tab has been removed.

Is used to keep track of currently available and visible tabs.

Definition at line 123 of file qgstabwidget.cpp.


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