2020-06-23 12:01:21 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-10-31 09:56:53 +08:00
|
|
|
#ifndef DLGCONNHIDWIFIWPA_H
|
|
|
|
#define DLGCONNHIDWIFIWPA_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QMouseEvent>
|
|
|
|
#include <QThread>
|
2021-01-07 14:21:03 +08:00
|
|
|
#include <QProcess>
|
2019-10-31 09:56:53 +08:00
|
|
|
|
|
|
|
class MainWindow;
|
|
|
|
|
|
|
|
namespace Ui {
|
2020-11-24 15:41:24 +08:00
|
|
|
class DlgHideWifiWpa;
|
2019-10-31 09:56:53 +08:00
|
|
|
}
|
|
|
|
|
2020-11-24 15:41:24 +08:00
|
|
|
class DlgHideWifiWpa : public QDialog
|
2019-10-31 09:56:53 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-11-24 15:41:24 +08:00
|
|
|
explicit DlgHideWifiWpa(int type, MainWindow *mw = 0, QWidget *parent = 0);
|
|
|
|
~DlgHideWifiWpa();
|
2019-10-31 09:56:53 +08:00
|
|
|
|
2020-02-26 11:31:26 +08:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
|
2019-10-31 09:56:53 +08:00
|
|
|
public slots:
|
|
|
|
void changeDialog();
|
|
|
|
void changeWindow();
|
|
|
|
void emitSignal();
|
|
|
|
void on_execSecConn();
|
2021-03-25 21:17:57 +08:00
|
|
|
void slotStartConnectHiddenWifi();
|
|
|
|
void slotStartConnectRememberedHiddenWifi();
|
2019-10-31 09:56:53 +08:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_btnCancel_clicked();
|
|
|
|
|
|
|
|
void on_btnConnect_clicked();
|
|
|
|
|
|
|
|
void on_checkBoxPwd_stateChanged(int arg1);
|
|
|
|
|
|
|
|
void on_leNetName_textEdited(const QString &arg1);
|
|
|
|
|
|
|
|
void on_lePassword_textEdited(const QString &arg1);
|
|
|
|
|
2021-03-25 21:17:57 +08:00
|
|
|
// void finishedProcess(int res);
|
2021-01-07 14:21:03 +08:00
|
|
|
|
2019-10-31 09:56:53 +08:00
|
|
|
signals:
|
|
|
|
void reSetWifiList();
|
|
|
|
void stopSignal();
|
2020-12-31 20:54:55 +08:00
|
|
|
void stopSignalAgain();
|
2021-03-25 21:17:57 +08:00
|
|
|
void sigConnHiddenWifi(QString wifiName, QString wifiPasswd);
|
|
|
|
void sigConnRememberedHiddenWifi(QString wifiName);
|
2019-10-31 09:56:53 +08:00
|
|
|
|
|
|
|
private:
|
2020-11-24 15:41:24 +08:00
|
|
|
Ui::DlgHideWifiWpa *ui;
|
2019-10-31 09:56:53 +08:00
|
|
|
int isUsed;//=0 current wifi not used before; >=1 used
|
|
|
|
MainWindow *mw;
|
|
|
|
QString strWifiname;
|
|
|
|
QString strWifiPassword;
|
|
|
|
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
void mouseMoveEvent(QMouseEvent *event);
|
2020-03-16 10:34:14 +08:00
|
|
|
|
|
|
|
// QString labelQss, cbxQss, leQss, btnConnQss, btnCancelQss, lineQss, checkBoxQss;
|
|
|
|
|
2019-10-31 09:56:53 +08:00
|
|
|
bool isPress;
|
|
|
|
QPoint winPos;
|
|
|
|
QPoint dragPos;
|
2021-01-07 14:21:03 +08:00
|
|
|
|
|
|
|
QString shellOutput = "";
|
|
|
|
QStringList wlist;
|
|
|
|
QProcess * shellProcess;
|
2019-10-31 09:56:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DLGCONNHIDWIFIWPA_H
|