Add wifi6 and wifi6+ icons
32
nmqrc.qrc
|
@ -88,7 +88,6 @@
|
||||||
<file>res/w/wifi6-medium-pwd.png</file>
|
<file>res/w/wifi6-medium-pwd.png</file>
|
||||||
<file>res/w/wifi6-medium.png</file>
|
<file>res/w/wifi6-medium.png</file>
|
||||||
<file>res/w/wifi6-none.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+-none.png</file>
|
||||||
<file>res/w/wifi6+-meidum-pwd.png</file>
|
<file>res/w/wifi6+-meidum-pwd.png</file>
|
||||||
<file>res/w/wifi6+-medium.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+-high-pwd.png</file>
|
||||||
<file>res/w/wifi6+-full.png</file>
|
<file>res/w/wifi6+-full.png</file>
|
||||||
<file>res/w/wifi6+-full-pwd.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>
|
</qresource>
|
||||||
</RCC>
|
</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 |
|
@ -1380,7 +1380,7 @@ void MainWindow::on_btnWifiList_clicked()
|
||||||
|
|
||||||
// 当前连接的wifi
|
// 当前连接的wifi
|
||||||
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
|
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->setSignal("0", "--");
|
||||||
ccf->setRate("0");
|
ccf->setRate("0");
|
||||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||||
|
@ -1490,7 +1490,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
||||||
// 若当前没有任何一个有线网连接,设置有线列表顶部的item状态为未连接
|
// 若当前没有任何一个有线网连接,设置有线列表顶部的item状态为未连接
|
||||||
if (!hasCurrentLanConnected) {
|
if (!hasCurrentLanConnected) {
|
||||||
OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
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->setIcon(false);
|
||||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||||
ccf->isConnected = false;
|
ccf->isConnected = false;
|
||||||
|
@ -1578,7 +1578,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
||||||
OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
||||||
connect(ccfAct, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneTopLanFormSelected(QString, QString)));
|
connect(ccfAct, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneTopLanFormSelected(QString, QString)));
|
||||||
connect(ccfAct, SIGNAL(disconnActiveLan()), this, SLOT(activeLanDisconn()));
|
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->setIcon(true);
|
||||||
ccfAct->setLanInfo(objKyDBus->dbusActiveLanIpv4, objKyDBus->dbusActiveLanIpv6, mwBandWidth, macInterface);
|
ccfAct->setLanInfo(objKyDBus->dbusActiveLanIpv4, objKyDBus->dbusActiveLanIpv6, mwBandWidth, macInterface);
|
||||||
ccfAct->isConnected = true;
|
ccfAct->isConnected = true;
|
||||||
|
@ -1643,7 +1643,7 @@ void MainWindow::getLanListDone(QStringList slist)
|
||||||
|
|
||||||
OneLancForm *ocf = new OneLancForm(lanListWidget, this, confForm, ksnm);
|
OneLancForm *ocf = new OneLancForm(lanListWidget, this, confForm, ksnm);
|
||||||
connect(ocf, SIGNAL(selectedOneLanForm(QString, QString)), this, SLOT(oneLanFormSelected(QString, QString)));
|
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->setIcon(true);
|
||||||
ocf->setLine(true);
|
ocf->setLine(true);
|
||||||
ocf->setLanInfo(objKyDBus->dbusLanIpv4, objKyDBus->dbusLanIpv6, tr("Disconnected"), macInterface);
|
ocf->setLanInfo(objKyDBus->dbusLanIpv4, objKyDBus->dbusLanIpv6, tr("Disconnected"), macInterface);
|
||||||
|
@ -2146,7 +2146,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
// 根据当前连接的wifi 设置OneConnForm
|
// 根据当前连接的wifi 设置OneConnForm
|
||||||
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
|
OneConnForm *ccf = new OneConnForm(topWifiListWidget, this, confForm, ksnm);
|
||||||
if (actWifiName == "--" || wifiActState == 1 || actWifiBssidList.at(0) == "--") {
|
if (actWifiName == "--" || wifiActState == 1 || actWifiBssidList.at(0) == "--") {
|
||||||
ccf->setName(tr("Not connected"), "--", "--", "--");//"当前未连接任何 Wifi"
|
ccf->setWifiName(tr("Not connected"), "--", "--", "--", isHuaWeiPC);//"当前未连接任何 Wifi"
|
||||||
ccf->setSignal("0", "--");
|
ccf->setSignal("0", "--");
|
||||||
activeWifiSignalLv = 0;
|
activeWifiSignalLv = 0;
|
||||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||||
|
@ -2307,7 +2307,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
QString m_name;
|
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 (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 == "") {
|
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)) {
|
if (!canReconnectWifiList.contains(wname)) {
|
||||||
canReconnectWifiList.append(wname);
|
canReconnectWifiList.append(wname);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2315,7 +2315,7 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
canReconnectWifiList.append(wname);
|
canReconnectWifiList.append(wname);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ccf->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
ccf->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||||
if (!canReconnectWifiList.contains(m_name)) {
|
if (!canReconnectWifiList.contains(m_name)) {
|
||||||
canReconnectWifiList.append(m_name);
|
canReconnectWifiList.append(m_name);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2347,14 +2347,13 @@ void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
|
|
||||||
OneConnForm *ocf = new OneConnForm(wifiListWidget, this, confForm, ksnm);
|
OneConnForm *ocf = new OneConnForm(wifiListWidget, this, confForm, ksnm);
|
||||||
connect(ocf, SIGNAL(selectedOneWifiForm(QString,int)), this, SLOT(oneWifiFormSelected(QString,int)));
|
connect(ocf, SIGNAL(selectedOneWifiForm(QString,int)), this, SLOT(oneWifiFormSelected(QString,int)));
|
||||||
// ocf->setName(wname, wbssid, "--");
|
|
||||||
QString path = line.mid(indexPath).trimmed();
|
QString path = line.mid(indexPath).trimmed();
|
||||||
QString m_name;
|
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 (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 == "") {
|
if (m_name.isEmpty() || m_name == "") {
|
||||||
ocf->setName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
ocf->setWifiName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||||
} else {
|
} else {
|
||||||
ocf->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
ocf->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||||
}
|
}
|
||||||
//ocf->setRate(wrate);
|
//ocf->setRate(wrate);
|
||||||
ocf->setLine(true);
|
ocf->setLine(true);
|
||||||
|
@ -2562,9 +2561,9 @@ void MainWindow::updateWifiListDone(QStringList slist)
|
||||||
QString m_name;
|
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 (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 == "") {
|
if (m_name.isEmpty() || m_name == "") {
|
||||||
addItem->setName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
addItem->setWifiName(wname, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||||
} else {
|
} else {
|
||||||
addItem->setName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName);
|
addItem->setWifiName(m_name, wbssid, actWifiUuid, objKyDBus->dbusWiFiCardName, isHuaWeiPC);
|
||||||
}
|
}
|
||||||
//addItem->setRate(wrate);
|
//addItem->setRate(wrate);
|
||||||
addItem->setLine(false);
|
addItem->setLine(false);
|
||||||
|
@ -3143,7 +3142,7 @@ void MainWindow::disNetDone()
|
||||||
|
|
||||||
// 当前连接的lan
|
// 当前连接的lan
|
||||||
OneLancForm *ccf = new OneLancForm(topLanListWidget, this, confForm, ksnm);
|
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->setIcon(false);
|
||||||
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
ccf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||||
ccf->isConnected = false;
|
ccf->isConnected = false;
|
||||||
|
@ -3216,7 +3215,7 @@ void MainWindow::disWifiDoneChangeUI()
|
||||||
OneConnForm *ocf = wifiList.at(i);
|
OneConnForm *ocf = wifiList.at(i);
|
||||||
if (ocf->isActive == true) {
|
if (ocf->isActive == true) {
|
||||||
ocf->setSelected(false, false);
|
ocf->setSelected(false, false);
|
||||||
ocf->setName(tr("Not connected"), "--", "--", "--");//"当前未连接任何 Wifi"
|
ocf->setWifiName(tr("Not connected"), "--", "--", "--", isHuaWeiPC);//"当前未连接任何 Wifi"
|
||||||
ocf->setSignal("0", "--");
|
ocf->setSignal("0", "--");
|
||||||
ocf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
ocf->setConnedString(1, tr("Disconnected"), "");//"未连接"
|
||||||
ocf->lbFreq->hide();
|
ocf->lbFreq->hide();
|
||||||
|
|
|
@ -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());
|
QFontMetrics fontMetrics(lbNameText->font());
|
||||||
QString showname = fontMetrics.elidedText(name, Qt::ElideRight, 200);
|
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;
|
wifiBSsid = bssid;
|
||||||
wifiUuid = uuid;
|
wifiUuid = uuid;
|
||||||
wifiIfName = ifname;
|
wifiIfName = ifname;
|
||||||
|
isHuaweiPC = isHW;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OneConnForm::getName()
|
QString OneConnForm::getName()
|
||||||
|
@ -441,7 +442,14 @@ void OneConnForm::setSignal(QString lv, QString secu, QString category)
|
||||||
} else {
|
} else {
|
||||||
hasPwd = true;
|
hasPwd = true;
|
||||||
}
|
}
|
||||||
QString signalStyle = "QLabel{border-radius:0px;background:url(:/res/w/wifi";
|
|
||||||
|
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) {
|
if ("1" == category) {
|
||||||
signalStyle += "6";
|
signalStyle += "6";
|
||||||
} else if ("2" == category) {
|
} else if ("2" == category) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
|
|
||||||
// category:1->normal protocol 1->wifi 6 2->wifi 6+
|
// category:1->normal protocol 1->wifi 6 2->wifi 6+
|
||||||
void setSignal(QString lv, QString secu,QString category = "0");
|
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();
|
QString getName();
|
||||||
void setRate(QString rate);
|
void setRate(QString rate);
|
||||||
void setLine(bool isShow);
|
void setLine(bool isShow);
|
||||||
|
@ -91,6 +91,7 @@ public:
|
||||||
QString connType;
|
QString connType;
|
||||||
QString wifiSecu;
|
QString wifiSecu;
|
||||||
QLabel * lbFreq = nullptr;
|
QLabel * lbFreq = nullptr;
|
||||||
|
bool isHuaweiPC;
|
||||||
bool isSelected;
|
bool isSelected;
|
||||||
bool isActive;
|
bool isActive;
|
||||||
bool isConnected;
|
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
|
//处理过长SSID
|
||||||
QString displayName;
|
QString displayName;
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
explicit OneLancForm(QWidget *parent = 0, MainWindow *mw = 0, ConfForm *confForm = 0, KSimpleNM *ksnm = 0);
|
explicit OneLancForm(QWidget *parent = 0, MainWindow *mw = 0, ConfForm *confForm = 0, KSimpleNM *ksnm = 0);
|
||||||
~OneLancForm();
|
~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 setIcon(bool isOn);
|
||||||
void setLine(bool isShow);
|
void setLine(bool isShow);
|
||||||
void setLanInfo(QString str1, QString str2, QString str3, QString str4);
|
void setLanInfo(QString str1, QString str2, QString str3, QString str4);
|
||||||
|
|