NDEVR
API Documentation
ColorThemeButton

A button for adjusting the color theme used by the NDEVR engine (Typically light or dark color palettes). More...

Collaboration diagram for ColorThemeButton:
[legend]

Public Member Functions

 ColorThemeButton (Button *button, bool use_big_icons=false)
 Constructs a color theme button attached to an existing Button widget.
void clearConstantTheme ()
 Clears any locked constant theme, restoring normal toggle behavior.
NDEVRLightingTheme clickedTarget () const
 Returns the theme that will be activated when the button is clicked.
void setConstantTheme (NDEVRLightingTheme theme)
 Locks the button to always display a specific theme.
void setMakeUpper (bool make_upper)
 Sets whether the button label text should be uppercased.

Protected Member Functions

void styleDestroyed ()
 Slot invoked when the proxy style is destroyed, to clean up connections.
void themeChangedSlot ()
 Slot invoked when the application theme changes to update the button appearance.

Protected Attributes

Buttonm_button
 The button widget this theme button controls.
NDEVRLightingTheme m_constant_theme = e_num_of_themes
 The locked theme, or e_num_of_themes if not locked.
bool m_make_upper = false
 Whether to uppercase the button label.
bool m_use_big_icons
 Whether to use large icon variants.

Detailed Description

A button for adjusting the color theme used by the NDEVR engine (Typically light or dark color palettes).


Definition at line 44 of file ThemeButton.h.

Constructor & Destructor Documentation

◆ ColorThemeButton()

ColorThemeButton::ColorThemeButton ( Button * button,
bool use_big_icons = false )

Constructs a color theme button attached to an existing Button widget.

Parameters
[in]buttonThe button to attach theme-switching behavior to.
[in]use_big_iconsWhether to use large icons for the button.

Member Function Documentation

◆ clickedTarget()

NDEVRLightingTheme ColorThemeButton::clickedTarget ( ) const

Returns the theme that will be activated when the button is clicked.

Returns
The target lighting theme.

◆ setConstantTheme()

void ColorThemeButton::setConstantTheme ( NDEVRLightingTheme theme)

Locks the button to always display a specific theme.

Parameters
[in]themeThe theme to lock to.

◆ setMakeUpper()

void ColorThemeButton::setMakeUpper ( bool make_upper)

Sets whether the button label text should be uppercased.

Parameters
[in]make_upperWhether to uppercase the label.

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