-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
43 lines (38 loc) · 1.09 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QWidget>
#include <QUrl>
#include <QtNetwork/QtNetwork>
namespace Ui {
class MainWindow;
}
class MainWindow : public QWidget
{
Q_OBJECT
signals:
void deviceSettingsObtained();
void deviceRebootRequested();
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void PerformGETrequest(QHostAddress host, QString path, QUrlQuery *query=nullptr);
void PerformPOSTrequest(QHostAddress host, QString path, QByteArray *dataToSend);
QString UserName, Password;
QVector <QHostAddress> HostsToSetup;
int WEBPort;
public slots:
void uploadSettings();
void rebootDevices();
void onAuthenticationNeeded(QNetworkReply *reply, QAuthenticator *authenticator);
void onNetManagerFinished(QNetworkReply *reply);
private slots:
void on_applyButton_clicked();
void on_rebootButton_clicked();
void on_progressBar_valueChanged(int value);
private:
QNetworkAccessManager *netManager;
QStringList NewDeviceSettings;
uint ActiveThreadsNum;
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H