本文整理汇总了C++中QSystemTrayIcon::isVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QSystemTrayIcon::isVisible方法的具体用法?C++ QSystemTrayIcon::isVisible怎么用?C++ QSystemTrayIcon::isVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSystemTrayIcon
的用法示例。
在下文中一共展示了QSystemTrayIcon::isVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showStateNotificationBySender
void CNotificationManager::showStateNotificationBySender(libnutcommon::DeviceState state) {
if (!m_NotificationsEnabled)
return;
CUIDevice * uiDevice = qobject_cast<CUIDevice *>(sender());
if (!uiDevice)
return;
QString message;
switch (state) {
case libnutcommon::DeviceState::UP:
message = tr("%2 is now up and running on network: %1")
.arg(currentNetwork(uiDevice->device()));
break;
case libnutcommon::DeviceState::UNCONFIGURED:
message = tr("%2 got carrier (to network: %1) but needs configuration.\n\nClick here to open the device details.")
.arg(currentNetwork(uiDevice->device()));
break;
case libnutcommon::DeviceState::ACTIVATED:
message = tr("%1 is now activated and waits for carrier.");
break;
case libnutcommon::DeviceState::DEACTIVATED:
message = tr("%1 is now deactivated");
break;
default:
return;
}
{
QSystemTrayIcon * trayIcon = m_UIDeviceIcons.value(uiDevice, NULL);
message = message.arg(trayIcon && trayIcon->isVisible() ? tr("Device") : uiDevice->device()->getName());
}
showDeviceMessage(QString(), message, uiDevice);
}