Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
theme_config.h
Go to the documentation of this file.
1#ifndef COCKATRICE_THEME_CONFIG_H
2#define COCKATRICE_THEME_CONFIG_H
3
4#include <QColor>
5#include <QMap>
6#include <QPalette>
7#include <QString>
8
10{
11 QString colorScheme;
12 QString styleName;
13
14 bool isEmpty() const;
15 QString toIni() const;
16
17 static ThemeConfig fromThemeDir(const QString &themeDirPath);
18 bool save(const QString &themeDirPath) const;
19};
20
22{
23 QMap<QPalette::ColorGroup, QMap<QPalette::ColorRole, QColor>> colors;
24
25 bool hasPalette() const;
26 QString toToml() const;
27
28 static QString fileName(const QString &colorScheme);
29
30 static PaletteConfig fromFile(const QString &filePath);
31 static PaletteConfig fromScheme(const QString &themeDirPath, const QString &colorScheme);
32 static PaletteConfig fromDefault(const QString &themeDirPath, const QString &colorScheme);
33
34 QPalette apply(QPalette base) const;
35};
36
37#endif // COCKATRICE_THEME_CONFIG_H
Definition theme_config.h:22
bool hasPalette() const
Definition theme_config.cpp:97
static PaletteConfig fromScheme(const QString &themeDirPath, const QString &colorScheme)
Definition theme_config.cpp:229
QString toToml() const
Definition theme_config.cpp:102
static PaletteConfig fromFile(const QString &filePath)
Definition theme_config.cpp:144
static QString fileName(const QString &colorScheme)
Definition theme_config.cpp:139
static PaletteConfig fromDefault(const QString &themeDirPath, const QString &colorScheme)
Definition theme_config.cpp:238
QMap< QPalette::ColorGroup, QMap< QPalette::ColorRole, QColor > > colors
Definition theme_config.h:23
QPalette apply(QPalette base) const
Definition theme_config.cpp:258
Definition theme_config.h:10
bool isEmpty() const
Definition theme_config.cpp:8
static ThemeConfig fromThemeDir(const QString &themeDirPath)
Definition theme_config.cpp:23
bool save(const QString &themeDirPath) const
Definition theme_config.cpp:74
QString colorScheme
Definition theme_config.h:11
QString styleName
Definition theme_config.h:12
QString toIni() const
Definition theme_config.cpp:13