This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
shared-libraries/ScStwStyling/headers/scstwapptheme.h

44 lines
1,000 B
C
Raw Normal View History

2020-05-18 11:27:09 +02:00
#ifndef APPTHEME_H
#define APPTHEME_H
#include <QObject>
#include <QVariant>
2020-05-19 09:31:27 +02:00
#include <QFontDatabase>
2020-05-18 11:27:09 +02:00
class ScStwAppTheme : public QObject
{
Q_OBJECT
2020-05-19 12:43:02 +02:00
Q_PROPERTY(QVariant colors READ getColors NOTIFY colorsChanged)
Q_PROPERTY(QVariant icons READ getIcons NOTIFY iconsChanged)
Q_PROPERTY(QVariant fonts READ getFonts NOTIFY fontsChanged)
Q_PROPERTY(QVariant images READ getImages NOTIFY imagesChanged)
2020-05-18 11:27:09 +02:00
2020-05-19 09:31:27 +02:00
public:
2020-05-19 12:43:02 +02:00
explicit ScStwAppTheme(QString name, QVariantMap colors = {}, QVariantMap icons = {}, QVariantMap fonts = {}, QVariantMap images = {}, QObject *parent = nullptr);
2020-05-18 11:27:09 +02:00
2020-05-19 09:31:27 +02:00
private:
2020-05-19 12:43:02 +02:00
QString name;
2020-05-19 09:31:27 +02:00
QVariantMap colors;
QVariantMap icons;
QVariantMap fonts;
QVariantMap images;
2020-05-18 11:27:09 +02:00
signals:
2020-05-19 12:43:02 +02:00
void colorsChanged();
void iconsChanged();
void fontsChanged();
void imagesChanged();
2020-05-18 11:27:09 +02:00
public slots:
2020-05-19 12:43:02 +02:00
QString getName();
2020-05-19 09:31:27 +02:00
QVariant getColors();
QVariant getIcons();
QVariant getFonts();
QVariant getImages();
2020-05-18 11:27:09 +02:00
};
2020-05-19 12:43:02 +02:00
2020-05-18 11:27:09 +02:00
#endif // APPTHEME_H