Add configuration file
This commit is contained in:
29
src/services/configmanager.h
Normal file
29
src/services/configmanager.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef CONFIGMANAGER_H
|
||||
#define CONFIGMANAGER_H
|
||||
|
||||
#define FILENAME "config.json"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QStandardPaths>
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
|
||||
#include "../models/appconfiguration.h"
|
||||
|
||||
class ConfigManager
|
||||
{
|
||||
private:
|
||||
QString getSaveFilePath();
|
||||
void load();
|
||||
AppConfiguration *cfg;
|
||||
|
||||
public:
|
||||
ConfigManager();
|
||||
~ConfigManager();
|
||||
|
||||
AppConfiguration *getConfiguration();
|
||||
void writeToDisk();
|
||||
};
|
||||
|
||||
#endif // CONFIGMANAGER_H
|
||||
Reference in New Issue
Block a user