-
Notifications
You must be signed in to change notification settings - Fork 2
/
setting.h
54 lines (48 loc) · 1.29 KB
/
setting.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
45
46
47
48
49
50
51
52
53
54
#ifndef SETTING_H
#define SETTING_H
#include <QObject>
#include <QSettings>
class Setting : public QObject
{
Q_OBJECT
public:
Setting();
~Setting();
static Setting* instance();
QString getScriptPath() {
return settings->value("scriptPath").toString();
};
QString getTessdataPath() {
return settings->value("tessdataPath").toString();
};
quint16 getRemotePort() {
return settings->value("remotePort").toUInt();
};
QString getServerUrl() {
return settings->value("serverUrl").toString();
};
quint16 getServerPort() {
return settings->value("serverPort").toUInt();
};
QString getLiveUrl() {
return settings->value("liveUrl").toString();
};
void setScriptPath(QString path);
void setTessdataPath(QString path);
void setRemotePort(quint16 remotePort) {
settings->setValue("remotePort", remotePort);
};
void setServerUrl(QString serverUrl) {
settings->setValue("serverUrl", serverUrl);
};
void setServerPort(quint16 serverPort) {
settings->setValue("serverPort", serverPort);
};
void setLiveUrl(QString liveUrl) {
settings->setValue("liveUrl", liveUrl);
};
private:
QSettings *settings = Q_NULLPTR;
signals:
};
#endif // SETTING_H