-
Notifications
You must be signed in to change notification settings - Fork 3
/
CtrlGui.h
109 lines (86 loc) · 2.38 KB
/
CtrlGui.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef CTRLGUI_H
#define CTRLGUI_H
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QFrame>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QPushButton>
#include <QTranslator>
#include "CtrlSettings.h"
#include "CtrlAgent.h"
#include "CtrlBus.h"
#include "CtrlFrame.h"
#include <QMouseEvent>
#include <QScreen>
QT_BEGIN_NAMESPACE
namespace Ui {
class CtrlGui;
class CtrlGuiAPUForm;
class CtrlGuiSettings;
class CtrlInfoWidget;
}
QT_END_NAMESPACE
class CtrlGui : public QMainWindow
{
Q_OBJECT
public:
CtrlGui(CtrlBus *bus);
~CtrlGui();
private:
void setupUi();
void setupConnections();
void loadPresets();
void loadStyleSheet();
void languageChange(QString langid);
void savePreset();
void saveApplyPreset();
void applyPreset();
void cancelPreset();
void sendPreset(int presetId = -1, bool save = false, bool apply = false);
void smuCheckBoxClicked();
void saveSettings();
void readSettings();
void cancelSettings();
#ifdef BUILD_SERVICE
void startService();
void installService();
#endif
void infoPushButtonClicked();
void sendRyzenAdjInfo(QString value = "0");
bool infoWidgetHasBeenShowed = false;
void settingsPushButtonClicked();
void presetPushButtonClicked();
void presetPlusPushButtonClicked();
void presetDeletePushButtonClicked();
void presetNameEditChanged(QString name);
void settingsAutomaticPresetSwitchClicked();
void openAdvancedInfoUrl();
void recieveMessageToGui(messageToGuiStr messageToGui);
void useAgent(bool use);
void exitFromAgent();
void presetChangeFromAgent(int idx);
void showWindow(){ this->showNormal(); }
bool infoMessageShowed = false;
Ui::CtrlGui *ui;
Ui::CtrlGuiSettings *ui_settings;
Ui::CtrlInfoWidget *ui_infoWidget;
QFrame *settingFrame;
CtrlFrame *infoFrame;
QTranslator *qtLanguageTranslator;
CtrlBus *bus;
CtrlSettings *conf;
CtrlAgent *ui_agent = nullptr;
QList<Ui::CtrlGuiAPUForm*> *presetFormList;
QVBoxLayout *verticalLayout;
QList<QWidget*> *tabWidgetsList;
QList<QPushButton*> *tabButtonList;
QPushButton *tabPlusButton;
QSpacerItem *spacer;
QString ryzenFamily;
QString biosVersion;
QString pmTableVersion;
QString ryzenAdjVersion;
int currentPresetId = -1;
protected:
virtual void closeEvent(QCloseEvent *event);
};
#endif // CTRLGUI_H