-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.h
44 lines (41 loc) · 1.24 KB
/
settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QObject>
#include <QFile>
#include <QFileInfo>
#include <QJsonDocument>
#include <QJsonObject>
#include "handlers/errorhandler.h"
class Settings : public QObject
{
Q_OBJECT
public:
Settings();
Q_INVOKABLE void loadSettings();
Q_INVOKABLE void loadAndSaveDefaultSettings();
Q_INVOKABLE void saveSettings();
Q_INVOKABLE bool getAudioOn();
Q_INVOKABLE bool getVideoOn();
Q_INVOKABLE bool getSaveLastRoom();
Q_INVOKABLE QString getDisplayName();
Q_INVOKABLE QString getDefaultAudioInput();
Q_INVOKABLE QString getLastRoomId();
Q_INVOKABLE QString getLastRoomPassword();
Q_INVOKABLE void setAudioOn(bool val);
Q_INVOKABLE void setVideoOn(bool val);
Q_INVOKABLE void setDisplayName(QString val);
Q_INVOKABLE void setDefaultAudioInput(QString val);
Q_INVOKABLE void setSaveLastRoom(bool val);
Q_INVOKABLE void setLastRoomId(QString val);
Q_INVOKABLE void setLastRoomPassword(QString val);
private:
bool mAudioOn;
bool mVideoOn;
bool mSaveLastRoom;
QString mDisplayName;
QString mDefaultAudioInput;
QString mSettingsFile = "./settings.json";
QString mLastRoomId;
QString mLastRoomPassword;
};
#endif // SETTINGS_H