Added func connectableWifiPriorityList,and added some resources
10
nmqrc.qrc
|
@ -79,5 +79,15 @@
|
||||||
<file>res/s/conning-s/12.png</file>
|
<file>res/s/conning-s/12.png</file>
|
||||||
<file>res/x/setup.png</file>
|
<file>res/x/setup.png</file>
|
||||||
<file>res/x/control.svg</file>
|
<file>res/x/control.svg</file>
|
||||||
|
<file>res/w/wifi6-full-pwd.png</file>
|
||||||
|
<file>res/w/wifi6-full.png</file>
|
||||||
|
<file>res/w/wifi6-high-pwd.png</file>
|
||||||
|
<file>res/w/wifi6-high.png</file>
|
||||||
|
<file>res/w/wifi6-low-pwd.png</file>
|
||||||
|
<file>res/w/wifi6-low.png</file>
|
||||||
|
<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>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
After Width: | Height: | Size: 761 B |
After Width: | Height: | Size: 711 B |
After Width: | Height: | Size: 812 B |
After Width: | Height: | Size: 765 B |
After Width: | Height: | Size: 804 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 814 B |
After Width: | Height: | Size: 765 B |
After Width: | Height: | Size: 738 B |
After Width: | Height: | Size: 783 B |
|
@ -55,7 +55,6 @@ void LoadingDiv::switchAnimStep()
|
||||||
if (this->currentPage > 12) {
|
if (this->currentPage > 12) {
|
||||||
this->currentPage = 1; //循环播放
|
this->currentPage = 1; //循环播放
|
||||||
}
|
}
|
||||||
|
|
||||||
this->countCurrentTime += FRAMESPEED;
|
this->countCurrentTime += FRAMESPEED;
|
||||||
if (this->countCurrentTime >= ALLTIME) {
|
if (this->countCurrentTime >= ALLTIME) {
|
||||||
emit this->toStopLoading(); //发出信号停止主界面和托盘区的等待动画
|
emit this->toStopLoading(); //发出信号停止主界面和托盘区的等待动画
|
||||||
|
|
|
@ -1807,16 +1807,51 @@ void MainWindow::wifiListOptimize(QStringList& slist)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ifContinue) continue;
|
if(ifContinue) continue;
|
||||||
// if(conFreq < 5000)
|
|
||||||
// apSignalSet[conName+"2.4"] = conSignal;
|
|
||||||
// else
|
|
||||||
// apSignalSet[conName+"5"] = conSignal;
|
|
||||||
targetList<<i;
|
targetList<<i;
|
||||||
}
|
}
|
||||||
slist = targetList;
|
slist = targetList;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
QStringList MainWindow::connectableWifiPriorityList(const QStringList slist){
|
||||||
|
QStringList target;
|
||||||
|
if(!slist.size()) return target;
|
||||||
|
OneConnForm *ocf = new OneConnForm();
|
||||||
|
QString headLine = slist.at(0);
|
||||||
|
int indexSignal,indexSecu, indexFreq, indexBSsid, indexName;
|
||||||
|
headLine = headLine.trimmed();
|
||||||
|
bool isChineseExist = headLine.contains(QRegExp("[\\x4e00-\\x9fa5]+"));
|
||||||
|
if (isChineseExist) {
|
||||||
|
indexSignal = headLine.indexOf("SIGNAL");
|
||||||
|
indexSecu = headLine.indexOf("安全性");
|
||||||
|
indexFreq = headLine.indexOf("频率") + 4;
|
||||||
|
indexBSsid = headLine.indexOf("BSSID") + 6;
|
||||||
|
indexName = indexBSsid + 19;
|
||||||
|
} else {
|
||||||
|
indexSignal = headLine.indexOf("SIGNAL");
|
||||||
|
indexSecu = headLine.indexOf("SECURITY");
|
||||||
|
indexFreq = headLine.indexOf("FREQ");
|
||||||
|
indexBSsid = headLine.indexOf("BSSID");
|
||||||
|
indexName = indexBSsid + 19;
|
||||||
|
}
|
||||||
|
QStringList tmp = slist;
|
||||||
|
for(int i=1;i<tmp.size();i++){
|
||||||
|
QString line = tmp.at(i);
|
||||||
|
QString name = line.mid(indexName).trimmed();
|
||||||
|
int freq = line.mid(indexFreq,4).trimmed().toInt();
|
||||||
|
int signal = line.mid(indexSignal,3).trimmed().toInt();
|
||||||
|
if(freq >= 5000 && ocf->isWifiConfExist(name) && signal > 55){ //两格以上有配置的5Gwifi中选择信号最佳的
|
||||||
|
target << line;
|
||||||
|
tmp.removeAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(QString i:tmp){
|
||||||
|
QString name = i.mid(indexName).trimmed();
|
||||||
|
if(ocf->isWifiConfExist(name)){
|
||||||
|
target<<i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
// 加载wifi列表
|
// 加载wifi列表
|
||||||
void MainWindow::loadWifiListDone(QStringList slist)
|
void MainWindow::loadWifiListDone(QStringList slist)
|
||||||
{
|
{
|
||||||
|
|
|
@ -169,8 +169,8 @@ public:
|
||||||
int is_fly_mode_on = 0; //是否已经打开飞行模式
|
int is_fly_mode_on = 0; //是否已经打开飞行模式
|
||||||
int is_hot_sopt_on = 0; //是否已经打开热点
|
int is_hot_sopt_on = 0; //是否已经打开热点
|
||||||
int is_connect_hide_wifi = 0; //是否正在连接隐藏wifi
|
int is_connect_hide_wifi = 0; //是否正在连接隐藏wifi
|
||||||
|
|
||||||
QString currSelNetName = ""; //当前ScrollArea中选中的网络名称
|
QString currSelNetName = ""; //当前ScrollArea中选中的网络名称
|
||||||
|
|
||||||
QString currConnIfname = ""; //当前连接的有线网对应网卡名称,只有一个有线网连接的情况
|
QString currConnIfname = ""; //当前连接的有线网对应网卡名称,只有一个有线网连接的情况
|
||||||
int currSelNetNum = 0; //当前选中的item序号
|
int currSelNetNum = 0; //当前选中的item序号
|
||||||
bool isLanBeConnUp = false; //lan是否连接上
|
bool isLanBeConnUp = false; //lan是否连接上
|
||||||
|
@ -290,6 +290,7 @@ private:
|
||||||
QString oldActLanName = ""; //上一次获取的已连接有线网名称
|
QString oldActLanName = ""; //上一次获取的已连接有线网名称
|
||||||
int oldDbusActLanDNS = 0; //上一次获取的已连接有线网的DNS代号
|
int oldDbusActLanDNS = 0; //上一次获取的已连接有线网的DNS代号
|
||||||
void wifiListOptimize(QStringList& slist); //只保留同名同频信号最强AP
|
void wifiListOptimize(QStringList& slist); //只保留同名同频信号最强AP
|
||||||
|
QStringList connectableWifiPriorityList(const QStringList slist); //可连接wifi优先级列表
|
||||||
//循环检测网络连接状态
|
//循环检测网络连接状态
|
||||||
QTimer *iconTimer = nullptr;
|
QTimer *iconTimer = nullptr;
|
||||||
QTimer *wiredCableUpTimer = nullptr;
|
QTimer *wiredCableUpTimer = nullptr;
|
||||||
|
|