Add wifi6 and wifi6+ icons

This commit is contained in:
chenlelin 2021-05-08 17:31:36 +08:00
parent f6aae7d58c
commit 71a1d1d949
37 changed files with 60 additions and 22 deletions

View File

@ -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>

BIN
res/hw/wifi-full-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
res/hw/wifi-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

BIN
res/hw/wifi-high-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

BIN
res/hw/wifi-high.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

BIN
res/hw/wifi-low-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

BIN
res/hw/wifi-low.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
res/hw/wifi-medium-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

BIN
res/hw/wifi-medium.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

BIN
res/hw/wifi-none-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

BIN
res/hw/wifi-none.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

BIN
res/hw/wifi6+-full-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

BIN
res/hw/wifi6+-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
res/hw/wifi6+-high-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

BIN
res/hw/wifi6+-high.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

BIN
res/hw/wifi6+-low-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

BIN
res/hw/wifi6+-low.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

BIN
res/hw/wifi6+-medium.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

BIN
res/hw/wifi6+-none-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

BIN
res/hw/wifi6+-none.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

BIN
res/hw/wifi6-full-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
res/hw/wifi6-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

BIN
res/hw/wifi6-high-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

BIN
res/hw/wifi6-high.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
res/hw/wifi6-low-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

BIN
res/hw/wifi6-low.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

BIN
res/hw/wifi6-medium-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

BIN
res/hw/wifi6-medium.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

BIN
res/hw/wifi6-none-pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

BIN
res/hw/wifi6-none.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

View File

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 783 B

View File

@ -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();

View File

@ -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+";
}

View File

@ -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;

View File

@ -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;

View File

@ -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);