wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ThemeManager Class Reference

Singleton class for managing application themes. More...

#include <ThemeManager.h>

Inheritance diagram for ThemeManager:
[legend]

Public Member Functions

void themeChanged ()
 Emitted whenever the active theme changes.

Static Public Member Functions

static const ThemeAttributesattributes ()
 Returns the current ThemeAttributes color set.
static Theme effectiveTheme ()
 Returns the effective theme (Light or Dark), resolving System to the OS preference.
static ThemeManagerinstance ()
 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").

Detailed Description

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.

Member Function Documentation

◆ attributes()

◆ effectiveTheme()

Theme ThemeManager::effectiveTheme ( )
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().

◆ instance()

ThemeManager & ThemeManager::instance ( )
inlinestatic

◆ setTheme()

void ThemeManager::setTheme ( const Theme theme)
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().

◆ theme()

Theme ThemeManager::theme ( )
static

Returns the currently active theme.

Definition at line 60 of file ThemeManager.cpp.

References instance().

Referenced by main(), and setTheme().

◆ themeChanged()

void ThemeManager::themeChanged ( )

Emitted whenever the active theme changes.

References System.

Referenced by ExerciseOverlay::ExerciseOverlay(), MinimapWidget::MinimapWidget(), Scene::Scene(), setTheme(), and TourOverlay::TourOverlay().

◆ themePath()

QString ThemeManager::themePath ( )
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().


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