|
wiRedPanda
Logic Circuit Simulator
|
Singleton class for managing application themes. More...
#include <ThemeManager.h>
Public Member Functions | |
| void | themeChanged () |
| Emitted whenever the active theme changes. | |
Static Public Member Functions | |
| static const ThemeAttributes & | attributes () |
| Returns the current ThemeAttributes color set. | |
| static Theme | effectiveTheme () |
| Returns the effective theme (Light or Dark), resolving System to the OS preference. | |
| static ThemeManager & | instance () |
| Returns the singleton ThemeManager instance. | |
| static void | setTheme (const Theme theme) |
| Switches the application to theme and emits themeChanged(). | |
| static Theme | theme () |
| Returns the currently active theme. | |
| static QString | themePath () |
| Returns the resource path prefix for the current theme (e.g. "dark" or "light"). | |
Singleton class for managing application themes.
ThemeManager provides a central point for accessing and changing the application theme. It maintains the current theme setting and notifies the application when the theme changes.
Definition at line 89 of file ThemeManager.h.
|
static |
Returns the current ThemeAttributes color set.
Definition at line 155 of file ThemeManager.cpp.
References instance().
Referenced by Port::hoverEnter(), PortHoverLabel::paint(), Node::setWirelessMode(), Connection::updateTheme(), GraphicElement::updateTheme(), Port::updateTheme(), Scene::updateTheme(), and Text::updateTheme().
|
static |
Returns the effective theme (Light or Dark), resolving System to the OS preference.
Definition at line 65 of file ThemeManager.cpp.
References instance(), and System.
Referenced by themePath(), and ElementEditor::updateTheme().
|
inlinestatic |
Returns the singleton ThemeManager instance.
Definition at line 95 of file ThemeManager.h.
References instance().
Referenced by attributes(), effectiveTheme(), ExerciseOverlay::ExerciseOverlay(), instance(), MinimapWidget::MinimapWidget(), Scene::Scene(), setTheme(), theme(), and TourOverlay::TourOverlay().
|
static |
Switches the application to theme and emits themeChanged().
Definition at line 95 of file ThemeManager.cpp.
References Dark, Application::instance(), instance(), Light, Settings::setTheme(), ThemeAttributes::setTheme(), System, theme(), and themeChanged().
Referenced by main().
|
static |
Returns the currently active theme.
Definition at line 60 of file ThemeManager.cpp.
References instance().
Referenced by main(), and setTheme().
| void ThemeManager::themeChanged | ( | ) |
Emitted whenever the active theme changes.
References System.
Referenced by ExerciseOverlay::ExerciseOverlay(), MinimapWidget::MinimapWidget(), Scene::Scene(), setTheme(), and TourOverlay::TourOverlay().
|
static |
Returns the resource path prefix for the current theme (e.g. "dark" or "light").
Definition at line 55 of file ThemeManager.cpp.
References effectiveTheme(), and Light.
Referenced by DFlipFlop::pixmapPath(), DLatch::pixmapPath(), JKFlipFlop::pixmapPath(), SRFlipFlop::pixmapPath(), SRLatch::pixmapPath(), and TFlipFlop::pixmapPath().