starting cloud save
This commit is contained in:
43
sources/models/settings.h
Normal file
43
sources/models/settings.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DEFAULT_AGENT "cagent.exe"
|
||||
#else
|
||||
#define DEFAULT_AGENT "cagent"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_AGENT_KEY "<default>"
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
|
||||
class Settings
|
||||
{
|
||||
private:
|
||||
bool cloudEnabled;
|
||||
QString cloudUrl;
|
||||
QString cloudEmail;
|
||||
QString cloudPassword;
|
||||
QString cloudAgent;
|
||||
public:
|
||||
Settings();
|
||||
|
||||
static Settings* FromJSON(QJsonObject obj);
|
||||
QJsonObject ToJSON();
|
||||
|
||||
bool GetCloudEnabled();
|
||||
QString GetCloudUrl();
|
||||
QString GetCloudEmail();
|
||||
QString GetCloudPassword();
|
||||
QString GetCloudAgent();
|
||||
QString GetCloudAgentDefault();
|
||||
|
||||
void SetCloudEnabled(bool enabled);
|
||||
void SetCloudUrl(QString url);
|
||||
void SetCloudEmail(QString email);
|
||||
void SetCloudPassword(QString password);
|
||||
void SetCloudAgent(QString agent);
|
||||
};
|
||||
|
||||
#endif // SETTINGS_H
|
||||
Reference in New Issue
Block a user