-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshutmgrwnd.h
138 lines (83 loc) · 2.77 KB
/
shutmgrwnd.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#ifndef SHUTMGRWND_H
#define SHUTMGRWND_H
#include <QMainWindow>
#include "MachineWnd.h"
#include "shutdownpara.h"
#include "logwnd.h"
#include "qradiobutton.h"
#include "shutdowntask.h"
#include "starterchecker.h"
#include <nightmodechecker.h>
#include <floatingbutton.h>
QT_BEGIN_NAMESPACE
namespace Ui {
class ShutMgrWnd;
}
QT_END_NAMESPACE
class ShutMgrWnd : public QMainWindow
{
Q_OBJECT
public:
ShutMgrWnd(QWidget *parent = nullptr);
~ShutMgrWnd();
public slots:
void setDarkMode(bool isDark);
private slots:
void on_BExit_clicked();
void on_BViewLog_clicked();
void on_BExecute_clicked();
void moveEvent(QMoveEvent *event) override;
void on_Check_timeout_stateChanged(int arg1);
void on_Spin_timeout_valueChanged(int arg1);
void on_Check_force_stateChanged(int arg1);
void on_Check_toAdvanceOpt_stateChanged(int arg1);
void on_Check_toFirmware_stateChanged(int arg1);
// void on_Check_machine_stateChanged(int arg1);
void on_Check_fastboot_stateChanged(int arg1);
void on_Check_autoLogin_stateChanged(int arg1);
void on_Check_reason_stateChanged(int arg1);
void on_Combo_reasonType_currentIndexChanged(int index);
void on_Spin_majorReason_valueChanged(int arg1);
void on_Spin_minorReason_valueChanged(int arg1);
void on_Check_comment_stateChanged(int arg1);
void on_Edit_Comment_textChanged();
void on_But_machine_clicked();
// void on_Spin_majorReason_textChanged(const QString &arg1);
void on_List_tasks_doubleClicked(const QModelIndex &index);
void removeTask(ShutdownTask * t);
void on_Line_Condition_textChanged(const QString &arg1);
// void on_BDarkMode_triggered(QAction *arg1);
void on_BDarkMode_clicked();
void on_BLightMode_clicked();
// void on_BAutoDark_clicked();
void openFloatingBut();
void on_But_SavePreset_clicked();
void setPreset(int, QString name , ShutdownPara* p);
void applyPreset(int);
// void on_But_Preset1_clicked();
private:
Ui::ShutMgrWnd *ui;
LogWnd * logWindow;
MachineWnd * machineWindow;
//选项按钮
QRadioButton* ShutdownButtons;
ShutdownPara* para;
QList<ShutdownTask*> tasks;
NightModeChecker* checker;
// QString condition;
QMenu* presetSlotMenu;
QString qssList[2];
//深色模式
StarterChecker* startChk;
bool isDark;
//开始菜单悬浮窗
FloatingButton* floatBut;
//预置槽相关
ShutdownPara presets[4];
QPushButton* But_Presets[4];
QString strPresetNames[4];
void loadPreset();
protected:
void closeEvent(QCloseEvent *event);
};
#endif // SHUTMGRWND_H