From 614b78470c5ed3c701abdd32bc65412f363a6fc2 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 4 Sep 2012 12:01:53 +0300 Subject: added restarter project (code wcreated to restart critical services on server without root access) --- client/mainwindow.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 client/mainwindow.h (limited to 'client/mainwindow.h') 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 +#include +#include +#include +#include + +#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 -- cgit v1.2.3