mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
This commit is contained in:
parent
8dbdd24c8e
commit
b29bd9e070
272 changed files with 13378 additions and 9535 deletions
|
|
@ -1,32 +1,48 @@
|
|||
#ifndef THEMEMANAGER_H
|
||||
#define THEMEMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QBrush>
|
||||
#include <QPixmap>
|
||||
#include <QMap>
|
||||
#include <QDir>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
|
||||
typedef QMap<QString, QString> QStringMap;
|
||||
|
||||
class QApplication;
|
||||
|
||||
class ThemeManager : public QObject {
|
||||
class ThemeManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ThemeManager(QObject *parent = 0);
|
||||
|
||||
private:
|
||||
QBrush handBgBrush, stackBgBrush, tableBgBrush, playerBgBrush;
|
||||
QStringMap availableThemes;
|
||||
|
||||
protected:
|
||||
void ensureThemeDirectoryExists();
|
||||
QBrush loadBrush(QString fileName, QColor fallbackColor);
|
||||
|
||||
public:
|
||||
QBrush &getHandBgBrush() { return handBgBrush; }
|
||||
QBrush &getStackBgBrush() { return stackBgBrush; }
|
||||
QBrush &getTableBgBrush() { return tableBgBrush; }
|
||||
QBrush &getPlayerBgBrush() { return playerBgBrush; }
|
||||
QBrush &getHandBgBrush()
|
||||
{
|
||||
return handBgBrush;
|
||||
}
|
||||
QBrush &getStackBgBrush()
|
||||
{
|
||||
return stackBgBrush;
|
||||
}
|
||||
QBrush &getTableBgBrush()
|
||||
{
|
||||
return tableBgBrush;
|
||||
}
|
||||
QBrush &getPlayerBgBrush()
|
||||
{
|
||||
return playerBgBrush;
|
||||
}
|
||||
QStringMap &getAvailableThemes();
|
||||
protected slots:
|
||||
void themeChangedSlot();
|
||||
|
|
@ -34,6 +50,6 @@ signals:
|
|||
void themeChanged();
|
||||
};
|
||||
|
||||
extern ThemeManager * themeManager;
|
||||
extern ThemeManager *themeManager;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue