34 lines
835 B
C++
34 lines
835 B
C++
#ifndef THEME_H
|
|
#define THEME_H
|
|
|
|
#include <QColor>
|
|
#include <QObject>
|
|
#include <QQmlEngine>
|
|
|
|
class Theme : public QObject {
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
QML_SINGLETON
|
|
Q_PROPERTY(QColor fontPrimaryColor READ fontPrimaryColor WRITE setFontPrimaryColor NOTIFY fontPrimaryColorChanged)
|
|
Q_PROPERTY(QColor itemNormalColor READ itemNormalColor WRITE setItemNormalColor NOTIFY itemNormalColorChanged)
|
|
|
|
public:
|
|
Theme(QObject *parent = nullptr);
|
|
|
|
QColor fontPrimaryColor() const;
|
|
void setFontPrimaryColor(const QColor &color);
|
|
|
|
QColor itemNormalColor() const;
|
|
void setItemNormalColor(const QColor &color);
|
|
|
|
signals:
|
|
void fontPrimaryColorChanged();
|
|
void itemNormalColorChanged();
|
|
|
|
private:
|
|
QColor m_fontPrimaryColor;
|
|
QColor m_itemNormalColor;
|
|
};
|
|
|
|
#endif // THEME_H
|