LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::utils::ThemeManager Class Reference

Manages application themes and customization (v1.10.0 Phase 8). More...

#include <ThemeManager.hpp>

Collaboration diagram for ui::qt::utils::ThemeManager:
Collaboration graph

Classes

struct  ColorScheme
 
struct  FontConfig
 

Public Types

enum class  Theme { Light , Dark , HighContrast , Custom }
 

Public Member Functions

void setTheme (Theme theme)
 Set the active theme.
 
Theme theme () const
 
const ColorScheme & colorScheme () const
 Get current color scheme.
 
void setColorScheme (const ColorScheme &scheme)
 Set custom color scheme.
 
QFont getFont (const QString &componentName) const
 Get font for a component.
 
void setFont (const QString &componentName, const QFont &font)
 
QString stylesheet () const
 Get stylesheet for Qt application.
 
void saveTheme (const QString &name)
 Save theme to file.
 
bool loadTheme (const QString &name)
 Load theme from file.
 
std::vector< QString > getAvailableThemes () const
 Get available theme names.
 
std::vector< ColorScheme > getColorSchemes () const
 Get available color schemes.
 
void resetToDefault ()
 Reset to default theme.
 

Static Public Member Functions

static ThemeManager & getInstance ()
 

Private Member Functions

 ThemeManager ()
 
ColorScheme GetLightScheme () const
 
ColorScheme GetDarkScheme () const
 
ColorScheme GetHighContrastScheme () const
 
void ApplyColorScheme ()
 

Private Attributes

Theme m_currentTheme {Theme::Light}
 
ColorScheme m_colorScheme
 
std::map< QString, QFont > m_fonts
 
std::vector< ColorScheme > m_customSchemes
 

Detailed Description

Manages application themes and customization (v1.10.0 Phase 8).

Features:

  • Predefined light/dark themes
  • Custom color schemes
  • Font customization per component
  • Theme persistence across sessions
  • Runtime theme switching
  • Per-component styling overrides

Member Enumeration Documentation

◆ Theme

Enumerator
Light 
Dark 
HighContrast 
Custom 

Constructor & Destructor Documentation

◆ ThemeManager()

ui::qt::utils::ThemeManager::ThemeManager ( )
private
Here is the call graph for this function:

Member Function Documentation

◆ ApplyColorScheme()

void ui::qt::utils::ThemeManager::ApplyColorScheme ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ colorScheme()

const ColorScheme & ui::qt::utils::ThemeManager::colorScheme ( ) const
inline

Get current color scheme.

◆ getAvailableThemes()

std::vector< QString > ui::qt::utils::ThemeManager::getAvailableThemes ( ) const

Get available theme names.

Here is the call graph for this function:

◆ getColorSchemes()

std::vector< ThemeManager::ColorScheme > ui::qt::utils::ThemeManager::getColorSchemes ( ) const

Get available color schemes.

Here is the call graph for this function:

◆ GetDarkScheme()

ThemeManager::ColorScheme ui::qt::utils::ThemeManager::GetDarkScheme ( ) const
private
Here is the caller graph for this function:

◆ getFont()

QFont ui::qt::utils::ThemeManager::getFont ( const QString &  componentName) const

Get font for a component.

◆ GetHighContrastScheme()

ThemeManager::ColorScheme ui::qt::utils::ThemeManager::GetHighContrastScheme ( ) const
private
Here is the caller graph for this function:

◆ getInstance()

ThemeManager & ui::qt::utils::ThemeManager::getInstance ( )
static
Here is the caller graph for this function:

◆ GetLightScheme()

ThemeManager::ColorScheme ui::qt::utils::ThemeManager::GetLightScheme ( ) const
private
Here is the caller graph for this function:

◆ loadTheme()

bool ui::qt::utils::ThemeManager::loadTheme ( const QString &  name)

Load theme from file.

Here is the call graph for this function:

◆ resetToDefault()

void ui::qt::utils::ThemeManager::resetToDefault ( )

Reset to default theme.

Here is the call graph for this function:

◆ saveTheme()

void ui::qt::utils::ThemeManager::saveTheme ( const QString &  name)

Save theme to file.

Here is the call graph for this function:

◆ setColorScheme()

void ui::qt::utils::ThemeManager::setColorScheme ( const ColorScheme &  scheme)

Set custom color scheme.

Here is the call graph for this function:

◆ setFont()

void ui::qt::utils::ThemeManager::setFont ( const QString &  componentName,
const QFont &  font 
)
Here is the call graph for this function:

◆ setTheme()

void ui::qt::utils::ThemeManager::setTheme ( Theme  theme)

Set the active theme.

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

◆ stylesheet()

QString ui::qt::utils::ThemeManager::stylesheet ( ) const

Get stylesheet for Qt application.

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

◆ theme()

Theme ui::qt::utils::ThemeManager::theme ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ m_colorScheme

ColorScheme ui::qt::utils::ThemeManager::m_colorScheme
private

◆ m_currentTheme

Theme ui::qt::utils::ThemeManager::m_currentTheme {Theme::Light}
private

◆ m_customSchemes

std::vector<ColorScheme> ui::qt::utils::ThemeManager::m_customSchemes
private

◆ m_fonts

std::map<QString, QFont> ui::qt::utils::ThemeManager::m_fonts
private

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