forked from lsk-china/my-live2d-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.h
60 lines (38 loc) · 1.23 KB
/
configuration.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
//
// Created by lsk on 3/23/23.
//
#ifndef QDESKTOPPET_2_CMAKE_CONFIGURATION_H
#define QDESKTOPPET_2_CMAKE_CONFIGURATION_H
#include <QSettings>
#include <QApplication>
#include <QSize>
#define B2S(boolean) QString(boolean ? "true" : "false")
#define N2S(number) QString("%1").arg(number)
class configuration {
public:
configuration();
~configuration();
void save();
[[nodiscard]] bool isHideOnHover() const;
void setHideOnHover(bool hideOnHover);
[[nodiscard]] const QString &getResourceDir() const;
void setResourceDir(const QString &resourceDir);
[[nodiscard]] const QString &getModelName() const;
void setModelName(const QString &modelName);
[[nodiscard]] bool isWidgetOnLeft() const;
void setWidgetOnLeft(bool widgetOnLeft);
[[nodiscard]] double getMouseSensibility() const;
void setMouseSensibility(double mouseSensibility);
[[nodiscard]] const QSize &getWidgetSize() const;
void setWidgetSize(const QSize &widgetSize);
QString toString();
private:
bool hideOnHover;
QString resourceDir;
QString modelName;
bool widgetOnLeft;
double mouseSensibility;
QSize widgetSize;
QSettings *settings;
};
#endif //QDESKTOPPET_2_CMAKE_CONFIGURATION_H