本文整理汇总了C++中NotificationSettings::notify方法的典型用法代码示例。如果您正苦于以下问题:C++ NotificationSettings::notify方法的具体用法?C++ NotificationSettings::notify怎么用?C++ NotificationSettings::notify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NotificationSettings
的用法示例。
在下文中一共展示了NotificationSettings::notify方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AbstractNotificationBackend
QtMultimediaNotificationBackend::QtMultimediaNotificationBackend(QObject* parent)
: AbstractNotificationBackend(parent)
{
NotificationSettings notificationSettings;
notificationSettings.notify("QtMultimedia/Enabled", this, &QtMultimediaNotificationBackend::enabledChanged);
notificationSettings.notify("QtMultimedia/AudioFile", this, &QtMultimediaNotificationBackend::audioFileChanged);
createMediaObject(notificationSettings.value("QtMultimedia/AudioFile", QString()).toString());
_enabled = notificationSettings.value("QtMultimedia/Enabled", true).toBool();
}
示例2: AbstractNotificationBackend
TaskbarNotificationBackend::TaskbarNotificationBackend(QObject* parent)
: AbstractNotificationBackend(parent)
{
NotificationSettings notificationSettings;
_enabled = notificationSettings.value("Taskbar/Enabled", true).toBool();
_timeout = notificationSettings.value("Taskbar/Timeout", 0).toInt();
notificationSettings.notify("Taskbar/Enabled", this, &TaskbarNotificationBackend::enabledChanged);
notificationSettings.notify("Taskbar/Timeout", this, &TaskbarNotificationBackend::timeoutChanged);
}
示例3: AbstractNotificationBackend
DockManagerNotificationBackend::DockManagerNotificationBackend(QObject* parent)
: AbstractNotificationBackend(parent)
, _bus(QDBusConnection::sessionBus())
{
NotificationSettings notificationSettings;
_enabled = notificationSettings.value("DockManager/Enabled", false).toBool();
notificationSettings.notify("DockManager/Enabled", this, &DockManagerNotificationBackend::enabledChanged);
_dock = new QDBusInterface("net.launchpad.DockManager", "/net/launchpad/DockManager", "net.launchpad.DockManager", _bus, this);
if (_dock->isValid()) {
_bus.connect("net.launchpad.DockManager",
"/net/launchpad/DockManager",
"net.launchpad.DockManager",
"ItemAdded",
this,
SLOT(itemAdded(QDBusObjectPath)));
}
else {
// evil implementations (awn) use fd.o
_dock = new QDBusInterface("org.freedesktop.DockManager", "/org/freedesktop/DockManager", "org.freedesktop.DockManager", _bus, this);
if (_dock->isValid()) {
_bus.connect("org.freedesktop.DockManager",
"/org/freedesktop/DockManager",
"org.freedesktop.DockManager",
"ItemAdded",
this,
SLOT(itemAdded(QDBusObjectPath)));
}
else {
_available = _enabled = false;
return;
}
}
_available = true;
itemAdded(QDBusObjectPath());
connect(Client::coreConnection(),
&CoreConnection::progressValueChanged,
this,
selectOverload<int>(&DockManagerNotificationBackend::updateProgress));
connect(Client::coreConnection(), &CoreConnection::synchronized, this, &DockManagerNotificationBackend::synchronized);
}