#ifndef APPSETTINGS_H #define APPSETTINGS_H #include #include #include #include class AppSettings : public QObject { Q_OBJECT public: explicit AppSettings(QObject *parent = nullptr); // This is the Constructor of the AppSettings class ~AppSettings(); // This is the Destructor of the AppSettings class private: QSettings *settingsManager; // QSettings object which cares about our settings.ini file QSettings *themeSettingsManager; // QSettings object which cares about our themes signals: public slots: Q_INVOKABLE QString read(const QString &key); // function to read values from the settings file Q_INVOKABLE void write(const QString &key, const QVariant &value); // function to write values from the settings file Q_INVOKABLE void setDefault(const QString &key, const QVariant &defaultValue); // function to create a key (/ setting) with a default value if it hasn't been created yet Q_INVOKABLE QString theme(QString key); // function to get style settings from a theme file }; #endif // APPSETTINGS_H