设置托盘网络项【未连接】无选中状态
This commit is contained in:
parent
65934236cb
commit
ef6fee8c05
|
@ -352,9 +352,11 @@ void LanPage::constructActiveConnectionArea()
|
|||
p_activeConnectionItem = nullptr;
|
||||
}
|
||||
setNetSpeed->start(REFRESH_NETWORKSPEED_TIMER);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
} else {
|
||||
qDebug()<<"[LanPage] there is not active";
|
||||
addEmptyConnectItem(m_activeConnectionMap, m_activatedLanListWidget);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -835,6 +837,8 @@ QListWidgetItem *LanPage::addNewItem(KyConnectItem *itemData, QListWidget *listW
|
|||
|
||||
void LanPage::updateActivatedConnectionArea(KyConnectItem *p_newItem)
|
||||
{
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
|
||||
if (m_activeConnectionMap.contains(p_newItem->m_connectUuid)) {
|
||||
return;
|
||||
}
|
||||
|
@ -863,6 +867,7 @@ void LanPage::updateConnectionArea(KyConnectItem *p_newItem)
|
|||
deleteConnectionMapItem(m_activeConnectionMap, m_activatedLanListWidget, p_newItem->m_connectUuid);
|
||||
if (m_activeConnectionMap.count() <= 0) {
|
||||
addEmptyConnectItem(m_activeConnectionMap, m_activatedLanListWidget);
|
||||
m_activatedLanListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
}
|
||||
|
||||
if (p_newItem->m_ifaceName == m_currentDeviceName || p_newItem->m_ifaceName == "") {
|
||||
|
|
|
@ -481,12 +481,14 @@ void WlanPage::constructActivateConnectionArea()
|
|||
|
||||
height += p_listWidgetItem->sizeHint().height();
|
||||
setNetSpeed->start(REFRESH_NETWORKSPEED_TIMER);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
}
|
||||
}
|
||||
|
||||
if (height == 0) {
|
||||
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
|
||||
height += p_listWidgetItem->sizeHint().height();
|
||||
}
|
||||
|
@ -933,6 +935,8 @@ void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::St
|
|||
|
||||
void WlanPage::updateActivatedArea(QString uuid, QString ssid, QString devName)
|
||||
{
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::SingleSelection);
|
||||
|
||||
if (m_activateConnectionItemMap.contains(ssid)) {
|
||||
return;
|
||||
}
|
||||
|
@ -987,6 +991,7 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName
|
|||
deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid);
|
||||
QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height());
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue