-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
88 lines (73 loc) · 1.81 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QObject>
#include <QtGui>
#include <QWidget>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QCheckBox>
#include <QLabel>
#include <QLineEdit>
#include <QTableWidget>
#include <QToolButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QDir>
#include <QStringList>
#include <QSettings>
#include <QPushButton>
#include <QMessageBox>
#include <QFileDialog>
#include <QProcess>
#include <QHash>
#include <QScrollBar>
#include <QHeaderView>
//#include "settinglist.h"
//#include "qjsonmodel.h"
#include "logwindow.h"
class Widget : public QWidget
{
Q_OBJECT
private:
void createForm();
void createTrayIcon();
void loadConfig();
void reloadConfig();
void killAll();
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
QTableWidget* kubeList;
QLabel* kubePathLabel;
QCheckBox* kubeRestart;
QLineEdit* kubePathEdit;
QToolButton* kubePathButton;
QPushButton* kubeAddRow;
QPushButton* kubeDelRow;
QPushButton* kubeSave;
QSettings *kubeConfig;
QHash <QString, QProcess*> kubectl;
QColor qred,qgreen,qblack;
QTimer* restartTimer;
LogWindow * kubelogs;
public:
Widget(QWidget *parent = 0);
~Widget();
private slots:
// void getdata();
// void readout();
// void readerr();
// void trayClick(QSystemTrayIcon::ActivationReason activationReason);
void addRow();
void delRow();
void saveConfig();
void findKubectl();
void restartAll();
// void runProc(QString name);
void menuClicked(QAction*);
// void readItem();
// void writePath();
void getLogs();
void getLogs(int code, QProcess::ExitStatus state);
void exitClick();
};
#endif // MAINWINDOW_H