modify get channel method
This commit is contained in:
parent
6697722d4a
commit
2a2d2fbf29
|
@ -54,6 +54,7 @@ void KyWirelessNetItem::init(NetworkManager::WirelessNetwork::Ptr net)
|
|||
m_NetSsid = net->ssid();
|
||||
m_signalStrength = net->signalStrength();
|
||||
m_frequency = net->referenceAccessPoint()->frequency();
|
||||
m_channel = NetworkManager::findChannel(m_frequency);
|
||||
NetworkManager::AccessPoint::Capabilities cap = net->referenceAccessPoint()->capabilities();
|
||||
NetworkManager::AccessPoint::WpaFlags wpaFlag = net->referenceAccessPoint()->wpaFlags();
|
||||
NetworkManager::AccessPoint::WpaFlags rsnFlag = net->referenceAccessPoint()->rsnFlags();
|
||||
|
@ -81,7 +82,6 @@ void KyWirelessNetItem::initInfoBySsid()
|
|||
m_connName = conn->name();
|
||||
m_connDbusPath = conn->path();
|
||||
m_isConfigured = true;
|
||||
m_channel = wifi_sett->channel();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,15 +111,28 @@ void NetDetail::initUI()
|
|||
|
||||
detailBtn = new QPushButton(this);
|
||||
detailBtn->setText(tr("Detail"));
|
||||
detailBtn->setCheckable(true);
|
||||
detailBtn->setChecked(true);
|
||||
|
||||
ipv4Btn = new QPushButton(this);
|
||||
ipv4Btn->setText(tr("Ipv4"));
|
||||
ipv4Btn->setCheckable(true);
|
||||
|
||||
ipv6Btn = new QPushButton(this);
|
||||
ipv6Btn->setText(tr("Ipv6"));
|
||||
ipv6Btn->setCheckable(true);
|
||||
|
||||
securityBtn = new QPushButton(this);
|
||||
securityBtn->setText(tr("Security"));
|
||||
securityBtn->setCheckable(true);
|
||||
|
||||
group = new QButtonGroup(this);
|
||||
group->addButton(detailBtn);
|
||||
group->addButton(ipv4Btn);
|
||||
group->addButton(ipv6Btn);
|
||||
if (isWlan) {
|
||||
group->addButton(securityBtn);
|
||||
}
|
||||
|
||||
pageLayout->addStretch();
|
||||
pageLayout->addWidget(detailBtn);
|
||||
|
@ -360,9 +373,7 @@ void NetDetail::getBaseInfo(ConInfo &conInfo)
|
|||
qDebug() << "KeyMgmt not support now " << type;
|
||||
}
|
||||
conInfo.strHz = QString::number(item.m_frequency);
|
||||
if (item.m_isConfigured) {
|
||||
conInfo.strChan = QString::number(item.m_channel);
|
||||
}
|
||||
|
||||
initSecuData();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
#include <QButtonGroup>
|
||||
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusObjectPath>
|
||||
|
@ -119,6 +120,8 @@ private:
|
|||
|
||||
ConInfo m_info;
|
||||
|
||||
QButtonGroup *group;
|
||||
|
||||
private slots:
|
||||
void on_btnConfirm_clicked();
|
||||
void on_btnForget_clicked();
|
||||
|
|
Loading…
Reference in New Issue