-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
71 lines (66 loc) · 1.69 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
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
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QSettings>
using namespace std;
/*!
\enum SettingKeys
This type describe all possible setting keys
*/
enum SettingKeys{
FirstRun,
AbsolutePaths,
IpAddresses,
MacAddresses
};
/*!
* \class Settings
* \brief The Settings is consist of member functions that load and save user settings with the help of QSettings
* \since v 0.0.1
*/
class Settings
{
public:
/*!
\fn Settings()
Default Constructs
*/
Settings();
/*!
\fn void saveSettings(bool firstRun, bool anonymizeAbsolutePath, bool anonymizeIpAddresses, bool macAddresses);
Saves updated settings using QSettings
*/
void saveSettings(bool firstRun, bool anonymizeAbsolutePath, bool anonymizeIpAddresses, bool macAddresses);
/*!
\fn array<bool, 4> loadSettings()
Loads saved settings using QSettings
Returns array<bool, 4>
*/
array<bool, 4> loadSettings();
/*!
\fn string enumToString(SettingKeys key);
Returns string for each value in \enum SettingKeys
*/
string enumToString(SettingKeys key);
private:
/*!
Boolean member variable that stores whether it if first application run or not
*/
bool notFirstRun;
/*!
Boolean member variable that stores whether to hide absolute paths or not
*/
bool hideAbsPaths;
/*!
Boolean member variable that stores whether to hide IP addresses or not
*/
bool hideIps;
/*!
Boolean member variable that stores whether to hide MAC addresses or not
*/
bool hideMacs;
/*!
Boolean Array member variable that stores all other boolean settings member variables
*/
array<bool, 4> boolSettings;
};
#endif // SETTINGS_H