-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.h
More file actions
41 lines (31 loc) · 712 Bytes
/
settings.h
File metadata and controls
41 lines (31 loc) · 712 Bytes
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
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QWidget>
#include <QDebug>
#include <map>
#include <QStandardPaths>
#include <QDir>
#include <QFileInfo>
#include <fstream>
namespace Ui {
class Settings;
}
class Settings : public QWidget
{
Q_OBJECT
public:
explicit Settings(QWidget *parent = nullptr);
~Settings();
static std::map<QString, QString> readSettings(std::string path);
std::string getPath();
signals:
void settingsChanged(std::map<QString, QString> settings);
private:
Ui::Settings *ui;
void writeSettings(std::map<QString, QString> settings);
void writeDefaults();
std::string settingsPath;
private slots:
void update();
};
#endif // SETTINGS_H