forked from wario-land/WL4Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsUtils.h
More file actions
59 lines (53 loc) · 1.43 KB
/
SettingsUtils.h
File metadata and controls
59 lines (53 loc) · 1.43 KB
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
#ifndef SETTINGSUTILS_H
#define SETTINGSUTILS_H
#include <QCoreApplication>
#include <QFileInfo>
#include <QSettings>
#include <QString>
#include <QVector>
namespace SettingsUtils
{
// Global variables
extern QString ProgramSettingFilePath;
/* Sections, keys and values included in the ini file
* [patch]
* eabi_binfile_path = path
*
* [history]
* RecentROMPath_0 = path
* RecentROMPath_1 = path
* RecentROMPath_2 = path
* RecentROMPath_3 = path
* RecentROMPath_4 = path
*
* [settings]
* EditorThemeId = string (convert to int after being read)
*/
enum IniKeys
{
eabi_binfile_path = 0,
RecentROMPath_0 = 1,
RecentROMPath_1 = 2,
RecentROMPath_2 = 3,
RecentROMPath_3 = 4,
RecentROMPath_4 = 5,
EditorThemeId = 6,
};
// Static Key QString set
// clang-format off
static QVector<QString> KeyStringSet =
{
"patch/eabi_binfile_path",
"history/RecentROMPath_0",
"history/RecentROMPath_1",
"history/RecentROMPath_2",
"history/RecentROMPath_3",
"history/RecentROMPath_4",
"settings/EditorThemeId",
};
// clang-format on
void InitProgramSetupPath(QCoreApplication &application);
void SetKey(enum IniKeys key, QString value);
QString GetKey(enum IniKeys key);
}; // namespace SettingsUtils
#endif // SETTINGSUTILS_H