#ifndef APPTHEME_H #define APPTHEME_H #include #include class ScStwAppTheme : public QObject { Q_OBJECT Q_PROPERTY(QVariant style READ getStyle NOTIFY styleChanged) public: explicit ScStwAppTheme(QObject *parent = nullptr); enum Theme { Light, Dark }; Q_ENUM(Theme) private: QMap themes; QVariantMap * currentTheme; Theme currentThemeKey; signals: void styleChanged(); public slots: QVariant getStyle(); Q_INVOKABLE bool setTheme(Theme theme); Q_INVOKABLE void refreshTheme(); }; #endif // APPTHEME_H