Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ThemeManager Class Reference

#include <theme_manager.h>

Inheritance diagram for ThemeManager:
[legend]
Collaboration diagram for ThemeManager:
[legend]

Public Types

enum  Role {
  MinRole = 0 , Hand = MinRole , Stack , Table ,
  Player , MaxRole = Player
}

Signals

void themeChanged ()

Public Member Functions

 ThemeManager (QObject *parent=nullptr)
QStringMapgetAvailableThemes ()
QBrush & getBgBrush (Role zone)
QBrush getExtraBgBrush (Role zone, int zoneId=0)

Protected Slots

void themeChangedSlot ()

Protected Member Functions

void ensureThemeDirectoryExists ()
QBrush loadBrush (QString fileName, QColor fallbackColor)
QBrush loadExtraBrush (QString fileName, QBrush &fallbackBrush)

Private Attributes

std::array< QBrush, Role::MaxRole+1 > brushes
QStringMap availableThemes
std::array< QBrushMap, Role::MaxRole+1 > brushesCache

Member Enumeration Documentation

◆ Role

Enumerator
MinRole 
Hand 
Stack 
Table 
Player 
MaxRole 

Constructor & Destructor Documentation

◆ ThemeManager()

ThemeManager::ThemeManager ( QObject * parent = nullptr)
Here is the call graph for this function:

Member Function Documentation

◆ ensureThemeDirectoryExists()

void ThemeManager::ensureThemeDirectoryExists ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAvailableThemes()

QStringMap & ThemeManager::getAvailableThemes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBgBrush()

QBrush & ThemeManager::getBgBrush ( Role zone)
Here is the caller graph for this function:

◆ getExtraBgBrush()

QBrush ThemeManager::getExtraBgBrush ( Role zone,
int zoneId = 0 )
Here is the call graph for this function:

◆ loadBrush()

QBrush ThemeManager::loadBrush ( QString fileName,
QColor fallbackColor )
protected
Here is the caller graph for this function:

◆ loadExtraBrush()

QBrush ThemeManager::loadExtraBrush ( QString fileName,
QBrush & fallbackBrush )
protected
Here is the caller graph for this function:

◆ themeChanged

void ThemeManager::themeChanged ( )
signal
Here is the caller graph for this function:

◆ themeChangedSlot

void ThemeManager::themeChangedSlot ( )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ availableThemes

QStringMap ThemeManager::availableThemes
private

◆ brushes

std::array<QBrush, Role::MaxRole + 1> ThemeManager::brushes
private

◆ brushesCache

std::array<QBrushMap, Role::MaxRole + 1> ThemeManager::brushesCache
private

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