iVS3D v2.0.0
Loading...
Searching...
No Matches
AdaptiveToolButton Class Reference
Inheritance diagram for AdaptiveToolButton:

Public Member Functions

 AdaptiveToolButton (const QString &fullText, const QString &shortText="", QWidget *parent=nullptr)
 AdaptiveToolButton constructor.
 
void setIconForTheme (const QIcon &icon, ColorTheme theme)
 setIconForTheme sets the icon for a specific color theme
 
void setColorTheme (ColorTheme theme)
 setColorTheme sets the current color theme and updates the icon accordingly
 

Detailed Description

QToolButton that adapts its label based on the available space. It can show a full text, a short text, or just an icon depending on the width of the button. It also supports changing icons based on a color theme (light/dark).

Constructor & Destructor Documentation

◆ AdaptiveToolButton()

AdaptiveToolButton::AdaptiveToolButton ( const QString &  fullText,
const QString &  shortText = "",
QWidget *  parent = nullptr 
)
inline

AdaptiveToolButton constructor.

Parameters
fullTextThe full text to display when there is enough space
shortTextThe short text to display when space is limited (optional)
parentThe parent widget (optional)

Member Function Documentation

◆ setColorTheme()

void AdaptiveToolButton::setColorTheme ( ColorTheme  theme)
inline

setColorTheme sets the current color theme and updates the icon accordingly

Parameters
themeThe color theme (light/dark)

◆ setIconForTheme()

void AdaptiveToolButton::setIconForTheme ( const QIcon &  icon,
ColorTheme  theme 
)
inline

setIconForTheme sets the icon for a specific color theme

Parameters
iconThe icon to set
themeThe color theme (light/dark)

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