summaryrefslogtreecommitdiff
path: root/client/mainwindow.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-09-04 12:01:53 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-09-04 12:01:53 +0300
commit614b78470c5ed3c701abdd32bc65412f363a6fc2 (patch)
tree288d7967378bb980544c2ca74fd6bf04e4efd590 /client/mainwindow.h
parent3ab3d03b8b603f210d878d352b56442eec14f6af (diff)
added restarter project (code wcreated to restart critical services on server without root access)
Diffstat (limited to 'client/mainwindow.h')
-rw-r--r--client/mainwindow.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/client/mainwindow.h b/client/mainwindow.h
new file mode 100644
index 0000000..dea9301
--- /dev/null
+++ b/client/mainwindow.h
@@ -0,0 +1,55 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QMessageBox>
+#include <QSslSocket>
+#include <QFile>
+#include <QSslKey>
+
+#ifdef MINIMAL
+const QString host = "192.168.0.1";
+#else
+const QString host = "gluzskaya.ru";
+#endif
+
+namespace Ui {
+ class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+protected slots:
+ void ssl_verify_error_handler(const QSslError);
+
+private slots:
+ void on_restart_vbox_btn_clicked();
+ void restart_vbox_sock_connected();
+ void reboot();
+ void halt();
+ void restart_cups();
+ void restart_ppp();
+ void disconnected();
+
+ void on_reboot_clicked();
+
+ void on_halt_clicked();
+
+ void on_restart_cups_clicked();
+
+ void on_restart_ppp_clicked();
+
+private:
+ void enable_buttons(bool);
+ QSslSocket *get_socket();
+ Ui::MainWindow *ui;
+ QSslSocket *sock;
+};
+
+#endif // MAINWINDOW_H