Open 3D Engine AzQtComponents API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::TabWidget Class Reference

A container for other widgets that provides a tab bar to switch between them. More...

#include <TabWidget.h>

Inherits QTabWidget.

Inherited by AzQtComponents::DockTabWidget.

Classes

struct  Config
 Style configuration for tab widgets. More...
 

Public Member Functions

 TabWidget (QWidget *parent=nullptr)
 
 TabWidget (TabWidgetActionToolBar *actionToolBar, QWidget *parent=nullptr)
 
void setCustomTabBar (TabBar *tabBar)
 Sets a custom tab bar overriding the default one.
 
void setActionToolBar (TabWidgetActionToolBar *actionToolBar)
 Adds or replaces the action toolbar of the widget. Implicitly sets actionToolBarEnabled.
 
TabWidgetActionToolBaractionToolBar () const
 Returns the action toolbar, or nullptr if not set.
 
void setActionToolBarVisible (bool visible=true)
 
bool isActionToolBarVisible () const
 Returns true if the action toolbar is visible.
 
void setOverflowButtonSpacing (bool enable)
 Enables extra space between the tabs and the action toolbar to allow easier dragging.
 
void resizeEvent (QResizeEvent *resizeEvent) override
 Overrides the QTabWidget resizeEvent function to account for tab sizing.
 

Static Public Member Functions

static void applySecondaryStyle (TabWidget *tabWidget, bool bordered=true)
 
static Config loadConfig (QSettings &settings)
 
static Config defaultConfig ()
 Gets the default tab widget style configuration.
 

Protected Member Functions

void tabInserted (int index) override
 
void tabRemoved (int index) override
 

Properties

bool actionToolBarVisible
 Visibility of the action toolbar.
 

Friends

class Style
 

Detailed Description

A container for other widgets that provides a tab bar to switch between them.

Constructor & Destructor Documentation

◆ TabWidget()

AzQtComponents::TabWidget::TabWidget ( TabWidgetActionToolBar actionToolBar,
QWidget *  parent = nullptr 
)

Alternate constructor to pre-populate the action toolbar.

Parameters
actionToolBarThe action toolbar to show. Implicitly sets actionToolBarEnabled.
parentThe parent widget.

Member Function Documentation

◆ applySecondaryStyle()

static void AzQtComponents::TabWidget::applySecondaryStyle ( TabWidget tabWidget,
bool  bordered = true 
)
static

Applies the "Secondary" style class to a TabWidget. @guidepage uidev-tab-component.html

◆ loadConfig()

static Config AzQtComponents::TabWidget::loadConfig ( QSettings &  settings)
static

Sets the tab widget style configuration.

Parameters
settingsThe settings object to load the configuration from.
Returns
The new configuration of the tab widget.

◆ setActionToolBarVisible()

void AzQtComponents::TabWidget::setActionToolBarVisible ( bool  visible = true)

Sets the visibility of the action toolbar. If none is set, it creates and displays a default one.


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