#include <thememanager.h>
◆ Mode
| Enumerator |
|---|
| System | |
| Light | |
| Dark | |
◆ apply()
| void openswmmvis::ui::ThemeManager::apply |
( |
| ) |
|
Build + install the QPalette and QSS overlay for the effective scheme onto qApp. Safe to call any time after QApplication construction.
◆ colors()
| const ThemeColors & openswmmvis::ui::ThemeManager::colors |
( |
| ) |
const |
Tokens for the effective scheme.
◆ effectiveScheme()
| Qt::ColorScheme openswmmvis::ui::ThemeManager::effectiveScheme |
( |
| ) |
const |
The scheme in force: the OS scheme in System mode (falling back to Light when the platform reports Unknown — e.g. the offscreen QPA), otherwise the explicit choice.
◆ instance()
◆ mode()
| Mode openswmmvis::ui::ThemeManager::mode |
( |
| ) |
const |
|
inline |
◆ modeFromString()
◆ modeToString()
| QString openswmmvis::ui::ThemeManager::modeToString |
( |
Mode |
mode | ) |
|
|
static |
Round-trip helpers for the persisted preference string ("System" / "Light" / "Dark"; unknown input falls back to System).
◆ setMode()
| void openswmmvis::ui::ThemeManager::setMode |
( |
Mode |
mode | ) |
|
Change the mode and re-apply the palette. Emits themeChanged() when the effective scheme actually changes.
◆ themeChanged
| void openswmmvis::ui::ThemeManager::themeChanged |
( |
| ) |
|
|
signal |
Emitted after the palette/overlay for a new effective scheme has been applied — widgets holding token-derived pens repaint on this.
The documentation for this class was generated from the following files: