diff --git a/kylin-nm.pro b/kylin-nm.pro index 0c40dec3..5994a951 100644 --- a/kylin-nm.pro +++ b/kylin-nm.pro @@ -59,16 +59,16 @@ SOURCES += \ src/onelancform.cpp \ src/switchbutton.cpp \ src/utils.cpp \ - wireless-security/dlgconnhidwifi.cpp \ - wireless-security/dlgconnhidwifisecfast.cpp \ - wireless-security/dlgconnhidwifisectunneltls.cpp \ - wireless-security/dlgconnhidwifisecpeap.cpp \ - wireless-security/dlgconnhidwifisectls.cpp \ - wireless-security/dlgconnhidwifisecleap.cpp \ - wireless-security/dlgconnhidwifisecpwd.cpp \ - wireless-security/dlgconnhidwifiwep.cpp \ - wireless-security/dlgconnhidwifileap.cpp \ - wireless-security/dlgconnhidwifiwpa.cpp \ + wireless-security/dlghidewifi.cpp \ + wireless-security/dlghidewifieapfast.cpp \ + wireless-security/dlghidewifieapleap.cpp \ + wireless-security/dlghidewifieappeap.cpp \ + wireless-security/dlghidewifieappwd.cpp \ + wireless-security/dlghidewifieaptls.cpp \ + wireless-security/dlghidewifieapttls.cpp \ + wireless-security/dlghidewifileap.cpp \ + wireless-security/dlghidewifiwep.cpp \ + wireless-security/dlghidewifiwpa.cpp \ wireless-security/kylinheadfile.cpp \ hot-spot/dlghotspotcreate.cpp @@ -85,16 +85,16 @@ HEADERS += \ src/onelancform.h \ src/switchbutton.h \ src/utils.h \ - wireless-security/dlgconnhidwifi.h \ - wireless-security/dlgconnhidwifisecfast.h \ - wireless-security/dlgconnhidwifisectunneltls.h \ - wireless-security/dlgconnhidwifisecpeap.h \ - wireless-security/dlgconnhidwifisectls.h \ - wireless-security/dlgconnhidwifisecleap.h \ - wireless-security/dlgconnhidwifisecpwd.h \ - wireless-security/dlgconnhidwifiwep.h \ - wireless-security/dlgconnhidwifileap.h \ - wireless-security/dlgconnhidwifiwpa.h \ + wireless-security/dlghidewifi.h \ + wireless-security/dlghidewifieapfast.h \ + wireless-security/dlghidewifieapleap.h \ + wireless-security/dlghidewifieappeap.h \ + wireless-security/dlghidewifieappwd.h \ + wireless-security/dlghidewifieaptls.h \ + wireless-security/dlghidewifieapttls.h \ + wireless-security/dlghidewifileap.h \ + wireless-security/dlghidewifiwep.h \ + wireless-security/dlghidewifiwpa.h \ wireless-security/kylinheadfile.h \ hot-spot/dlghotspotcreate.h @@ -103,17 +103,17 @@ FORMS += \ src/mainwindow.ui \ src/oneconnform.ui \ src/onelancform.ui \ - wireless-security/dlgconnhidwifi.ui \ - wireless-security/dlgconnhidwifisecfast.ui \ - wireless-security/dlgconnhidwifisectunneltls.ui \ - wireless-security/dlgconnhidwifisecpeap.ui \ - wireless-security/dlgconnhidwifisectls.ui \ - wireless-security/dlgconnhidwifisecleap.ui \ - wireless-security/dlgconnhidwifisecpwd.ui \ - wireless-security/dlgconnhidwifiwep.ui \ - wireless-security/dlgconnhidwifileap.ui \ - wireless-security/dlgconnhidwifiwpa.ui \ - hot-spot/dlghotspotcreate.ui + hot-spot/dlghotspotcreate.ui \ + wireless-security/dlghidewifi.ui \ + wireless-security/dlghidewifieapfast.ui \ + wireless-security/dlghidewifieapleap.ui \ + wireless-security/dlghidewifieappeap.ui \ + wireless-security/dlghidewifieappwd.ui \ + wireless-security/dlghidewifieaptls.ui \ + wireless-security/dlghidewifieapttls.ui \ + wireless-security/dlghidewifileap.ui \ + wireless-security/dlghidewifiwep.ui \ + wireless-security/dlghidewifiwpa.ui RESOURCES += \ nmqrc.qrc diff --git a/src/main.cpp b/src/main.cpp index d051d788..3e60989e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,7 @@ #include "mainwindow.h" #include "ksimplenm.h" #include "kylin-network-interface.h" -#include "wireless-security/dlgconnhidwifi.h" +#include "wireless-security/dlghidewifi.h" #include #include diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 82e9f588..49035081 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -21,7 +21,7 @@ #include "oneconnform.h" #include "onelancform.h" #include "hot-spot/dlghotspotcreate.h" -#include "wireless-security/dlgconnhidwifi.h" +#include "wireless-security/dlghidewifi.h" #include #include @@ -1905,7 +1905,7 @@ void MainWindow::on_btnHotspot_clicked() void MainWindow::onBtnAddNetClicked() { QApplication::setQuitOnLastWindowClosed(false); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, this); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, this); connect(connHidWifi, SIGNAL(reSetWifiList() ), this, SLOT(on_btnWifiList_clicked()) ); connHidWifi->show(); } diff --git a/src/oneconnform.cpp b/src/oneconnform.cpp index 7f8a3d71..af0f8e8d 100644 --- a/src/oneconnform.cpp +++ b/src/oneconnform.cpp @@ -21,7 +21,7 @@ #include "mainwindow.h" #include "kylin-dbus-interface.h" #include "kylin-network-interface.h" -#include "wireless-security/dlgconnhidwifi.h" +#include "wireless-security/dlghidewifi.h" #include "utils.h" #include @@ -543,7 +543,7 @@ void OneConnForm::on_btnConnPWD_clicked() void OneConnForm::on_btnHideConn_clicked() { QApplication::setQuitOnLastWindowClosed(false); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, mw); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); connHidWifi->show(); } diff --git a/translations/kylin-nm_bo.ts b/translations/kylin-nm_bo.ts index 305f4698..5ebfda14 100644 --- a/translations/kylin-nm_bo.ts +++ b/translations/kylin-nm_bo.ts @@ -111,7 +111,7 @@ - DlgConnHidWifi + DlgHideWifi Connect to Hidden Wi-Fi Network @@ -169,7 +169,7 @@ - DlgConnHidWifiLeap + DlgHideWifiLeap Connect to Hidden Wi-Fi Network @@ -252,7 +252,7 @@ - DlgConnHidWifiSecFast + DlgHideWifiEapFast Connect to Hidden Wi-Fi Network @@ -386,7 +386,7 @@ - DlgConnHidWifiSecLeap + DlgHideWifiEapLeap Connect to Hidden Wi-Fi Network @@ -484,7 +484,7 @@ - DlgConnHidWifiSecPeap + DlgHideWifiEapPeap Connect to Hidden Wi-Fi Network @@ -633,7 +633,7 @@ - DlgConnHidWifiSecPwd + DlgHideWifiEapPwd Connect to Hidden Wi-Fi Network @@ -731,7 +731,7 @@ - DlgConnHidWifiSecTls + DlgHideWifiEapTls Connect to Hidden Wi-Fi Network @@ -859,7 +859,7 @@ - DlgConnHidWifiSecTunnelTLS + DlgHideWifiEapTTLS Connect to Hidden Wi-Fi Network @@ -993,7 +993,7 @@ - DlgConnHidWifiWep + DlgHideWifiWep Connect to Hidden Wi-Fi Network @@ -1096,7 +1096,7 @@ - DlgConnHidWifiWpa + DlgHideWifiWpa Connect to Hidden Wi-Fi Network diff --git a/translations/kylin-nm_tr.ts b/translations/kylin-nm_tr.ts index a750c934..65fb3659 100644 --- a/translations/kylin-nm_tr.ts +++ b/translations/kylin-nm_tr.ts @@ -126,7 +126,7 @@ - DlgConnHidWifi + DlgHideWifi Add Hidden Wi-Fi @@ -196,7 +196,7 @@ - DlgConnHidWifiLeap + DlgHideWifiLeap Connect to Hidden Wi-Fi Network @@ -279,7 +279,7 @@ - DlgConnHidWifiSecFast + DlgHideWifiEapFast Connect to Hidden Wi-Fi Network @@ -413,7 +413,7 @@ - DlgConnHidWifiSecLeap + DlgHideWifiEapLeap Connect to Hidden Wi-Fi Network @@ -511,7 +511,7 @@ - DlgConnHidWifiSecPeap + DlgHideWifiEapPeap Connect to Hidden Wi-Fi Network @@ -660,7 +660,7 @@ - DlgConnHidWifiSecPwd + DlgHideWifiEapPwd Connect to Hidden Wi-Fi Network @@ -758,7 +758,7 @@ - DlgConnHidWifiSecTls + DlgHideWifiEapTls Connect to Hidden Wi-Fi Network @@ -898,7 +898,7 @@ - DlgConnHidWifiSecTunnelTLS + DlgHideWifiEapTTLS Connect to Hidden Wi-Fi Network @@ -1032,7 +1032,7 @@ - DlgConnHidWifiWep + DlgHideWifiWep Connect to Hidden Wi-Fi Network @@ -1135,7 +1135,7 @@ - DlgConnHidWifiWpa + DlgHideWifiWpa Connect to Hidden Wi-Fi Network diff --git a/translations/kylin-nm_zh_CN.ts b/translations/kylin-nm_zh_CN.ts index b9d6a033..29498eec 100644 --- a/translations/kylin-nm_zh_CN.ts +++ b/translations/kylin-nm_zh_CN.ts @@ -126,7 +126,7 @@ - DlgConnHidWifi + DlgHideWifi Add Hidden Wi-Fi @@ -196,7 +196,7 @@ - DlgConnHidWifiLeap + DlgHideWifiLeap Connect to Hidden Wi-Fi Network @@ -279,7 +279,7 @@ - DlgConnHidWifiSecFast + DlgHideWifiEapFast Connect to Hidden Wi-Fi Network @@ -413,7 +413,7 @@ - DlgConnHidWifiSecLeap + DlgHideWifiEapLeap Connect to Hidden Wi-Fi Network @@ -511,7 +511,7 @@ - DlgConnHidWifiSecPeap + DlgHideWifiEapPeap Connect to Hidden Wi-Fi Network @@ -660,7 +660,7 @@ - DlgConnHidWifiSecPwd + DlgHideWifiEapPwd Connect to Hidden Wi-Fi Network @@ -758,7 +758,7 @@ - DlgConnHidWifiSecTls + DlgHideWifiEapTls Connect to Hidden Wi-Fi Network @@ -898,7 +898,7 @@ - DlgConnHidWifiSecTunnelTLS + DlgHideWifiEapTTLS Connect to Hidden Wi-Fi Network @@ -1032,7 +1032,7 @@ - DlgConnHidWifiWep + DlgHideWifiWep Connect to Hidden Wi-Fi Network @@ -1135,7 +1135,7 @@ - DlgConnHidWifiWpa + DlgHideWifiWpa Connect to Hidden Wi-Fi Network diff --git a/wireless-security/dlgconnhidwifi.cpp b/wireless-security/dlghidewifi.cpp similarity index 87% rename from wireless-security/dlgconnhidwifi.cpp rename to wireless-security/dlghidewifi.cpp index dc71f921..ef9d9670 100644 --- a/wireless-security/dlgconnhidwifi.cpp +++ b/wireless-security/dlghidewifi.cpp @@ -17,9 +17,9 @@ */ -#include "dlgconnhidwifi.h" +#include "dlghidewifi.h" #include "kylinheadfile.h" -#include "ui_dlgconnhidwifi.h" +#include "ui_dlghidewifi.h" #include "src/backthread.h" #include "src/mainwindow.h" #include "src/kylin-dbus-interface.h" @@ -29,10 +29,10 @@ #include #include -DlgConnHidWifi::DlgConnHidWifi(int type, MainWindow *mainWindow, QWidget *parent) : +DlgHideWifi::DlgHideWifi(int type, MainWindow *mainWindow, QWidget *parent) : isUsed(type), QDialog(parent), - ui(new Ui::DlgConnHidWifi) + ui(new Ui::DlgHideWifi) { ui->setupUi(this); @@ -78,7 +78,7 @@ DlgConnHidWifi::DlgConnHidWifi(int type, MainWindow *mainWindow, QWidget *parent QString tmpPath = "/tmp/kylin-nm-connshow-" + QDir::home().dirName(); QString cmd = "nmcli connection show>" + tmpPath; int status = system(cmd.toUtf8().data()); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifi' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifi' failed");} QFile file(tmpPath); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -124,12 +124,12 @@ DlgConnHidWifi::DlgConnHidWifi(int type, MainWindow *mainWindow, QWidget *parent KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifi::~DlgConnHidWifi() +DlgHideWifi::~DlgHideWifi() { delete ui; } -void DlgConnHidWifi::mousePressEvent(QMouseEvent *event){ +void DlgHideWifi::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -137,10 +137,10 @@ void DlgConnHidWifi::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifi::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifi::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifi::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifi::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -148,46 +148,46 @@ void DlgConnHidWifi::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifi::changeDialog() +void DlgHideWifi::changeDialog() { if(ui->cbxSecurity->currentIndex()==0){ qDebug()<<"it's not need to change dialog"; } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0, mw); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0, mw); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(1, 0, mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, 0, mw); + connHidWifiEapPeap->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==5) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(0, 0, mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(0, 0, mw); + connHidWifiEapPeap->show(); } } //同一 Wi-Fi安全类型的窗口变换 -void DlgConnHidWifi::changeWindow(){ +void DlgHideWifi::changeWindow(){ if (ui->cbxConn->currentIndex() == 0){ isUsed = ui->cbxConn->currentIndex(); ui->cbxConn->setCurrentIndex(0); @@ -214,15 +214,15 @@ void DlgConnHidWifi::changeWindow(){ if (txt.indexOf("wpa-psk") != -1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(ui->cbxConn->currentIndex(), mw); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(ui->cbxConn->currentIndex(), mw); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } if (txt.indexOf("wpa-eap") != -1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(1, ui->cbxConn->currentIndex(), mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, ui->cbxConn->currentIndex(), mw); + connHidWifiEapPeap->show(); } }else { isUsed = ui->cbxConn->currentIndex(); @@ -236,13 +236,13 @@ void DlgConnHidWifi::changeWindow(){ } } -void DlgConnHidWifi::on_btnCancel_clicked() +void DlgHideWifi::on_btnCancel_clicked() { //this->close(); this->hide(); } -void DlgConnHidWifi::on_btnConnect_clicked() +void DlgHideWifi::on_btnConnect_clicked() { QThread *t = new QThread(); connect(t, SIGNAL(finished()), t, SLOT(deleteLater())); @@ -289,7 +289,7 @@ void DlgConnHidWifi::on_btnConnect_clicked() this->hide(); } -void DlgConnHidWifi::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifi::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -298,12 +298,12 @@ void DlgConnHidWifi::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifi::slotStartLoading() +void DlgHideWifi::slotStartLoading() { mw->startLoading(); } -void DlgConnHidWifi::on_execSecConn() +void DlgHideWifi::on_execSecConn() { QString str = "nmcli device wifi connect " + strWifiname + " password ''"; int status = system(str.toUtf8().data()); @@ -312,14 +312,14 @@ void DlgConnHidWifi::on_execSecConn() QTimer::singleShot(3*1000, this, SLOT(emitSignal() )); } -void DlgConnHidWifi::emitSignal() +void DlgHideWifi::emitSignal() { emit reSetWifiList(); mw->stopLoading(); emit this->stopSignal(); } -void DlgConnHidWifi::paintEvent(QPaintEvent *event) +void DlgHideWifi::paintEvent(QPaintEvent *event) { KylinDBus mkylindbus; double trans = mkylindbus.getTransparentData(); diff --git a/wireless-security/dlgconnhidwifi.h b/wireless-security/dlghidewifi.h similarity index 90% rename from wireless-security/dlgconnhidwifi.h rename to wireless-security/dlghidewifi.h index db71d518..21dcfed8 100644 --- a/wireless-security/dlgconnhidwifi.h +++ b/wireless-security/dlghidewifi.h @@ -28,16 +28,16 @@ class MainWindow; namespace Ui { -class DlgConnHidWifi; +class DlgHideWifi; } -class DlgConnHidWifi : public QDialog +class DlgHideWifi : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifi(int type, MainWindow *mw = 0, QWidget *parent = 0); - ~DlgConnHidWifi(); + explicit DlgHideWifi(int type, MainWindow *mw = 0, QWidget *parent = 0); + ~DlgHideWifi(); protected: void paintEvent(QPaintEvent *event); @@ -63,7 +63,7 @@ signals: void stopSignal(); private: - Ui::DlgConnHidWifi *ui; + Ui::DlgHideWifi *ui; int isUsed;//=0 current wifi not used before; >=1 used MainWindow *mw; QString strWifiname; diff --git a/wireless-security/dlgconnhidwifi.ui b/wireless-security/dlghidewifi.ui similarity index 98% rename from wireless-security/dlgconnhidwifi.ui rename to wireless-security/dlghidewifi.ui index 1d23ac68..541540ae 100644 --- a/wireless-security/dlgconnhidwifi.ui +++ b/wireless-security/dlghidewifi.ui @@ -1,7 +1,7 @@ - DlgConnHidWifi - + DlgHideWifi + 0 diff --git a/wireless-security/dlgconnhidwifisecfast.cpp b/wireless-security/dlghidewifieapfast.cpp similarity index 83% rename from wireless-security/dlgconnhidwifisecfast.cpp rename to wireless-security/dlghidewifieapfast.cpp index 736987d4..5d7fc126 100644 --- a/wireless-security/dlgconnhidwifisecfast.cpp +++ b/wireless-security/dlghidewifieapfast.cpp @@ -17,16 +17,16 @@ */ -#include "dlgconnhidwifisecfast.h" -#include "ui_dlgconnhidwifisecfast.h" +#include "dlghidewifieapfast.h" +#include "ui_dlghidewifieapfast.h" #include "kylinheadfile.h" #include -DlgConnHidWifiSecFast::DlgConnHidWifiSecFast(int type, QWidget *parent) : +DlgHideWifiEapFast::DlgHideWifiEapFast(int type, QWidget *parent) : WepOrWpa(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecFast) + ui(new Ui::DlgHideWifiEapFast) { ui->setupUi(this); @@ -99,7 +99,7 @@ DlgConnHidWifiSecFast::DlgConnHidWifiSecFast(int type, QWidget *parent) : ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecFast' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapFast' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -158,12 +158,12 @@ DlgConnHidWifiSecFast::DlgConnHidWifiSecFast(int type, QWidget *parent) : KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecFast::~DlgConnHidWifiSecFast() +DlgHideWifiEapFast::~DlgHideWifiEapFast() { delete ui; } -void DlgConnHidWifiSecFast::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapFast::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -171,42 +171,42 @@ void DlgConnHidWifiSecFast::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecFast::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapFast::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecFast::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapFast::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); } } -void DlgConnHidWifiSecFast::changeDialogSecu() +void DlgHideWifiEapFast::changeDialogSecu() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else if(ui->cbxSecurity->currentIndex()==5) { if (WepOrWpa == 1) { @@ -221,49 +221,49 @@ void DlgConnHidWifiSecFast::changeDialogSecu() } } -void DlgConnHidWifiSecFast::changeDialogAuth() +void DlgHideWifiEapFast::changeDialogAuth() { if(ui->cbxAuth->currentIndex()==0){ // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(WepOrWpa); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(WepOrWpa); +// connHidWifiEapTls->show(); } else if(ui->cbxAuth->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecLeap *connHidWifiSecLeap = new DlgConnHidWifiSecLeap(WepOrWpa); - connHidWifiSecLeap->show(); + DlgHideWifiEapLeap *connHidWifiEapLeap = new DlgHideWifiEapLeap(WepOrWpa); + connHidWifiEapLeap->show(); } else if(ui->cbxAuth->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPwd *connHidWifiSecPwd = new DlgConnHidWifiSecPwd(WepOrWpa); - connHidWifiSecPwd->show(); + DlgHideWifiEapPwd *connHidWifiEapPwd = new DlgHideWifiEapPwd(WepOrWpa); + connHidWifiEapPwd->show(); } else if(ui->cbxAuth->currentIndex()==3) { qDebug()<<"it's not need to change dialog"; } else if(ui->cbxAuth->currentIndex()==4) { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTunnelTLS *connHidWifiSecTuTls = new DlgConnHidWifiSecTunnelTLS(WepOrWpa); -// connHidWifiSecTuTls->show(); +// DlgHideWifiEapTTLS *connHidWifiEapTTls = new DlgHideWifiEapTTLS(WepOrWpa); +// connHidWifiEapTTls->show(); } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(WepOrWpa); -// connHidWifiSecPeap->show(); +// DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(WepOrWpa); +// connHidWifiEapPeap->show(); } } -void DlgConnHidWifiSecFast::on_btnCancel_clicked() +void DlgHideWifiEapFast::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecFast::on_btnConnect_clicked() +void DlgHideWifiEapFast::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiSecFast::on_checkBoxAutoPCA_stateChanged(int arg1) +void DlgHideWifiEapFast::on_checkBoxAutoPCA_stateChanged(int arg1) { if (arg1 == 0) { ui->cbxAutoPCA->setEnabled(false); @@ -272,7 +272,7 @@ void DlgConnHidWifiSecFast::on_checkBoxAutoPCA_stateChanged(int arg1) } } -void DlgConnHidWifiSecFast::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiEapFast::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword ->setEchoMode(QLineEdit::Password); @@ -281,7 +281,7 @@ void DlgConnHidWifiSecFast::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiSecFast::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapFast::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -296,7 +296,7 @@ void DlgConnHidWifiSecFast::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecFast::on_leAnonyId_textEdited(const QString &arg1) +void DlgHideWifiEapFast::on_leAnonyId_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -311,7 +311,7 @@ void DlgConnHidWifiSecFast::on_leAnonyId_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecFast::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiEapFast::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -326,7 +326,7 @@ void DlgConnHidWifiSecFast::on_leUserName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecFast::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiEapFast::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -341,7 +341,7 @@ void DlgConnHidWifiSecFast::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecFast::paintEvent(QPaintEvent *event) +void DlgHideWifiEapFast::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifisecfast.h b/wireless-security/dlghidewifieapfast.h similarity index 89% rename from wireless-security/dlgconnhidwifisecfast.h rename to wireless-security/dlghidewifieapfast.h index bd1dc1b4..b6ec06fd 100644 --- a/wireless-security/dlgconnhidwifisecfast.h +++ b/wireless-security/dlghidewifieapfast.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiSecFast; +class DlgHideWifiEapFast; } -class DlgConnHidWifiSecFast : public QDialog +class DlgHideWifiEapFast : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiSecFast(int type, QWidget *parent = 0); - ~DlgConnHidWifiSecFast(); + explicit DlgHideWifiEapFast(int type, QWidget *parent = 0); + ~DlgHideWifiEapFast(); protected: void paintEvent(QPaintEvent *event); @@ -59,7 +59,7 @@ private slots: void on_lePassword_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiSecFast *ui; + Ui::DlgHideWifiEapFast *ui; int WepOrWpa = 0;//0 WEP;1WPA void mousePressEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifisecfast.ui b/wireless-security/dlghidewifieapfast.ui similarity index 99% rename from wireless-security/dlgconnhidwifisecfast.ui rename to wireless-security/dlghidewifieapfast.ui index 8b915633..5f95720d 100644 --- a/wireless-security/dlgconnhidwifisecfast.ui +++ b/wireless-security/dlghidewifieapfast.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecFast - + DlgHideWifiEapFast + 0 diff --git a/wireless-security/dlgconnhidwifisecleap.cpp b/wireless-security/dlghidewifieapleap.cpp similarity index 81% rename from wireless-security/dlgconnhidwifisecleap.cpp rename to wireless-security/dlghidewifieapleap.cpp index bf99db75..94deb87c 100644 --- a/wireless-security/dlgconnhidwifisecleap.cpp +++ b/wireless-security/dlghidewifieapleap.cpp @@ -17,16 +17,16 @@ */ -#include "dlgconnhidwifisecleap.h" -#include "ui_dlgconnhidwifisecleap.h" +#include "dlghidewifieapleap.h" +#include "ui_dlghidewifieapleap.h" #include "kylinheadfile.h" #include -DlgConnHidWifiSecLeap::DlgConnHidWifiSecLeap(int type, QWidget *parent) : +DlgHideWifiEapLeap::DlgHideWifiEapLeap(int type, QWidget *parent) : WepOrWpa(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecLeap) + ui(new Ui::DlgHideWifiEapLeap) { ui->setupUi(this); @@ -82,7 +82,7 @@ DlgConnHidWifiSecLeap::DlgConnHidWifiSecLeap(int type, QWidget *parent) : ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecLeap' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapLeap' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -128,12 +128,12 @@ DlgConnHidWifiSecLeap::DlgConnHidWifiSecLeap(int type, QWidget *parent) : KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecLeap::~DlgConnHidWifiSecLeap() +DlgHideWifiEapLeap::~DlgHideWifiEapLeap() { delete ui; } -void DlgConnHidWifiSecLeap::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapLeap::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -141,42 +141,42 @@ void DlgConnHidWifiSecLeap::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecLeap::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapLeap::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecLeap::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapLeap::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); } } -void DlgConnHidWifiSecLeap::changeDialogSecu() +void DlgHideWifiEapLeap::changeDialogSecu() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else if(ui->cbxSecurity->currentIndex()==5) { if (WepOrWpa == 1) { @@ -191,49 +191,49 @@ void DlgConnHidWifiSecLeap::changeDialogSecu() } } -void DlgConnHidWifiSecLeap::changeDialogAuth() +void DlgHideWifiEapLeap::changeDialogAuth() { if(ui->cbxAuth->currentIndex()==0){ // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(WepOrWpa); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(WepOrWpa); +// connHidWifiEapTls->show(); } else if(ui->cbxAuth->currentIndex()==1) { qDebug()<<"it's not need to change dialog"; } else if(ui->cbxAuth->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPwd *connHidWifiSecPwd = new DlgConnHidWifiSecPwd(WepOrWpa); - connHidWifiSecPwd->show(); + DlgHideWifiEapPwd *connHidWifiEapPwd = new DlgHideWifiEapPwd(WepOrWpa); + connHidWifiEapPwd->show(); } else if(ui->cbxAuth->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecFast *connHidWifiSecFast = new DlgConnHidWifiSecFast(WepOrWpa); - connHidWifiSecFast->show(); + DlgHideWifiEapFast *connHidWifiEapFast = new DlgHideWifiEapFast(WepOrWpa); + connHidWifiEapFast->show(); } else if(ui->cbxAuth->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecTunnelTLS *connHidWifiSecTuTls = new DlgConnHidWifiSecTunnelTLS(WepOrWpa); - connHidWifiSecTuTls->show(); + DlgHideWifiEapTTLS *connHidWifiEapTTls = new DlgHideWifiEapTTLS(WepOrWpa); + connHidWifiEapTTls->show(); } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(WepOrWpa); -// connHidWifiSecPeap->show(); +// DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(WepOrWpa); +// connHidWifiEapPeap->show(); } } -void DlgConnHidWifiSecLeap::on_btnCancel_clicked() +void DlgHideWifiEapLeap::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecLeap::on_btnConnect_clicked() +void DlgHideWifiEapLeap::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiSecLeap::on_checkBox_stateChanged(int arg1) +void DlgHideWifiEapLeap::on_checkBox_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword ->setEchoMode(QLineEdit::Password); @@ -242,7 +242,7 @@ void DlgConnHidWifiSecLeap::on_checkBox_stateChanged(int arg1) } } -void DlgConnHidWifiSecLeap::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapLeap::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -255,7 +255,7 @@ void DlgConnHidWifiSecLeap::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecLeap::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiEapLeap::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -268,7 +268,7 @@ void DlgConnHidWifiSecLeap::on_leUserName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecLeap::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiEapLeap::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -281,7 +281,7 @@ void DlgConnHidWifiSecLeap::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecLeap::paintEvent(QPaintEvent *event) +void DlgHideWifiEapLeap::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifisecleap.h b/wireless-security/dlghidewifieapleap.h similarity index 89% rename from wireless-security/dlgconnhidwifisecleap.h rename to wireless-security/dlghidewifieapleap.h index ebdcccb9..18023fa4 100644 --- a/wireless-security/dlgconnhidwifisecleap.h +++ b/wireless-security/dlghidewifieapleap.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiSecLeap; +class DlgHideWifiEapLeap; } -class DlgConnHidWifiSecLeap : public QDialog +class DlgHideWifiEapLeap : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiSecLeap(int type, QWidget *parent = 0); - ~DlgConnHidWifiSecLeap(); + explicit DlgHideWifiEapLeap(int type, QWidget *parent = 0); + ~DlgHideWifiEapLeap(); protected: void paintEvent(QPaintEvent *event); @@ -55,7 +55,7 @@ private slots: void on_lePassword_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiSecLeap *ui; + Ui::DlgHideWifiEapLeap *ui; int WepOrWpa = 0;//0 WEP;1WPA void mousePressEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifisecleap.ui b/wireless-security/dlghidewifieapleap.ui similarity index 98% rename from wireless-security/dlgconnhidwifisecleap.ui rename to wireless-security/dlghidewifieapleap.ui index 9664fd87..dfbcd7e9 100644 --- a/wireless-security/dlgconnhidwifisecleap.ui +++ b/wireless-security/dlghidewifieapleap.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecLeap - + DlgHideWifiEapLeap + 0 diff --git a/wireless-security/dlgconnhidwifisecpeap.cpp b/wireless-security/dlghidewifieappeap.cpp similarity index 87% rename from wireless-security/dlgconnhidwifisecpeap.cpp rename to wireless-security/dlghidewifieappeap.cpp index dce67282..1c6907eb 100644 --- a/wireless-security/dlgconnhidwifisecpeap.cpp +++ b/wireless-security/dlghidewifieappeap.cpp @@ -17,8 +17,8 @@ */ -#include "dlgconnhidwifisecpeap.h" -#include "ui_dlgconnhidwifisecpeap.h" +#include "dlghidewifieappeap.h" +#include "ui_dlghidewifieappeap.h" #include "kylinheadfile.h" #include "src/mainwindow.h" #include "src/kylin-dbus-interface.h" @@ -28,11 +28,11 @@ #include #include -DlgConnHidWifiSecPeap::DlgConnHidWifiSecPeap(int type, int beUsed, MainWindow *mainWindow, QWidget *parent) : +DlgHideWifiEapPeap::DlgHideWifiEapPeap(int type, int beUsed, MainWindow *mainWindow, QWidget *parent) : WepOrWpa(type), isUsed(beUsed), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecPeap) + ui(new Ui::DlgHideWifiEapPeap) { ui->setupUi(this); @@ -114,7 +114,7 @@ DlgConnHidWifiSecPeap::DlgConnHidWifiSecPeap(int type, int beUsed, MainWindow *m ui->cbxConn->addItem("新建..."); int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecPeap' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapPeap' failed");} QFile file("/tmp/kylin-nm-connshow"); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug()<<"Can't open the file!"; @@ -198,12 +198,12 @@ DlgConnHidWifiSecPeap::DlgConnHidWifiSecPeap(int type, int beUsed, MainWindow *m KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecPeap::~DlgConnHidWifiSecPeap() +DlgHideWifiEapPeap::~DlgHideWifiEapPeap() { delete ui; } -void DlgConnHidWifiSecPeap::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapPeap::mousePressEvent(QMouseEvent *event){ if (event->button() == Qt::LeftButton) { this->isPress = true; this->winPos = this->pos(); @@ -211,10 +211,10 @@ void DlgConnHidWifiSecPeap::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecPeap::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapPeap::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecPeap::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapPeap::mouseMoveEvent(QMouseEvent *event){ if (this->isPress) { this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -222,18 +222,18 @@ void DlgConnHidWifiSecPeap::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifiSecPeap::changeDialogSecu() +void DlgHideWifiEapPeap::changeDialogSecu() { if (ui->cbxSecurity->currentIndex()==0) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==2) { @@ -244,17 +244,17 @@ void DlgConnHidWifiSecPeap::changeDialogSecu() } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==5) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else { if (WepOrWpa == 1) { @@ -265,44 +265,44 @@ void DlgConnHidWifiSecPeap::changeDialogSecu() } //同一 Wi-Fi安全类型的Authentication变换 -void DlgConnHidWifiSecPeap::changeDialogAuth() +void DlgHideWifiEapPeap::changeDialogAuth() { if (ui->cbxAuth->currentIndex()==0) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(WepOrWpa, 0, mw); - connHidWifiSecTls->show(); + DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(WepOrWpa, 0, mw); + connHidWifiEapTls->show(); } else if(ui->cbxAuth->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecLeap *connHidWifiSecLeap = new DlgConnHidWifiSecLeap(WepOrWpa); - connHidWifiSecLeap->show(); + DlgHideWifiEapLeap *connHidWifiEapLeap = new DlgHideWifiEapLeap(WepOrWpa); + connHidWifiEapLeap->show(); } else if(ui->cbxAuth->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPwd *connHidWifiSecPwd = new DlgConnHidWifiSecPwd(WepOrWpa); - connHidWifiSecPwd->show(); + DlgHideWifiEapPwd *connHidWifiEapPwd = new DlgHideWifiEapPwd(WepOrWpa); + connHidWifiEapPwd->show(); } else if(ui->cbxAuth->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecFast *connHidWifiSecFast = new DlgConnHidWifiSecFast(WepOrWpa); - connHidWifiSecFast->show(); + DlgHideWifiEapFast *connHidWifiEapFast = new DlgHideWifiEapFast(WepOrWpa); + connHidWifiEapFast->show(); } else if(ui->cbxAuth->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecTunnelTLS *connHidWifiSecTuTls = new DlgConnHidWifiSecTunnelTLS(WepOrWpa); - connHidWifiSecTuTls->show(); + DlgHideWifiEapTTLS *connHidWifiEapTTls = new DlgHideWifiEapTTLS(WepOrWpa); + connHidWifiEapTTls->show(); } else { qDebug()<<"it's not need to change dialog"; } } //同一 Wi-Fi安全类型的窗口变换 -void DlgConnHidWifiSecPeap::changeWindow(){ +void DlgHideWifiEapPeap::changeWindow(){ if (ui->cbxConn->currentIndex() == 0) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if (ui->cbxConn->currentIndex() >= 1) { @@ -323,7 +323,7 @@ void DlgConnHidWifiSecPeap::changeWindow(){ if (txt.indexOf("wpa-psk") != -1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(ui->cbxConn->currentIndex(), mw); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(ui->cbxConn->currentIndex(), mw); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } @@ -349,7 +349,7 @@ void DlgConnHidWifiSecPeap::changeWindow(){ } else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(ui->cbxConn->currentIndex(), mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(ui->cbxConn->currentIndex(), mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } @@ -357,7 +357,7 @@ void DlgConnHidWifiSecPeap::changeWindow(){ } //CA证书的Index变化 -void DlgConnHidWifiSecPeap::on_cbxCA_currentIndexChanged(const QString &arg1) +void DlgHideWifiEapPeap::on_cbxCA_currentIndexChanged(const QString &arg1) { if (ui->cbxCA->currentIndex() == 0) { ui->leCaPwd->setText(""); @@ -370,18 +370,18 @@ void DlgConnHidWifiSecPeap::on_cbxCA_currentIndexChanged(const QString &arg1) } } -void DlgConnHidWifiSecPeap::on_btnCancel_clicked() +void DlgHideWifiEapPeap::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecPeap::on_btnConnect_clicked() +void DlgHideWifiEapPeap::on_btnConnect_clicked() { this->close(); } //是否显示密码 -void DlgConnHidWifiSecPeap::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiEapPeap::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->leCaPwd->setEchoMode(QLineEdit::Password); @@ -391,7 +391,7 @@ void DlgConnHidWifiSecPeap::on_checkBoxPwd_stateChanged(int arg1) } //是否是不需要CA证书 -void DlgConnHidWifiSecPeap::on_checkBoxCA_stateChanged(int arg1) +void DlgHideWifiEapPeap::on_checkBoxCA_stateChanged(int arg1) { if (arg1 == 0) { ui->cbxCA->setCurrentIndex(0); @@ -407,7 +407,7 @@ void DlgConnHidWifiSecPeap::on_checkBoxCA_stateChanged(int arg1) } //是否显示密码 -void DlgConnHidWifiSecPeap::on_checkBoxPwdSec_stateChanged(int arg1) +void DlgHideWifiEapPeap::on_checkBoxPwdSec_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword->setEchoMode(QLineEdit::Password); @@ -417,7 +417,7 @@ void DlgConnHidWifiSecPeap::on_checkBoxPwdSec_stateChanged(int arg1) } //编辑网络名称 -void DlgConnHidWifiSecPeap::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -443,7 +443,7 @@ void DlgConnHidWifiSecPeap::on_leNetName_textEdited(const QString &arg1) } //编辑匿名身份 -void DlgConnHidWifiSecPeap::on_leAnonyId_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_leAnonyId_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -467,7 +467,7 @@ void DlgConnHidWifiSecPeap::on_leAnonyId_textEdited(const QString &arg1) } //编辑域名 -void DlgConnHidWifiSecPeap::on_leDomain_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_leDomain_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -491,7 +491,7 @@ void DlgConnHidWifiSecPeap::on_leDomain_textEdited(const QString &arg1) } //编辑CA证书密码 -void DlgConnHidWifiSecPeap::on_leCaPwd_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_leCaPwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -511,7 +511,7 @@ void DlgConnHidWifiSecPeap::on_leCaPwd_textEdited(const QString &arg1) } //编辑用户名 -void DlgConnHidWifiSecPeap::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -537,7 +537,7 @@ void DlgConnHidWifiSecPeap::on_leUserName_textEdited(const QString &arg1) } //编辑密码 -void DlgConnHidWifiSecPeap::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiEapPeap::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == "") { ui->btnConnect->setEnabled(false); @@ -562,7 +562,7 @@ void DlgConnHidWifiSecPeap::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecPeap::paintEvent(QPaintEvent *event) +void DlgHideWifiEapPeap::paintEvent(QPaintEvent *event) { KylinDBus mkylindbus; double trans = mkylindbus.getTransparentData(); diff --git a/wireless-security/dlgconnhidwifisecpeap.h b/wireless-security/dlghidewifieappeap.h similarity index 90% rename from wireless-security/dlgconnhidwifisecpeap.h rename to wireless-security/dlghidewifieappeap.h index dfde40b3..02e3d534 100644 --- a/wireless-security/dlgconnhidwifisecpeap.h +++ b/wireless-security/dlghidewifieappeap.h @@ -25,17 +25,17 @@ class MainWindow; namespace Ui { -class DlgConnHidWifiSecPeap; +class DlgHideWifiEapPeap; } -class DlgConnHidWifiSecPeap : public QDialog +class DlgHideWifiEapPeap : public QDialog { Q_OBJECT public: //type: 0是动态 WEP, 1是企业wpa, beUsed:是否是之前已经连接过多网络 - explicit DlgConnHidWifiSecPeap(int type, int beUsed, MainWindow *mw = 0, QWidget *parent = 0); - ~DlgConnHidWifiSecPeap(); + explicit DlgHideWifiEapPeap(int type, int beUsed, MainWindow *mw = 0, QWidget *parent = 0); + ~DlgHideWifiEapPeap(); protected: void paintEvent(QPaintEvent *event); @@ -71,7 +71,7 @@ private slots: void on_lePassword_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiSecPeap *ui; + Ui::DlgHideWifiEapPeap *ui; int WepOrWpa = 0;//0 WEP;1 WPA int isUsed;//=0 current wifi not used before; >=1 used MainWindow *mw; diff --git a/wireless-security/dlgconnhidwifisecpeap.ui b/wireless-security/dlghidewifieappeap.ui similarity index 99% rename from wireless-security/dlgconnhidwifisecpeap.ui rename to wireless-security/dlghidewifieappeap.ui index 82bc3545..f96866cc 100644 --- a/wireless-security/dlgconnhidwifisecpeap.ui +++ b/wireless-security/dlghidewifieappeap.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecPeap - + DlgHideWifiEapPeap + 0 diff --git a/wireless-security/dlgconnhidwifisecpwd.cpp b/wireless-security/dlghidewifieappwd.cpp similarity index 81% rename from wireless-security/dlgconnhidwifisecpwd.cpp rename to wireless-security/dlghidewifieappwd.cpp index 9e3b17ec..43c1672b 100644 --- a/wireless-security/dlgconnhidwifisecpwd.cpp +++ b/wireless-security/dlghidewifieappwd.cpp @@ -17,16 +17,16 @@ */ -#include "dlgconnhidwifisecpwd.h" -#include "ui_dlgconnhidwifisecpwd.h" +#include "dlghidewifieappwd.h" +#include "ui_dlghidewifieappwd.h" #include "kylinheadfile.h" #include -DlgConnHidWifiSecPwd::DlgConnHidWifiSecPwd(int type, QWidget *parent) : +DlgHideWifiEapPwd::DlgHideWifiEapPwd(int type, QWidget *parent) : WepOrWpa(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecPwd) + ui(new Ui::DlgHideWifiEapPwd) { ui->setupUi(this); @@ -83,7 +83,7 @@ DlgConnHidWifiSecPwd::DlgConnHidWifiSecPwd(int type, QWidget *parent) : ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecPwd' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapPwd' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -129,12 +129,12 @@ DlgConnHidWifiSecPwd::DlgConnHidWifiSecPwd(int type, QWidget *parent) : KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecPwd::~DlgConnHidWifiSecPwd() +DlgHideWifiEapPwd::~DlgHideWifiEapPwd() { delete ui; } -void DlgConnHidWifiSecPwd::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapPwd::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -142,42 +142,42 @@ void DlgConnHidWifiSecPwd::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecPwd::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapPwd::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecPwd::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapPwd::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); } } -void DlgConnHidWifiSecPwd::changeDialogSecu() +void DlgHideWifiEapPwd::changeDialogSecu() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else if(ui->cbxSecurity->currentIndex()==5) { if (WepOrWpa == 1) { @@ -192,49 +192,49 @@ void DlgConnHidWifiSecPwd::changeDialogSecu() } } -void DlgConnHidWifiSecPwd::changeDialogAuth() +void DlgHideWifiEapPwd::changeDialogAuth() { if(ui->cbxAuth->currentIndex()==0){ // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(WepOrWpa); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(WepOrWpa); +// connHidWifiEapTls->show(); } else if(ui->cbxAuth->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecLeap *connHidWifiSecLeap = new DlgConnHidWifiSecLeap(WepOrWpa); - connHidWifiSecLeap->show(); + DlgHideWifiEapLeap *connHidWifiEapLeap = new DlgHideWifiEapLeap(WepOrWpa); + connHidWifiEapLeap->show(); } else if(ui->cbxAuth->currentIndex()==2) { qDebug()<<"it's not need to change dialog"; } else if(ui->cbxAuth->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecFast *connHidWifiSecFast = new DlgConnHidWifiSecFast(WepOrWpa); - connHidWifiSecFast->show(); + DlgHideWifiEapFast *connHidWifiEapFast = new DlgHideWifiEapFast(WepOrWpa); + connHidWifiEapFast->show(); } else if(ui->cbxAuth->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecTunnelTLS *connHidWifiSecTuTls = new DlgConnHidWifiSecTunnelTLS(WepOrWpa); - connHidWifiSecTuTls->show(); + DlgHideWifiEapTTLS *connHidWifiEapTTls = new DlgHideWifiEapTTLS(WepOrWpa); + connHidWifiEapTTls->show(); } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(WepOrWpa); -// connHidWifiSecPeap->show(); +// DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(WepOrWpa); +// connHidWifiEapPeap->show(); } } -void DlgConnHidWifiSecPwd::on_btnCancel_clicked() +void DlgHideWifiEapPwd::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecPwd::on_btnConnect_clicked() +void DlgHideWifiEapPwd::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiSecPwd::on_checkBox_stateChanged(int arg1) +void DlgHideWifiEapPwd::on_checkBox_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword ->setEchoMode(QLineEdit::Password); @@ -243,7 +243,7 @@ void DlgConnHidWifiSecPwd::on_checkBox_stateChanged(int arg1) } } -void DlgConnHidWifiSecPwd::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapPwd::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -256,7 +256,7 @@ void DlgConnHidWifiSecPwd::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecPwd::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiEapPwd::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -269,7 +269,7 @@ void DlgConnHidWifiSecPwd::on_leUserName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecPwd::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiEapPwd::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -282,7 +282,7 @@ void DlgConnHidWifiSecPwd::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecPwd::paintEvent(QPaintEvent *event) +void DlgHideWifiEapPwd::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifisecpwd.h b/wireless-security/dlghidewifieappwd.h similarity index 89% rename from wireless-security/dlgconnhidwifisecpwd.h rename to wireless-security/dlghidewifieappwd.h index d44250d1..33dcdbde 100644 --- a/wireless-security/dlgconnhidwifisecpwd.h +++ b/wireless-security/dlghidewifieappwd.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiSecPwd; +class DlgHideWifiEapPwd; } -class DlgConnHidWifiSecPwd : public QDialog +class DlgHideWifiEapPwd : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiSecPwd(int type, QWidget *parent = 0); - ~DlgConnHidWifiSecPwd(); + explicit DlgHideWifiEapPwd(int type, QWidget *parent = 0); + ~DlgHideWifiEapPwd(); protected: void paintEvent(QPaintEvent *event); @@ -55,7 +55,7 @@ private slots: void on_lePassword_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiSecPwd *ui; + Ui::DlgHideWifiEapPwd *ui; int WepOrWpa = 0;//0 WEP;1WPA void mousePressEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifisecpwd.ui b/wireless-security/dlghidewifieappwd.ui similarity index 98% rename from wireless-security/dlgconnhidwifisecpwd.ui rename to wireless-security/dlghidewifieappwd.ui index 7dc8cbaa..5ca39e2d 100644 --- a/wireless-security/dlgconnhidwifisecpwd.ui +++ b/wireless-security/dlghidewifieappwd.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecPwd - + DlgHideWifiEapPwd + 0 diff --git a/wireless-security/dlgconnhidwifisectls.cpp b/wireless-security/dlghidewifieaptls.cpp similarity index 89% rename from wireless-security/dlgconnhidwifisectls.cpp rename to wireless-security/dlghidewifieaptls.cpp index 45ca1fe3..a7125a11 100644 --- a/wireless-security/dlgconnhidwifisectls.cpp +++ b/wireless-security/dlghidewifieaptls.cpp @@ -17,7 +17,7 @@ */ -#include "ui_dlgconnhidwifisectls.h" +#include "ui_dlghidewifieaptls.h" #include "kylinheadfile.h" #include "src/mainwindow.h" #include "src/kylin-dbus-interface.h" @@ -27,11 +27,11 @@ #include #include -DlgConnHidWifiSecTls::DlgConnHidWifiSecTls(int type, int beUsed, MainWindow *mainWindow, QWidget *parent) : +DlgHideWifiEapTls::DlgHideWifiEapTls(int type, int beUsed, MainWindow *mainWindow, QWidget *parent) : WepOrWpa(type), isUsed(beUsed), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecTls) + ui(new Ui::DlgHideWifiEapTls) { ui->setupUi(this); @@ -113,7 +113,7 @@ DlgConnHidWifiSecTls::DlgConnHidWifiSecTls(int type, int beUsed, MainWindow *mai ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecTls' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapTls' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -186,12 +186,12 @@ DlgConnHidWifiSecTls::DlgConnHidWifiSecTls(int type, int beUsed, MainWindow *mai KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecTls::~DlgConnHidWifiSecTls() +DlgHideWifiEapTls::~DlgHideWifiEapTls() { delete ui; } -void DlgConnHidWifiSecTls::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapTls::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -199,10 +199,10 @@ void DlgConnHidWifiSecTls::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecTls::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapTls::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecTls::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapTls::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -210,18 +210,18 @@ void DlgConnHidWifiSecTls::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifiSecTls::changeDialogSecu() +void DlgHideWifiEapTls::changeDialogSecu() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==2) { @@ -233,17 +233,17 @@ void DlgConnHidWifiSecTls::changeDialogSecu() } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==5) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else { if (WepOrWpa == 1) { @@ -254,44 +254,44 @@ void DlgConnHidWifiSecTls::changeDialogSecu() } //同一 Wi-Fi安全类型的Authentication变换 -void DlgConnHidWifiSecTls::changeDialogAuth() +void DlgHideWifiEapTls::changeDialogAuth() { if(ui->cbxAuth->currentIndex()==0){ qDebug()<<"it's not need to change dialog"; } else if(ui->cbxAuth->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecLeap *connHidWifiSecLeap = new DlgConnHidWifiSecLeap(WepOrWpa); - connHidWifiSecLeap->show(); + DlgHideWifiEapLeap *connHidWifiEapLeap = new DlgHideWifiEapLeap(WepOrWpa); + connHidWifiEapLeap->show(); } else if(ui->cbxAuth->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPwd *connHidWifiSecPwd = new DlgConnHidWifiSecPwd(WepOrWpa); - connHidWifiSecPwd->show(); + DlgHideWifiEapPwd *connHidWifiEapPwd = new DlgHideWifiEapPwd(WepOrWpa); + connHidWifiEapPwd->show(); } else if(ui->cbxAuth->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecFast *connHidWifiSecFast = new DlgConnHidWifiSecFast(WepOrWpa); - connHidWifiSecFast->show(); + DlgHideWifiEapFast *connHidWifiEapFast = new DlgHideWifiEapFast(WepOrWpa); + connHidWifiEapFast->show(); } else if(ui->cbxAuth->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecTunnelTLS *connHidWifiSecTuTls = new DlgConnHidWifiSecTunnelTLS(WepOrWpa); - connHidWifiSecTuTls->show(); + DlgHideWifiEapTTLS *connHidWifiEapTTls = new DlgHideWifiEapTTLS(WepOrWpa); + connHidWifiEapTTls->show(); } else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(WepOrWpa, 0, mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(WepOrWpa, 0, mw); + connHidWifiEapPeap->show(); } } //同一 Wi-Fi安全类型的窗口变换 -void DlgConnHidWifiSecTls::changeWindow(){ +void DlgHideWifiEapTls::changeWindow(){ if (ui->cbxConn->currentIndex() == 0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); }else if (ui->cbxConn->currentIndex() >= 1){ @@ -310,20 +310,20 @@ void DlgConnHidWifiSecTls::changeWindow(){ if (txt.indexOf("802-11-wireless-security.key-mgmt:") != -1){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(ui->cbxConn->currentIndex(), mw); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(ui->cbxConn->currentIndex(), mw); connHidWifiWpa->show(); connect(connHidWifiWpa, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(ui->cbxConn->currentIndex(), mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(ui->cbxConn->currentIndex(), mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } } } -void DlgConnHidWifiSecTls::on_cbxCA_currentIndexChanged(const QString &arg1) +void DlgHideWifiEapTls::on_cbxCA_currentIndexChanged(const QString &arg1) { if (ui->cbxCA->currentIndex() == 0){ ui->leCaPwd->setText(""); @@ -336,7 +336,7 @@ void DlgConnHidWifiSecTls::on_cbxCA_currentIndexChanged(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_cbxUserCertify_currentIndexChanged(const QString &arg1) +void DlgHideWifiEapTls::on_cbxUserCertify_currentIndexChanged(const QString &arg1) { if (ui->cbxUserCertify->currentIndex() == 0){ ui->leUserCertifyPwd->setText(""); @@ -365,7 +365,7 @@ void DlgConnHidWifiSecTls::on_cbxUserCertify_currentIndexChanged(const QString & } } -void DlgConnHidWifiSecTls::on_cbxUserPriKey_currentIndexChanged(const QString &arg1) +void DlgHideWifiEapTls::on_cbxUserPriKey_currentIndexChanged(const QString &arg1) { if (ui->cbxUserPriKey->currentIndex() == 0){ ui->leUserKeyPwd->setText(""); @@ -378,17 +378,17 @@ void DlgConnHidWifiSecTls::on_cbxUserPriKey_currentIndexChanged(const QString &a } } -void DlgConnHidWifiSecTls::on_btnCancel_clicked() +void DlgHideWifiEapTls::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecTls::on_btnConnect_clicked() +void DlgHideWifiEapTls::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiSecTls::on_checkBoxCA_stateChanged(int arg1) +void DlgHideWifiEapTls::on_checkBoxCA_stateChanged(int arg1) { if (arg1 == 0) { ui->cbxCA->setCurrentIndex(0); @@ -401,7 +401,7 @@ void DlgConnHidWifiSecTls::on_checkBoxCA_stateChanged(int arg1) } } -void DlgConnHidWifiSecTls::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiEapTls::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->leCaPwd->setEchoMode(QLineEdit::Password); @@ -410,7 +410,7 @@ void DlgConnHidWifiSecTls::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiSecTls::on_checkBoxPwdSec_stateChanged(int arg1) +void DlgHideWifiEapTls::on_checkBoxPwdSec_stateChanged(int arg1) { if (arg1 == 0) { ui->leUserCertifyPwd->setEchoMode(QLineEdit::Password); @@ -421,7 +421,7 @@ void DlgConnHidWifiSecTls::on_checkBoxPwdSec_stateChanged(int arg1) } } -void DlgConnHidWifiSecTls::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -470,7 +470,7 @@ void DlgConnHidWifiSecTls::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_leIdentity_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leIdentity_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -519,7 +519,7 @@ void DlgConnHidWifiSecTls::on_leIdentity_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_leDomain_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leDomain_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -568,7 +568,7 @@ void DlgConnHidWifiSecTls::on_leDomain_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_leCaPwd_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leCaPwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -597,7 +597,7 @@ void DlgConnHidWifiSecTls::on_leCaPwd_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_leUserCertifyPwd_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leUserCertifyPwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -638,7 +638,7 @@ void DlgConnHidWifiSecTls::on_leUserCertifyPwd_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::on_leUserKeyPwd_textEdited(const QString &arg1) +void DlgHideWifiEapTls::on_leUserKeyPwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -671,7 +671,7 @@ void DlgConnHidWifiSecTls::on_leUserKeyPwd_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTls::paintEvent(QPaintEvent *event) +void DlgHideWifiEapTls::paintEvent(QPaintEvent *event) { KylinDBus mkylindbus; double trans = mkylindbus.getTransparentData(); diff --git a/wireless-security/dlgconnhidwifisectls.h b/wireless-security/dlghidewifieaptls.h similarity index 90% rename from wireless-security/dlgconnhidwifisectls.h rename to wireless-security/dlghidewifieaptls.h index e153bfd2..67c13448 100644 --- a/wireless-security/dlgconnhidwifisectls.h +++ b/wireless-security/dlghidewifieaptls.h @@ -25,16 +25,16 @@ class MainWindow; namespace Ui { -class DlgConnHidWifiSecTls; +class DlgHideWifiEapTls; } -class DlgConnHidWifiSecTls : public QDialog +class DlgHideWifiEapTls : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiSecTls(int type, int beUsed, MainWindow *mw = 0, QWidget *parent = 0); - ~DlgConnHidWifiSecTls(); + explicit DlgHideWifiEapTls(int type, int beUsed, MainWindow *mw = 0, QWidget *parent = 0); + ~DlgHideWifiEapTls(); protected: void paintEvent(QPaintEvent *event); @@ -74,7 +74,7 @@ private slots: void on_cbxUserPriKey_currentIndexChanged(const QString &arg1); private: - Ui::DlgConnHidWifiSecTls *ui; + Ui::DlgHideWifiEapTls *ui; int WepOrWpa = 0;//0 WEP;1WPA int isUsed;//=0 current wifi not used before; >=1 used MainWindow *mw; diff --git a/wireless-security/dlgconnhidwifisectls.ui b/wireless-security/dlghidewifieaptls.ui similarity index 99% rename from wireless-security/dlgconnhidwifisectls.ui rename to wireless-security/dlghidewifieaptls.ui index 969ab4ff..551610d1 100644 --- a/wireless-security/dlgconnhidwifisectls.ui +++ b/wireless-security/dlghidewifieaptls.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecTls - + DlgHideWifiEapTls + 0 diff --git a/wireless-security/dlgconnhidwifisectunneltls.cpp b/wireless-security/dlghidewifieapttls.cpp similarity index 84% rename from wireless-security/dlgconnhidwifisectunneltls.cpp rename to wireless-security/dlghidewifieapttls.cpp index 2481496b..e7812f09 100644 --- a/wireless-security/dlgconnhidwifisectunneltls.cpp +++ b/wireless-security/dlghidewifieapttls.cpp @@ -17,16 +17,16 @@ */ -#include "dlgconnhidwifisectunneltls.h" -#include "ui_dlgconnhidwifisectunneltls.h" +#include "dlghidewifieapttls.h" +#include "ui_dlghidewifieapttls.h" #include "kylinheadfile.h" #include -DlgConnHidWifiSecTunnelTLS::DlgConnHidWifiSecTunnelTLS(int type, QWidget *parent) : +DlgHideWifiEapTTLS::DlgHideWifiEapTTLS(int type, QWidget *parent) : WepOrWpa(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiSecTunnelTLS) + ui(new Ui::DlgHideWifiEapTTLS) { ui->setupUi(this); @@ -104,7 +104,7 @@ DlgConnHidWifiSecTunnelTLS::DlgConnHidWifiSecTunnelTLS(int type, QWidget *parent ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiSecTunnelTLS' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiEapTTLS' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -163,12 +163,12 @@ DlgConnHidWifiSecTunnelTLS::DlgConnHidWifiSecTunnelTLS(int type, QWidget *parent KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiSecTunnelTLS::~DlgConnHidWifiSecTunnelTLS() +DlgHideWifiEapTTLS::~DlgHideWifiEapTTLS() { delete ui; } -void DlgConnHidWifiSecTunnelTLS::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiEapTTLS::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -176,42 +176,42 @@ void DlgConnHidWifiSecTunnelTLS::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiSecTunnelTLS::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiEapTTLS::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiSecTunnelTLS::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiEapTTLS::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); } } -void DlgConnHidWifiSecTunnelTLS::changeDialogSecu() +void DlgHideWifiEapTTLS::changeDialogSecu() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else if(ui->cbxSecurity->currentIndex()==5) { if (WepOrWpa == 1) { @@ -226,39 +226,39 @@ void DlgConnHidWifiSecTunnelTLS::changeDialogSecu() } } -void DlgConnHidWifiSecTunnelTLS::changeDialogAuth() +void DlgHideWifiEapTTLS::changeDialogAuth() { if(ui->cbxAuth->currentIndex()==0){ // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(WepOrWpa); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(WepOrWpa); +// connHidWifiEapTls->show(); } else if(ui->cbxAuth->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecLeap *connHidWifiSecLeap = new DlgConnHidWifiSecLeap(WepOrWpa); - connHidWifiSecLeap->show(); + DlgHideWifiEapLeap *connHidWifiEapLeap = new DlgHideWifiEapLeap(WepOrWpa); + connHidWifiEapLeap->show(); } else if(ui->cbxAuth->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPwd *connHidWifiSecPwd = new DlgConnHidWifiSecPwd(WepOrWpa); - connHidWifiSecPwd->show(); + DlgHideWifiEapPwd *connHidWifiEapPwd = new DlgHideWifiEapPwd(WepOrWpa); + connHidWifiEapPwd->show(); } else if(ui->cbxAuth->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecFast *connHidWifiSecFast = new DlgConnHidWifiSecFast(WepOrWpa); - connHidWifiSecFast->show(); + DlgHideWifiEapFast *connHidWifiEapFast = new DlgHideWifiEapFast(WepOrWpa); + connHidWifiEapFast->show(); } else if(ui->cbxAuth->currentIndex()==4) { qDebug()<<"it's not need to change dialog"; } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(WepOrWpa); -// connHidWifiSecPeap->show(); +// DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(WepOrWpa); +// connHidWifiEapPeap->show(); } } -void DlgConnHidWifiSecTunnelTLS::on_cbxCA_currentIndexChanged(const QString &arg1) +void DlgHideWifiEapTTLS::on_cbxCA_currentIndexChanged(const QString &arg1) { if (ui->cbxCA->currentIndex() == 0){ ui->leCaPwd->setText(""); @@ -271,17 +271,17 @@ void DlgConnHidWifiSecTunnelTLS::on_cbxCA_currentIndexChanged(const QString &arg } } -void DlgConnHidWifiSecTunnelTLS::on_btnCancel_clicked() +void DlgHideWifiEapTTLS::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiSecTunnelTLS::on_btnConnect_clicked() +void DlgHideWifiEapTTLS::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiSecTunnelTLS::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiEapTTLS::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->leCaPwd->setEchoMode(QLineEdit::Password); @@ -290,7 +290,7 @@ void DlgConnHidWifiSecTunnelTLS::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_checkBoxCA_stateChanged(int arg1) +void DlgHideWifiEapTTLS::on_checkBoxCA_stateChanged(int arg1) { if (arg1 == 0) { ui->cbxCA->setCurrentIndex(0); @@ -305,7 +305,7 @@ void DlgConnHidWifiSecTunnelTLS::on_checkBoxCA_stateChanged(int arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_checkBoxPwdSec_stateChanged(int arg1) +void DlgHideWifiEapTTLS::on_checkBoxPwdSec_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword->setEchoMode(QLineEdit::Password); @@ -314,7 +314,7 @@ void DlgConnHidWifiSecTunnelTLS::on_checkBoxPwdSec_stateChanged(int arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -337,7 +337,7 @@ void DlgConnHidWifiSecTunnelTLS::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_leAnonyId_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_leAnonyId_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -360,7 +360,7 @@ void DlgConnHidWifiSecTunnelTLS::on_leAnonyId_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_leDomain_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_leDomain_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -383,7 +383,7 @@ void DlgConnHidWifiSecTunnelTLS::on_leDomain_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_leCaPwd_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_leCaPwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -402,7 +402,7 @@ void DlgConnHidWifiSecTunnelTLS::on_leCaPwd_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -425,7 +425,7 @@ void DlgConnHidWifiSecTunnelTLS::on_leUserName_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::on_lePwd_textEdited(const QString &arg1) +void DlgHideWifiEapTTLS::on_lePwd_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -448,7 +448,7 @@ void DlgConnHidWifiSecTunnelTLS::on_lePwd_textEdited(const QString &arg1) } } -void DlgConnHidWifiSecTunnelTLS::paintEvent(QPaintEvent *event) +void DlgHideWifiEapTTLS::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifisectunneltls.h b/wireless-security/dlghidewifieapttls.h similarity index 89% rename from wireless-security/dlgconnhidwifisectunneltls.h rename to wireless-security/dlghidewifieapttls.h index bbd881a8..d347cc89 100644 --- a/wireless-security/dlgconnhidwifisectunneltls.h +++ b/wireless-security/dlghidewifieapttls.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiSecTunnelTLS; +class DlgHideWifiEapTTLS; } -class DlgConnHidWifiSecTunnelTLS : public QDialog +class DlgHideWifiEapTTLS : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiSecTunnelTLS(int type, QWidget *parent = 0); - ~DlgConnHidWifiSecTunnelTLS(); + explicit DlgHideWifiEapTTLS(int type, QWidget *parent = 0); + ~DlgHideWifiEapTTLS(); protected: void paintEvent(QPaintEvent *event); @@ -67,7 +67,7 @@ private slots: void on_lePwd_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiSecTunnelTLS *ui; + Ui::DlgHideWifiEapTTLS *ui; int WepOrWpa = 0;//0 WEP;1WPA void mousePressEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifisectunneltls.ui b/wireless-security/dlghidewifieapttls.ui similarity index 99% rename from wireless-security/dlgconnhidwifisectunneltls.ui rename to wireless-security/dlghidewifieapttls.ui index c625c2ff..04cc1d2d 100644 --- a/wireless-security/dlgconnhidwifisectunneltls.ui +++ b/wireless-security/dlghidewifieapttls.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiSecTunnelTLS - + DlgHideWifiEapTTLS + 0 diff --git a/wireless-security/dlgconnhidwifileap.cpp b/wireless-security/dlghidewifileap.cpp similarity index 84% rename from wireless-security/dlgconnhidwifileap.cpp rename to wireless-security/dlghidewifileap.cpp index de775022..a44c548d 100644 --- a/wireless-security/dlgconnhidwifileap.cpp +++ b/wireless-security/dlghidewifileap.cpp @@ -17,14 +17,14 @@ */ -#include "ui_dlgconnhidwifileap.h" +#include "ui_dlghidewifileap.h" #include "kylinheadfile.h" #include -DlgConnHidWifiLeap::DlgConnHidWifiLeap(QWidget *parent) : +DlgHideWifiLeap::DlgHideWifiLeap(QWidget *parent) : QDialog(parent), - ui(new Ui::DlgConnHidWifiLeap) + ui(new Ui::DlgHideWifiLeap) { ui->setupUi(this); @@ -76,7 +76,7 @@ DlgConnHidWifiLeap::DlgConnHidWifiLeap(QWidget *parent) : ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiLeap' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiLeap' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -109,12 +109,12 @@ DlgConnHidWifiLeap::DlgConnHidWifiLeap(QWidget *parent) : KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiLeap::~DlgConnHidWifiLeap() +DlgHideWifiLeap::~DlgHideWifiLeap() { delete ui; } -void DlgConnHidWifiLeap::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiLeap::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -122,10 +122,10 @@ void DlgConnHidWifiLeap::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiLeap::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiLeap::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiLeap::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiLeap::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -133,54 +133,54 @@ void DlgConnHidWifiLeap::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifiLeap::changeDialog() +void DlgHideWifiLeap::changeDialog() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { qDebug()<<"it's not need to change dialog"; } else if(ui->cbxSecurity->currentIndex()==5) { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(0); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(0); +// connHidWifiEapTls->show(); } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(1); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(1); +// connHidWifiEapTls->show(); } } -void DlgConnHidWifiLeap::on_btnCancel_clicked() +void DlgHideWifiLeap::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiLeap::on_btnConnect_clicked() +void DlgHideWifiLeap::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiLeap::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiLeap::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword ->setEchoMode(QLineEdit::Password); @@ -189,7 +189,7 @@ void DlgConnHidWifiLeap::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiLeap::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiLeap::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == "" || ui->lePassword->text() == ""){ ui->btnConnect->setEnabled(false); @@ -202,7 +202,7 @@ void DlgConnHidWifiLeap::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiLeap::on_leUserName_textEdited(const QString &arg1) +void DlgHideWifiLeap::on_leUserName_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -215,7 +215,7 @@ void DlgConnHidWifiLeap::on_leUserName_textEdited(const QString &arg1) } } -void DlgConnHidWifiLeap::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiLeap::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == ""){ ui->btnConnect->setEnabled(false); @@ -228,7 +228,7 @@ void DlgConnHidWifiLeap::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiLeap::paintEvent(QPaintEvent *event) +void DlgHideWifiLeap::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifileap.h b/wireless-security/dlghidewifileap.h similarity index 89% rename from wireless-security/dlgconnhidwifileap.h rename to wireless-security/dlghidewifileap.h index 3bec0db4..55b61732 100644 --- a/wireless-security/dlgconnhidwifileap.h +++ b/wireless-security/dlghidewifileap.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiLeap; +class DlgHideWifiLeap; } -class DlgConnHidWifiLeap : public QDialog +class DlgHideWifiLeap : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiLeap(QWidget *parent = 0); - ~DlgConnHidWifiLeap(); + explicit DlgHideWifiLeap(QWidget *parent = 0); + ~DlgHideWifiLeap(); protected: void paintEvent(QPaintEvent *event); @@ -54,7 +54,7 @@ private slots: void on_lePassword_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiLeap *ui; + Ui::DlgHideWifiLeap *ui; void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifileap.ui b/wireless-security/dlghidewifileap.ui similarity index 98% rename from wireless-security/dlgconnhidwifileap.ui rename to wireless-security/dlghidewifileap.ui index b8a5b4bc..865b4e09 100644 --- a/wireless-security/dlgconnhidwifileap.ui +++ b/wireless-security/dlghidewifileap.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiLeap - + DlgHideWifiLeap + 0 diff --git a/wireless-security/dlgconnhidwifiwep.cpp b/wireless-security/dlghidewifiwep.cpp similarity index 85% rename from wireless-security/dlgconnhidwifiwep.cpp rename to wireless-security/dlghidewifiwep.cpp index 200dc619..efe56fc2 100644 --- a/wireless-security/dlgconnhidwifiwep.cpp +++ b/wireless-security/dlghidewifiwep.cpp @@ -17,15 +17,15 @@ */ -#include "ui_dlgconnhidwifiwep.h" +#include "ui_dlghidewifiwep.h" #include "kylinheadfile.h" #include -DlgConnHidWifiWep::DlgConnHidWifiWep(int type, QWidget *parent) : +DlgHideWifiWep::DlgHideWifiWep(int type, QWidget *parent) : WepPwdOrCode(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiWep) + ui(new Ui::DlgHideWifiWep) { ui->setupUi(this); @@ -82,7 +82,7 @@ DlgConnHidWifiWep::DlgConnHidWifiWep(int type, QWidget *parent) : ui->cbxConn->addItem(tr("C_reate…")); //新建... int status = system("nmcli connection show>/tmp/kylin-nm-connshow"); - if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiWep' failed");} + if (status != 0){ syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiWep' failed");} QFile file("/tmp/kylin-nm-connshow"); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ qDebug()<<"Can't open the file!"; @@ -129,12 +129,12 @@ DlgConnHidWifiWep::DlgConnHidWifiWep(int type, QWidget *parent) : KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiWep::~DlgConnHidWifiWep() +DlgHideWifiWep::~DlgHideWifiWep() { delete ui; } -void DlgConnHidWifiWep::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiWep::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -142,10 +142,10 @@ void DlgConnHidWifiWep::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiWep::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiWep::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiWep::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiWep::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -153,17 +153,17 @@ void DlgConnHidWifiWep::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifiWep::changeDialog() +void DlgHideWifiWep::changeDialog() { if(ui->cbxSecurity->currentIndex()==0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); } else if(ui->cbxSecurity->currentIndex()==1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWpa *connHidWifiWpa = new DlgConnHidWifiWpa(0); + DlgHideWifiWpa *connHidWifiWpa = new DlgHideWifiWpa(0); connHidWifiWpa->show(); } else if(ui->cbxSecurity->currentIndex()==2) { if (WepPwdOrCode == 1) { @@ -178,32 +178,32 @@ void DlgConnHidWifiWep::changeDialog() } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else if(ui->cbxSecurity->currentIndex()==5) { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(0); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(0); +// connHidWifiEapTls->show(); } else { // QApplication::setQuitOnLastWindowClosed(false); // this->hide(); -// DlgConnHidWifiSecTls *connHidWifiSecTls = new DlgConnHidWifiSecTls(1); -// connHidWifiSecTls->show(); +// DlgHideWifiEapTls *connHidWifiEapTls = new DlgHideWifiEapTls(1); +// connHidWifiEapTls->show(); } } -void DlgConnHidWifiWep::on_btnCancel_clicked() +void DlgHideWifiWep::on_btnCancel_clicked() { this->close(); } -void DlgConnHidWifiWep::on_btnConnect_clicked() +void DlgHideWifiWep::on_btnConnect_clicked() { this->close(); } -void DlgConnHidWifiWep::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiWep::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->leKey->setEchoMode(QLineEdit::Password); @@ -212,7 +212,7 @@ void DlgConnHidWifiWep::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiWep::on_leKey_textEdited(const QString &arg1) +void DlgHideWifiWep::on_leKey_textEdited(const QString &arg1) { if (ui->leNetName->text() == "" || ui->leKey->text() == ""){ ui->btnConnect->setEnabled(false); @@ -221,7 +221,7 @@ void DlgConnHidWifiWep::on_leKey_textEdited(const QString &arg1) } } -void DlgConnHidWifiWep::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiWep::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == "" || ui->leKey->text() == ""){ ui->btnConnect->setEnabled(false); @@ -230,7 +230,7 @@ void DlgConnHidWifiWep::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiWep::paintEvent(QPaintEvent *event) +void DlgHideWifiWep::paintEvent(QPaintEvent *event) { QStyleOption opt; opt.init(this); diff --git a/wireless-security/dlgconnhidwifiwep.h b/wireless-security/dlghidewifiwep.h similarity index 89% rename from wireless-security/dlgconnhidwifiwep.h rename to wireless-security/dlghidewifiwep.h index bd071acc..72eb226b 100644 --- a/wireless-security/dlgconnhidwifiwep.h +++ b/wireless-security/dlghidewifiwep.h @@ -23,16 +23,16 @@ #include namespace Ui { -class DlgConnHidWifiWep; +class DlgHideWifiWep; } -class DlgConnHidWifiWep : public QDialog +class DlgHideWifiWep : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiWep(int type, QWidget *parent = 0); - ~DlgConnHidWifiWep(); + explicit DlgHideWifiWep(int type, QWidget *parent = 0); + ~DlgHideWifiWep(); protected: void paintEvent(QPaintEvent *event); @@ -52,7 +52,7 @@ private slots: void on_leNetName_textEdited(const QString &arg1); private: - Ui::DlgConnHidWifiWep *ui; + Ui::DlgHideWifiWep *ui; int WepPwdOrCode = 0; //0 WEP password;1 WEP Code Sentence void mousePressEvent(QMouseEvent *event); diff --git a/wireless-security/dlgconnhidwifiwep.ui b/wireless-security/dlghidewifiwep.ui similarity index 98% rename from wireless-security/dlgconnhidwifiwep.ui rename to wireless-security/dlghidewifiwep.ui index baac5c84..903df1ce 100644 --- a/wireless-security/dlgconnhidwifiwep.ui +++ b/wireless-security/dlghidewifiwep.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiWep - + DlgHideWifiWep + 0 diff --git a/wireless-security/dlgconnhidwifiwpa.cpp b/wireless-security/dlghidewifiwpa.cpp similarity index 86% rename from wireless-security/dlgconnhidwifiwpa.cpp rename to wireless-security/dlghidewifiwpa.cpp index 2c67c876..18c49442 100644 --- a/wireless-security/dlgconnhidwifiwpa.cpp +++ b/wireless-security/dlghidewifiwpa.cpp @@ -17,8 +17,8 @@ */ -#include "dlgconnhidwifiwpa.h" -#include "ui_dlgconnhidwifiwpa.h" +#include "dlghidewifiwpa.h" +#include "ui_dlghidewifiwpa.h" #include "kylinheadfile.h" #include "src/backthread.h" #include "src/mainwindow.h" @@ -28,10 +28,10 @@ #include -DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget *parent) : +DlgHideWifiWpa::DlgHideWifiWpa(int type, MainWindow *mainWindow, QWidget *parent) : isUsed(type), QDialog(parent), - ui(new Ui::DlgConnHidWifiWpa) + ui(new Ui::DlgHideWifiWpa) { ui->setupUi(this); @@ -85,7 +85,7 @@ DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget * QString cmd = "nmcli connection show > " + tmpPath; int status = system(cmd.toUtf8().data()); if (status != 0) { - syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgConnHidWifiWpa' failed"); + syslog(LOG_ERR, "execute 'nmcli connection show' in function 'DlgHideWifiWpa' failed"); } QFile file(tmpPath); if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ @@ -136,12 +136,12 @@ DlgConnHidWifiWpa::DlgConnHidWifiWpa(int type, MainWindow *mainWindow, QWidget * KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); } -DlgConnHidWifiWpa::~DlgConnHidWifiWpa() +DlgHideWifiWpa::~DlgHideWifiWpa() { delete ui; } -void DlgConnHidWifiWpa::mousePressEvent(QMouseEvent *event){ +void DlgHideWifiWpa::mousePressEvent(QMouseEvent *event){ if(event->button() == Qt::LeftButton){ this->isPress = true; this->winPos = this->pos(); @@ -149,10 +149,10 @@ void DlgConnHidWifiWpa::mousePressEvent(QMouseEvent *event){ event->accept(); } } -void DlgConnHidWifiWpa::mouseReleaseEvent(QMouseEvent *event){ +void DlgHideWifiWpa::mouseReleaseEvent(QMouseEvent *event){ this->isPress = false; } -void DlgConnHidWifiWpa::mouseMoveEvent(QMouseEvent *event){ +void DlgHideWifiWpa::mouseMoveEvent(QMouseEvent *event){ if(this->isPress){ this->move(this->winPos - (this->dragPos - event->globalPos())); event->accept(); @@ -160,12 +160,12 @@ void DlgConnHidWifiWpa::mouseMoveEvent(QMouseEvent *event){ } //切换到其他Wi-Fi安全类型 -void DlgConnHidWifiWpa::changeDialog() +void DlgHideWifiWpa::changeDialog() { if (ui->cbxSecurity->currentIndex()==0) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0); + DlgHideWifi *connHidWifi = new DlgHideWifi(0); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } else if(ui->cbxSecurity->currentIndex()==1) { @@ -173,38 +173,38 @@ void DlgConnHidWifiWpa::changeDialog() } else if(ui->cbxSecurity->currentIndex()==2) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(1, 0, mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, 0, mw); + connHidWifiEapPeap->show(); } else if(ui->cbxSecurity->currentIndex()==3) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(0); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(0); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==4) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiWep *connHidWifiWep = new DlgConnHidWifiWep(1); + DlgHideWifiWep *connHidWifiWep = new DlgHideWifiWep(1); connHidWifiWep->show(); } else if(ui->cbxSecurity->currentIndex()==5) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiLeap *connHidWifiLeap = new DlgConnHidWifiLeap(); + DlgHideWifiLeap *connHidWifiLeap = new DlgHideWifiLeap(); connHidWifiLeap->show(); } else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(0, 0, mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(0, 0, mw); + connHidWifiEapPeap->show(); } } //同一 Wi-Fi安全类型的窗口变换 -void DlgConnHidWifiWpa::changeWindow() +void DlgHideWifiWpa::changeWindow() { if (ui->cbxConn->currentIndex() == 0){ QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(0, mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(0, mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); }else if (ui->cbxConn->currentIndex() >= 1){ @@ -237,26 +237,26 @@ void DlgConnHidWifiWpa::changeWindow() if (txt.indexOf("wpa-eap") != -1) { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifiSecPeap *connHidWifiSecPeap = new DlgConnHidWifiSecPeap(1, ui->cbxConn->currentIndex(), mw); - connHidWifiSecPeap->show(); + DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, ui->cbxConn->currentIndex(), mw); + connHidWifiEapPeap->show(); } }else { QApplication::setQuitOnLastWindowClosed(false); this->hide(); - DlgConnHidWifi *connHidWifi = new DlgConnHidWifi(ui->cbxConn->currentIndex(), mw); + DlgHideWifi *connHidWifi = new DlgHideWifi(ui->cbxConn->currentIndex(), mw); connHidWifi->show(); connect(connHidWifi, SIGNAL(reSetWifiList() ), mw, SLOT(on_btnWifiList_clicked()) ); } } } -void DlgConnHidWifiWpa::on_btnCancel_clicked() +void DlgHideWifiWpa::on_btnCancel_clicked() { //this->close(); this->hide(); } -void DlgConnHidWifiWpa::on_btnConnect_clicked() +void DlgHideWifiWpa::on_btnConnect_clicked() { QThread *t = new QThread(); connect(t, SIGNAL(finished()), t, SLOT(deleteLater())); @@ -301,7 +301,7 @@ void DlgConnHidWifiWpa::on_btnConnect_clicked() this->hide(); } -void DlgConnHidWifiWpa::on_checkBoxPwd_stateChanged(int arg1) +void DlgHideWifiWpa::on_checkBoxPwd_stateChanged(int arg1) { if (arg1 == 0) { ui->lePassword ->setEchoMode(QLineEdit::Password); @@ -310,7 +310,7 @@ void DlgConnHidWifiWpa::on_checkBoxPwd_stateChanged(int arg1) } } -void DlgConnHidWifiWpa::on_leNetName_textEdited(const QString &arg1) +void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1) { if (ui->leNetName->text() == "" || ui->lePassword->text() == ""){ ui->btnConnect->setEnabled(false); @@ -319,7 +319,7 @@ void DlgConnHidWifiWpa::on_leNetName_textEdited(const QString &arg1) } } -void DlgConnHidWifiWpa::on_lePassword_textEdited(const QString &arg1) +void DlgHideWifiWpa::on_lePassword_textEdited(const QString &arg1) { if (ui->leNetName->text() == "" || ui->lePassword->text() == ""){ ui->btnConnect->setEnabled(false); @@ -328,12 +328,12 @@ void DlgConnHidWifiWpa::on_lePassword_textEdited(const QString &arg1) } } -void DlgConnHidWifiWpa::slotStartLoading() +void DlgHideWifiWpa::slotStartLoading() { mw->startLoading(); } -void DlgConnHidWifiWpa::on_execSecConn() +void DlgHideWifiWpa::on_execSecConn() { QString str = "nmcli device wifi connect " + strWifiname + " password " + strWifiPassword; int status = system(str.toUtf8().data()); @@ -342,14 +342,14 @@ void DlgConnHidWifiWpa::on_execSecConn() QTimer::singleShot(3*1000, this, SLOT(emitSignal() )); } -void DlgConnHidWifiWpa::emitSignal() +void DlgHideWifiWpa::emitSignal() { emit reSetWifiList(); mw->stopLoading(); emit this->stopSignal(); } -void DlgConnHidWifiWpa::paintEvent(QPaintEvent *event) +void DlgHideWifiWpa::paintEvent(QPaintEvent *event) { KylinDBus mkylindbus; double trans = mkylindbus.getTransparentData(); diff --git a/wireless-security/dlgconnhidwifiwpa.h b/wireless-security/dlghidewifiwpa.h similarity index 90% rename from wireless-security/dlgconnhidwifiwpa.h rename to wireless-security/dlghidewifiwpa.h index f973e9cb..830e53a3 100644 --- a/wireless-security/dlgconnhidwifiwpa.h +++ b/wireless-security/dlghidewifiwpa.h @@ -26,16 +26,16 @@ class MainWindow; namespace Ui { -class DlgConnHidWifiWpa; +class DlgHideWifiWpa; } -class DlgConnHidWifiWpa : public QDialog +class DlgHideWifiWpa : public QDialog { Q_OBJECT public: - explicit DlgConnHidWifiWpa(int type, MainWindow *mw = 0, QWidget *parent = 0); - ~DlgConnHidWifiWpa(); + explicit DlgHideWifiWpa(int type, MainWindow *mw = 0, QWidget *parent = 0); + ~DlgHideWifiWpa(); protected: void paintEvent(QPaintEvent *event); @@ -65,7 +65,7 @@ signals: void stopSignal(); private: - Ui::DlgConnHidWifiWpa *ui; + Ui::DlgHideWifiWpa *ui; int isUsed;//=0 current wifi not used before; >=1 used MainWindow *mw; QString strWifiname; diff --git a/wireless-security/dlgconnhidwifiwpa.ui b/wireless-security/dlghidewifiwpa.ui similarity index 98% rename from wireless-security/dlgconnhidwifiwpa.ui rename to wireless-security/dlghidewifiwpa.ui index 093ab22c..8297214b 100644 --- a/wireless-security/dlgconnhidwifiwpa.ui +++ b/wireless-security/dlghidewifiwpa.ui @@ -1,7 +1,7 @@ - DlgConnHidWifiWpa - + DlgHideWifiWpa + 0 diff --git a/wireless-security/kylinheadfile.h b/wireless-security/kylinheadfile.h index 14ff434e..622b03cf 100644 --- a/wireless-security/kylinheadfile.h +++ b/wireless-security/kylinheadfile.h @@ -19,16 +19,16 @@ #ifndef KYLINHEADFILE_H #define KYLINHEADFILE_H -#include "dlgconnhidwifi.h" -#include "dlgconnhidwifileap.h" -#include "dlgconnhidwifisecfast.h" -#include "dlgconnhidwifisecleap.h" -#include "dlgconnhidwifisecpeap.h" -#include "dlgconnhidwifisecpwd.h" -#include "dlgconnhidwifisectls.h" -#include "dlgconnhidwifisectunneltls.h" -#include "dlgconnhidwifiwep.h" -#include "dlgconnhidwifiwpa.h" +#include "dlghidewifi.h" +#include "dlghidewifileap.h" +#include "dlghidewifieapfast.h" +#include "dlghidewifieapleap.h" +#include "dlghidewifieappeap.h" +#include "dlghidewifieappwd.h" +#include "dlghidewifieaptls.h" +#include "dlghidewifieapttls.h" +#include "dlghidewifiwep.h" +#include "dlghidewifiwpa.h" #include #include