-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettloader.h
150 lines (91 loc) · 3.54 KB
/
settloader.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#ifndef SETTLOADER_H
#define SETTLOADER_H
#include <QSettings>
#include <QObject>
#define SETT_MAIN_GEOMETRY 1
#define SETT_MAIN_APP_LOG 2
#define SETT_MAIN_CURRLANG 3
#define SETT_MAIN_LASTDIR 4
#define SETT_MAIN_OPERLISTM 5
#define SETT_MAIN_LANG_SELECTED 6
#define SETT_MAIN_OPTION_VIEW 7
#define SETT_MAIN_OPTION_TRONE 8
#define SETT_MAIN_UDP_SHOW_AVIP 9
#define SETT_MAIN_UDP_CHECK_IP 10
#define SETT_LOLO_POPO 500
#define SETT_LOLO_TOTO 501
#define SETT_PAGES_FAVORITE 1000
#define SETT_PAGES_DB 1001
#define SETT_PAGES_ML 1002
#define SETT_PAGES_DB_F 1003
#define SETT_PAGES_ML_F 1004
#define SETT_METER_MPV 2000
#define SETT_OPTIONS_DATEMASK 3000
#define SETT_OPTIONS_PDFPAPER 3001
#define SETT_OPTIONS_TEXTCODEC 3002
#define SETT_OPTIONS_PDFL 3003
#define SETT_OPTIONS_LR 3004
#define SETT_OPTIONS_MBC 3005
#define SETT_OPTIONS_DP 3006
#define SETT_OPTIONS_APPFONT 3007
#define SETT_OPTIONS_REGION 3008
#define SETT_FILTERS_METER 5000
#define SETT_FILTERS_DATABASE 5001
#define SETT_FILTERS_METERLOG 5002
#define SETT_FILTERS_STATIST 5003
#define SETT_FILTERS_FORWARD 5004
#define SETT_FILTERS_MODELDEV 5005
#define SETT_FILTERS_UPGRADE 5006
#define SETT_FILTERS_TZ 5007
#define SETT_FILTERS_LEDLAMPS 5008
#define SETT_FILTERS_LEDTASKS 5009
#define SETT_FILTERS_LED_RELAY 5010
#define SETT_FILTERS_LED_GCHART 5011
class SettLoader : public QObject
{
Q_OBJECT
public:
explicit SettLoader(QObject *parent = 0);
static QVariant loadSett(const int &key, QVariant defVal = QVariant());
static void saveSett(const int &key, const QVariant &val);
static void saveLastDir(const QString &fileName);
static QString getValidLastDir();
static QString groupName4key(const int &key);
static QString valName4key(const int &key);
//defVals
static QString defPath2dir();
static QStringList simplePagesList();
static QStringList listPath2icon();
static QStringList realPageNameByDev(const int &devType);//en_GB
static QHash<QString,QStringList> pageName4devTree();//en_GB
static QStringList realPageNameDevPoll();
static QStringList realPageNameDevStor();
static QStringList realPageNameDevGate();
static QStringList realPageNameDevEmul0();
static QStringList realPageNameDevEmul1();
static QStringList realPageNameDevEmul2();
static QStringList realPageName();//en_GB
static QStringList localPageName();//local lang
static QHash<QString,QString> hashRealName2localName();
static QHash<QString,QString> hashLocalName2realName();
static QVariantMap getDefMpv();
//helper
static QStringList intList2strList(const QList<int> &l );
static QList<int> strList2intList(const QStringList &l);
static QList<int> getPageCanWrite();
static QList<int> getPageCanRead();
static QStringList getFilterListStr(const int &startIndx, const int &count);
static QList<int> getFilterList(const int &startIndx, const int &count);
static QVariantHash defVal4dbFilter();
static QString defVal4region();
static QVariantHash defVal4pageDb();
static QVariantHash defVal4pageMl();
static QVariantHash defVal4pageDb_F();
static QVariantHash defVal4pageMl_F();
static QVariantHash varMap2varHash(const QVariantMap &map);
//protocol v2
static QStringList registeredKesy4pppSupervisor();
signals:
public slots:
};
#endif // SETTLOADER_H