#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 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 to 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 hasnt been ceated yet }; #endif // APPSETTINGS_H