SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::ThemeManager Class Reference

#include <thememanager.h>

Inheritance diagram for openswmmvis::ui::ThemeManager:
Collaboration diagram for openswmmvis::ui::ThemeManager:

Public Types

enum class  Mode {
  System ,
  Light ,
  Dark
}
 

Signals

void themeChanged ()
 

Public Member Functions

Mode mode () const
 
void setMode (Mode mode)
 
Qt::ColorScheme effectiveScheme () const
 
const ThemeColorscolors () const
 
void apply ()
 

Static Public Member Functions

static ThemeManagerinstance ()
 
static QString modeToString (Mode mode)
 
static Mode modeFromString (const QString &text)
 

Member Enumeration Documentation

◆ Mode

Enumerator
System 
Light 
Dark 

Member Function Documentation

◆ 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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()

ThemeManager * openswmmvis::ui::ThemeManager::instance ( )
static
Here is the caller graph for this function:

◆ mode()

Mode openswmmvis::ui::ThemeManager::mode ( ) const
inline

◆ modeFromString()

ThemeManager::Mode openswmmvis::ui::ThemeManager::modeFromString ( const QString &  text)
static
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

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