QGIS API Documentation  2.99.0-Master (314842d)
Classes | Public Member Functions | List of all members
QgsTabWidget Class Reference

The QgsTabWidget class is the same as the QTabWidget but with additional methods to temporarily hide/show tabs. More...

#include <qgstabwidget.h>

Inheritance diagram for QgsTabWidget:
Inheritance graph
[legend]

Public Member Functions

 QgsTabWidget (QWidget *parent=nullptr)
 Create a new QgsTabWidget with the optionally provided parent. More...
 
void hideTab (QWidget *tab)
 Hides the tab with the given widget. More...
 
int realTabIndex (QWidget *widget)
 Returns the index of the tab with the given widget. More...
 
void setTabVisible (QWidget *tab, bool visible)
 Control the visibility for the tab with the given widget. More...
 
void showTab (QWidget *tab)
 Shows the tab with the given widget. More...
 
virtual void tabInserted (int index) override
 Is called internally whenever a new tab has been inserted. More...
 
virtual void tabRemoved (int index) override
 Is called internally whenever a tab has been removed. More...
 

Detailed Description

The QgsTabWidget class is the same as the QTabWidget but with additional methods to temporarily hide/show tabs.

Note
Added in QGIS 3.0

Definition at line 28 of file qgstabwidget.h.

Constructor & Destructor Documentation

◆ QgsTabWidget()

QgsTabWidget::QgsTabWidget ( QWidget *  parent = nullptr)

Create a new QgsTabWidget with the optionally provided parent.

Note
Added in QGIS 3.0

Definition at line 20 of file qgstabwidget.cpp.

Member Function Documentation

◆ hideTab()

void QgsTabWidget::hideTab ( QWidget *  tab)

Hides the tab with the given widget.

Note
Added in QGIS 3.0

Definition at line 26 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.

Note
Added in QGIS 3.0

Definition at line 60 of file qgstabwidget.cpp.

◆ setTabVisible()

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

Control the visibility for the tab with the given widget.

Note
Added in QGIS 3.0

Definition at line 52 of file qgstabwidget.cpp.

◆ showTab()

void QgsTabWidget::showTab ( QWidget *  tab)

Shows the tab with the given widget.

Note
Added in QGIS 3.0

Definition at line 39 of file qgstabwidget.cpp.

◆ tabInserted()

void QgsTabWidget::tabInserted ( int  index)
overridevirtual

Is called internally whenever a new tab has been inserted.

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

Note
Added in QGIS 3.0

Definition at line 72 of file qgstabwidget.cpp.

◆ tabRemoved()

void QgsTabWidget::tabRemoved ( int  index)
overridevirtual

Is called internally whenever a tab has been removed.

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

Note
Added in QGIS 3.0

Definition at line 107 of file qgstabwidget.cpp.


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