89class ThemeManager :
public QObject
127 explicit ThemeManager(QObject *parent =
nullptr);
131 static Theme resolveSystemTheme();
134 void onSystemColorSchemeChanged();
Custom QApplication subclass with exception handling and main-window access.
Theme
Enumeration of available application themes.
Contains all color attributes for a theme.
QColor m_connectionUnknown
QColor m_connectionInactive
QColor m_portHoverLabelText
QColor m_portHoverLabelBg
QColor m_connectionSelected
QColor m_portInactiveBrush
QColor m_portUnknownBrush
QColor m_connectionActive
void setTheme(const Theme theme)
Applies theme colors to all color attributes in this object.
QColor m_graphicElementLabelColor
static Theme theme()
Returns the currently active theme.
static ThemeManager & instance()
Returns the singleton ThemeManager instance.
void themeChanged()
Emitted whenever the active theme changes.
static void setTheme(const Theme theme)
Switches the application to theme and emits themeChanged().
static Theme effectiveTheme()
Returns the effective theme (Light or Dark), resolving System to the OS preference.
static QString themePath()
Returns the resource path prefix for the current theme (e.g. "dark" or "light").
static const ThemeAttributes & attributes()
Returns the current ThemeAttributes color set.