-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.h
More file actions
37 lines (28 loc) · 741 Bytes
/
config.h
File metadata and controls
37 lines (28 loc) · 741 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
#ifndef CONFIG_H
#define CONFIG_H
#include <QString>
#include <QDebug>
#include <QFile>
#include <QXmlStreamReader>
#include <QtCore>
#include <QReadWriteLock>
class Config : public QObject
{
Q_OBJECT
public:
static Config* getInstance();
void destroyInstance();
bool getUnsavedChanges();
void setUnsavedChanges(bool bb);
void setCurrentOpenedFile(QString file) { currentOpenedFile = file; }
QString getCurrentOpenedFile() { return currentOpenedFile; }
signals:
void savedStatusChanged(bool);
private:
Config();
static Config* m_pInstance;
bool unsavedChanges;
QReadWriteLock saveChangesMutex;
QString currentOpenedFile;
};
#endif // CONFIG_H