当前位置: 首页>>代码示例>>C++>>正文


C++ NotificationSettings::value方法代码示例

本文整理汇总了C++中NotificationSettings::value方法的典型用法代码示例。如果您正苦于以下问题:C++ NotificationSettings::value方法的具体用法?C++ NotificationSettings::value怎么用?C++ NotificationSettings::value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NotificationSettings的用法示例。


在下文中一共展示了NotificationSettings::value方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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);
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:10,代码来源:taskbarnotificationbackend.cpp

示例2: 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();
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:11,代码来源:qtmultimedianotificationbackend.cpp

示例3: QString

void QtMultimediaNotificationBackend::ConfigWidget::load()
{
    NotificationSettings s;
    _enabled = s.value("QtMultimedia/Enabled", false).toBool();
    _filename = s.value("QtMultimedia/AudioFile", QString()).toString();

    ui.enabled->setChecked(_enabled);
    ui.filename->setText(_filename);

    setChangedState(false);
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:11,代码来源:qtmultimedianotificationbackend.cpp

示例4: setChangedState

void TaskbarNotificationBackend::ConfigWidget::load()
{
    NotificationSettings s;
    enabled = s.value("Taskbar/Enabled", true).toBool();
    timeout = s.value("Taskbar/Timeout", 0).toInt();

    enabledBox->setChecked(enabled);
    timeoutBox->setValue(timeout / 1000);

    setChangedState(false);
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:11,代码来源:taskbarnotificationbackend.cpp

示例5: setChangedState

void SystrayNotificationBackend::ConfigWidget::load()
{
    NotificationSettings s;
    _showBubble = s.value("Systray/ShowBubble", false).toBool();
    _showBubbleBox->setChecked(_showBubble);
    setChangedState(false);
}
开发者ID:2kah,项目名称:quassel,代码行数:7,代码来源:systraynotificationbackend.cpp

示例6: setChangedState

void DockManagerNotificationBackend::ConfigWidget::load()
{
    NotificationSettings s;
    enabled = s.value("DockManager/Enabled", false).toBool();

    enabledBox->setChecked(enabled);
    setChangedState(false);
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:8,代码来源:dockmanagernotificationbackend.cpp

示例7: 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);
}
开发者ID:fuzzball81,项目名称:quassel,代码行数:44,代码来源:dockmanagernotificationbackend.cpp


注:本文中的NotificationSettings::value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。