Merge branch 'master' into 0507-dev
32
nmqrc.qrc
|
@ -88,7 +88,6 @@
|
|||
<file>res/w/wifi6-medium-pwd.png</file>
|
||||
<file>res/w/wifi6-medium.png</file>
|
||||
<file>res/w/wifi6-none.png</file>
|
||||
<file>res/w/wifi6-null-pwd.png</file>
|
||||
<file>res/w/wifi6+-none.png</file>
|
||||
<file>res/w/wifi6+-meidum-pwd.png</file>
|
||||
<file>res/w/wifi6+-medium.png</file>
|
||||
|
@ -99,5 +98,36 @@
|
|||
<file>res/w/wifi6+-high-pwd.png</file>
|
||||
<file>res/w/wifi6+-full.png</file>
|
||||
<file>res/w/wifi6+-full-pwd.png</file>
|
||||
<file>res/w/wifi6-none-pwd.png</file>
|
||||
<file>res/hw/wifi-full-pwd.png</file>
|
||||
<file>res/hw/wifi-full.png</file>
|
||||
<file>res/hw/wifi-high-pwd.png</file>
|
||||
<file>res/hw/wifi-high.png</file>
|
||||
<file>res/hw/wifi-low-pwd.png</file>
|
||||
<file>res/hw/wifi-low.png</file>
|
||||
<file>res/hw/wifi-medium-pwd.png</file>
|
||||
<file>res/hw/wifi-medium.png</file>
|
||||
<file>res/hw/wifi-none-pwd.png</file>
|
||||
<file>res/hw/wifi-none.png</file>
|
||||
<file>res/hw/wifi6-full-pwd.png</file>
|
||||
<file>res/hw/wifi6-full.png</file>
|
||||
<file>res/hw/wifi6-high-pwd.png</file>
|
||||
<file>res/hw/wifi6-high.png</file>
|
||||
<file>res/hw/wifi6-low-pwd.png</file>
|
||||
<file>res/hw/wifi6-low.png</file>
|
||||
<file>res/hw/wifi6-medium-pwd.png</file>
|
||||
<file>res/hw/wifi6-medium.png</file>
|
||||
<file>res/hw/wifi6-none-pwd.png</file>
|
||||
<file>res/hw/wifi6-none.png</file>
|
||||
<file>res/hw/wifi6+-full-pwd.png</file>
|
||||
<file>res/hw/wifi6+-full.png</file>
|
||||
<file>res/hw/wifi6+-high-pwd.png</file>
|
||||
<file>res/hw/wifi6+-high.png</file>
|
||||
<file>res/hw/wifi6+-low-pwd.png</file>
|
||||
<file>res/hw/wifi6+-low.png</file>
|
||||
<file>res/hw/wifi6+-medium-pwd.png</file>
|
||||
<file>res/hw/wifi6+-medium.png</file>
|
||||
<file>res/hw/wifi6+-none-pwd.png</file>
|
||||
<file>res/hw/wifi6+-none.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 557 B |
After Width: | Height: | Size: 682 B |
After Width: | Height: | Size: 605 B |
After Width: | Height: | Size: 651 B |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 663 B |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 781 B |
After Width: | Height: | Size: 705 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 704 B |
After Width: | Height: | Size: 781 B |
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 765 B |
After Width: | Height: | Size: 690 B |
After Width: | Height: | Size: 762 B |
After Width: | Height: | Size: 690 B |
After Width: | Height: | Size: 803 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 806 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 742 B |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 783 B |
|
@ -364,8 +364,7 @@ void BackThread::execConnRememberedHiddenWifi(QString wifiName)
|
|||
QProcess shellProcess;
|
||||
shellProcess.start("nmcli -f ssid device wifi");
|
||||
shellProcess.waitForFinished(3000); // 等待最多3s
|
||||
if (shellProcess.exitCode() == 0)
|
||||
{
|
||||
if (shellProcess.exitCode() == 0) {
|
||||
QString shellOutput = shellProcess.readAllStandardOutput();
|
||||
QStringList wlist = shellOutput.split("\n");
|
||||
bool is_hidden = true;
|
||||
|
@ -377,7 +376,11 @@ void BackThread::execConnRememberedHiddenWifi(QString wifiName)
|
|||
if (! is_hidden) {
|
||||
QString cmd = "nmcli connection up '" + wifiName + "'";
|
||||
int res = Utils::m_system(cmd.toUtf8().data());
|
||||
emit connDone(res);
|
||||
if (res == 0) {
|
||||
emit connDone(6);
|
||||
} else {
|
||||
emit connDone(res);
|
||||
}
|
||||
} else {
|
||||
//已保存的wifi没有在wifi列表找到(隐藏wifi保存后也会出现在wifi列表),则当前区域无法连接此wifi
|
||||
syslog(LOG_DEBUG, "Choosen wifi can not be sacnned in finishedProcess() in dlghidewifiwpa.cpp 377.");
|
||||
|
|
|
@ -694,7 +694,6 @@ void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason)
|
|||
onBtnNetListClicked(0);
|
||||
}
|
||||
|
||||
qDebug() << "00000000000000000 " <<is_connect_hide_wifi;
|
||||
if (!is_init_wifi_list && !is_connect_hide_wifi && is_stop_check_net_state==0) {
|
||||
is_stop_check_net_state = 1;
|
||||
if (is_btnWifiList_clicked == 1) {
|
||||
|
@ -1381,7 +1380,7 @@ void MainWindow::on_btnWifiList_clicked()
|
|||
|
||||
// 当前连接的wifi
|
||||
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
|
||||
ccf->setName(tr("Not connected"), "--", "--", "--");//"当前未连接任何 Wifi"
|
||||
ccf->setWifiName(tr("Not connected"), "--", "--", "--", isHuaWeiPC);//"当前未连接任何 Wifi"
|
||||
ccf->setSignal("0", "--");
|
||||
ccf->setRate("0");
|
||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||
|
@ -1491,7 +1490,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
|||
// 若当前没有任何一个有线网连接,设置有线列表顶部的item状态为未连接
|
||||
if (!hasCurrentLanConnected) {
|
||||
OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
||||
ccf->setName(tr("Not connected"), tr("Not connected"), "--", "--");//"当前未连接任何 以太网"
|
||||
ccf->setLanName(tr("Not connected"), tr("Not connected"), "--", "--");//"当前未连接任何 以太网"
|
||||
ccf->setIcon(false);
|
||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||
ccf->isConnected = false;
|
||||
|
@ -1579,7 +1578,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
|||
OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
||||
connect(ccfAct, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneTopLanFormSelected(QString, QString)));
|
||||
connect(ccfAct, SIGNAL(disconnActiveLan()), this, SLOT(activeLanDisconn()));
|
||||
ccfAct->setName(nname, ltype, nuuid, mIfName);//第二个参数本来是strLanName,但目前不需要翻译
|
||||
ccfAct->setLanName(nname, ltype, nuuid, mIfName);//第二个参数本来是strLanName,但目前不需要翻译
|
||||
ccfAct->setIcon(true);
|
||||
ccfAct->setLanInfo(objKyDBus->dbusActiveLanIpv4, objKyDBus->dbusActiveLanIpv6, mwBandWidth, macInterface);
|
||||
ccfAct->isConnected = true;
|
||||
|
@ -1644,7 +1643,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
|||
|
||||
OneLancForm *ocf = new OneLancForm(lanListWidget, this, confForm, ksnm);
|
||||
connect(ocf, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneLanFormSelected(QString, QString)));
|
||||
ocf->setName(nname, ltype, nuuid, mIfName);
|
||||
ocf->setLanName(nname, ltype, nuuid, mIfName);
|
||||
ocf->setIcon(true);
|
||||
ocf->setLine(true);
|
||||
ocf->setLanInfo(objKyDBus->dbusLanIpv4, objKyDBus->dbusLanIpv6, tr("Disconnected"), macInterface);
|
||||
|
@ -2148,7 +2147,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
|||
// 根据当前连接的wifi 设置OneConnForm
|
||||
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
|
||||
if (actWifiName == "--" || wifiActState == 1 || actWifiBssidList.at(0) == "--") {
|
||||
ccf->setName(tr("Not connected"), "--", "--", "--");//"当前未连接任何 Wifi"
|
||||
ccf->setWifiName(tr("Not connected"), "--", "--", "--", isHuaWeiPC);//"当前未连接任何 Wifi"
|
||||
ccf->setSignal("0", "--");
|
||||
activeWifiSignalLv = 0;
|
||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||
|
@ -2310,7 +2309,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
|||
QString m_name;
|
||||
if (path != "" && !path.isEmpty()) m_name= this->objKyDBus->getWifiSsid(QString("/org/freedesktop/NetworkManager/AccessPoint/%1").arg(path.mid(path.lastIndexOf("/") + 1)));
|
||||
if (m_name.isEmpty() || m_name == "") {
|
||||
ccf->setName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
ccf->setWifiName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
if (!canReconnectWifiList.contains(wname)) {
|
||||
canReconnectWifiList.append(wname);
|
||||
} else {
|
||||
|
@ -2318,7 +2317,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
|||
canReconnectWifiList.append(wname);
|
||||
}
|
||||
} else {
|
||||
ccf->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
ccf->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
if (!canReconnectWifiList.contains(m_name)) {
|
||||
canReconnectWifiList.append(m_name);
|
||||
} else {
|
||||
|
@ -2359,14 +2358,13 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
|||
|
||||
OneConnForm *ocf = new OneConnForm(wifiListWidget, this, confForm, ksnm);
|
||||
connect(ocf, SIGNAL(selectedOneWifiForm(QString,int)), this, SLOT(oneWifiFormSelected(QString,int)));
|
||||
// ocf->setName(wname, wbssid, "--");
|
||||
QString path = line.mid(indexPath).trimmed();
|
||||
QString m_name;
|
||||
if (path != "" && !path.isEmpty()) m_name= this->objKyDBus->getWifiSsid(QString("/org/freedesktop/NetworkManager/AccessPoint/%1").arg(path.mid(path.lastIndexOf("/") + 1)));
|
||||
if (m_name.isEmpty() || m_name == "") {
|
||||
ocf->setName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
ocf->setWifiName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
} else {
|
||||
ocf->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
ocf->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
}
|
||||
//ocf->setRate(wrate);
|
||||
ocf->setLine(true);
|
||||
|
@ -2592,9 +2590,9 @@ void MainWindow::updateWifiListDone(QStringList slist)
|
|||
QString m_name;
|
||||
if (path != "" && !path.isEmpty()) m_name= this->objKyDBus->getWifiSsid(QString("/org/freedesktop/NetworkManager/AccessPoint/%1").arg(path.mid(path.lastIndexOf("/") + 1)));
|
||||
if (m_name.isEmpty() || m_name == "") {
|
||||
addItem->setName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
addItem->setWifiName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
} else {
|
||||
addItem->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
||||
addItem->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||
}
|
||||
//addItem->setRate(wrate);
|
||||
addItem->setLine(false);
|
||||
|
@ -3179,7 +3177,7 @@ void MainWindow::disNetDone()
|
|||
|
||||
// 当前连接的lan
|
||||
OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
||||
ccf->setName(tr("Not connected"), tr("Not connected"), "--", "--");//"当前未连接任何 以太网"
|
||||
ccf->setLanName(tr("Not connected"), tr("Not connected"), "--", "--");//"当前未连接任何 以太网"
|
||||
ccf->setIcon(false);
|
||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||
ccf->isConnected = false;
|
||||
|
@ -3252,7 +3250,7 @@ void MainWindow::disWifiDoneChangeUI()
|
|||
OneConnForm *ocf = wifiList.at(i);
|
||||
if (ocf->isActive == true) {
|
||||
ocf->setSelected(false, false);
|
||||
ocf->setName(tr("Not connected"), "--", "--", "--");//"当前未连接任何 Wifi"
|
||||
ocf->setWifiName(tr("Not connected"), "--", "--", "--", isHuaWeiPC);//"当前未连接任何 Wifi"
|
||||
ocf->setSignal("0", "--");
|
||||
ocf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||
ocf->lbFreq->hide();
|
||||
|
|
|
@ -402,7 +402,7 @@ void OneConnForm::setConnedString(bool showLable, QString str, QString str1)
|
|||
}
|
||||
}
|
||||
|
||||
void OneConnForm::setName(QString name, QString bssid, QString uuid, QString ifname)
|
||||
void OneConnForm::setWifiName(QString name, QString bssid, QString uuid, QString ifname, bool isHW)
|
||||
{
|
||||
QFontMetrics fontMetrics(lbNameText->font());
|
||||
QString showname = fontMetrics.elidedText(name, Qt::ElideRight, 200);
|
||||
|
@ -411,6 +411,7 @@ void OneConnForm::setName(QString name, QString bssid, QString uuid, QString ifn
|
|||
wifiBSsid = bssid;
|
||||
wifiUuid = uuid;
|
||||
wifiIfName = ifname;
|
||||
isHuaweiPC = isHW;
|
||||
}
|
||||
|
||||
QString OneConnForm::getName()
|
||||
|
@ -443,10 +444,17 @@ void OneConnForm::setSignal(QString lv, QString secu, QString category)
|
|||
} else {
|
||||
hasPwd = true;
|
||||
}
|
||||
QString signalStyle = "QLabel{border-radius:0px;background:url(:/res/w/wifi";
|
||||
if("1" == category){
|
||||
|
||||
QString signalStyle;
|
||||
if (isHuaweiPC) {
|
||||
signalStyle = "QLabel{border-radius:0px;background:url(:/res/hw/wifi";
|
||||
} else {
|
||||
signalStyle = "QLabel{border-radius:0px;background:url(:/res/w/wifi";
|
||||
}
|
||||
|
||||
if ("1" == category) {
|
||||
signalStyle += "6";
|
||||
}else if("2" == category){
|
||||
} else if ("2" == category) {
|
||||
signalStyle += "6+";
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
// category:1->normal protocol 1->wifi 6 2->wifi 6+
|
||||
void setSignal(QString lv, QString secu,QString category = "0");
|
||||
int getSignal();
|
||||
void setName(QString name, QString bssid, QString uuid, QString isname);
|
||||
void setWifiName(QString name, QString bssid, QString uuid, QString isname, bool isHW);
|
||||
QString getName();
|
||||
void setRate(QString rate);
|
||||
void setLine(bool isShow);
|
||||
|
@ -92,6 +92,7 @@ public:
|
|||
QString connType;
|
||||
QString wifiSecu;
|
||||
QLabel * lbFreq = nullptr;
|
||||
bool isHuaweiPC;
|
||||
bool isSelected;
|
||||
bool isActive;
|
||||
bool isConnected;
|
||||
|
|
|
@ -223,7 +223,7 @@ void OneLancForm::setTopItem(bool isSelected)
|
|||
}
|
||||
|
||||
//设置网络名称
|
||||
void OneLancForm::setName(QString ssid, QString transSsid, QString uuid, QString interface)
|
||||
void OneLancForm::setLanName(QString ssid, QString transSsid, QString uuid, QString interface)
|
||||
{
|
||||
//处理过长SSID
|
||||
QString displayName;
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
explicit OneLancForm(QWidget *parent = 0, MainWindow *mw = 0, ConfForm *confForm = 0, KSimpleNM *ksnm = 0);
|
||||
~OneLancForm();
|
||||
|
||||
void setName(QString ssid, QString transSsid, QString uuid, QString interface);
|
||||
void setLanName(QString ssid, QString transSsid, QString uuid, QString interface);
|
||||
void setIcon(bool isOn);
|
||||
void setLine(bool isShow);
|
||||
void setLanInfo(QString str1, QString str2, QString str3, QString str4);
|
||||
|
|