43 lines
897 B
C++
43 lines
897 B
C++
#ifndef SETTINGMANAGER_H
|
|
#define SETTINGMANAGER_H
|
|
|
|
#include "QHotkey/qhotkey.h"
|
|
#include "utilities.h"
|
|
#include <QObject>
|
|
|
|
#define TOOLGRIDSIZE 40
|
|
|
|
class SettingManager : public QObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SettingManager(QObject *parent = nullptr);
|
|
|
|
static SettingManager *instance();
|
|
|
|
public:
|
|
bool loadSettings();
|
|
bool saveSettings();
|
|
bool exportSettings(QString filename);
|
|
void resetSettings();
|
|
|
|
public:
|
|
int toolGridSize();
|
|
void setToolGridSize(int v);
|
|
|
|
signals:
|
|
void sigToolGridSizeChanged(int v);
|
|
|
|
void getHokeysBuffer(QList<QHotkey *> &hotkeysBuf,
|
|
QMap<QHotkey *, ToolStructInfo> &buffer);
|
|
void getToolLeftBuffer(ToolStructInfo buffer[]);
|
|
void getToolRightBuffer(QList<ToolStructInfo> &buffer);
|
|
void loadingFinish();
|
|
|
|
private:
|
|
static SettingManager *m_instance;
|
|
|
|
int m_toolGridSize = TOOLGRIDSIZE;
|
|
};
|
|
|
|
#endif // SETTINGMANAGER_H
|