Merge branch '1025' into 'dbus-interface'
bug#86797 See merge request kylin-desktop/kylin-nm!360
This commit is contained in:
commit
bda9da0968
|
@ -32,6 +32,7 @@ LanListItem::LanListItem(QWidget *parent) : ListItem(parent)
|
|||
{
|
||||
m_isActive = false;
|
||||
m_netButton->setButtonIcon(QIcon::fromTheme("network-offline-symbolic"));
|
||||
m_netButton->setDefaultPixmap();
|
||||
const QString str=tr("Not connected");
|
||||
m_nameLabel->setText(str);
|
||||
this->m_infoButton->hide();
|
||||
|
|
|
@ -31,6 +31,7 @@ WlanListItem::WlanListItem(QWidget *parent) : ListItem(parent)
|
|||
qDebug()<<"[WlanPage] wlan list item is created." << m_wirelessNetItem.m_NetSsid;
|
||||
|
||||
m_netButton->setButtonIcon(QIcon::fromTheme("network-wireless-signal-none-symbolic"));
|
||||
m_netButton->setDefaultPixmap();
|
||||
const QString name = tr("Not connected");
|
||||
setExpanded(false);
|
||||
this->setName(name);
|
||||
|
@ -303,6 +304,7 @@ void WlanListItem::refreshIcon()
|
|||
break;
|
||||
}
|
||||
}
|
||||
m_netButton->setActive(false);
|
||||
}
|
||||
|
||||
void WlanListItem::onInfoButtonClicked()
|
||||
|
|
|
@ -25,7 +25,6 @@ RadioItemButton::RadioItemButton(QWidget *parent) : QPushButton(parent)
|
|||
m_iconLabel->setFixedSize(BUTTON_SIZE);
|
||||
m_iconLabel->setAlignment(Qt::AlignCenter);
|
||||
|
||||
|
||||
setActive(false);
|
||||
//JXJ_TODO loading动画
|
||||
connect(this, &RadioItemButton::requestStartLoading, this, &RadioItemButton::onLoadingStarted);
|
||||
|
@ -47,16 +46,21 @@ void RadioItemButton::stopLoading()
|
|||
{
|
||||
emit this->requestStopLoading();
|
||||
}
|
||||
|
||||
//设置图标
|
||||
void RadioItemButton::setButtonIcon(const QIcon &icon)
|
||||
{
|
||||
if (icon.isNull()) {
|
||||
return;
|
||||
}
|
||||
m_pixmap = icon.pixmap(ICON_SIZE);
|
||||
// m_iconLabel->setPixmap(m_pixmap);
|
||||
}
|
||||
//显示默认图标
|
||||
void RadioItemButton::setDefaultPixmap()
|
||||
{
|
||||
m_iconLabel->setPixmap(m_pixmap);
|
||||
}
|
||||
|
||||
//根据连接状态更改图标颜色
|
||||
void RadioItemButton::setActive(const bool &isActive)
|
||||
{
|
||||
m_isActivated = isActive;
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
void startLoading();
|
||||
void stopLoading();
|
||||
void setButtonIcon(const QIcon &icon);
|
||||
void setDefaultPixmap();
|
||||
void setActive(const bool &isActive);
|
||||
enum PixmapColor {
|
||||
WHITE = 0,
|
||||
|
|
Loading…
Reference in New Issue