add accessibility name to tips

Change-Id: I9db8447ab3e8be46bd78ab4e8b9c9620802eb2a5
This commit is contained in:
石博文 2016-07-28 10:59:21 +08:00 committed by Hualet Wang
parent 53e8f61ab5
commit de444b01bc
10 changed files with 11 additions and 2 deletions

View File

@ -30,6 +30,7 @@ AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent)
m_id = m_itemEntry->id();
m_active = m_itemEntry->active();
m_appNameTips->setObjectName(m_itemEntry->name());
m_appNameTips->setVisible(false);
m_appNameTips->setStyleSheet("color:white;"
"padding:5px 10px;");

View File

@ -13,6 +13,7 @@ LauncherItem::LauncherItem(QWidget *parent)
{
setAccessibleName("Launcher");
m_tips->setVisible(false);
m_tips->setObjectName("launcher");
m_tips->setText(tr("Launcher"));
m_tips->setStyleSheet("color:white;"
"padding:5px 10px;");

View File

@ -22,8 +22,6 @@ PluginsItem::PluginsItem(PluginsItemInterface* const pluginInter, const QString
{
Q_ASSERT(m_centeralWidget);
setAccessibleName(m_pluginInter->pluginName());
QBoxLayout *hLayout = new QHBoxLayout;
hLayout->addWidget(m_centeralWidget);
hLayout->setSpacing(0);
@ -33,6 +31,7 @@ PluginsItem::PluginsItem(PluginsItemInterface* const pluginInter, const QString
m_centeralWidget->setVisible(true);
setLayout(hLayout);
setAccessibleName(pluginInter->pluginName() + "-" + m_itemKey);
setAttribute(Qt::WA_TranslucentBackground);
}

View File

@ -33,6 +33,8 @@ void DockPopupWindow::setContent(QWidget *content)
lastWidget->removeEventFilter(this);
content->installEventFilter(this);
setAccessibleName(content->objectName() + "-popup");
DArrowRectangle::setContent(content);
}

View File

@ -9,6 +9,7 @@ DatetimePlugin::DatetimePlugin(QObject *parent)
m_refershTimer(new QTimer(this))
{
m_dateTipsLabel->setObjectName("datetime");
m_dateTipsLabel->setStyleSheet("color:white;"
"padding:6px 10px;");

View File

@ -41,6 +41,7 @@ QWidget *DiskMountPlugin::itemPopupApplet(const QString &itemKey)
void DiskMountPlugin::initCompoments()
{
m_diskControlApplet = new DiskControlWidget;
m_diskControlApplet->setObjectName("dist-mount");
m_diskControlApplet->setVisible(false);
connect(m_diskControlApplet, &DiskControlWidget::diskCountChanged, this, &DiskMountPlugin::diskCountChanged);

View File

@ -11,6 +11,7 @@ WiredItem::WiredItem(const QUuid &deviceUuid)
m_itemTips(new QLabel(this))
{
m_itemTips->setObjectName("wired-" + deviceUuid.toString());
m_itemTips->setVisible(false);
m_itemTips->setStyleSheet("color:white;"
"padding:5px 10px;");

View File

@ -80,6 +80,7 @@ void WirelessItem::init()
const auto devInfo = m_networkManager->device(m_deviceUuid);
m_applet = new WirelessApplet(devInfo, this);
m_applet->setObjectName("wireless-" + m_deviceUuid.toString());
m_applet->setVisible(false);
connect(m_applet, &WirelessApplet::activeAPChanged, this, static_cast<void (WirelessItem::*)()>(&WirelessItem::update));

View File

@ -15,6 +15,7 @@ ShutdownPlugin::ShutdownPlugin(QObject *parent)
m_powerInter(new DBusPower(this))
{
m_tipsLabel->setVisible(false);
m_tipsLabel->setObjectName("power");
m_tipsLabel->setAlignment(Qt::AlignCenter);
m_tipsLabel->setStyleSheet("color:white;"
"padding:5px 10px;");

View File

@ -11,6 +11,7 @@ SystemTrayPlugin::SystemTrayPlugin(QObject *parent)
m_trayInter(new DBusTrayManager(this)),
m_tipsWidget(new TipsWidget)
{
m_tipsWidget->setObjectName("sys-tray");
m_fashionItem = new FashionTrayItem;
}