This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathwlanconfig.h
103 lines (79 loc) · 2.08 KB
/
wlanconfig.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef WLANCONFIG_H
#define WLANCONFIG_H
#include <QDialog>
#include <QMap>
#include <QSizeF>
#include <QMetaType>
#include <QStandardItemModel>
extern int DebugFlat ;
extern QSizeF SizePercent;
struct WPAInfo{
int id;
double level;
bool connectflags;
bool pwdError;
int Quality_value;
int Quality_max;
WPAInfo()
{
id = -1;
level = -100;
Quality_value = 0;
Quality_max = 100;
connectflags = false;
pwdError = false;
}
};
Q_DECLARE_METATYPE(WPAInfo);
namespace Ui {
class Wlanconfig;
}
class Wlanconfig : public QDialog
{
Q_OBJECT
public:
explicit Wlanconfig(QWidget *parent = nullptr);
~Wlanconfig();
void GetNetworkInfo();
private slots:
virtual void on_Btn_Back_clicked();
void on_Btn_DevRefresh_clicked();
void on_Btn_DevSwitch_clicked();
void on_Btn_Connect_clicked();
void on_Btn_Scan_clicked();
void on_DevList_currentIndexChanged(const QString &arg1);
void on_WPA_List_doubleClicked(const QModelIndex &index);
void on_Btn_Help_clicked();
private:
void GetDevState();
void GetDevState(QStringList &Responses);
void ScanWPAList();
void ScanWPAList(QStringList &Responses);
void ScanWPA();
void ScanWPA(QStringList &Responses);
void ScanWPA_Ressult();
void ScanWPA_Ressult(QStringList &Responses);
QString ReverseStr(QString args);
void ConnectNetwork();
void SetPassword(QStringList &Responses);
void SetPassword();
void SetSSID();
void SetSSID(QStringList &Responses);
void CreateNetwork();
// void GetNetworkInfo();
void GetNetworkInfo(QStringList &Responses);
void RemoveNetwork();
void RemoveNetwork(QStringList &Responses);
private:
Ui::Wlanconfig *ui;
QWidget *FUI;
QString TeminalState = "-q-e";
QMap<QString,bool> WPA_Switch ;
QMap<QString,QString> WPA_SSID ;
QMap<QString,WPAInfo> WPA_Scan_SSID_List ;
QStandardItemModel *WPAModel = new QStandardItemModel(this);
QString LastDev;
protected:
void showEvent(QShowEvent *event);
};
#endif // WLANCONFIG_H