-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wizard.h
87 lines (65 loc) · 1.92 KB
/
wizard.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
#ifndef WIZARD_H
#define WIZARD_H
#include <QMainWindow>
#include <QStandardPaths>
#include <QProcess>
QT_BEGIN_NAMESPACE
namespace Ui { class Wizard; }
QT_END_NAMESPACE
class Wizard : public QMainWindow
{
Q_OBJECT
public:
Wizard(QWidget *parent = nullptr);
~Wizard();
private slots:
void on_BtnPath_released();
void on_BtnAdd_released();
void on_BtnCancel_released();
void on_BtnSavePath_released();
void on_BtnLoad_released();
void on_PathED_textEdited(const QString &arg1);
void on_BtnCronCreate_released();
void on_BtnDelTimer_released();
void on_BtnDuplicate_released();
public slots:
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
void addlabelstatus(QProcess::ProcessState newState);
void processreadyReadStandardError();
void processreadyReadStandardOutput();
void QPerrorOccurred(QProcess::ProcessError error);
private:
Ui::Wizard *ui;
QString Lastpath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
QString GetSrce();
QString GetParam(QString ToSplit);
enum ConfParam{url = 0,
username = 1,
password = 2,
Channel = 3
};
QString SystemdServiceTemplate = "[Unit]\n"
"Description=Run HikNetExtractor to backup videos of CAM device.\n"
"\n"
"[Service]\n"
"Type=simple\n"
"ExecStart=HikNetExtractor.py\n"
"\n"
"[Install]\n"
"WantedBy=multi-user.target";
QString SystemdTimerTemplate = "[Unit]\n"
"Description=Run HikNetExtractor to backup videos of CAM device.\n"
"\n"
"[Timer]\n"
"OnUnitActiveSec=00MMmin\n"
"AccuracySec=1us\n"
"\n"
"[Install]\n"
"WantedBy=multi-user.target\n";
QString SystemdPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/systemd/user/";
QProcess *process;
bool processIsFinished = false;
void Requiere();
int ProcCase = -1;
};
#endif // WIZARD_H