diff --git a/nmqrc.qrc b/nmqrc.qrc
index a5d52211..8612698c 100644
--- a/nmqrc.qrc
+++ b/nmqrc.qrc
@@ -88,7 +88,6 @@
res/w/wifi6-medium-pwd.png
res/w/wifi6-medium.png
res/w/wifi6-none.png
- res/w/wifi6-null-pwd.png
res/w/wifi6+-none.png
res/w/wifi6+-meidum-pwd.png
res/w/wifi6+-medium.png
@@ -99,5 +98,36 @@
res/w/wifi6+-high-pwd.png
res/w/wifi6+-full.png
res/w/wifi6+-full-pwd.png
+ res/w/wifi6-none-pwd.png
+ res/hw/wifi-full-pwd.png
+ res/hw/wifi-full.png
+ res/hw/wifi-high-pwd.png
+ res/hw/wifi-high.png
+ res/hw/wifi-low-pwd.png
+ res/hw/wifi-low.png
+ res/hw/wifi-medium-pwd.png
+ res/hw/wifi-medium.png
+ res/hw/wifi-none-pwd.png
+ res/hw/wifi-none.png
+ res/hw/wifi6-full-pwd.png
+ res/hw/wifi6-full.png
+ res/hw/wifi6-high-pwd.png
+ res/hw/wifi6-high.png
+ res/hw/wifi6-low-pwd.png
+ res/hw/wifi6-low.png
+ res/hw/wifi6-medium-pwd.png
+ res/hw/wifi6-medium.png
+ res/hw/wifi6-none-pwd.png
+ res/hw/wifi6-none.png
+ res/hw/wifi6+-full-pwd.png
+ res/hw/wifi6+-full.png
+ res/hw/wifi6+-high-pwd.png
+ res/hw/wifi6+-high.png
+ res/hw/wifi6+-low-pwd.png
+ res/hw/wifi6+-low.png
+ res/hw/wifi6+-medium-pwd.png
+ res/hw/wifi6+-medium.png
+ res/hw/wifi6+-none-pwd.png
+ res/hw/wifi6+-none.png
diff --git a/res/hw/wifi-full-pwd.png b/res/hw/wifi-full-pwd.png
new file mode 100644
index 00000000..065f7f8e
Binary files /dev/null and b/res/hw/wifi-full-pwd.png differ
diff --git a/res/hw/wifi-full.png b/res/hw/wifi-full.png
new file mode 100644
index 00000000..48024d04
Binary files /dev/null and b/res/hw/wifi-full.png differ
diff --git a/res/hw/wifi-high-pwd.png b/res/hw/wifi-high-pwd.png
new file mode 100644
index 00000000..81a4d11e
Binary files /dev/null and b/res/hw/wifi-high-pwd.png differ
diff --git a/res/hw/wifi-high.png b/res/hw/wifi-high.png
new file mode 100644
index 00000000..3ec53052
Binary files /dev/null and b/res/hw/wifi-high.png differ
diff --git a/res/hw/wifi-low-pwd.png b/res/hw/wifi-low-pwd.png
new file mode 100644
index 00000000..784ad1b2
Binary files /dev/null and b/res/hw/wifi-low-pwd.png differ
diff --git a/res/hw/wifi-low.png b/res/hw/wifi-low.png
new file mode 100644
index 00000000..3fe8bded
Binary files /dev/null and b/res/hw/wifi-low.png differ
diff --git a/res/hw/wifi-medium-pwd.png b/res/hw/wifi-medium-pwd.png
new file mode 100644
index 00000000..221fdbc1
Binary files /dev/null and b/res/hw/wifi-medium-pwd.png differ
diff --git a/res/hw/wifi-medium.png b/res/hw/wifi-medium.png
new file mode 100644
index 00000000..3b1683f3
Binary files /dev/null and b/res/hw/wifi-medium.png differ
diff --git a/res/hw/wifi-none-pwd.png b/res/hw/wifi-none-pwd.png
new file mode 100644
index 00000000..109f19ee
Binary files /dev/null and b/res/hw/wifi-none-pwd.png differ
diff --git a/res/hw/wifi-none.png b/res/hw/wifi-none.png
new file mode 100644
index 00000000..0a3bdd14
Binary files /dev/null and b/res/hw/wifi-none.png differ
diff --git a/res/hw/wifi6+-full-pwd.png b/res/hw/wifi6+-full-pwd.png
new file mode 100644
index 00000000..b2936c6f
Binary files /dev/null and b/res/hw/wifi6+-full-pwd.png differ
diff --git a/res/hw/wifi6+-full.png b/res/hw/wifi6+-full.png
new file mode 100644
index 00000000..faf2297d
Binary files /dev/null and b/res/hw/wifi6+-full.png differ
diff --git a/res/hw/wifi6+-high-pwd.png b/res/hw/wifi6+-high-pwd.png
new file mode 100644
index 00000000..684d51f6
Binary files /dev/null and b/res/hw/wifi6+-high-pwd.png differ
diff --git a/res/hw/wifi6+-high.png b/res/hw/wifi6+-high.png
new file mode 100644
index 00000000..0ffb9ff9
Binary files /dev/null and b/res/hw/wifi6+-high.png differ
diff --git a/res/hw/wifi6+-low-pwd.png b/res/hw/wifi6+-low-pwd.png
new file mode 100644
index 00000000..c2b8ece5
Binary files /dev/null and b/res/hw/wifi6+-low-pwd.png differ
diff --git a/res/hw/wifi6+-low.png b/res/hw/wifi6+-low.png
new file mode 100644
index 00000000..134cf766
Binary files /dev/null and b/res/hw/wifi6+-low.png differ
diff --git a/res/hw/wifi6+-medium-pwd.png b/res/hw/wifi6+-medium-pwd.png
new file mode 100644
index 00000000..4e1c908f
Binary files /dev/null and b/res/hw/wifi6+-medium-pwd.png differ
diff --git a/res/hw/wifi6+-medium.png b/res/hw/wifi6+-medium.png
new file mode 100644
index 00000000..bb9d50dd
Binary files /dev/null and b/res/hw/wifi6+-medium.png differ
diff --git a/res/hw/wifi6+-none-pwd.png b/res/hw/wifi6+-none-pwd.png
new file mode 100644
index 00000000..640ec001
Binary files /dev/null and b/res/hw/wifi6+-none-pwd.png differ
diff --git a/res/hw/wifi6+-none.png b/res/hw/wifi6+-none.png
new file mode 100644
index 00000000..fa20a4c2
Binary files /dev/null and b/res/hw/wifi6+-none.png differ
diff --git a/res/hw/wifi6-full-pwd.png b/res/hw/wifi6-full-pwd.png
new file mode 100644
index 00000000..427b721e
Binary files /dev/null and b/res/hw/wifi6-full-pwd.png differ
diff --git a/res/hw/wifi6-full.png b/res/hw/wifi6-full.png
new file mode 100644
index 00000000..a4bcdcea
Binary files /dev/null and b/res/hw/wifi6-full.png differ
diff --git a/res/hw/wifi6-high-pwd.png b/res/hw/wifi6-high-pwd.png
new file mode 100644
index 00000000..9458bb97
Binary files /dev/null and b/res/hw/wifi6-high-pwd.png differ
diff --git a/res/hw/wifi6-high.png b/res/hw/wifi6-high.png
new file mode 100644
index 00000000..8280cd0c
Binary files /dev/null and b/res/hw/wifi6-high.png differ
diff --git a/res/hw/wifi6-low-pwd.png b/res/hw/wifi6-low-pwd.png
new file mode 100644
index 00000000..9b647b41
Binary files /dev/null and b/res/hw/wifi6-low-pwd.png differ
diff --git a/res/hw/wifi6-low.png b/res/hw/wifi6-low.png
new file mode 100644
index 00000000..5217b8dc
Binary files /dev/null and b/res/hw/wifi6-low.png differ
diff --git a/res/hw/wifi6-medium-pwd.png b/res/hw/wifi6-medium-pwd.png
new file mode 100644
index 00000000..c157f572
Binary files /dev/null and b/res/hw/wifi6-medium-pwd.png differ
diff --git a/res/hw/wifi6-medium.png b/res/hw/wifi6-medium.png
new file mode 100644
index 00000000..a44f85a7
Binary files /dev/null and b/res/hw/wifi6-medium.png differ
diff --git a/res/hw/wifi6-none-pwd.png b/res/hw/wifi6-none-pwd.png
new file mode 100644
index 00000000..6c2973e5
Binary files /dev/null and b/res/hw/wifi6-none-pwd.png differ
diff --git a/res/hw/wifi6-none.png b/res/hw/wifi6-none.png
new file mode 100644
index 00000000..7d41e1ce
Binary files /dev/null and b/res/hw/wifi6-none.png differ
diff --git a/res/w/wifi6-null-pwd.png b/res/w/wifi6-none-pwd.png
similarity index 100%
rename from res/w/wifi6-null-pwd.png
rename to res/w/wifi6-none-pwd.png
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 026579ef..304ee068 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1380,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"), "");//"未连接"
@@ -1490,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;
@@ -1578,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;
@@ -1643,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);
@@ -2146,7 +2146,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"), "");//"未连接"
@@ -2307,7 +2307,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 {
@@ -2315,7 +2315,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 {
@@ -2347,14 +2347,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);
@@ -2562,9 +2561,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);
@@ -3143,7 +3142,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;
@@ -3216,7 +3215,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();
diff --git a/src/oneconnform.cpp b/src/oneconnform.cpp
index 4bc41e4e..792540ca 100644
--- a/src/oneconnform.cpp
+++ b/src/oneconnform.cpp
@@ -401,7 +401,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);
@@ -410,6 +410,7 @@ void OneConnForm::setName(QString name, QString bssid, QString uuid, QString ifn
wifiBSsid = bssid;
wifiUuid = uuid;
wifiIfName = ifname;
+ isHuaweiPC = isHW;
}
QString OneConnForm::getName()
@@ -441,10 +442,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+";
}
diff --git a/src/oneconnform.h b/src/oneconnform.h
index e86a2acb..40e9b020 100644
--- a/src/oneconnform.h
+++ b/src/oneconnform.h
@@ -67,7 +67,7 @@ public:
// category:1->normal protocol 1->wifi 6 2->wifi 6+
void setSignal(QString lv, QString secu,QString category = "0");
- 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);
@@ -91,6 +91,7 @@ public:
QString connType;
QString wifiSecu;
QLabel * lbFreq = nullptr;
+ bool isHuaweiPC;
bool isSelected;
bool isActive;
bool isConnected;
diff --git a/src/onelancform.cpp b/src/onelancform.cpp
index 9e366f68..1fe6b8b3 100644
--- a/src/onelancform.cpp
+++ b/src/onelancform.cpp
@@ -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;
diff --git a/src/onelancform.h b/src/onelancform.h
index c35516a7..e39b84b0 100644
--- a/src/onelancform.h
+++ b/src/onelancform.h
@@ -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);