From c6837d9f13605d515954bd63e0509a9e354e0ccf Mon Sep 17 00:00:00 2001 From: jingshenghao Date: Mon, 13 Jan 2025 16:38:33 +0800 Subject: [PATCH] feat: Add files generated by qdbusXML2cpp and DCONG2cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add files generated by qdbusXML2cpp and DCONG2cpp Log: Add files generated by qdbusXML2cpp and DCONG2cpp --- .reuse/dep5 | 4 + .../org_deepin_dde_dock_plugin_bluetooth.hpp | 180 ++++ .../org_deepin_dde_dock_plugin_common.hpp | 214 +++++ .../org_deepin_dde_dock_plugin_power.hpp | 180 ++++ ...org_deepin_dde_dock_plugin_quick-panel.hpp | 248 +++++ .../org_deepin_dde_dock_plugin_shutdown.hpp | 180 ++++ .../org_deepin_dde_dock_plugin_sound.hpp | 214 +++++ .../org_deepin_dde_dock_plugin_tray.hpp | 180 ++++ .../dconfig2cpp/org_deepin_dde_network.hpp | 860 ++++++++++++++++++ .../com.canonical.dbusmenuAdaptor.cpp | 83 ++ .../com.canonical.dbusmenuAdaptor.h | 108 +++ .../com.deepin.daemon.PowerAdaptor.cpp | 41 + .../com.deepin.daemon.PowerAdaptor.h | 53 ++ .../org.deepin.dde.AirplaneMode1Adaptor.cpp | 77 ++ .../org.deepin.dde.AirplaneMode1Adaptor.h | 73 ++ .../org.deepin.dde.Appearance1Adaptor.cpp | 225 +++++ .../org.deepin.dde.Appearance1Adaptor.h | 155 ++++ .../org.deepin.dde.Audio1.SinkAdaptor.cpp | 145 +++ .../org.deepin.dde.Audio1.SinkAdaptor.h | 125 +++ .../org.deepin.dde.Audio1Adaptor.cpp | 163 ++++ .../org.deepin.dde.Audio1Adaptor.h | 137 +++ .../org.deepin.dde.Bluetooth1Adaptor.cpp | 193 ++++ .../org.deepin.dde.Bluetooth1Adaptor.h | 253 ++++++ ...org.deepin.dde.Display1.MonitorAdaptor.cpp | 209 +++++ .../org.deepin.dde.Display1.MonitorAdaptor.h | 172 ++++ .../org.deepin.dde.Display1Adaptor.cpp | 251 +++++ .../org.deepin.dde.Display1Adaptor.h | 194 ++++ ...eepin.dde.InputDevice1.KeyboardAdaptor.cpp | 183 ++++ ....deepin.dde.InputDevice1.KeyboardAdaptor.h | 120 +++ .../org.deepin.dde.Network1Adaptor.cpp | 325 +++++++ .../org.deepin.dde.Network1Adaptor.h | 274 ++++++ .../org.deepin.dde.Notification1Adaptor.cpp | 199 ++++ .../org.deepin.dde.Notification1Adaptor.h | 200 ++++ .../org.deepin.dde.Power1Adaptor.cpp | 181 ++++ .../org.deepin.dde.Power1Adaptor.h | 138 +++ .../org.deepin.dde.Timedate1Adaptor.cpp | 239 +++++ .../org.deepin.dde.Timedate1Adaptor.h | 167 ++++ .../org.deepin.dde.TrayManager1Adaptor.cpp | 63 ++ .../org.deepin.dde.TrayManager1Adaptor.h | 81 ++ .../qdbusxml2cpp/org.fcitx.FcitxAdaptor.cpp | 195 ++++ .../qdbusxml2cpp/org.fcitx.FcitxAdaptor.h | 149 +++ .../org.freedesktop.Login1Adaptor.cpp | 475 ++++++++++ .../org.freedesktop.Login1Adaptor.h | 425 +++++++++ .../org.kde.StatusNotifierItemAdaptor.cpp | 155 ++++ .../org.kde.StatusNotifierItemAdaptor.h | 153 ++++ .../org.kde.StatusNotifierWatcherAdaptor.cpp | 65 ++ .../org.kde.StatusNotifierWatcherAdaptor.h | 77 ++ 47 files changed, 8781 insertions(+) create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_common.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_power.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_quick-panel.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_shutdown.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_tray.hpp create mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_network.hpp create mode 100644 toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.h create mode 100644 toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.cpp create mode 100644 toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.h diff --git a/.reuse/dep5 b/.reuse/dep5 index 8c1b80a1..a1db4498 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -65,3 +65,7 @@ License: CC0-1.0 Files: misc/*.service Copyright: None License: CC0-1.0 + +Files: toolGenerate/**/* +Copyright: None +License: CC0-1.0 diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp new file mode 100644 index 00000000..29375c29 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_bluetooth : public QObject { + Q_OBJECT + + Q_PROPERTY(double scanInterval READ scanInterval WRITE setScanInterval NOTIFY scanIntervalChanged) +public: + explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_bluetooth() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + double scanInterval() const { + return p_scanInterval; + } + void setScanInterval(const double &value) { + auto oldValue = p_scanInterval; + p_scanInterval = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("scanInterval"), value); + }); + } + if (p_scanInterval != oldValue) { + Q_EMIT scanIntervalChanged(); + } + } +Q_SIGNALS: + void scanIntervalChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("scanInterval"), QVariant::fromValue(p_scanInterval)); + } else { + updateValue(QStringLiteral("scanInterval"), QVariant::fromValue(p_scanInterval)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("scanInterval")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_scanInterval != newValue) { + p_scanInterval = newValue; + Q_EMIT scanIntervalChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + double p_scanInterval { 10 }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_common.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_common.hpp new file mode 100644 index 00000000..1ccfdb91 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_common.hpp @@ -0,0 +1,214 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.common.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_COMMON_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_COMMON_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_common : public QObject { + Q_OBJECT + + Q_PROPERTY(QList defaultDockedPlugins READ defaultDockedPlugins WRITE setDefaultDockedPlugins NOTIFY defaultDockedPluginsChanged) + Q_PROPERTY(QString pluginsOrder READ pluginsOrder WRITE setPluginsOrder NOTIFY pluginsOrderChanged) +public: + explicit org_deepin_dde_dock_plugin_common(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_common(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_common(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_common(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_common() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList defaultDockedPlugins() const { + return p_defaultDockedPlugins; + } + void setDefaultDockedPlugins(const QList &value) { + auto oldValue = p_defaultDockedPlugins; + p_defaultDockedPlugins = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("defaultDockedPlugins"), value); + }); + } + if (p_defaultDockedPlugins != oldValue) { + Q_EMIT defaultDockedPluginsChanged(); + } + } + QString pluginsOrder() const { + return p_pluginsOrder; + } + void setPluginsOrder(const QString &value) { + auto oldValue = p_pluginsOrder; + p_pluginsOrder = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("pluginsOrder"), value); + }); + } + if (p_pluginsOrder != oldValue) { + Q_EMIT pluginsOrderChanged(); + } + } +Q_SIGNALS: + void defaultDockedPluginsChanged(); + void pluginsOrderChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("defaultDockedPlugins"), QVariant::fromValue(p_defaultDockedPlugins)); + } else { + updateValue(QStringLiteral("defaultDockedPlugins"), QVariant::fromValue(p_defaultDockedPlugins)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("pluginsOrder"), QVariant::fromValue(p_pluginsOrder)); + } else { + updateValue(QStringLiteral("pluginsOrder"), QVariant::fromValue(p_pluginsOrder)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("defaultDockedPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_defaultDockedPlugins != newValue) { + p_defaultDockedPlugins = newValue; + Q_EMIT defaultDockedPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("pluginsOrder")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_pluginsOrder != newValue) { + p_pluginsOrder = newValue; + Q_EMIT pluginsOrderChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + QList p_defaultDockedPlugins { QList{QVariant(QStringLiteral("multitasking")), QVariant(QStringLiteral("show-desktop")), QVariant(QStringLiteral("battery")), QVariant(QStringLiteral("shutdown")), QVariant(QStringLiteral("datetime"))} }; + QString p_pluginsOrder { QStringLiteral("{"2": ["dde-tray", "network-item-key", "dde-quick-panel", "AiAssistant", "notifications", "power", "shutdown"], "3": [ "show-desktop", "multitasking" ], "7": [ "datetime", "trash" ] }") }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_COMMON_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_power.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_power.hpp new file mode 100644 index 00000000..e5a2d4b8 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_power.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.power.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_POWER_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_POWER_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_power : public QObject { + Q_OBJECT + + Q_PROPERTY(bool showTimeToFull READ showTimeToFull WRITE setShowTimeToFull NOTIFY showTimeToFullChanged) +public: + explicit org_deepin_dde_dock_plugin_power(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_power(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_power(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_power(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_power() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + bool showTimeToFull() const { + return p_showTimeToFull; + } + void setShowTimeToFull(const bool &value) { + auto oldValue = p_showTimeToFull; + p_showTimeToFull = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("showTimeToFull"), value); + }); + } + if (p_showTimeToFull != oldValue) { + Q_EMIT showTimeToFullChanged(); + } + } +Q_SIGNALS: + void showTimeToFullChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("showTimeToFull"), QVariant::fromValue(p_showTimeToFull)); + } else { + updateValue(QStringLiteral("showTimeToFull"), QVariant::fromValue(p_showTimeToFull)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("showTimeToFull")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_showTimeToFull != newValue) { + p_showTimeToFull = newValue; + Q_EMIT showTimeToFullChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + bool p_showTimeToFull { true }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_POWER_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_quick-panel.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_quick-panel.hpp new file mode 100644 index 00000000..2e579172 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_quick-panel.hpp @@ -0,0 +1,248 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.quick-panel.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_QUICK-PANEL_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_QUICK-PANEL_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_quick-panel : public QObject { + Q_OBJECT + + Q_PROPERTY(QList dockedQuickPlugins READ dockedQuickPlugins WRITE setDockedQuickPlugins NOTIFY dockedQuickPluginsChanged) + Q_PROPERTY(QList hiddenQuickPlugins READ hiddenQuickPlugins WRITE setHiddenQuickPlugins NOTIFY hiddenQuickPluginsChanged) + Q_PROPERTY(QList quickPluginsOrder READ quickPluginsOrder WRITE setQuickPluginsOrder NOTIFY quickPluginsOrderChanged) +public: + explicit org_deepin_dde_dock_plugin_quick-panel(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_quick-panel(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_quick-panel(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_quick-panel(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_quick-panel() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList dockedQuickPlugins() const { + return p_dockedQuickPlugins; + } + void setDockedQuickPlugins(const QList &value) { + auto oldValue = p_dockedQuickPlugins; + p_dockedQuickPlugins = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dockedQuickPlugins"), value); + }); + } + if (p_dockedQuickPlugins != oldValue) { + Q_EMIT dockedQuickPluginsChanged(); + } + } + QList hiddenQuickPlugins() const { + return p_hiddenQuickPlugins; + } + void setHiddenQuickPlugins(const QList &value) { + auto oldValue = p_hiddenQuickPlugins; + p_hiddenQuickPlugins = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("hiddenQuickPlugins"), value); + }); + } + if (p_hiddenQuickPlugins != oldValue) { + Q_EMIT hiddenQuickPluginsChanged(); + } + } + QList quickPluginsOrder() const { + return p_quickPluginsOrder; + } + void setQuickPluginsOrder(const QList &value) { + auto oldValue = p_quickPluginsOrder; + p_quickPluginsOrder = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("quickPluginsOrder"), value); + }); + } + if (p_quickPluginsOrder != oldValue) { + Q_EMIT quickPluginsOrderChanged(); + } + } +Q_SIGNALS: + void dockedQuickPluginsChanged(); + void hiddenQuickPluginsChanged(); + void quickPluginsOrderChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("dockedQuickPlugins"), QVariant::fromValue(p_dockedQuickPlugins)); + } else { + updateValue(QStringLiteral("dockedQuickPlugins"), QVariant::fromValue(p_dockedQuickPlugins)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("hiddenQuickPlugins"), QVariant::fromValue(p_hiddenQuickPlugins)); + } else { + updateValue(QStringLiteral("hiddenQuickPlugins"), QVariant::fromValue(p_hiddenQuickPlugins)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("quickPluginsOrder"), QVariant::fromValue(p_quickPluginsOrder)); + } else { + updateValue(QStringLiteral("quickPluginsOrder"), QVariant::fromValue(p_quickPluginsOrder)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("dockedQuickPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dockedQuickPlugins != newValue) { + p_dockedQuickPlugins = newValue; + Q_EMIT dockedQuickPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("hiddenQuickPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_hiddenQuickPlugins != newValue) { + p_hiddenQuickPlugins = newValue; + Q_EMIT hiddenQuickPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("quickPluginsOrder")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_quickPluginsOrder != newValue) { + p_quickPluginsOrder = newValue; + Q_EMIT quickPluginsOrderChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + QList p_dockedQuickPlugins { QList{QVariant(QStringLiteral("network"))} }; + QList p_hiddenQuickPlugins { QList{} }; + QList p_quickPluginsOrder { QList{QVariant(QStringLiteral("network")), QVariant(QStringLiteral("bluetooth")), QVariant(QStringLiteral("wireless-casting")), QVariant(QStringLiteral("grand-search")), QVariant(QStringLiteral("eye-comfort-mode")), QVariant(QStringLiteral("airplane-mode")), QVariant(QStringLiteral("dnd-mode")), QVariant(QStringLiteral("shot-start-plugin")), QVariant(QStringLiteral("shot-start-record-plugin")), QVariant(QStringLiteral("clipboard")), QVariant(QStringLiteral("system-monitor")), QVariant(QStringLiteral("media")), QVariant(QStringLiteral("dde-brightness")), QVariant(QStringLiteral("sound"))} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_QUICK-PANEL_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_shutdown.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_shutdown.hpp new file mode 100644 index 00000000..b14d8e4e --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_shutdown.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.shutdown.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_SHUTDOWN_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_SHUTDOWN_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_shutdown : public QObject { + Q_OBJECT + + Q_PROPERTY(QList contextMenu READ contextMenu WRITE setContextMenu NOTIFY contextMenuChanged) +public: + explicit org_deepin_dde_dock_plugin_shutdown(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_shutdown(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_shutdown(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_shutdown(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_shutdown() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList contextMenu() const { + return p_contextMenu; + } + void setContextMenu(const QList &value) { + auto oldValue = p_contextMenu; + p_contextMenu = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("contextMenu"), value); + }); + } + if (p_contextMenu != oldValue) { + Q_EMIT contextMenuChanged(); + } + } +Q_SIGNALS: + void contextMenuChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("contextMenu"), QVariant::fromValue(p_contextMenu)); + } else { + updateValue(QStringLiteral("contextMenu"), QVariant::fromValue(p_contextMenu)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("contextMenu")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_contextMenu != newValue) { + p_contextMenu = newValue; + Q_EMIT contextMenuChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + QList p_contextMenu { QList{QVariant(QStringLiteral("Shutdown")), QVariant(QStringLiteral("Reboot")), QVariant(QStringLiteral("Suspend")), QVariant(QStringLiteral("Hibernate")), QVariant(QStringLiteral("Lock")), QVariant(QStringLiteral("Logout")), QVariant(QStringLiteral("SwitchUser")), QVariant(QStringLiteral("PowerSettings"))} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_SHUTDOWN_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp new file mode 100644 index 00000000..173d4f86 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp @@ -0,0 +1,214 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_sound : public QObject { + Q_OBJECT + + Q_PROPERTY(bool enableAdjustVolumeNoCard READ enableAdjustVolumeNoCard WRITE setEnableAdjustVolumeNoCard NOTIFY enableAdjustVolumeNoCardChanged) + Q_PROPERTY(double soundOutputSlider READ soundOutputSlider WRITE setSoundOutputSlider NOTIFY soundOutputSliderChanged) +public: + explicit org_deepin_dde_dock_plugin_sound(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_sound(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_sound(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_sound(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_sound() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + bool enableAdjustVolumeNoCard() const { + return p_enableAdjustVolumeNoCard; + } + void setEnableAdjustVolumeNoCard(const bool &value) { + auto oldValue = p_enableAdjustVolumeNoCard; + p_enableAdjustVolumeNoCard = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enableAdjustVolumeNoCard"), value); + }); + } + if (p_enableAdjustVolumeNoCard != oldValue) { + Q_EMIT enableAdjustVolumeNoCardChanged(); + } + } + double soundOutputSlider() const { + return p_soundOutputSlider; + } + void setSoundOutputSlider(const double &value) { + auto oldValue = p_soundOutputSlider; + p_soundOutputSlider = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("soundOutputSlider"), value); + }); + } + if (p_soundOutputSlider != oldValue) { + Q_EMIT soundOutputSliderChanged(); + } + } +Q_SIGNALS: + void enableAdjustVolumeNoCardChanged(); + void soundOutputSliderChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("enableAdjustVolumeNoCard"), QVariant::fromValue(p_enableAdjustVolumeNoCard)); + } else { + updateValue(QStringLiteral("enableAdjustVolumeNoCard"), QVariant::fromValue(p_enableAdjustVolumeNoCard)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("soundOutputSlider"), QVariant::fromValue(p_soundOutputSlider)); + } else { + updateValue(QStringLiteral("soundOutputSlider"), QVariant::fromValue(p_soundOutputSlider)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("enableAdjustVolumeNoCard")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enableAdjustVolumeNoCard != newValue) { + p_enableAdjustVolumeNoCard = newValue; + Q_EMIT enableAdjustVolumeNoCardChanged(); + } + }); + return; + } + if (key == QStringLiteral("soundOutputSlider")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_soundOutputSlider != newValue) { + p_soundOutputSlider = newValue; + Q_EMIT soundOutputSliderChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + bool p_enableAdjustVolumeNoCard { false }; + double p_soundOutputSlider { 0 }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_tray.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_tray.hpp new file mode 100644 index 00000000..4e435605 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_tray.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.tray.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_TRAY_H +#define ORG_DEEPIN_DDE_DOCK_PLUGIN_TRAY_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_dock_plugin_tray : public QObject { + Q_OBJECT + + Q_PROPERTY(QList dockedTrayPlugins READ dockedTrayPlugins WRITE setDockedTrayPlugins NOTIFY dockedTrayPluginsChanged) +public: + explicit org_deepin_dde_dock_plugin_tray(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_tray(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_tray(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_dock_plugin_tray(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_dock_plugin_tray() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList dockedTrayPlugins() const { + return p_dockedTrayPlugins; + } + void setDockedTrayPlugins(const QList &value) { + auto oldValue = p_dockedTrayPlugins; + p_dockedTrayPlugins = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dockedTrayPlugins"), value); + }); + } + if (p_dockedTrayPlugins != oldValue) { + Q_EMIT dockedTrayPluginsChanged(); + } + } +Q_SIGNALS: + void dockedTrayPluginsChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("dockedTrayPlugins"), QVariant::fromValue(p_dockedTrayPlugins)); + } else { + updateValue(QStringLiteral("dockedTrayPlugins"), QVariant::fromValue(p_dockedTrayPlugins)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("dockedTrayPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dockedTrayPlugins != newValue) { + p_dockedTrayPlugins = newValue; + Q_EMIT dockedTrayPluginsChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + QList p_dockedTrayPlugins { QList{QVariant(QStringLiteral("sni:Fcitx")), QVariant(QStringLiteral("mount-item-key")), QVariant(QStringLiteral("sni:uos-activator"))} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_TRAY_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_network.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_network.hpp new file mode 100644 index 00000000..bfb0004c --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_network.hpp @@ -0,0 +1,860 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-network-core/config/org.deepin.dde.network.json + * Generation time: 2025-01-14T10:55:03 + * JSON file version: 1.0 + * + * WARNING: DO NOT MODIFY THIS FILE MANUALLY. + * If you need to change the content, please modify the dconfig2cpp tool. + */ + +#ifndef ORG_DEEPIN_DDE_NETWORK_H +#define ORG_DEEPIN_DDE_NETWORK_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_network : public QObject { + Q_OBJECT + + Q_PROPERTY(double ConnectivityCheckInterval READ ConnectivityCheckInterval WRITE setConnectivityCheckInterval NOTIFY ConnectivityCheckIntervalChanged) + Q_PROPERTY(bool LoadServiceFromNM READ LoadServiceFromNM WRITE setLoadServiceFromNM NOTIFY LoadServiceFromNMChanged) + Q_PROPERTY(QList NetworkCheckerUrls READ NetworkCheckerUrls WRITE setNetworkCheckerUrls NOTIFY NetworkCheckerUrlsChanged) + Q_PROPERTY(QList WLANScanInterval READ WLANScanInterval WRITE setWLANScanInterval NOTIFY WLANScanIntervalChanged) + Q_PROPERTY(bool WPA3-Enterprise-Visible READ WPA3-Enterprise-Visible WRITE setWPA3-Enterprise-Visible NOTIFY WPA3-Enterprise-VisibleChanged) + Q_PROPERTY(QString browserUrl READ browserUrl WRITE setBrowserUrl NOTIFY browserUrlChanged) + Q_PROPERTY(bool checkPortal READ checkPortal WRITE setCheckPortal NOTIFY checkPortalChanged) + Q_PROPERTY(bool disabledNetwork READ disabledNetwork WRITE setDisabledNetwork NOTIFY disabledNetworkChanged) + Q_PROPERTY(bool dontSetIpIfConflict READ dontSetIpIfConflict WRITE setDontSetIpIfConflict NOTIFY dontSetIpIfConflictChanged) + Q_PROPERTY(bool enableAccountNetwork READ enableAccountNetwork WRITE setEnableAccountNetwork NOTIFY enableAccountNetworkChanged) + Q_PROPERTY(bool enableConnectivity READ enableConnectivity WRITE setEnableConnectivity NOTIFY enableConnectivityChanged) + Q_PROPERTY(bool enableEapInput READ enableEapInput WRITE setEnableEapInput NOTIFY enableEapInputChanged) + Q_PROPERTY(QString lastProxyMethod READ lastProxyMethod WRITE setLastProxyMethod NOTIFY lastProxyMethodChanged) + Q_PROPERTY(bool networkAirplaneMode READ networkAirplaneMode WRITE setNetworkAirplaneMode NOTIFY networkAirplaneModeChanged) + Q_PROPERTY(bool reconnectIfIpConflicted READ reconnectIfIpConflicted WRITE setReconnectIfIpConflicted NOTIFY reconnectIfIpConflictedChanged) + Q_PROPERTY(bool showBrowserLink READ showBrowserLink WRITE setShowBrowserLink NOTIFY showBrowserLinkChanged) + Q_PROPERTY(bool showUnauthorizedSwitch READ showUnauthorizedSwitch WRITE setShowUnauthorizedSwitch NOTIFY showUnauthorizedSwitchChanged) + Q_PROPERTY(bool supportCertifiedEscape READ supportCertifiedEscape WRITE setSupportCertifiedEscape NOTIFY supportCertifiedEscapeChanged) + Q_PROPERTY(double wirelessScanInterval READ wirelessScanInterval WRITE setWirelessScanInterval NOTIFY wirelessScanIntervalChanged) + Q_PROPERTY(QString wpaEapAuthen READ wpaEapAuthen WRITE setWpaEapAuthen NOTIFY wpaEapAuthenChanged) + Q_PROPERTY(QString wpaEapAuthmethod READ wpaEapAuthmethod WRITE setWpaEapAuthmethod NOTIFY wpaEapAuthmethodChanged) +public: + explicit org_deepin_dde_network(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_network(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_network(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + explicit org_deepin_dde_network(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) + : QObject(parent) { + + if (!thread->isRunning()) { + qWarning() << QStringLiteral("Warning: The provided thread is not running."); + } + Q_ASSERT(QThread::currentThread() != thread); + auto worker = new QObject(); + worker->moveToThread(thread); + QMetaObject::invokeMethod(worker, [=]() { + auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); + if (!config) { + qWarning() << QStringLiteral("Failed to create DConfig instance."); + worker->deleteLater(); + return; + } + config->moveToThread(QThread::currentThread()); + initialize(config); + worker->deleteLater(); + }); + } + ~org_deepin_dde_network() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + double ConnectivityCheckInterval() const { + return p_ConnectivityCheckInterval; + } + void setConnectivityCheckInterval(const double &value) { + auto oldValue = p_ConnectivityCheckInterval; + p_ConnectivityCheckInterval = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("ConnectivityCheckInterval"), value); + }); + } + if (p_ConnectivityCheckInterval != oldValue) { + Q_EMIT ConnectivityCheckIntervalChanged(); + } + } + bool LoadServiceFromNM() const { + return p_LoadServiceFromNM; + } + void setLoadServiceFromNM(const bool &value) { + auto oldValue = p_LoadServiceFromNM; + p_LoadServiceFromNM = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("LoadServiceFromNM"), value); + }); + } + if (p_LoadServiceFromNM != oldValue) { + Q_EMIT LoadServiceFromNMChanged(); + } + } + QList NetworkCheckerUrls() const { + return p_NetworkCheckerUrls; + } + void setNetworkCheckerUrls(const QList &value) { + auto oldValue = p_NetworkCheckerUrls; + p_NetworkCheckerUrls = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("NetworkCheckerUrls"), value); + }); + } + if (p_NetworkCheckerUrls != oldValue) { + Q_EMIT NetworkCheckerUrlsChanged(); + } + } + QList WLANScanInterval() const { + return p_WLANScanInterval; + } + void setWLANScanInterval(const QList &value) { + auto oldValue = p_WLANScanInterval; + p_WLANScanInterval = value; + markPropertySet(3); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("WLANScanInterval"), value); + }); + } + if (p_WLANScanInterval != oldValue) { + Q_EMIT WLANScanIntervalChanged(); + } + } + bool WPA3-Enterprise-Visible() const { + return p_WPA3-Enterprise-Visible; + } + void setWPA3-Enterprise-Visible(const bool &value) { + auto oldValue = p_WPA3-Enterprise-Visible; + p_WPA3-Enterprise-Visible = value; + markPropertySet(4); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("WPA3-Enterprise-Visible"), value); + }); + } + if (p_WPA3-Enterprise-Visible != oldValue) { + Q_EMIT WPA3-Enterprise-VisibleChanged(); + } + } + QString browserUrl() const { + return p_browserUrl; + } + void setBrowserUrl(const QString &value) { + auto oldValue = p_browserUrl; + p_browserUrl = value; + markPropertySet(5); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("browserUrl"), value); + }); + } + if (p_browserUrl != oldValue) { + Q_EMIT browserUrlChanged(); + } + } + bool checkPortal() const { + return p_checkPortal; + } + void setCheckPortal(const bool &value) { + auto oldValue = p_checkPortal; + p_checkPortal = value; + markPropertySet(6); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("checkPortal"), value); + }); + } + if (p_checkPortal != oldValue) { + Q_EMIT checkPortalChanged(); + } + } + bool disabledNetwork() const { + return p_disabledNetwork; + } + void setDisabledNetwork(const bool &value) { + auto oldValue = p_disabledNetwork; + p_disabledNetwork = value; + markPropertySet(7); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("disabledNetwork"), value); + }); + } + if (p_disabledNetwork != oldValue) { + Q_EMIT disabledNetworkChanged(); + } + } + bool dontSetIpIfConflict() const { + return p_dontSetIpIfConflict; + } + void setDontSetIpIfConflict(const bool &value) { + auto oldValue = p_dontSetIpIfConflict; + p_dontSetIpIfConflict = value; + markPropertySet(8); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dontSetIpIfConflict"), value); + }); + } + if (p_dontSetIpIfConflict != oldValue) { + Q_EMIT dontSetIpIfConflictChanged(); + } + } + bool enableAccountNetwork() const { + return p_enableAccountNetwork; + } + void setEnableAccountNetwork(const bool &value) { + auto oldValue = p_enableAccountNetwork; + p_enableAccountNetwork = value; + markPropertySet(9); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enableAccountNetwork"), value); + }); + } + if (p_enableAccountNetwork != oldValue) { + Q_EMIT enableAccountNetworkChanged(); + } + } + bool enableConnectivity() const { + return p_enableConnectivity; + } + void setEnableConnectivity(const bool &value) { + auto oldValue = p_enableConnectivity; + p_enableConnectivity = value; + markPropertySet(10); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enableConnectivity"), value); + }); + } + if (p_enableConnectivity != oldValue) { + Q_EMIT enableConnectivityChanged(); + } + } + bool enableEapInput() const { + return p_enableEapInput; + } + void setEnableEapInput(const bool &value) { + auto oldValue = p_enableEapInput; + p_enableEapInput = value; + markPropertySet(11); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enableEapInput"), value); + }); + } + if (p_enableEapInput != oldValue) { + Q_EMIT enableEapInputChanged(); + } + } + QString lastProxyMethod() const { + return p_lastProxyMethod; + } + void setLastProxyMethod(const QString &value) { + auto oldValue = p_lastProxyMethod; + p_lastProxyMethod = value; + markPropertySet(12); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("lastProxyMethod"), value); + }); + } + if (p_lastProxyMethod != oldValue) { + Q_EMIT lastProxyMethodChanged(); + } + } + bool networkAirplaneMode() const { + return p_networkAirplaneMode; + } + void setNetworkAirplaneMode(const bool &value) { + auto oldValue = p_networkAirplaneMode; + p_networkAirplaneMode = value; + markPropertySet(13); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("networkAirplaneMode"), value); + }); + } + if (p_networkAirplaneMode != oldValue) { + Q_EMIT networkAirplaneModeChanged(); + } + } + bool reconnectIfIpConflicted() const { + return p_reconnectIfIpConflicted; + } + void setReconnectIfIpConflicted(const bool &value) { + auto oldValue = p_reconnectIfIpConflicted; + p_reconnectIfIpConflicted = value; + markPropertySet(14); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("reconnectIfIpConflicted"), value); + }); + } + if (p_reconnectIfIpConflicted != oldValue) { + Q_EMIT reconnectIfIpConflictedChanged(); + } + } + bool showBrowserLink() const { + return p_showBrowserLink; + } + void setShowBrowserLink(const bool &value) { + auto oldValue = p_showBrowserLink; + p_showBrowserLink = value; + markPropertySet(15); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("showBrowserLink"), value); + }); + } + if (p_showBrowserLink != oldValue) { + Q_EMIT showBrowserLinkChanged(); + } + } + bool showUnauthorizedSwitch() const { + return p_showUnauthorizedSwitch; + } + void setShowUnauthorizedSwitch(const bool &value) { + auto oldValue = p_showUnauthorizedSwitch; + p_showUnauthorizedSwitch = value; + markPropertySet(16); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("showUnauthorizedSwitch"), value); + }); + } + if (p_showUnauthorizedSwitch != oldValue) { + Q_EMIT showUnauthorizedSwitchChanged(); + } + } + bool supportCertifiedEscape() const { + return p_supportCertifiedEscape; + } + void setSupportCertifiedEscape(const bool &value) { + auto oldValue = p_supportCertifiedEscape; + p_supportCertifiedEscape = value; + markPropertySet(17); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("supportCertifiedEscape"), value); + }); + } + if (p_supportCertifiedEscape != oldValue) { + Q_EMIT supportCertifiedEscapeChanged(); + } + } + double wirelessScanInterval() const { + return p_wirelessScanInterval; + } + void setWirelessScanInterval(const double &value) { + auto oldValue = p_wirelessScanInterval; + p_wirelessScanInterval = value; + markPropertySet(18); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("wirelessScanInterval"), value); + }); + } + if (p_wirelessScanInterval != oldValue) { + Q_EMIT wirelessScanIntervalChanged(); + } + } + QString wpaEapAuthen() const { + return p_wpaEapAuthen; + } + void setWpaEapAuthen(const QString &value) { + auto oldValue = p_wpaEapAuthen; + p_wpaEapAuthen = value; + markPropertySet(19); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("wpaEapAuthen"), value); + }); + } + if (p_wpaEapAuthen != oldValue) { + Q_EMIT wpaEapAuthenChanged(); + } + } + QString wpaEapAuthmethod() const { + return p_wpaEapAuthmethod; + } + void setWpaEapAuthmethod(const QString &value) { + auto oldValue = p_wpaEapAuthmethod; + p_wpaEapAuthmethod = value; + markPropertySet(20); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("wpaEapAuthmethod"), value); + }); + } + if (p_wpaEapAuthmethod != oldValue) { + Q_EMIT wpaEapAuthmethodChanged(); + } + } +Q_SIGNALS: + void ConnectivityCheckIntervalChanged(); + void LoadServiceFromNMChanged(); + void NetworkCheckerUrlsChanged(); + void WLANScanIntervalChanged(); + void WPA3-Enterprise-VisibleChanged(); + void browserUrlChanged(); + void checkPortalChanged(); + void disabledNetworkChanged(); + void dontSetIpIfConflictChanged(); + void enableAccountNetworkChanged(); + void enableConnectivityChanged(); + void enableEapInputChanged(); + void lastProxyMethodChanged(); + void networkAirplaneModeChanged(); + void reconnectIfIpConflictedChanged(); + void showBrowserLinkChanged(); + void showUnauthorizedSwitchChanged(); + void supportCertifiedEscapeChanged(); + void wirelessScanIntervalChanged(); + void wpaEapAuthenChanged(); + void wpaEapAuthmethodChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("ConnectivityCheckInterval"), QVariant::fromValue(p_ConnectivityCheckInterval)); + } else { + updateValue(QStringLiteral("ConnectivityCheckInterval"), QVariant::fromValue(p_ConnectivityCheckInterval)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("LoadServiceFromNM"), QVariant::fromValue(p_LoadServiceFromNM)); + } else { + updateValue(QStringLiteral("LoadServiceFromNM"), QVariant::fromValue(p_LoadServiceFromNM)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("NetworkCheckerUrls"), QVariant::fromValue(p_NetworkCheckerUrls)); + } else { + updateValue(QStringLiteral("NetworkCheckerUrls"), QVariant::fromValue(p_NetworkCheckerUrls)); + } + if (testPropertySet(3)) { + config->setValue(QStringLiteral("WLANScanInterval"), QVariant::fromValue(p_WLANScanInterval)); + } else { + updateValue(QStringLiteral("WLANScanInterval"), QVariant::fromValue(p_WLANScanInterval)); + } + if (testPropertySet(4)) { + config->setValue(QStringLiteral("WPA3-Enterprise-Visible"), QVariant::fromValue(p_WPA3-Enterprise-Visible)); + } else { + updateValue(QStringLiteral("WPA3-Enterprise-Visible"), QVariant::fromValue(p_WPA3-Enterprise-Visible)); + } + if (testPropertySet(5)) { + config->setValue(QStringLiteral("browserUrl"), QVariant::fromValue(p_browserUrl)); + } else { + updateValue(QStringLiteral("browserUrl"), QVariant::fromValue(p_browserUrl)); + } + if (testPropertySet(6)) { + config->setValue(QStringLiteral("checkPortal"), QVariant::fromValue(p_checkPortal)); + } else { + updateValue(QStringLiteral("checkPortal"), QVariant::fromValue(p_checkPortal)); + } + if (testPropertySet(7)) { + config->setValue(QStringLiteral("disabledNetwork"), QVariant::fromValue(p_disabledNetwork)); + } else { + updateValue(QStringLiteral("disabledNetwork"), QVariant::fromValue(p_disabledNetwork)); + } + if (testPropertySet(8)) { + config->setValue(QStringLiteral("dontSetIpIfConflict"), QVariant::fromValue(p_dontSetIpIfConflict)); + } else { + updateValue(QStringLiteral("dontSetIpIfConflict"), QVariant::fromValue(p_dontSetIpIfConflict)); + } + if (testPropertySet(9)) { + config->setValue(QStringLiteral("enableAccountNetwork"), QVariant::fromValue(p_enableAccountNetwork)); + } else { + updateValue(QStringLiteral("enableAccountNetwork"), QVariant::fromValue(p_enableAccountNetwork)); + } + if (testPropertySet(10)) { + config->setValue(QStringLiteral("enableConnectivity"), QVariant::fromValue(p_enableConnectivity)); + } else { + updateValue(QStringLiteral("enableConnectivity"), QVariant::fromValue(p_enableConnectivity)); + } + if (testPropertySet(11)) { + config->setValue(QStringLiteral("enableEapInput"), QVariant::fromValue(p_enableEapInput)); + } else { + updateValue(QStringLiteral("enableEapInput"), QVariant::fromValue(p_enableEapInput)); + } + if (testPropertySet(12)) { + config->setValue(QStringLiteral("lastProxyMethod"), QVariant::fromValue(p_lastProxyMethod)); + } else { + updateValue(QStringLiteral("lastProxyMethod"), QVariant::fromValue(p_lastProxyMethod)); + } + if (testPropertySet(13)) { + config->setValue(QStringLiteral("networkAirplaneMode"), QVariant::fromValue(p_networkAirplaneMode)); + } else { + updateValue(QStringLiteral("networkAirplaneMode"), QVariant::fromValue(p_networkAirplaneMode)); + } + if (testPropertySet(14)) { + config->setValue(QStringLiteral("reconnectIfIpConflicted"), QVariant::fromValue(p_reconnectIfIpConflicted)); + } else { + updateValue(QStringLiteral("reconnectIfIpConflicted"), QVariant::fromValue(p_reconnectIfIpConflicted)); + } + if (testPropertySet(15)) { + config->setValue(QStringLiteral("showBrowserLink"), QVariant::fromValue(p_showBrowserLink)); + } else { + updateValue(QStringLiteral("showBrowserLink"), QVariant::fromValue(p_showBrowserLink)); + } + if (testPropertySet(16)) { + config->setValue(QStringLiteral("showUnauthorizedSwitch"), QVariant::fromValue(p_showUnauthorizedSwitch)); + } else { + updateValue(QStringLiteral("showUnauthorizedSwitch"), QVariant::fromValue(p_showUnauthorizedSwitch)); + } + if (testPropertySet(17)) { + config->setValue(QStringLiteral("supportCertifiedEscape"), QVariant::fromValue(p_supportCertifiedEscape)); + } else { + updateValue(QStringLiteral("supportCertifiedEscape"), QVariant::fromValue(p_supportCertifiedEscape)); + } + if (testPropertySet(18)) { + config->setValue(QStringLiteral("wirelessScanInterval"), QVariant::fromValue(p_wirelessScanInterval)); + } else { + updateValue(QStringLiteral("wirelessScanInterval"), QVariant::fromValue(p_wirelessScanInterval)); + } + if (testPropertySet(19)) { + config->setValue(QStringLiteral("wpaEapAuthen"), QVariant::fromValue(p_wpaEapAuthen)); + } else { + updateValue(QStringLiteral("wpaEapAuthen"), QVariant::fromValue(p_wpaEapAuthen)); + } + if (testPropertySet(20)) { + config->setValue(QStringLiteral("wpaEapAuthmethod"), QVariant::fromValue(p_wpaEapAuthmethod)); + } else { + updateValue(QStringLiteral("wpaEapAuthmethod"), QVariant::fromValue(p_wpaEapAuthmethod)); + } + + connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { + updateValue(key); + }, Qt::DirectConnection); + } + void updateValue(const QString &key, const QVariant &fallback = QVariant()) { + Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); + const QVariant &value = m_config.loadRelaxed()->value(key, fallback); + if (key == QStringLiteral("ConnectivityCheckInterval")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_ConnectivityCheckInterval != newValue) { + p_ConnectivityCheckInterval = newValue; + Q_EMIT ConnectivityCheckIntervalChanged(); + } + }); + return; + } + if (key == QStringLiteral("LoadServiceFromNM")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_LoadServiceFromNM != newValue) { + p_LoadServiceFromNM = newValue; + Q_EMIT LoadServiceFromNMChanged(); + } + }); + return; + } + if (key == QStringLiteral("NetworkCheckerUrls")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_NetworkCheckerUrls != newValue) { + p_NetworkCheckerUrls = newValue; + Q_EMIT NetworkCheckerUrlsChanged(); + } + }); + return; + } + if (key == QStringLiteral("WLANScanInterval")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_WLANScanInterval != newValue) { + p_WLANScanInterval = newValue; + Q_EMIT WLANScanIntervalChanged(); + } + }); + return; + } + if (key == QStringLiteral("WPA3-Enterprise-Visible")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_WPA3-Enterprise-Visible != newValue) { + p_WPA3-Enterprise-Visible = newValue; + Q_EMIT WPA3-Enterprise-VisibleChanged(); + } + }); + return; + } + if (key == QStringLiteral("browserUrl")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_browserUrl != newValue) { + p_browserUrl = newValue; + Q_EMIT browserUrlChanged(); + } + }); + return; + } + if (key == QStringLiteral("checkPortal")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_checkPortal != newValue) { + p_checkPortal = newValue; + Q_EMIT checkPortalChanged(); + } + }); + return; + } + if (key == QStringLiteral("disabledNetwork")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_disabledNetwork != newValue) { + p_disabledNetwork = newValue; + Q_EMIT disabledNetworkChanged(); + } + }); + return; + } + if (key == QStringLiteral("dontSetIpIfConflict")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dontSetIpIfConflict != newValue) { + p_dontSetIpIfConflict = newValue; + Q_EMIT dontSetIpIfConflictChanged(); + } + }); + return; + } + if (key == QStringLiteral("enableAccountNetwork")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enableAccountNetwork != newValue) { + p_enableAccountNetwork = newValue; + Q_EMIT enableAccountNetworkChanged(); + } + }); + return; + } + if (key == QStringLiteral("enableConnectivity")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enableConnectivity != newValue) { + p_enableConnectivity = newValue; + Q_EMIT enableConnectivityChanged(); + } + }); + return; + } + if (key == QStringLiteral("enableEapInput")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enableEapInput != newValue) { + p_enableEapInput = newValue; + Q_EMIT enableEapInputChanged(); + } + }); + return; + } + if (key == QStringLiteral("lastProxyMethod")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_lastProxyMethod != newValue) { + p_lastProxyMethod = newValue; + Q_EMIT lastProxyMethodChanged(); + } + }); + return; + } + if (key == QStringLiteral("networkAirplaneMode")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_networkAirplaneMode != newValue) { + p_networkAirplaneMode = newValue; + Q_EMIT networkAirplaneModeChanged(); + } + }); + return; + } + if (key == QStringLiteral("reconnectIfIpConflicted")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_reconnectIfIpConflicted != newValue) { + p_reconnectIfIpConflicted = newValue; + Q_EMIT reconnectIfIpConflictedChanged(); + } + }); + return; + } + if (key == QStringLiteral("showBrowserLink")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_showBrowserLink != newValue) { + p_showBrowserLink = newValue; + Q_EMIT showBrowserLinkChanged(); + } + }); + return; + } + if (key == QStringLiteral("showUnauthorizedSwitch")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_showUnauthorizedSwitch != newValue) { + p_showUnauthorizedSwitch = newValue; + Q_EMIT showUnauthorizedSwitchChanged(); + } + }); + return; + } + if (key == QStringLiteral("supportCertifiedEscape")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_supportCertifiedEscape != newValue) { + p_supportCertifiedEscape = newValue; + Q_EMIT supportCertifiedEscapeChanged(); + } + }); + return; + } + if (key == QStringLiteral("wirelessScanInterval")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_wirelessScanInterval != newValue) { + p_wirelessScanInterval = newValue; + Q_EMIT wirelessScanIntervalChanged(); + } + }); + return; + } + if (key == QStringLiteral("wpaEapAuthen")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_wpaEapAuthen != newValue) { + p_wpaEapAuthen = newValue; + Q_EMIT wpaEapAuthenChanged(); + } + }); + return; + } + if (key == QStringLiteral("wpaEapAuthmethod")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_wpaEapAuthmethod != newValue) { + p_wpaEapAuthmethod = newValue; + Q_EMIT wpaEapAuthmethodChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + double p_ConnectivityCheckInterval { 30 }; + bool p_LoadServiceFromNM { true }; + QList p_NetworkCheckerUrls { QList{QVariant(QStringLiteral("http://detect.uniontech.com")), QVariant(QStringLiteral("http://detectportal.deepin.com"))} }; + QList p_WLANScanInterval { QList{QVariant(10), QVariant(10), QVariant(10), QVariant(30), QVariant(30), QVariant(30), QVariant(60)} }; + bool p_WPA3-Enterprise-Visible { false }; + QString p_browserUrl { QStringLiteral("https://www.uniontech.com") }; + bool p_checkPortal { true }; + bool p_disabledNetwork { false }; + bool p_dontSetIpIfConflict { false }; + bool p_enableAccountNetwork { false }; + bool p_enableConnectivity { true }; + bool p_enableEapInput { false }; + QString p_lastProxyMethod { QStringLiteral("manual") }; + bool p_networkAirplaneMode { true }; + bool p_reconnectIfIpConflicted { false }; + bool p_showBrowserLink { false }; + bool p_showUnauthorizedSwitch { false }; + bool p_supportCertifiedEscape { false }; + double p_wirelessScanInterval { 10 }; + QString p_wpaEapAuthen { QStringLiteral("peap") }; + QString p_wpaEapAuthmethod { QStringLiteral("MSCHAPV2") }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_NETWORK_H diff --git a/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.cpp b/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.cpp new file mode 100644 index 00000000..c023e495 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.cpp @@ -0,0 +1,83 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/libdbusmenuqt/com.canonical.dbusmenu.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenu.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class DbusmenuAdaptor + */ + +DbusmenuAdaptor::DbusmenuAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +DbusmenuAdaptor::~DbusmenuAdaptor() +{ + // destructor +} + +QString DbusmenuAdaptor::status() const +{ + // get the value of property Status + return qvariant_cast< QString >(parent()->property("Status")); +} + +uint DbusmenuAdaptor::version() const +{ + // get the value of property Version + return qvariant_cast< uint >(parent()->property("Version")); +} + +bool DbusmenuAdaptor::AboutToShow(int id) +{ + // handle method call com.canonical.dbusmenu.AboutToShow + bool out0; + QMetaObject::invokeMethod(parent(), "AboutToShow", Q_RETURN_ARG(bool, out0), Q_ARG(int, id)); + return out0; +} + +void DbusmenuAdaptor::Event(int id, const QString &eventId, const QDBusVariant &data, uint timestamp) +{ + // handle method call com.canonical.dbusmenu.Event + QMetaObject::invokeMethod(parent(), "Event", Q_ARG(int, id), Q_ARG(QString, eventId), Q_ARG(QDBusVariant, data), Q_ARG(uint, timestamp)); +} + +DBusMenuItemList DbusmenuAdaptor::GetGroupProperties(const QList &ids, const QStringList &propertyNames) +{ + // handle method call com.canonical.dbusmenu.GetGroupProperties + DBusMenuItemList out0; + QMetaObject::invokeMethod(parent(), "GetGroupProperties", Q_RETURN_ARG(DBusMenuItemList, out0), Q_ARG(QList, ids), Q_ARG(QStringList, propertyNames)); + return out0; +} + +uint DbusmenuAdaptor::GetLayout(int parentId, int recursionDepth, const QStringList &propertyNames, DBusMenuLayoutItem &item) +{ + // handle method call com.canonical.dbusmenu.GetLayout + //return static_cast(parent())->GetLayout(parentId, recursionDepth, propertyNames, item); +} + +QDBusVariant DbusmenuAdaptor::GetProperty(int id, const QString &property) +{ + // handle method call com.canonical.dbusmenu.GetProperty + QDBusVariant out0; + QMetaObject::invokeMethod(parent(), "GetProperty", Q_RETURN_ARG(QDBusVariant, out0), Q_ARG(int, id), Q_ARG(QString, property)); + return out0; +} + diff --git a/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.h b/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.h new file mode 100644 index 00000000..86602023 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor.h @@ -0,0 +1,108 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/libdbusmenuqt/com.canonical.dbusmenu.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenuAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenu.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef COM_CANONICAL_DBUSMENUADAPTOR_H +#define COM_CANONICAL_DBUSMENUADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.canonical.dbusmenu.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface com.canonical.dbusmenu + */ +class DbusmenuAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "com.canonical.dbusmenu") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + DbusmenuAdaptor(QObject *parent); + virtual ~DbusmenuAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString Status READ status) + QString status() const; + + Q_PROPERTY(uint Version READ version) + uint version() const; + +public Q_SLOTS: // METHODS + bool AboutToShow(int id); + Q_NOREPLY void Event(int id, const QString &eventId, const QDBusVariant &data, uint timestamp); + DBusMenuItemList GetGroupProperties(const QList &ids, const QStringList &propertyNames); + uint GetLayout(int parentId, int recursionDepth, const QStringList &propertyNames, DBusMenuLayoutItem &item); + QDBusVariant GetProperty(int id, const QString &property); +Q_SIGNALS: // SIGNALS + void ItemActivationRequested(int id, uint timeStamp); + void ItemsPropertiesUpdated(DBusMenuItemList in0, DBusMenuItemKeysList in1); + void LayoutUpdated(uint revision, int parentId); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.cpp b/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.cpp new file mode 100644 index 00000000..a776e1d5 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.cpp @@ -0,0 +1,41 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/power/dbus/com.deepin.daemon.Power.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.Power.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Power1Adaptor + */ + +Power1Adaptor::Power1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Power1Adaptor::~Power1Adaptor() +{ + // destructor +} + +BatteryPercentageMap Power1Adaptor::batteryPercentage() const +{ + // get the value of property BatteryPercentage + return qvariant_cast< BatteryPercentageMap >(parent()->property("BatteryPercentage")); +} + diff --git a/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.h b/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.h new file mode 100644 index 00000000..913e0ef1 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor.h @@ -0,0 +1,53 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/power/dbus/com.deepin.daemon.Power.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.PowerAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.Power.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef COM_DEEPIN_DAEMON_POWERADAPTOR_H +#define COM_DEEPIN_DAEMON_POWERADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/com.deepin.daemon.Power.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Power1 + */ +class Power1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Power1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Power1Adaptor(QObject *parent); + virtual ~Power1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(BatteryPercentageMap BatteryPercentage READ batteryPercentage) + BatteryPercentageMap batteryPercentage() const; + +public Q_SLOTS: // METHODS +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.cpp new file mode 100644 index 00000000..769e7db7 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.cpp @@ -0,0 +1,77 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.AirplaneMode1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class AirplaneMode1Adaptor + */ + +AirplaneMode1Adaptor::AirplaneMode1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +AirplaneMode1Adaptor::~AirplaneMode1Adaptor() +{ + // destructor +} + +bool AirplaneMode1Adaptor::bluetoothEnabled() const +{ + // get the value of property BluetoothEnabled + return qvariant_cast< bool >(parent()->property("BluetoothEnabled")); +} + +bool AirplaneMode1Adaptor::enabled() const +{ + // get the value of property Enabled + return qvariant_cast< bool >(parent()->property("Enabled")); +} + +bool AirplaneMode1Adaptor::wifiEnabled() const +{ + // get the value of property WifiEnabled + return qvariant_cast< bool >(parent()->property("WifiEnabled")); +} + +void AirplaneMode1Adaptor::DumpState() +{ + // handle method call org.deepin.dde.AirplaneMode1.DumpState + QMetaObject::invokeMethod(parent(), "DumpState"); +} + +void AirplaneMode1Adaptor::Enable(bool enabled) +{ + // handle method call org.deepin.dde.AirplaneMode1.Enable + QMetaObject::invokeMethod(parent(), "Enable", Q_ARG(bool, enabled)); +} + +void AirplaneMode1Adaptor::EnableBluetooth(bool enabled) +{ + // handle method call org.deepin.dde.AirplaneMode1.EnableBluetooth + QMetaObject::invokeMethod(parent(), "EnableBluetooth", Q_ARG(bool, enabled)); +} + +void AirplaneMode1Adaptor::EnableWifi(bool enabled) +{ + // handle method call org.deepin.dde.AirplaneMode1.EnableWifi + QMetaObject::invokeMethod(parent(), "EnableWifi", Q_ARG(bool, enabled)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.h new file mode 100644 index 00000000..cb26a236 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor.h @@ -0,0 +1,73 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.AirplaneMode1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_AIRPLANEMODE1ADAPTOR_H +#define ORG_DEEPIN_DDE_AIRPLANEMODE1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.AirplaneMode1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.AirplaneMode1 + */ +class AirplaneMode1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.AirplaneMode1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + AirplaneMode1Adaptor(QObject *parent); + virtual ~AirplaneMode1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool BluetoothEnabled READ bluetoothEnabled) + bool bluetoothEnabled() const; + + Q_PROPERTY(bool Enabled READ enabled) + bool enabled() const; + + Q_PROPERTY(bool WifiEnabled READ wifiEnabled) + bool wifiEnabled() const; + +public Q_SLOTS: // METHODS + void DumpState(); + void Enable(bool enabled); + void EnableBluetooth(bool enabled); + void EnableWifi(bool enabled); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp new file mode 100644 index 00000000..ea493624 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp @@ -0,0 +1,225 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Appearance1Adaptor + */ + +Appearance1Adaptor::Appearance1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Appearance1Adaptor::~Appearance1Adaptor() +{ + // destructor +} + +QString Appearance1Adaptor::background() const +{ + // get the value of property Background + return qvariant_cast< QString >(parent()->property("Background")); +} + +void Appearance1Adaptor::setBackground(const QString &value) +{ + // set the value of property Background + parent()->setProperty("Background", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::cursorTheme() const +{ + // get the value of property CursorTheme + return qvariant_cast< QString >(parent()->property("CursorTheme")); +} + +void Appearance1Adaptor::setCursorTheme(const QString &value) +{ + // set the value of property CursorTheme + parent()->setProperty("CursorTheme", QVariant::fromValue(value)); +} + +double Appearance1Adaptor::fontSize() const +{ + // get the value of property FontSize + return qvariant_cast< double >(parent()->property("FontSize")); +} + +void Appearance1Adaptor::setFontSize(double value) +{ + // set the value of property FontSize + parent()->setProperty("FontSize", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::globalTheme() const +{ + // get the value of property GlobalTheme + return qvariant_cast< QString >(parent()->property("GlobalTheme")); +} + +QString Appearance1Adaptor::gtkTheme() const +{ + // get the value of property GtkTheme + return qvariant_cast< QString >(parent()->property("GtkTheme")); +} + +void Appearance1Adaptor::setGtkTheme(const QString &value) +{ + // set the value of property GtkTheme + parent()->setProperty("GtkTheme", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::iconTheme() const +{ + // get the value of property IconTheme + return qvariant_cast< QString >(parent()->property("IconTheme")); +} + +void Appearance1Adaptor::setIconTheme(const QString &value) +{ + // set the value of property IconTheme + parent()->setProperty("IconTheme", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::monospaceFont() const +{ + // get the value of property MonospaceFont + return qvariant_cast< QString >(parent()->property("MonospaceFont")); +} + +void Appearance1Adaptor::setMonospaceFont(const QString &value) +{ + // set the value of property MonospaceFont + parent()->setProperty("MonospaceFont", QVariant::fromValue(value)); +} + +double Appearance1Adaptor::opacity() const +{ + // get the value of property Opacity + return qvariant_cast< double >(parent()->property("Opacity")); +} + +void Appearance1Adaptor::setOpacity(double value) +{ + // set the value of property Opacity + parent()->setProperty("Opacity", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::qtActiveColor() const +{ + // get the value of property QtActiveColor + return qvariant_cast< QString >(parent()->property("QtActiveColor")); +} + +void Appearance1Adaptor::setQtActiveColor(const QString &value) +{ + // set the value of property QtActiveColor + parent()->setProperty("QtActiveColor", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::standardFont() const +{ + // get the value of property StandardFont + return qvariant_cast< QString >(parent()->property("StandardFont")); +} + +void Appearance1Adaptor::setStandardFont(const QString &value) +{ + // set the value of property StandardFont + parent()->setProperty("StandardFont", QVariant::fromValue(value)); +} + +QString Appearance1Adaptor::wallpaperSlideShow() const +{ + // get the value of property WallpaperSlideShow + return qvariant_cast< QString >(parent()->property("WallpaperSlideShow")); +} + +void Appearance1Adaptor::setWallpaperSlideShow(const QString &value) +{ + // set the value of property WallpaperSlideShow + parent()->setProperty("WallpaperSlideShow", QVariant::fromValue(value)); +} + +void Appearance1Adaptor::Delete(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Appearance1.Delete + QMetaObject::invokeMethod(parent(), "Delete", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +double Appearance1Adaptor::GetScaleFactor() +{ + // handle method call org.deepin.dde.Appearance1.GetScaleFactor + double out0; + QMetaObject::invokeMethod(parent(), "GetScaleFactor", Q_RETURN_ARG(double, out0)); + return out0; +} + +QMap Appearance1Adaptor::GetScreenScaleFactors() +{ + // handle method call org.deepin.dde.Appearance1.GetScreenScaleFactors + QMap scaleFactors; + QMetaObject::invokeMethod(parent(), "GetScreenScaleFactors", Q_RETURN_ARG(QMap, scaleFactors)); + return scaleFactors; +} + +QString Appearance1Adaptor::List(const QString &in0) +{ + // handle method call org.deepin.dde.Appearance1.List + QString out0; + QMetaObject::invokeMethod(parent(), "List", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0)); + return out0; +} + +void Appearance1Adaptor::Set(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Appearance1.Set + QMetaObject::invokeMethod(parent(), "Set", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void Appearance1Adaptor::SetScaleFactor(double in0) +{ + // handle method call org.deepin.dde.Appearance1.SetScaleFactor + QMetaObject::invokeMethod(parent(), "SetScaleFactor", Q_ARG(double, in0)); +} + +void Appearance1Adaptor::SetScreenScaleFactors(const QMap &scaleFactors) +{ + // handle method call org.deepin.dde.Appearance1.SetScreenScaleFactors + QMetaObject::invokeMethod(parent(), "SetScreenScaleFactors", Q_ARG(QMap, scaleFactors)); +} + +QString Appearance1Adaptor::Show(const QString &in0, const QStringList &in1) +{ + // handle method call org.deepin.dde.Appearance1.Show + QString out0; + QMetaObject::invokeMethod(parent(), "Show", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0), Q_ARG(QStringList, in1)); + return out0; +} + +QString Appearance1Adaptor::Thumbnail(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Appearance1.Thumbnail + QString out0; + QMetaObject::invokeMethod(parent(), "Thumbnail", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0), Q_ARG(QString, in1)); + return out0; +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h new file mode 100644 index 00000000..40fba7f4 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h @@ -0,0 +1,155 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_APPEARANCE1ADAPTOR_H +#define ORG_DEEPIN_DDE_APPEARANCE1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Appearance1 + */ +class Appearance1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Appearance1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Appearance1Adaptor(QObject *parent); + virtual ~Appearance1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString Background READ background WRITE setBackground) + QString background() const; + void setBackground(const QString &value); + + Q_PROPERTY(QString CursorTheme READ cursorTheme WRITE setCursorTheme) + QString cursorTheme() const; + void setCursorTheme(const QString &value); + + Q_PROPERTY(double FontSize READ fontSize WRITE setFontSize) + double fontSize() const; + void setFontSize(double value); + + Q_PROPERTY(QString GlobalTheme READ globalTheme) + QString globalTheme() const; + + Q_PROPERTY(QString GtkTheme READ gtkTheme WRITE setGtkTheme) + QString gtkTheme() const; + void setGtkTheme(const QString &value); + + Q_PROPERTY(QString IconTheme READ iconTheme WRITE setIconTheme) + QString iconTheme() const; + void setIconTheme(const QString &value); + + Q_PROPERTY(QString MonospaceFont READ monospaceFont WRITE setMonospaceFont) + QString monospaceFont() const; + void setMonospaceFont(const QString &value); + + Q_PROPERTY(double Opacity READ opacity WRITE setOpacity) + double opacity() const; + void setOpacity(double value); + + Q_PROPERTY(QString QtActiveColor READ qtActiveColor WRITE setQtActiveColor) + QString qtActiveColor() const; + void setQtActiveColor(const QString &value); + + Q_PROPERTY(QString StandardFont READ standardFont WRITE setStandardFont) + QString standardFont() const; + void setStandardFont(const QString &value); + + Q_PROPERTY(QString WallpaperSlideShow READ wallpaperSlideShow WRITE setWallpaperSlideShow) + QString wallpaperSlideShow() const; + void setWallpaperSlideShow(const QString &value); + +public Q_SLOTS: // METHODS + void Delete(const QString &in0, const QString &in1); + double GetScaleFactor(); + QMap GetScreenScaleFactors(); + QString List(const QString &in0); + void Set(const QString &in0, const QString &in1); + void SetScaleFactor(double in0); + void SetScreenScaleFactors(const QMap &scaleFactors); + QString Show(const QString &in0, const QStringList &in1); + QString Thumbnail(const QString &in0, const QString &in1); +Q_SIGNALS: // SIGNALS + void Changed(const QString &in0, const QString &in1); + void Refreshed(const QString &in0); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp new file mode 100644 index 00000000..7b5c3503 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp @@ -0,0 +1,145 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class SinkAdaptor + */ + +SinkAdaptor::SinkAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +SinkAdaptor::~SinkAdaptor() +{ + // destructor +} + +AudioPort SinkAdaptor::activePort() const +{ + // get the value of property ActivePort + return qvariant_cast< AudioPort >(parent()->property("ActivePort")); +} + +double SinkAdaptor::balance() const +{ + // get the value of property Balance + return qvariant_cast< double >(parent()->property("Balance")); +} + +double SinkAdaptor::baseVolume() const +{ + // get the value of property BaseVolume + return qvariant_cast< double >(parent()->property("BaseVolume")); +} + +uint SinkAdaptor::card() const +{ + // get the value of property Card + return qvariant_cast< uint >(parent()->property("Card")); +} + +QString SinkAdaptor::description() const +{ + // get the value of property Description + return qvariant_cast< QString >(parent()->property("Description")); +} + +double SinkAdaptor::fade() const +{ + // get the value of property Fade + return qvariant_cast< double >(parent()->property("Fade")); +} + +bool SinkAdaptor::mute() const +{ + // get the value of property Mute + return qvariant_cast< bool >(parent()->property("Mute")); +} + +QString SinkAdaptor::name() const +{ + // get the value of property Name + return qvariant_cast< QString >(parent()->property("Name")); +} + +AudioPortList SinkAdaptor::ports() const +{ + // get the value of property Ports + return qvariant_cast< AudioPortList >(parent()->property("Ports")); +} + +bool SinkAdaptor::supportBalance() const +{ + // get the value of property SupportBalance + return qvariant_cast< bool >(parent()->property("SupportBalance")); +} + +bool SinkAdaptor::supportFade() const +{ + // get the value of property SupportFade + return qvariant_cast< bool >(parent()->property("SupportFade")); +} + +double SinkAdaptor::volume() const +{ + // get the value of property Volume + return qvariant_cast< double >(parent()->property("Volume")); +} + +QDBusObjectPath SinkAdaptor::GetMeter() +{ + // handle method call org.deepin.dde.Audio1.Sink.GetMeter + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetMeter", Q_RETURN_ARG(QDBusObjectPath, out0)); + return out0; +} + +void SinkAdaptor::SetBalance(double in0, bool in1) +{ + // handle method call org.deepin.dde.Audio1.Sink.SetBalance + QMetaObject::invokeMethod(parent(), "SetBalance", Q_ARG(double, in0), Q_ARG(bool, in1)); +} + +void SinkAdaptor::SetFade(double in0) +{ + // handle method call org.deepin.dde.Audio1.Sink.SetFade + QMetaObject::invokeMethod(parent(), "SetFade", Q_ARG(double, in0)); +} + +void SinkAdaptor::SetMute(bool in0) +{ + // handle method call org.deepin.dde.Audio1.Sink.SetMute + QMetaObject::invokeMethod(parent(), "SetMute", Q_ARG(bool, in0)); +} + +void SinkAdaptor::SetPort(const QString &in0) +{ + // handle method call org.deepin.dde.Audio1.Sink.SetPort + QMetaObject::invokeMethod(parent(), "SetPort", Q_ARG(QString, in0)); +} + +void SinkAdaptor::SetVolume(double in0, bool in1) +{ + // handle method call org.deepin.dde.Audio1.Sink.SetVolume + QMetaObject::invokeMethod(parent(), "SetVolume", Q_ARG(double, in0), Q_ARG(bool, in1)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h new file mode 100644 index 00000000..84ffd473 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h @@ -0,0 +1,125 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_AUDIO1_SINKADAPTOR_H +#define ORG_DEEPIN_DDE_AUDIO1_SINKADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Audio1.Sink + */ +class SinkAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Audio1.Sink") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + SinkAdaptor(QObject *parent); + virtual ~SinkAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(AudioPort ActivePort READ activePort) + AudioPort activePort() const; + + Q_PROPERTY(double Balance READ balance) + double balance() const; + + Q_PROPERTY(double BaseVolume READ baseVolume) + double baseVolume() const; + + Q_PROPERTY(uint Card READ card) + uint card() const; + + Q_PROPERTY(QString Description READ description) + QString description() const; + + Q_PROPERTY(double Fade READ fade) + double fade() const; + + Q_PROPERTY(bool Mute READ mute) + bool mute() const; + + Q_PROPERTY(QString Name READ name) + QString name() const; + + Q_PROPERTY(AudioPortList Ports READ ports) + AudioPortList ports() const; + + Q_PROPERTY(bool SupportBalance READ supportBalance) + bool supportBalance() const; + + Q_PROPERTY(bool SupportFade READ supportFade) + bool supportFade() const; + + Q_PROPERTY(double Volume READ volume) + double volume() const; + +public Q_SLOTS: // METHODS + QDBusObjectPath GetMeter(); + void SetBalance(double in0, bool in1); + void SetFade(double in0); + void SetMute(bool in0); + void SetPort(const QString &in0); + void SetVolume(double in0, bool in1); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp new file mode 100644 index 00000000..8cf4be36 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp @@ -0,0 +1,163 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Audio1Adaptor + */ + +Audio1Adaptor::Audio1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Audio1Adaptor::~Audio1Adaptor() +{ + // destructor +} + +QString Audio1Adaptor::bluetoothAudioMode() const +{ + // get the value of property BluetoothAudioMode + return qvariant_cast< QString >(parent()->property("BluetoothAudioMode")); +} + +QStringList Audio1Adaptor::bluetoothAudioModeOpts() const +{ + // get the value of property BluetoothAudioModeOpts + return qvariant_cast< QStringList >(parent()->property("BluetoothAudioModeOpts")); +} + +QString Audio1Adaptor::cards() const +{ + // get the value of property Cards + return qvariant_cast< QString >(parent()->property("Cards")); +} + +QString Audio1Adaptor::cardsWithoutUnavailable() const +{ + // get the value of property CardsWithoutUnavailable + return qvariant_cast< QString >(parent()->property("CardsWithoutUnavailable")); +} + +QDBusObjectPath Audio1Adaptor::defaultSink() const +{ + // get the value of property DefaultSink + return qvariant_cast< QDBusObjectPath >(parent()->property("DefaultSink")); +} + +QDBusObjectPath Audio1Adaptor::defaultSource() const +{ + // get the value of property DefaultSource + return qvariant_cast< QDBusObjectPath >(parent()->property("DefaultSource")); +} + +bool Audio1Adaptor::increaseVolume() const +{ + // get the value of property IncreaseVolume + return qvariant_cast< bool >(parent()->property("IncreaseVolume")); +} + +void Audio1Adaptor::setIncreaseVolume(bool value) +{ + // set the value of property IncreaseVolume + parent()->setProperty("IncreaseVolume", QVariant::fromValue(value)); +} + +double Audio1Adaptor::maxUIVolume() const +{ + // get the value of property MaxUIVolume + return qvariant_cast< double >(parent()->property("MaxUIVolume")); +} + +bool Audio1Adaptor::reduceNoise() const +{ + // get the value of property ReduceNoise + return qvariant_cast< bool >(parent()->property("ReduceNoise")); +} + +void Audio1Adaptor::setReduceNoise(bool value) +{ + // set the value of property ReduceNoise + parent()->setProperty("ReduceNoise", QVariant::fromValue(value)); +} + +QList Audio1Adaptor::sinkInputs() const +{ + // get the value of property SinkInputs + return qvariant_cast< QList >(parent()->property("SinkInputs")); +} + +QList Audio1Adaptor::sinks() const +{ + // get the value of property Sinks + return qvariant_cast< QList >(parent()->property("Sinks")); +} + +QList Audio1Adaptor::sources() const +{ + // get the value of property Sources + return qvariant_cast< QList >(parent()->property("Sources")); +} + +bool Audio1Adaptor::IsPortEnabled(uint in0, const QString &in1) +{ + // handle method call org.deepin.dde.Audio1.IsPortEnabled + bool out0; + QMetaObject::invokeMethod(parent(), "IsPortEnabled", Q_RETURN_ARG(bool, out0), Q_ARG(uint, in0), Q_ARG(QString, in1)); + return out0; +} + +void Audio1Adaptor::Reset() +{ + // handle method call org.deepin.dde.Audio1.Reset + QMetaObject::invokeMethod(parent(), "Reset"); +} + +void Audio1Adaptor::SetBluetoothAudioMode(const QString &in0) +{ + // handle method call org.deepin.dde.Audio1.SetBluetoothAudioMode + QMetaObject::invokeMethod(parent(), "SetBluetoothAudioMode", Q_ARG(QString, in0)); +} + +void Audio1Adaptor::SetDefaultSink(const QString &in0) +{ + // handle method call org.deepin.dde.Audio1.SetDefaultSink + QMetaObject::invokeMethod(parent(), "SetDefaultSink", Q_ARG(QString, in0)); +} + +void Audio1Adaptor::SetDefaultSource(const QString &in0) +{ + // handle method call org.deepin.dde.Audio1.SetDefaultSource + QMetaObject::invokeMethod(parent(), "SetDefaultSource", Q_ARG(QString, in0)); +} + +void Audio1Adaptor::SetPort(uint in0, const QString &in1, int in2) +{ + // handle method call org.deepin.dde.Audio1.SetPort + QMetaObject::invokeMethod(parent(), "SetPort", Q_ARG(uint, in0), Q_ARG(QString, in1), Q_ARG(int, in2)); +} + +void Audio1Adaptor::SetPortEnabled(uint in0, const QString &in1, bool in2) +{ + // handle method call org.deepin.dde.Audio1.SetPortEnabled + QMetaObject::invokeMethod(parent(), "SetPortEnabled", Q_ARG(uint, in0), Q_ARG(QString, in1), Q_ARG(bool, in2)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h new file mode 100644 index 00000000..2ffcbe90 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h @@ -0,0 +1,137 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_AUDIO1ADAPTOR_H +#define ORG_DEEPIN_DDE_AUDIO1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Audio1 + */ +class Audio1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Audio1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Audio1Adaptor(QObject *parent); + virtual ~Audio1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString BluetoothAudioMode READ bluetoothAudioMode) + QString bluetoothAudioMode() const; + + Q_PROPERTY(QStringList BluetoothAudioModeOpts READ bluetoothAudioModeOpts) + QStringList bluetoothAudioModeOpts() const; + + Q_PROPERTY(QString Cards READ cards) + QString cards() const; + + Q_PROPERTY(QString CardsWithoutUnavailable READ cardsWithoutUnavailable) + QString cardsWithoutUnavailable() const; + + Q_PROPERTY(QDBusObjectPath DefaultSink READ defaultSink) + QDBusObjectPath defaultSink() const; + + Q_PROPERTY(QDBusObjectPath DefaultSource READ defaultSource) + QDBusObjectPath defaultSource() const; + + Q_PROPERTY(bool IncreaseVolume READ increaseVolume WRITE setIncreaseVolume) + bool increaseVolume() const; + void setIncreaseVolume(bool value); + + Q_PROPERTY(double MaxUIVolume READ maxUIVolume) + double maxUIVolume() const; + + Q_PROPERTY(bool ReduceNoise READ reduceNoise WRITE setReduceNoise) + bool reduceNoise() const; + void setReduceNoise(bool value); + + Q_PROPERTY(QList SinkInputs READ sinkInputs) + QList sinkInputs() const; + + Q_PROPERTY(QList Sinks READ sinks) + QList sinks() const; + + Q_PROPERTY(QList Sources READ sources) + QList sources() const; + +public Q_SLOTS: // METHODS + bool IsPortEnabled(uint in0, const QString &in1); + void Reset(); + void SetBluetoothAudioMode(const QString &in0); + void SetDefaultSink(const QString &in0); + void SetDefaultSource(const QString &in0); + void SetPort(uint in0, const QString &in1, int in2); + void SetPortEnabled(uint in0, const QString &in1, bool in2); +Q_SIGNALS: // SIGNALS + void PortEnabledChanged(uint in0, const QString &in1, bool in2); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.cpp new file mode 100644 index 00000000..a6f92733 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.cpp @@ -0,0 +1,193 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Bluetooth1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Bluetooth1Adaptor + */ + +Bluetooth1Adaptor::Bluetooth1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Bluetooth1Adaptor::~Bluetooth1Adaptor() +{ + // destructor +} + +bool Bluetooth1Adaptor::canSendFile() const +{ + // get the value of property CanSendFile + return qvariant_cast< bool >(parent()->property("CanSendFile")); +} + +bool Bluetooth1Adaptor::displaySwitch() const +{ + // get the value of property DisplaySwitch + return qvariant_cast< bool >(parent()->property("DisplaySwitch")); +} + +void Bluetooth1Adaptor::setDisplaySwitch(bool value) +{ + // set the value of property DisplaySwitch + parent()->setProperty("DisplaySwitch", QVariant::fromValue(value)); +} + +uint Bluetooth1Adaptor::state() const +{ + // get the value of property State + return qvariant_cast< uint >(parent()->property("State")); +} + +bool Bluetooth1Adaptor::transportable() const +{ + // get the value of property Transportable + return qvariant_cast< bool >(parent()->property("Transportable")); +} + +void Bluetooth1Adaptor::CancelTransferSession(const QDBusObjectPath &sessionPath) +{ + // handle method call org.deepin.dde.Bluetooth1.CancelTransferSession + QMetaObject::invokeMethod(parent(), "CancelTransferSession", Q_ARG(QDBusObjectPath, sessionPath)); +} + +void Bluetooth1Adaptor::ClearUnpairedDevice() +{ + // handle method call org.deepin.dde.Bluetooth1.ClearUnpairedDevice + QMetaObject::invokeMethod(parent(), "ClearUnpairedDevice"); +} + +void Bluetooth1Adaptor::Confirm(const QDBusObjectPath &device, bool accept) +{ + // handle method call org.deepin.dde.Bluetooth1.Confirm + QMetaObject::invokeMethod(parent(), "Confirm", Q_ARG(QDBusObjectPath, device), Q_ARG(bool, accept)); +} + +void Bluetooth1Adaptor::ConnectDevice(const QDBusObjectPath &device, const QDBusObjectPath &adapter) +{ + // handle method call org.deepin.dde.Bluetooth1.ConnectDevice + QMetaObject::invokeMethod(parent(), "ConnectDevice", Q_ARG(QDBusObjectPath, device), Q_ARG(QDBusObjectPath, adapter)); +} + +QString Bluetooth1Adaptor::DebugInfo() +{ + // handle method call org.deepin.dde.Bluetooth1.DebugInfo + QString info; + QMetaObject::invokeMethod(parent(), "DebugInfo", Q_RETURN_ARG(QString, info)); + return info; +} + +void Bluetooth1Adaptor::DisconnectDevice(const QDBusObjectPath &device) +{ + // handle method call org.deepin.dde.Bluetooth1.DisconnectDevice + QMetaObject::invokeMethod(parent(), "DisconnectDevice", Q_ARG(QDBusObjectPath, device)); +} + +void Bluetooth1Adaptor::FeedPasskey(const QDBusObjectPath &device, bool accept, uint passkey) +{ + // handle method call org.deepin.dde.Bluetooth1.FeedPasskey + QMetaObject::invokeMethod(parent(), "FeedPasskey", Q_ARG(QDBusObjectPath, device), Q_ARG(bool, accept), Q_ARG(uint, passkey)); +} + +void Bluetooth1Adaptor::FeedPinCode(const QDBusObjectPath &device, bool accept, const QString &pinCode) +{ + // handle method call org.deepin.dde.Bluetooth1.FeedPinCode + QMetaObject::invokeMethod(parent(), "FeedPinCode", Q_ARG(QDBusObjectPath, device), Q_ARG(bool, accept), Q_ARG(QString, pinCode)); +} + +QString Bluetooth1Adaptor::GetAdapters() +{ + // handle method call org.deepin.dde.Bluetooth1.GetAdapters + QString adaptersJSON; + QMetaObject::invokeMethod(parent(), "GetAdapters", Q_RETURN_ARG(QString, adaptersJSON)); + return adaptersJSON; +} + +QString Bluetooth1Adaptor::GetDevices(const QDBusObjectPath &adapter) +{ + // handle method call org.deepin.dde.Bluetooth1.GetDevices + QString devicesJSON; + QMetaObject::invokeMethod(parent(), "GetDevices", Q_RETURN_ARG(QString, devicesJSON), Q_ARG(QDBusObjectPath, adapter)); + return devicesJSON; +} + +void Bluetooth1Adaptor::RemoveDevice(const QDBusObjectPath &adapter, const QDBusObjectPath &device) +{ + // handle method call org.deepin.dde.Bluetooth1.RemoveDevice + QMetaObject::invokeMethod(parent(), "RemoveDevice", Q_ARG(QDBusObjectPath, adapter), Q_ARG(QDBusObjectPath, device)); +} + +void Bluetooth1Adaptor::RequestDiscovery(const QDBusObjectPath &adapter) +{ + // handle method call org.deepin.dde.Bluetooth1.RequestDiscovery + QMetaObject::invokeMethod(parent(), "RequestDiscovery", Q_ARG(QDBusObjectPath, adapter)); +} + +QDBusObjectPath Bluetooth1Adaptor::SendFiles(const QString &device, const QStringList &files) +{ + // handle method call org.deepin.dde.Bluetooth1.SendFiles + QDBusObjectPath sessionPath; + QMetaObject::invokeMethod(parent(), "SendFiles", Q_RETURN_ARG(QDBusObjectPath, sessionPath), Q_ARG(QString, device), Q_ARG(QStringList, files)); + return sessionPath; +} + +void Bluetooth1Adaptor::SetAdapterAlias(const QDBusObjectPath &adapter, const QString &alias) +{ + // handle method call org.deepin.dde.Bluetooth1.SetAdapterAlias + QMetaObject::invokeMethod(parent(), "SetAdapterAlias", Q_ARG(QDBusObjectPath, adapter), Q_ARG(QString, alias)); +} + +void Bluetooth1Adaptor::SetAdapterDiscoverable(const QDBusObjectPath &adapter, bool discoverable) +{ + // handle method call org.deepin.dde.Bluetooth1.SetAdapterDiscoverable + QMetaObject::invokeMethod(parent(), "SetAdapterDiscoverable", Q_ARG(QDBusObjectPath, adapter), Q_ARG(bool, discoverable)); +} + +void Bluetooth1Adaptor::SetAdapterDiscoverableTimeout(const QDBusObjectPath &adapter, uint timeout) +{ + // handle method call org.deepin.dde.Bluetooth1.SetAdapterDiscoverableTimeout + QMetaObject::invokeMethod(parent(), "SetAdapterDiscoverableTimeout", Q_ARG(QDBusObjectPath, adapter), Q_ARG(uint, timeout)); +} + +void Bluetooth1Adaptor::SetAdapterDiscovering(const QDBusObjectPath &adapter, bool discovering) +{ + // handle method call org.deepin.dde.Bluetooth1.SetAdapterDiscovering + QMetaObject::invokeMethod(parent(), "SetAdapterDiscovering", Q_ARG(QDBusObjectPath, adapter), Q_ARG(bool, discovering)); +} + +void Bluetooth1Adaptor::SetAdapterPowered(const QDBusObjectPath &adapter, bool powered) +{ + // handle method call org.deepin.dde.Bluetooth1.SetAdapterPowered + QMetaObject::invokeMethod(parent(), "SetAdapterPowered", Q_ARG(QDBusObjectPath, adapter), Q_ARG(bool, powered)); +} + +void Bluetooth1Adaptor::SetDeviceAlias(const QDBusObjectPath &device, const QString &alias) +{ + // handle method call org.deepin.dde.Bluetooth1.SetDeviceAlias + QMetaObject::invokeMethod(parent(), "SetDeviceAlias", Q_ARG(QDBusObjectPath, device), Q_ARG(QString, alias)); +} + +void Bluetooth1Adaptor::SetDeviceTrusted(const QDBusObjectPath &device, bool trusted) +{ + // handle method call org.deepin.dde.Bluetooth1.SetDeviceTrusted + QMetaObject::invokeMethod(parent(), "SetDeviceTrusted", Q_ARG(QDBusObjectPath, device), Q_ARG(bool, trusted)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.h new file mode 100644 index 00000000..20429c7c --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor.h @@ -0,0 +1,253 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Bluetooth1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_BLUETOOTH1ADAPTOR_H +#define ORG_DEEPIN_DDE_BLUETOOTH1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Bluetooth1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Bluetooth1 + */ +class Bluetooth1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Bluetooth1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Bluetooth1Adaptor(QObject *parent); + virtual ~Bluetooth1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool CanSendFile READ canSendFile) + bool canSendFile() const; + + Q_PROPERTY(bool DisplaySwitch READ displaySwitch WRITE setDisplaySwitch) + bool displaySwitch() const; + void setDisplaySwitch(bool value); + + Q_PROPERTY(uint State READ state) + uint state() const; + + Q_PROPERTY(bool Transportable READ transportable) + bool transportable() const; + +public Q_SLOTS: // METHODS + void CancelTransferSession(const QDBusObjectPath &sessionPath); + void ClearUnpairedDevice(); + void Confirm(const QDBusObjectPath &device, bool accept); + void ConnectDevice(const QDBusObjectPath &device, const QDBusObjectPath &adapter); + QString DebugInfo(); + void DisconnectDevice(const QDBusObjectPath &device); + void FeedPasskey(const QDBusObjectPath &device, bool accept, uint passkey); + void FeedPinCode(const QDBusObjectPath &device, bool accept, const QString &pinCode); + QString GetAdapters(); + QString GetDevices(const QDBusObjectPath &adapter); + void RemoveDevice(const QDBusObjectPath &adapter, const QDBusObjectPath &device); + void RequestDiscovery(const QDBusObjectPath &adapter); + QDBusObjectPath SendFiles(const QString &device, const QStringList &files); + void SetAdapterAlias(const QDBusObjectPath &adapter, const QString &alias); + void SetAdapterDiscoverable(const QDBusObjectPath &adapter, bool discoverable); + void SetAdapterDiscoverableTimeout(const QDBusObjectPath &adapter, uint timeout); + void SetAdapterDiscovering(const QDBusObjectPath &adapter, bool discovering); + void SetAdapterPowered(const QDBusObjectPath &adapter, bool powered); + void SetDeviceAlias(const QDBusObjectPath &device, const QString &alias); + void SetDeviceTrusted(const QDBusObjectPath &device, bool trusted); +Q_SIGNALS: // SIGNALS + void AdapterAdded(const QString &adapterJSON); + void AdapterPropertiesChanged(const QString &adapterJSON); + void AdapterRemoved(const QString &adapterJSON); + void Cancelled(const QDBusObjectPath &device); + void ConnectFailed(const QDBusObjectPath &device); + void DeviceAdded(const QString &devJSON); + void DevicePropertiesChanged(const QString &devJSON); + void DeviceRemoved(const QString &devJSON); + void DisplayPasskey(const QDBusObjectPath &device, uint passkey, uint entered); + void DisplayPinCode(const QDBusObjectPath &device, const QString &pinCode); + void ObexSessionCreated(const QDBusObjectPath &sessionPath); + void ObexSessionProgress(const QDBusObjectPath &sessionPath, qulonglong totalSize, qulonglong transferred, int currentIdx); + void ObexSessionRemoved(const QDBusObjectPath &sessionPath); + void RequestAuthorization(const QDBusObjectPath &device); + void RequestConfirmation(const QDBusObjectPath &device, const QString &passkey); + void RequestPasskey(const QDBusObjectPath &device); + void RequestPinCode(const QDBusObjectPath &device); + void TransferCreated(const QString &file, const QDBusObjectPath &transferPath, const QDBusObjectPath &sessionPath); + void TransferFailed(const QString &file, const QDBusObjectPath &sessionPath, const QString &errInfo); + void TransferRemoved(const QString &file, const QDBusObjectPath &transferPath, const QDBusObjectPath &sessionPath, bool done); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp new file mode 100644 index 00000000..0e643b94 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp @@ -0,0 +1,209 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class MonitorAdaptor + */ + +MonitorAdaptor::MonitorAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +MonitorAdaptor::~MonitorAdaptor() +{ + // destructor +} + +QStringList MonitorAdaptor::availableFillModes() const +{ + // get the value of property AvailableFillModes + return qvariant_cast< QStringList >(parent()->property("AvailableFillModes")); +} + +Resolution MonitorAdaptor::bestMode() const +{ + // get the value of property BestMode + return qvariant_cast< Resolution >(parent()->property("BestMode")); +} + +bool MonitorAdaptor::connected() const +{ + // get the value of property Connected + return qvariant_cast< bool >(parent()->property("Connected")); +} + +QString MonitorAdaptor::currentFillMode() const +{ + // get the value of property CurrentFillMode + return qvariant_cast< QString >(parent()->property("CurrentFillMode")); +} + +void MonitorAdaptor::setCurrentFillMode(const QString &value) +{ + // set the value of property CurrentFillMode + parent()->setProperty("CurrentFillMode", QVariant::fromValue(value)); +} + +Resolution MonitorAdaptor::currentMode() const +{ + // get the value of property CurrentMode + return qvariant_cast< Resolution >(parent()->property("CurrentMode")); +} + +uchar MonitorAdaptor::currentRotateMode() const +{ + // get the value of property CurrentRotateMode + return qvariant_cast< uchar >(parent()->property("CurrentRotateMode")); +} + +bool MonitorAdaptor::enabled() const +{ + // get the value of property Enabled + return qvariant_cast< bool >(parent()->property("Enabled")); +} + +ushort MonitorAdaptor::height() const +{ + // get the value of property Height + return qvariant_cast< ushort >(parent()->property("Height")); +} + +QString MonitorAdaptor::manufacturer() const +{ + // get the value of property Manufacturer + return qvariant_cast< QString >(parent()->property("Manufacturer")); +} + +uint MonitorAdaptor::mmHeight() const +{ + // get the value of property MmHeight + return qvariant_cast< uint >(parent()->property("MmHeight")); +} + +uint MonitorAdaptor::mmWidth() const +{ + // get the value of property MmWidth + return qvariant_cast< uint >(parent()->property("MmWidth")); +} + +QString MonitorAdaptor::model() const +{ + // get the value of property Model + return qvariant_cast< QString >(parent()->property("Model")); +} + +ResolutionList MonitorAdaptor::modes() const +{ + // get the value of property Modes + return qvariant_cast< ResolutionList >(parent()->property("Modes")); +} + +QString MonitorAdaptor::name() const +{ + // get the value of property Name + return qvariant_cast< QString >(parent()->property("Name")); +} + +ushort MonitorAdaptor::reflect() const +{ + // get the value of property Reflect + return qvariant_cast< ushort >(parent()->property("Reflect")); +} + +ReflectList MonitorAdaptor::reflects() const +{ + // get the value of property Reflects + return qvariant_cast< ReflectList >(parent()->property("Reflects")); +} + +double MonitorAdaptor::refreshRate() const +{ + // get the value of property RefreshRate + return qvariant_cast< double >(parent()->property("RefreshRate")); +} + +ushort MonitorAdaptor::rotation() const +{ + // get the value of property Rotation + return qvariant_cast< ushort >(parent()->property("Rotation")); +} + +RotationList MonitorAdaptor::rotations() const +{ + // get the value of property Rotations + return qvariant_cast< RotationList >(parent()->property("Rotations")); +} + +ushort MonitorAdaptor::width() const +{ + // get the value of property Width + return qvariant_cast< ushort >(parent()->property("Width")); +} + +short MonitorAdaptor::x() const +{ + // get the value of property X + return qvariant_cast< short >(parent()->property("X")); +} + +short MonitorAdaptor::y() const +{ + // get the value of property Y + return qvariant_cast< short >(parent()->property("Y")); +} + +void MonitorAdaptor::Enable(bool in0) +{ + // handle method call org.deepin.dde.Display1.Monitor.Enable + QMetaObject::invokeMethod(parent(), "Enable", Q_ARG(bool, in0)); +} + +void MonitorAdaptor::SetMode(uint in0) +{ + // handle method call org.deepin.dde.Display1.Monitor.SetMode + QMetaObject::invokeMethod(parent(), "SetMode", Q_ARG(uint, in0)); +} + +void MonitorAdaptor::SetModeBySize(ushort in0, ushort in1) +{ + // handle method call org.deepin.dde.Display1.Monitor.SetModeBySize + QMetaObject::invokeMethod(parent(), "SetModeBySize", Q_ARG(ushort, in0), Q_ARG(ushort, in1)); +} + +void MonitorAdaptor::SetPosition(short in0, short in1) +{ + // handle method call org.deepin.dde.Display1.Monitor.SetPosition + QMetaObject::invokeMethod(parent(), "SetPosition", Q_ARG(short, in0), Q_ARG(short, in1)); +} + +void MonitorAdaptor::SetReflect(ushort in0) +{ + // handle method call org.deepin.dde.Display1.Monitor.SetReflect + QMetaObject::invokeMethod(parent(), "SetReflect", Q_ARG(ushort, in0)); +} + +void MonitorAdaptor::SetRotation(ushort in0) +{ + // handle method call org.deepin.dde.Display1.Monitor.SetRotation + QMetaObject::invokeMethod(parent(), "SetRotation", Q_ARG(ushort, in0)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h new file mode 100644 index 00000000..e72a4b32 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h @@ -0,0 +1,172 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_DISPLAY1_MONITORADAPTOR_H +#define ORG_DEEPIN_DDE_DISPLAY1_MONITORADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Display1.Monitor + */ +class MonitorAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Display1.Monitor") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + MonitorAdaptor(QObject *parent); + virtual ~MonitorAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QStringList AvailableFillModes READ availableFillModes) + QStringList availableFillModes() const; + + Q_PROPERTY(Resolution BestMode READ bestMode) + Resolution bestMode() const; + + Q_PROPERTY(bool Connected READ connected) + bool connected() const; + + Q_PROPERTY(QString CurrentFillMode READ currentFillMode WRITE setCurrentFillMode) + QString currentFillMode() const; + void setCurrentFillMode(const QString &value); + + Q_PROPERTY(Resolution CurrentMode READ currentMode) + Resolution currentMode() const; + + Q_PROPERTY(uchar CurrentRotateMode READ currentRotateMode) + uchar currentRotateMode() const; + + Q_PROPERTY(bool Enabled READ enabled) + bool enabled() const; + + Q_PROPERTY(ushort Height READ height) + ushort height() const; + + Q_PROPERTY(QString Manufacturer READ manufacturer) + QString manufacturer() const; + + Q_PROPERTY(uint MmHeight READ mmHeight) + uint mmHeight() const; + + Q_PROPERTY(uint MmWidth READ mmWidth) + uint mmWidth() const; + + Q_PROPERTY(QString Model READ model) + QString model() const; + + Q_PROPERTY(ResolutionList Modes READ modes) + ResolutionList modes() const; + + Q_PROPERTY(QString Name READ name) + QString name() const; + + Q_PROPERTY(ushort Reflect READ reflect) + ushort reflect() const; + + Q_PROPERTY(ReflectList Reflects READ reflects) + ReflectList reflects() const; + + Q_PROPERTY(double RefreshRate READ refreshRate) + double refreshRate() const; + + Q_PROPERTY(ushort Rotation READ rotation) + ushort rotation() const; + + Q_PROPERTY(RotationList Rotations READ rotations) + RotationList rotations() const; + + Q_PROPERTY(ushort Width READ width) + ushort width() const; + + Q_PROPERTY(short X READ x) + short x() const; + + Q_PROPERTY(short Y READ y) + short y() const; + +public Q_SLOTS: // METHODS + void Enable(bool in0); + void SetMode(uint in0); + void SetModeBySize(ushort in0, ushort in1); + void SetPosition(short in0, short in1); + void SetReflect(ushort in0); + void SetRotation(ushort in0); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp new file mode 100644 index 00000000..8fc0165b --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp @@ -0,0 +1,251 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Display1Adaptor + */ + +Display1Adaptor::Display1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Display1Adaptor::~Display1Adaptor() +{ + // destructor +} + +BrightnessMap Display1Adaptor::brightness() const +{ + // get the value of property Brightness + return qvariant_cast< BrightnessMap >(parent()->property("Brightness")); +} + +int Display1Adaptor::colorTemperatureManual() const +{ + // get the value of property ColorTemperatureManual + return qvariant_cast< int >(parent()->property("ColorTemperatureManual")); +} + +int Display1Adaptor::colorTemperatureMode() const +{ + // get the value of property ColorTemperatureMode + return qvariant_cast< int >(parent()->property("ColorTemperatureMode")); +} + +QString Display1Adaptor::currentCustomId() const +{ + // get the value of property CurrentCustomId + return qvariant_cast< QString >(parent()->property("CurrentCustomId")); +} + +QStringList Display1Adaptor::customIdList() const +{ + // get the value of property CustomIdList + return qvariant_cast< QStringList >(parent()->property("CustomIdList")); +} + +uchar Display1Adaptor::displayMode() const +{ + // get the value of property DisplayMode + return qvariant_cast< uchar >(parent()->property("DisplayMode")); +} + +bool Display1Adaptor::hasChanged() const +{ + // get the value of property HasChanged + return qvariant_cast< bool >(parent()->property("HasChanged")); +} + +uint Display1Adaptor::maxBacklightBrightness() const +{ + // get the value of property MaxBacklightBrightness + return qvariant_cast< uint >(parent()->property("MaxBacklightBrightness")); +} + +QList Display1Adaptor::monitors() const +{ + // get the value of property Monitors + return qvariant_cast< QList >(parent()->property("Monitors")); +} + +QString Display1Adaptor::primary() const +{ + // get the value of property Primary + return qvariant_cast< QString >(parent()->property("Primary")); +} + +ScreenRect Display1Adaptor::primaryRect() const +{ + // get the value of property PrimaryRect + return qvariant_cast< ScreenRect >(parent()->property("PrimaryRect")); +} + +ushort Display1Adaptor::screenHeight() const +{ + // get the value of property ScreenHeight + return qvariant_cast< ushort >(parent()->property("ScreenHeight")); +} + +ushort Display1Adaptor::screenWidth() const +{ + // get the value of property ScreenWidth + return qvariant_cast< ushort >(parent()->property("ScreenWidth")); +} + +TouchscreenMap Display1Adaptor::touchMap() const +{ + // get the value of property TouchMap + return qvariant_cast< TouchscreenMap >(parent()->property("TouchMap")); +} + +TouchscreenInfoList Display1Adaptor::touchscreens() const +{ + // get the value of property Touchscreens + return qvariant_cast< TouchscreenInfoList >(parent()->property("Touchscreens")); +} + +TouchscreenInfoList_V2 Display1Adaptor::touchscreensV2() const +{ + // get the value of property TouchscreensV2 + return qvariant_cast< TouchscreenInfoList_V2 >(parent()->property("TouchscreensV2")); +} + +void Display1Adaptor::ApplyChanges() +{ + // handle method call org.deepin.dde.Display1.ApplyChanges + QMetaObject::invokeMethod(parent(), "ApplyChanges"); +} + +void Display1Adaptor::AssociateTouch(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Display1.AssociateTouch + QMetaObject::invokeMethod(parent(), "AssociateTouch", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void Display1Adaptor::AssociateTouchByUUID(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Display1.AssociateTouchByUUID + QMetaObject::invokeMethod(parent(), "AssociateTouchByUUID", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void Display1Adaptor::ChangeBrightness(bool in0) +{ + // handle method call org.deepin.dde.Display1.ChangeBrightness + QMetaObject::invokeMethod(parent(), "ChangeBrightness", Q_ARG(bool, in0)); +} + +void Display1Adaptor::DeleteCustomMode(const QString &in0) +{ + // handle method call org.deepin.dde.Display1.DeleteCustomMode + QMetaObject::invokeMethod(parent(), "DeleteCustomMode", Q_ARG(QString, in0)); +} + +uchar Display1Adaptor::GetRealDisplayMode() +{ + // handle method call org.deepin.dde.Display1.GetRealDisplayMode + uchar out0; + QMetaObject::invokeMethod(parent(), "GetRealDisplayMode", Q_RETURN_ARG(uchar, out0)); + return out0; +} + +QStringList Display1Adaptor::ListOutputNames() +{ + // handle method call org.deepin.dde.Display1.ListOutputNames + QStringList out0; + QMetaObject::invokeMethod(parent(), "ListOutputNames", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +ResolutionList Display1Adaptor::ListOutputsCommonModes() +{ + // handle method call org.deepin.dde.Display1.ListOutputsCommonModes + ResolutionList out0; + QMetaObject::invokeMethod(parent(), "ListOutputsCommonModes", Q_RETURN_ARG(ResolutionList, out0)); + return out0; +} + +void Display1Adaptor::ModifyConfigName(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Display1.ModifyConfigName + QMetaObject::invokeMethod(parent(), "ModifyConfigName", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void Display1Adaptor::RefreshBrightness() +{ + // handle method call org.deepin.dde.Display1.RefreshBrightness + QMetaObject::invokeMethod(parent(), "RefreshBrightness"); +} + +void Display1Adaptor::Reset() +{ + // handle method call org.deepin.dde.Display1.Reset + QMetaObject::invokeMethod(parent(), "Reset"); +} + +void Display1Adaptor::ResetChanges() +{ + // handle method call org.deepin.dde.Display1.ResetChanges + QMetaObject::invokeMethod(parent(), "ResetChanges"); +} + +void Display1Adaptor::Save() +{ + // handle method call org.deepin.dde.Display1.Save + QMetaObject::invokeMethod(parent(), "Save"); +} + +void Display1Adaptor::SetAndSaveBrightness(const QString &in0, double in1) +{ + // handle method call org.deepin.dde.Display1.SetAndSaveBrightness + QMetaObject::invokeMethod(parent(), "SetAndSaveBrightness", Q_ARG(QString, in0), Q_ARG(double, in1)); +} + +void Display1Adaptor::SetBrightness(const QString &in0, double in1) +{ + // handle method call org.deepin.dde.Display1.SetBrightness + QMetaObject::invokeMethod(parent(), "SetBrightness", Q_ARG(QString, in0), Q_ARG(double, in1)); +} + +void Display1Adaptor::SetColorTemperature(int in0) +{ + // handle method call org.deepin.dde.Display1.SetColorTemperature + QMetaObject::invokeMethod(parent(), "SetColorTemperature", Q_ARG(int, in0)); +} + +void Display1Adaptor::SetMethodAdjustCCT(int in0) +{ + // handle method call org.deepin.dde.Display1.SetMethodAdjustCCT + QMetaObject::invokeMethod(parent(), "SetMethodAdjustCCT", Q_ARG(int, in0)); +} + +void Display1Adaptor::SetPrimary(const QString &in0) +{ + // handle method call org.deepin.dde.Display1.SetPrimary + QMetaObject::invokeMethod(parent(), "SetPrimary", Q_ARG(QString, in0)); +} + +void Display1Adaptor::SwitchMode(uchar in0, const QString &in1) +{ + // handle method call org.deepin.dde.Display1.SwitchMode + QMetaObject::invokeMethod(parent(), "SwitchMode", Q_ARG(uchar, in0), Q_ARG(QString, in1)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h new file mode 100644 index 00000000..be03ce86 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h @@ -0,0 +1,194 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_DISPLAY1ADAPTOR_H +#define ORG_DEEPIN_DDE_DISPLAY1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Display1 + */ +class Display1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Display1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Display1Adaptor(QObject *parent); + virtual ~Display1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(BrightnessMap Brightness READ brightness) + BrightnessMap brightness() const; + + Q_PROPERTY(int ColorTemperatureManual READ colorTemperatureManual) + int colorTemperatureManual() const; + + Q_PROPERTY(int ColorTemperatureMode READ colorTemperatureMode) + int colorTemperatureMode() const; + + Q_PROPERTY(QString CurrentCustomId READ currentCustomId) + QString currentCustomId() const; + + Q_PROPERTY(QStringList CustomIdList READ customIdList) + QStringList customIdList() const; + + Q_PROPERTY(uchar DisplayMode READ displayMode) + uchar displayMode() const; + + Q_PROPERTY(bool HasChanged READ hasChanged) + bool hasChanged() const; + + Q_PROPERTY(uint MaxBacklightBrightness READ maxBacklightBrightness) + uint maxBacklightBrightness() const; + + Q_PROPERTY(QList Monitors READ monitors) + QList monitors() const; + + Q_PROPERTY(QString Primary READ primary) + QString primary() const; + + Q_PROPERTY(ScreenRect PrimaryRect READ primaryRect) + ScreenRect primaryRect() const; + + Q_PROPERTY(ushort ScreenHeight READ screenHeight) + ushort screenHeight() const; + + Q_PROPERTY(ushort ScreenWidth READ screenWidth) + ushort screenWidth() const; + + Q_PROPERTY(TouchscreenMap TouchMap READ touchMap) + TouchscreenMap touchMap() const; + + Q_PROPERTY(TouchscreenInfoList Touchscreens READ touchscreens) + TouchscreenInfoList touchscreens() const; + + Q_PROPERTY(TouchscreenInfoList_V2 TouchscreensV2 READ touchscreensV2) + TouchscreenInfoList_V2 touchscreensV2() const; + +public Q_SLOTS: // METHODS + void ApplyChanges(); + void AssociateTouch(const QString &in0, const QString &in1); + void AssociateTouchByUUID(const QString &in0, const QString &in1); + void ChangeBrightness(bool in0); + void DeleteCustomMode(const QString &in0); + uchar GetRealDisplayMode(); + QStringList ListOutputNames(); + ResolutionList ListOutputsCommonModes(); + void ModifyConfigName(const QString &in0, const QString &in1); + void RefreshBrightness(); + void Reset(); + void ResetChanges(); + void Save(); + void SetAndSaveBrightness(const QString &in0, double in1); + void SetBrightness(const QString &in0, double in1); + void SetColorTemperature(int in0); + void SetMethodAdjustCCT(int in0); + void SetPrimary(const QString &in0); + void SwitchMode(uchar in0, const QString &in1); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.cpp new file mode 100644 index 00000000..762f8301 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.cpp @@ -0,0 +1,183 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.InputDevice1.Keyboard.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.Keyboard.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class KeyboardAdaptor + */ + +KeyboardAdaptor::KeyboardAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +KeyboardAdaptor::~KeyboardAdaptor() +{ + // destructor +} + +bool KeyboardAdaptor::capslockToggle() const +{ + // get the value of property CapslockToggle + return qvariant_cast< bool >(parent()->property("CapslockToggle")); +} + +void KeyboardAdaptor::setCapslockToggle(bool value) +{ + // set the value of property CapslockToggle + parent()->setProperty("CapslockToggle", QVariant::fromValue(value)); +} + +QString KeyboardAdaptor::currentLayout() const +{ + // get the value of property CurrentLayout + return qvariant_cast< QString >(parent()->property("CurrentLayout")); +} + +void KeyboardAdaptor::setCurrentLayout(const QString &value) +{ + // set the value of property CurrentLayout + parent()->setProperty("CurrentLayout", QVariant::fromValue(value)); +} + +int KeyboardAdaptor::cursorBlink() const +{ + // get the value of property CursorBlink + return qvariant_cast< int >(parent()->property("CursorBlink")); +} + +void KeyboardAdaptor::setCursorBlink(int value) +{ + // set the value of property CursorBlink + parent()->setProperty("CursorBlink", QVariant::fromValue(value)); +} + +int KeyboardAdaptor::layoutScope() const +{ + // get the value of property LayoutScope + return qvariant_cast< int >(parent()->property("LayoutScope")); +} + +void KeyboardAdaptor::setLayoutScope(int value) +{ + // set the value of property LayoutScope + parent()->setProperty("LayoutScope", QVariant::fromValue(value)); +} + +uint KeyboardAdaptor::repeatDelay() const +{ + // get the value of property RepeatDelay + return qvariant_cast< uint >(parent()->property("RepeatDelay")); +} + +void KeyboardAdaptor::setRepeatDelay(uint value) +{ + // set the value of property RepeatDelay + parent()->setProperty("RepeatDelay", QVariant::fromValue(value)); +} + +bool KeyboardAdaptor::repeatEnabled() const +{ + // get the value of property RepeatEnabled + return qvariant_cast< bool >(parent()->property("RepeatEnabled")); +} + +void KeyboardAdaptor::setRepeatEnabled(bool value) +{ + // set the value of property RepeatEnabled + parent()->setProperty("RepeatEnabled", QVariant::fromValue(value)); +} + +uint KeyboardAdaptor::repeatInterval() const +{ + // get the value of property RepeatInterval + return qvariant_cast< uint >(parent()->property("RepeatInterval")); +} + +void KeyboardAdaptor::setRepeatInterval(uint value) +{ + // set the value of property RepeatInterval + parent()->setProperty("RepeatInterval", QVariant::fromValue(value)); +} + +QStringList KeyboardAdaptor::userLayoutList() const +{ + // get the value of property UserLayoutList + return qvariant_cast< QStringList >(parent()->property("UserLayoutList")); +} + +QStringList KeyboardAdaptor::userOptionList() const +{ + // get the value of property UserOptionList + return qvariant_cast< QStringList >(parent()->property("UserOptionList")); +} + +void KeyboardAdaptor::AddLayoutOption(const QString &in0) +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.AddLayoutOption + QMetaObject::invokeMethod(parent(), "AddLayoutOption", Q_ARG(QString, in0)); +} + +void KeyboardAdaptor::AddUserLayout(const QString &in0) +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.AddUserLayout + QMetaObject::invokeMethod(parent(), "AddUserLayout", Q_ARG(QString, in0)); +} + +void KeyboardAdaptor::ClearLayoutOption() +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.ClearLayoutOption + QMetaObject::invokeMethod(parent(), "ClearLayoutOption"); +} + +void KeyboardAdaptor::DeleteLayoutOption(const QString &in0) +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.DeleteLayoutOption + QMetaObject::invokeMethod(parent(), "DeleteLayoutOption", Q_ARG(QString, in0)); +} + +void KeyboardAdaptor::DeleteUserLayout(const QString &in0) +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.DeleteUserLayout + QMetaObject::invokeMethod(parent(), "DeleteUserLayout", Q_ARG(QString, in0)); +} + +QString KeyboardAdaptor::GetLayoutDesc(const QString &in0) +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.GetLayoutDesc + QString out0; + QMetaObject::invokeMethod(parent(), "GetLayoutDesc", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0)); + return out0; +} + +KeyboardLayoutList KeyboardAdaptor::LayoutList() +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.LayoutList + KeyboardLayoutList out0; + QMetaObject::invokeMethod(parent(), "LayoutList", Q_RETURN_ARG(KeyboardLayoutList, out0)); + return out0; +} + +void KeyboardAdaptor::Reset() +{ + // handle method call org.deepin.dde.InputDevice1.Keyboard.Reset + QMetaObject::invokeMethod(parent(), "Reset"); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.h new file mode 100644 index 00000000..cfa4f131 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor.h @@ -0,0 +1,120 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.InputDevice1.Keyboard.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.KeyboardAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.Keyboard.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_INPUTDEVICE1_KEYBOARDADAPTOR_H +#define ORG_DEEPIN_DDE_INPUTDEVICE1_KEYBOARDADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.InputDevice1.Keyboard.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.InputDevice1.Keyboard + */ +class KeyboardAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.InputDevice1.Keyboard") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + KeyboardAdaptor(QObject *parent); + virtual ~KeyboardAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool CapslockToggle READ capslockToggle WRITE setCapslockToggle) + bool capslockToggle() const; + void setCapslockToggle(bool value); + + Q_PROPERTY(QString CurrentLayout READ currentLayout WRITE setCurrentLayout) + QString currentLayout() const; + void setCurrentLayout(const QString &value); + + Q_PROPERTY(int CursorBlink READ cursorBlink WRITE setCursorBlink) + int cursorBlink() const; + void setCursorBlink(int value); + + Q_PROPERTY(int LayoutScope READ layoutScope WRITE setLayoutScope) + int layoutScope() const; + void setLayoutScope(int value); + + Q_PROPERTY(uint RepeatDelay READ repeatDelay WRITE setRepeatDelay) + uint repeatDelay() const; + void setRepeatDelay(uint value); + + Q_PROPERTY(bool RepeatEnabled READ repeatEnabled WRITE setRepeatEnabled) + bool repeatEnabled() const; + void setRepeatEnabled(bool value); + + Q_PROPERTY(uint RepeatInterval READ repeatInterval WRITE setRepeatInterval) + uint repeatInterval() const; + void setRepeatInterval(uint value); + + Q_PROPERTY(QStringList UserLayoutList READ userLayoutList) + QStringList userLayoutList() const; + + Q_PROPERTY(QStringList UserOptionList READ userOptionList) + QStringList userOptionList() const; + +public Q_SLOTS: // METHODS + void AddLayoutOption(const QString &in0); + void AddUserLayout(const QString &in0); + void ClearLayoutOption(); + void DeleteLayoutOption(const QString &in0); + void DeleteUserLayout(const QString &in0); + QString GetLayoutDesc(const QString &in0); + KeyboardLayoutList LayoutList(); + void Reset(); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.cpp new file mode 100644 index 00000000..5e24374c --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.cpp @@ -0,0 +1,325 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Network1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Network1Adaptor + */ + +Network1Adaptor::Network1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Network1Adaptor::~Network1Adaptor() +{ + // destructor +} + +QString Network1Adaptor::activeConnections() const +{ + // get the value of property ActiveConnections + return qvariant_cast< QString >(parent()->property("ActiveConnections")); +} + +QString Network1Adaptor::connections() const +{ + // get the value of property Connections + return qvariant_cast< QString >(parent()->property("Connections")); +} + +uint Network1Adaptor::connectivity() const +{ + // get the value of property Connectivity + return qvariant_cast< uint >(parent()->property("Connectivity")); +} + +QString Network1Adaptor::devices() const +{ + // get the value of property Devices + return qvariant_cast< QString >(parent()->property("Devices")); +} + +bool Network1Adaptor::networkingEnabled() const +{ + // get the value of property NetworkingEnabled + return qvariant_cast< bool >(parent()->property("NetworkingEnabled")); +} + +void Network1Adaptor::setNetworkingEnabled(bool value) +{ + // set the value of property NetworkingEnabled + parent()->setProperty("NetworkingEnabled", QVariant::fromValue(value)); +} + +uint Network1Adaptor::state() const +{ + // get the value of property State + return qvariant_cast< uint >(parent()->property("State")); +} + +bool Network1Adaptor::vpnEnabled() const +{ + // get the value of property VpnEnabled + return qvariant_cast< bool >(parent()->property("VpnEnabled")); +} + +void Network1Adaptor::setVpnEnabled(bool value) +{ + // set the value of property VpnEnabled + parent()->setProperty("VpnEnabled", QVariant::fromValue(value)); +} + +QString Network1Adaptor::wirelessAccessPoints() const +{ + // get the value of property WirelessAccessPoints + return qvariant_cast< QString >(parent()->property("WirelessAccessPoints")); +} + +QDBusObjectPath Network1Adaptor::ActivateAccessPoint(const QString &in0, const QDBusObjectPath &in1, const QDBusObjectPath &in2) +{ + // handle method call org.deepin.dde.Network1.ActivateAccessPoint + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "ActivateAccessPoint", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0), Q_ARG(QDBusObjectPath, in1), Q_ARG(QDBusObjectPath, in2)); + return out0; +} + +QDBusObjectPath Network1Adaptor::ActivateConnection(const QString &in0, const QDBusObjectPath &in1) +{ + // handle method call org.deepin.dde.Network1.ActivateConnection + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "ActivateConnection", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0), Q_ARG(QDBusObjectPath, in1)); + return out0; +} + +void Network1Adaptor::CancelSecret(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Network1.CancelSecret + QMetaObject::invokeMethod(parent(), "CancelSecret", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +QDBusObjectPath Network1Adaptor::CreateConnection(const QString &in0, const QDBusObjectPath &in1) +{ + // handle method call org.deepin.dde.Network1.CreateConnection + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "CreateConnection", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0), Q_ARG(QDBusObjectPath, in1)); + return out0; +} + +QDBusObjectPath Network1Adaptor::CreateConnectionForAccessPoint(const QDBusObjectPath &in0, const QDBusObjectPath &in1) +{ + // handle method call org.deepin.dde.Network1.CreateConnectionForAccessPoint + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "CreateConnectionForAccessPoint", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QDBusObjectPath, in0), Q_ARG(QDBusObjectPath, in1)); + return out0; +} + +void Network1Adaptor::DeactivateConnection(const QString &in0) +{ + // handle method call org.deepin.dde.Network1.DeactivateConnection + QMetaObject::invokeMethod(parent(), "DeactivateConnection", Q_ARG(QString, in0)); +} + +void Network1Adaptor::DeleteConnection(const QString &in0) +{ + // handle method call org.deepin.dde.Network1.DeleteConnection + QMetaObject::invokeMethod(parent(), "DeleteConnection", Q_ARG(QString, in0)); +} + +void Network1Adaptor::DisableWirelessHotspotMode(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.DisableWirelessHotspotMode + QMetaObject::invokeMethod(parent(), "DisableWirelessHotspotMode", Q_ARG(QDBusObjectPath, in0)); +} + +void Network1Adaptor::DisconnectDevice(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.DisconnectDevice + QMetaObject::invokeMethod(parent(), "DisconnectDevice", Q_ARG(QDBusObjectPath, in0)); +} + +QDBusObjectPath Network1Adaptor::EditConnection(const QString &in0, const QDBusObjectPath &in1) +{ + // handle method call org.deepin.dde.Network1.EditConnection + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "EditConnection", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0), Q_ARG(QDBusObjectPath, in1)); + return out0; +} + +void Network1Adaptor::EnableDevice(const QDBusObjectPath &in0, bool in1) +{ + // handle method call org.deepin.dde.Network1.EnableDevice + QMetaObject::invokeMethod(parent(), "EnableDevice", Q_ARG(QDBusObjectPath, in0), Q_ARG(bool, in1)); +} + +void Network1Adaptor::EnableWirelessHotspotMode(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.EnableWirelessHotspotMode + QMetaObject::invokeMethod(parent(), "EnableWirelessHotspotMode", Q_ARG(QDBusObjectPath, in0)); +} + +void Network1Adaptor::FeedSecret(const QString &in0, const QString &in1, const QString &in2, bool in3) +{ + // handle method call org.deepin.dde.Network1.FeedSecret + QMetaObject::invokeMethod(parent(), "FeedSecret", Q_ARG(QString, in0), Q_ARG(QString, in1), Q_ARG(QString, in2), Q_ARG(bool, in3)); +} + +QString Network1Adaptor::GetAccessPoints(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.GetAccessPoints + QString out0; + QMetaObject::invokeMethod(parent(), "GetAccessPoints", Q_RETURN_ARG(QString, out0), Q_ARG(QDBusObjectPath, in0)); + return out0; +} + +QString Network1Adaptor::GetActiveConnectionInfo() +{ + // handle method call org.deepin.dde.Network1.GetActiveConnectionInfo + QString out0; + QMetaObject::invokeMethod(parent(), "GetActiveConnectionInfo", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString Network1Adaptor::GetAutoProxy() +{ + // handle method call org.deepin.dde.Network1.GetAutoProxy + QString out0; + QMetaObject::invokeMethod(parent(), "GetAutoProxy", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString Network1Adaptor::GetProxy(const QString &in0, QString &out1) +{ + // handle method call org.deepin.dde.Network1.GetProxy + //return static_cast(parent())->GetProxy(in0, out1); +} + +QString Network1Adaptor::GetProxyIgnoreHosts() +{ + // handle method call org.deepin.dde.Network1.GetProxyIgnoreHosts + QString out0; + QMetaObject::invokeMethod(parent(), "GetProxyIgnoreHosts", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString Network1Adaptor::GetProxyMethod() +{ + // handle method call org.deepin.dde.Network1.GetProxyMethod + QString out0; + QMetaObject::invokeMethod(parent(), "GetProxyMethod", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QStringList Network1Adaptor::GetSupportedConnectionTypes() +{ + // handle method call org.deepin.dde.Network1.GetSupportedConnectionTypes + QStringList out0; + QMetaObject::invokeMethod(parent(), "GetSupportedConnectionTypes", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +QString Network1Adaptor::GetWiredConnectionUuid(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.GetWiredConnectionUuid + QString out0; + QMetaObject::invokeMethod(parent(), "GetWiredConnectionUuid", Q_RETURN_ARG(QString, out0), Q_ARG(QDBusObjectPath, in0)); + return out0; +} + +bool Network1Adaptor::IsDeviceEnabled(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.IsDeviceEnabled + bool out0; + QMetaObject::invokeMethod(parent(), "IsDeviceEnabled", Q_RETURN_ARG(bool, out0), Q_ARG(QDBusObjectPath, in0)); + return out0; +} + +bool Network1Adaptor::IsPasswordValid(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Network1.IsPasswordValid + bool out0; + QMetaObject::invokeMethod(parent(), "IsPasswordValid", Q_RETURN_ARG(bool, out0), Q_ARG(QString, in0), Q_ARG(QString, in1)); + return out0; +} + +bool Network1Adaptor::IsWirelessHotspotModeEnabled(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.IsWirelessHotspotModeEnabled + bool out0; + QMetaObject::invokeMethod(parent(), "IsWirelessHotspotModeEnabled", Q_RETURN_ARG(bool, out0), Q_ARG(QDBusObjectPath, in0)); + return out0; +} + +QList Network1Adaptor::ListDeviceConnections(const QDBusObjectPath &in0) +{ + // handle method call org.deepin.dde.Network1.ListDeviceConnections + QList out0; + QMetaObject::invokeMethod(parent(), "ListDeviceConnections", Q_RETURN_ARG(QList, out0), Q_ARG(QDBusObjectPath, in0)); + return out0; +} + +void Network1Adaptor::RegisterSecretReceiver() +{ + // handle method call org.deepin.dde.Network1.RegisterSecretReceiver + QMetaObject::invokeMethod(parent(), "RegisterSecretReceiver"); +} + +void Network1Adaptor::RequestIPConflictCheck(const QString &in0, const QString &in1) +{ + // handle method call org.deepin.dde.Network1.RequestIPConflictCheck + QMetaObject::invokeMethod(parent(), "RequestIPConflictCheck", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void Network1Adaptor::RequestWirelessScan() +{ + // handle method call org.deepin.dde.Network1.RequestWirelessScan + QMetaObject::invokeMethod(parent(), "RequestWirelessScan"); +} + +void Network1Adaptor::SetAutoProxy(const QString &in0) +{ + // handle method call org.deepin.dde.Network1.SetAutoProxy + QMetaObject::invokeMethod(parent(), "SetAutoProxy", Q_ARG(QString, in0)); +} + +void Network1Adaptor::SetDeviceManaged(const QString &in0, bool in1) +{ + // handle method call org.deepin.dde.Network1.SetDeviceManaged + QMetaObject::invokeMethod(parent(), "SetDeviceManaged", Q_ARG(QString, in0), Q_ARG(bool, in1)); +} + +void Network1Adaptor::SetProxy(const QString &in0, const QString &in1, const QString &in2) +{ + // handle method call org.deepin.dde.Network1.SetProxy + QMetaObject::invokeMethod(parent(), "SetProxy", Q_ARG(QString, in0), Q_ARG(QString, in1), Q_ARG(QString, in2)); +} + +void Network1Adaptor::SetProxyIgnoreHosts(const QString &in0) +{ + // handle method call org.deepin.dde.Network1.SetProxyIgnoreHosts + QMetaObject::invokeMethod(parent(), "SetProxyIgnoreHosts", Q_ARG(QString, in0)); +} + +void Network1Adaptor::SetProxyMethod(const QString &in0) +{ + // handle method call org.deepin.dde.Network1.SetProxyMethod + QMetaObject::invokeMethod(parent(), "SetProxyMethod", Q_ARG(QString, in0)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.h new file mode 100644 index 00000000..933f0c0a --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor.h @@ -0,0 +1,274 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Network1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_NETWORK1ADAPTOR_H +#define ORG_DEEPIN_DDE_NETWORK1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Network1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Network1 + */ +class Network1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Network1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Network1Adaptor(QObject *parent); + virtual ~Network1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString ActiveConnections READ activeConnections) + QString activeConnections() const; + + Q_PROPERTY(QString Connections READ connections) + QString connections() const; + + Q_PROPERTY(uint Connectivity READ connectivity) + uint connectivity() const; + + Q_PROPERTY(QString Devices READ devices) + QString devices() const; + + Q_PROPERTY(bool NetworkingEnabled READ networkingEnabled WRITE setNetworkingEnabled) + bool networkingEnabled() const; + void setNetworkingEnabled(bool value); + + Q_PROPERTY(uint State READ state) + uint state() const; + + Q_PROPERTY(bool VpnEnabled READ vpnEnabled WRITE setVpnEnabled) + bool vpnEnabled() const; + void setVpnEnabled(bool value); + + Q_PROPERTY(QString WirelessAccessPoints READ wirelessAccessPoints) + QString wirelessAccessPoints() const; + +public Q_SLOTS: // METHODS + QDBusObjectPath ActivateAccessPoint(const QString &in0, const QDBusObjectPath &in1, const QDBusObjectPath &in2); + QDBusObjectPath ActivateConnection(const QString &in0, const QDBusObjectPath &in1); + void CancelSecret(const QString &in0, const QString &in1); + QDBusObjectPath CreateConnection(const QString &in0, const QDBusObjectPath &in1); + QDBusObjectPath CreateConnectionForAccessPoint(const QDBusObjectPath &in0, const QDBusObjectPath &in1); + void DeactivateConnection(const QString &in0); + void DeleteConnection(const QString &in0); + void DisableWirelessHotspotMode(const QDBusObjectPath &in0); + void DisconnectDevice(const QDBusObjectPath &in0); + QDBusObjectPath EditConnection(const QString &in0, const QDBusObjectPath &in1); + void EnableDevice(const QDBusObjectPath &in0, bool in1); + void EnableWirelessHotspotMode(const QDBusObjectPath &in0); + void FeedSecret(const QString &in0, const QString &in1, const QString &in2, bool in3); + QString GetAccessPoints(const QDBusObjectPath &in0); + QString GetActiveConnectionInfo(); + QString GetAutoProxy(); + QString GetProxy(const QString &in0, QString &out1); + QString GetProxyIgnoreHosts(); + QString GetProxyMethod(); + QStringList GetSupportedConnectionTypes(); + QString GetWiredConnectionUuid(const QDBusObjectPath &in0); + bool IsDeviceEnabled(const QDBusObjectPath &in0); + bool IsPasswordValid(const QString &in0, const QString &in1); + bool IsWirelessHotspotModeEnabled(const QDBusObjectPath &in0); + QList ListDeviceConnections(const QDBusObjectPath &in0); + void RegisterSecretReceiver(); + void RequestIPConflictCheck(const QString &in0, const QString &in1); + void RequestWirelessScan(); + void SetAutoProxy(const QString &in0); + void SetDeviceManaged(const QString &in0, bool in1); + void SetProxy(const QString &in0, const QString &in1, const QString &in2); + void SetProxyIgnoreHosts(const QString &in0); + void SetProxyMethod(const QString &in0); +Q_SIGNALS: // SIGNALS + void AccessPointAdded(const QString &in0, const QString &in1); + void AccessPointPropertiesChanged(const QString &in0, const QString &in1); + void AccessPointRemoved(const QString &in0, const QString &in1); + void ActiveConnectionInfoChanged(); + void DeviceEnabled(const QString &in0, bool in1); + void IPConflict(const QString &in0, const QString &in1); + void NeedSecrets(const QString &in0); + void NeedSecretsFinished(const QString &in0, const QString &in1); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.cpp new file mode 100644 index 00000000..825506ce --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.cpp @@ -0,0 +1,199 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Notification1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Notification1Adaptor + */ + +Notification1Adaptor::Notification1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Notification1Adaptor::~Notification1Adaptor() +{ + // destructor +} + +QString Notification1Adaptor::allSetting() const +{ + // get the value of property allSetting + return qvariant_cast< QString >(parent()->property("allSetting")); +} + +void Notification1Adaptor::setAllSetting(const QString &value) +{ + // set the value of property allSetting + parent()->setProperty("allSetting", QVariant::fromValue(value)); +} + +QString Notification1Adaptor::systemSetting() const +{ + // get the value of property systemSetting + return qvariant_cast< QString >(parent()->property("systemSetting")); +} + +void Notification1Adaptor::setSystemSetting(const QString &value) +{ + // set the value of property systemSetting + parent()->setProperty("systemSetting", QVariant::fromValue(value)); +} + +void Notification1Adaptor::ClearRecords() +{ + // handle method call org.deepin.dde.Notification1.ClearRecords + QMetaObject::invokeMethod(parent(), "ClearRecords"); +} + +void Notification1Adaptor::CloseNotification(uint in0) +{ + // handle method call org.deepin.dde.Notification1.CloseNotification + QMetaObject::invokeMethod(parent(), "CloseNotification", Q_ARG(uint, in0)); +} + +QString Notification1Adaptor::GetAllRecords() +{ + // handle method call org.deepin.dde.Notification1.GetAllRecords + QString out0; + QMetaObject::invokeMethod(parent(), "GetAllRecords", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QDBusVariant Notification1Adaptor::GetAppInfo(const QString &in0, uint in1) +{ + // handle method call org.deepin.dde.Notification1.GetAppInfo + QDBusVariant out0; + QMetaObject::invokeMethod(parent(), "GetAppInfo", Q_RETURN_ARG(QDBusVariant, out0), Q_ARG(QString, in0), Q_ARG(uint, in1)); + return out0; +} + +QStringList Notification1Adaptor::GetAppList() +{ + // handle method call org.deepin.dde.Notification1.GetAppList + QStringList out0; + QMetaObject::invokeMethod(parent(), "GetAppList", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +QStringList Notification1Adaptor::GetCapbilities() +{ + // handle method call org.deepin.dde.Notification1.GetCapbilities + QStringList out0; + QMetaObject::invokeMethod(parent(), "GetCapbilities", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +QString Notification1Adaptor::GetRecordById(const QString &in0) +{ + // handle method call org.deepin.dde.Notification1.GetRecordById + QString out0; + QMetaObject::invokeMethod(parent(), "GetRecordById", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0)); + return out0; +} + +QString Notification1Adaptor::GetRecordsFromId(int in0, const QString &in1) +{ + // handle method call org.deepin.dde.Notification1.GetRecordsFromId + QString out0; + QMetaObject::invokeMethod(parent(), "GetRecordsFromId", Q_RETURN_ARG(QString, out0), Q_ARG(int, in0), Q_ARG(QString, in1)); + return out0; +} + +QString Notification1Adaptor::GetServerInformation(QString &out1, QString &out2, QString &out3) +{ + // handle method call org.deepin.dde.Notification1.GetServerInformation + //return static_cast(parent())->GetServerInformation(out1, out2, out3); +} + +QDBusVariant Notification1Adaptor::GetSystemInfo(uint in0) +{ + // handle method call org.deepin.dde.Notification1.GetSystemInfo + QDBusVariant out0; + QMetaObject::invokeMethod(parent(), "GetSystemInfo", Q_RETURN_ARG(QDBusVariant, out0), Q_ARG(uint, in0)); + return out0; +} + +void Notification1Adaptor::Hide() +{ + // handle method call org.deepin.dde.Notification1.Hide + QMetaObject::invokeMethod(parent(), "Hide"); +} + +uint Notification1Adaptor::Notify(const QString &in0, uint in1, const QString &in2, const QString &in3, const QString &in4, const QStringList &in5, const QVariantMap &in6, int in7) +{ + // handle method call org.deepin.dde.Notification1.Notify + uint out0; + QMetaObject::invokeMethod(parent(), "Notify", Q_RETURN_ARG(uint, out0), Q_ARG(QString, in0), Q_ARG(uint, in1), Q_ARG(QString, in2), Q_ARG(QString, in3), Q_ARG(QString, in4), Q_ARG(QStringList, in5), Q_ARG(QVariantMap, in6), Q_ARG(int, in7)); + return out0; +} + +void Notification1Adaptor::RemoveRecord(const QString &in0) +{ + // handle method call org.deepin.dde.Notification1.RemoveRecord + QMetaObject::invokeMethod(parent(), "RemoveRecord", Q_ARG(QString, in0)); +} + +void Notification1Adaptor::SetAppInfo(const QString &in0, uint in1, const QDBusVariant &in2) +{ + // handle method call org.deepin.dde.Notification1.SetAppInfo + QMetaObject::invokeMethod(parent(), "SetAppInfo", Q_ARG(QString, in0), Q_ARG(uint, in1), Q_ARG(QDBusVariant, in2)); +} + +void Notification1Adaptor::SetSystemInfo(uint in0, const QDBusVariant &in1) +{ + // handle method call org.deepin.dde.Notification1.SetSystemInfo + QMetaObject::invokeMethod(parent(), "SetSystemInfo", Q_ARG(uint, in0), Q_ARG(QDBusVariant, in1)); +} + +void Notification1Adaptor::Show() +{ + // handle method call org.deepin.dde.Notification1.Show + QMetaObject::invokeMethod(parent(), "Show"); +} + +void Notification1Adaptor::Toggle() +{ + // handle method call org.deepin.dde.Notification1.Toggle + QMetaObject::invokeMethod(parent(), "Toggle"); +} + +QString Notification1Adaptor::getAppSetting(const QString &in0) +{ + // handle method call org.deepin.dde.Notification1.getAppSetting + QString out0; + QMetaObject::invokeMethod(parent(), "getAppSetting", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0)); + return out0; +} + +uint Notification1Adaptor::recordCount() +{ + // handle method call org.deepin.dde.Notification1.recordCount + uint out0; + QMetaObject::invokeMethod(parent(), "recordCount", Q_RETURN_ARG(uint, out0)); + return out0; +} + +void Notification1Adaptor::setAppSetting(const QString &in0) +{ + // handle method call org.deepin.dde.Notification1.setAppSetting + QMetaObject::invokeMethod(parent(), "setAppSetting", Q_ARG(QString, in0)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.h new file mode 100644 index 00000000..f1277bd3 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor.h @@ -0,0 +1,200 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Notification1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_NOTIFICATION1ADAPTOR_H +#define ORG_DEEPIN_DDE_NOTIFICATION1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Notification1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Notification1 + */ +class Notification1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Notification1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Notification1Adaptor(QObject *parent); + virtual ~Notification1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString allSetting READ allSetting WRITE setAllSetting) + QString allSetting() const; + void setAllSetting(const QString &value); + + Q_PROPERTY(QString systemSetting READ systemSetting WRITE setSystemSetting) + QString systemSetting() const; + void setSystemSetting(const QString &value); + +public Q_SLOTS: // METHODS + void ClearRecords(); + void CloseNotification(uint in0); + QString GetAllRecords(); + QDBusVariant GetAppInfo(const QString &in0, uint in1); + QStringList GetAppList(); + QStringList GetCapbilities(); + QString GetRecordById(const QString &in0); + QString GetRecordsFromId(int in0, const QString &in1); + QString GetServerInformation(QString &out1, QString &out2, QString &out3); + QDBusVariant GetSystemInfo(uint in0); + void Hide(); + uint Notify(const QString &in0, uint in1, const QString &in2, const QString &in3, const QString &in4, const QStringList &in5, const QVariantMap &in6, int in7); + void RemoveRecord(const QString &in0); + void SetAppInfo(const QString &in0, uint in1, const QDBusVariant &in2); + void SetSystemInfo(uint in0, const QDBusVariant &in1); + void Show(); + void Toggle(); + QString getAppSetting(const QString &in0); + uint recordCount(); + void setAppSetting(const QString &in0); +Q_SIGNALS: // SIGNALS + void ActionInvoked(uint in0, const QString &in1); + void AppAddedSignal(const QString &in0); + void AppInfoChanged(const QString &in0, uint in1, const QDBusVariant &in2); + void AppRemovedSignal(const QString &in0); + void NotificationClosed(uint in0, uint in1); + void RecordAdded(const QString &in0); + void SystemInfoChanged(uint in0, const QDBusVariant &in1); + void appAdded(const QString &in0); + void appRemoved(const QString &in0); + void appSettingChanged(const QString &in0); + void systemSettingChanged(const QString &in0); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.cpp new file mode 100644 index 00000000..d2be7c14 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.cpp @@ -0,0 +1,181 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Power1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Power1Adaptor + */ + +Power1Adaptor::Power1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Power1Adaptor::~Power1Adaptor() +{ + // destructor +} + +double Power1Adaptor::batteryPercentage() const +{ + // get the value of property BatteryPercentage + return qvariant_cast< double >(parent()->property("BatteryPercentage")); +} + +uint Power1Adaptor::batteryStatus() const +{ + // get the value of property BatteryStatus + return qvariant_cast< uint >(parent()->property("BatteryStatus")); +} + +qulonglong Power1Adaptor::batteryTimeToEmpty() const +{ + // get the value of property BatteryTimeToEmpty + return qvariant_cast< qulonglong >(parent()->property("BatteryTimeToEmpty")); +} + +qulonglong Power1Adaptor::batteryTimeToFull() const +{ + // get the value of property BatteryTimeToFull + return qvariant_cast< qulonglong >(parent()->property("BatteryTimeToFull")); +} + +bool Power1Adaptor::hasBattery() const +{ + // get the value of property HasBattery + return qvariant_cast< bool >(parent()->property("HasBattery")); +} + +bool Power1Adaptor::hasLidSwitch() const +{ + // get the value of property HasLidSwitch + return qvariant_cast< bool >(parent()->property("HasLidSwitch")); +} + +bool Power1Adaptor::isHighPerformanceSupported() const +{ + // get the value of property IsHighPerformanceSupported + return qvariant_cast< bool >(parent()->property("IsHighPerformanceSupported")); +} + +QString Power1Adaptor::mode() const +{ + // get the value of property Mode + return qvariant_cast< QString >(parent()->property("Mode")); +} + +bool Power1Adaptor::onBattery() const +{ + // get the value of property OnBattery + return qvariant_cast< bool >(parent()->property("OnBattery")); +} + +bool Power1Adaptor::powerSavingModeAuto() const +{ + // get the value of property PowerSavingModeAuto + return qvariant_cast< bool >(parent()->property("PowerSavingModeAuto")); +} + +void Power1Adaptor::setPowerSavingModeAuto(bool value) +{ + // set the value of property PowerSavingModeAuto + parent()->setProperty("PowerSavingModeAuto", QVariant::fromValue(value)); +} + +bool Power1Adaptor::powerSavingModeAutoWhenBatteryLow() const +{ + // get the value of property PowerSavingModeAutoWhenBatteryLow + return qvariant_cast< bool >(parent()->property("PowerSavingModeAutoWhenBatteryLow")); +} + +void Power1Adaptor::setPowerSavingModeAutoWhenBatteryLow(bool value) +{ + // set the value of property PowerSavingModeAutoWhenBatteryLow + parent()->setProperty("PowerSavingModeAutoWhenBatteryLow", QVariant::fromValue(value)); +} + +uint Power1Adaptor::powerSavingModeBrightnessDropPercent() const +{ + // get the value of property PowerSavingModeBrightnessDropPercent + return qvariant_cast< uint >(parent()->property("PowerSavingModeBrightnessDropPercent")); +} + +void Power1Adaptor::setPowerSavingModeBrightnessDropPercent(uint value) +{ + // set the value of property PowerSavingModeBrightnessDropPercent + parent()->setProperty("PowerSavingModeBrightnessDropPercent", QVariant::fromValue(value)); +} + +bool Power1Adaptor::powerSavingModeEnabled() const +{ + // get the value of property PowerSavingModeEnabled + return qvariant_cast< bool >(parent()->property("PowerSavingModeEnabled")); +} + +void Power1Adaptor::setPowerSavingModeEnabled(bool value) +{ + // set the value of property PowerSavingModeEnabled + parent()->setProperty("PowerSavingModeEnabled", QVariant::fromValue(value)); +} + +bool Power1Adaptor::powerSystemAutoToSleepWhenFree() const +{ + // get the value of property PowerSystemAutoToSleepWhenFree + return qvariant_cast< bool >(parent()->property("PowerSystemAutoToSleepWhenFree")); +} + +void Power1Adaptor::setPowerSystemAutoToSleepWhenFree(bool value) +{ + // set the value of property PowerSystemAutoToSleepWhenFree + parent()->setProperty("PowerSystemAutoToSleepWhenFree", QVariant::fromValue(value)); +} + +QList Power1Adaptor::GetBatteries() +{ + // handle method call org.deepin.dde.Power1.GetBatteries + QList batteries; + QMetaObject::invokeMethod(parent(), "GetBatteries", Q_RETURN_ARG(QList, batteries)); + return batteries; +} + +void Power1Adaptor::Refresh() +{ + // handle method call org.deepin.dde.Power1.Refresh + QMetaObject::invokeMethod(parent(), "Refresh"); +} + +void Power1Adaptor::RefreshBatteries() +{ + // handle method call org.deepin.dde.Power1.RefreshBatteries + QMetaObject::invokeMethod(parent(), "RefreshBatteries"); +} + +void Power1Adaptor::RefreshMains() +{ + // handle method call org.deepin.dde.Power1.RefreshMains + QMetaObject::invokeMethod(parent(), "RefreshMains"); +} + +void Power1Adaptor::SetMode(const QString &mode) +{ + // handle method call org.deepin.dde.Power1.SetMode + QMetaObject::invokeMethod(parent(), "SetMode", Q_ARG(QString, mode)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.h new file mode 100644 index 00000000..1cf43bd2 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor.h @@ -0,0 +1,138 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Power1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_POWER1ADAPTOR_H +#define ORG_DEEPIN_DDE_POWER1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Power1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Power1 + */ +class Power1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Power1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Power1Adaptor(QObject *parent); + virtual ~Power1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(double BatteryPercentage READ batteryPercentage) + double batteryPercentage() const; + + Q_PROPERTY(uint BatteryStatus READ batteryStatus) + uint batteryStatus() const; + + Q_PROPERTY(qulonglong BatteryTimeToEmpty READ batteryTimeToEmpty) + qulonglong batteryTimeToEmpty() const; + + Q_PROPERTY(qulonglong BatteryTimeToFull READ batteryTimeToFull) + qulonglong batteryTimeToFull() const; + + Q_PROPERTY(bool HasBattery READ hasBattery) + bool hasBattery() const; + + Q_PROPERTY(bool HasLidSwitch READ hasLidSwitch) + bool hasLidSwitch() const; + + Q_PROPERTY(bool IsHighPerformanceSupported READ isHighPerformanceSupported) + bool isHighPerformanceSupported() const; + + Q_PROPERTY(QString Mode READ mode) + QString mode() const; + + Q_PROPERTY(bool OnBattery READ onBattery) + bool onBattery() const; + + Q_PROPERTY(bool PowerSavingModeAuto READ powerSavingModeAuto WRITE setPowerSavingModeAuto) + bool powerSavingModeAuto() const; + void setPowerSavingModeAuto(bool value); + + Q_PROPERTY(bool PowerSavingModeAutoWhenBatteryLow READ powerSavingModeAutoWhenBatteryLow WRITE setPowerSavingModeAutoWhenBatteryLow) + bool powerSavingModeAutoWhenBatteryLow() const; + void setPowerSavingModeAutoWhenBatteryLow(bool value); + + Q_PROPERTY(uint PowerSavingModeBrightnessDropPercent READ powerSavingModeBrightnessDropPercent WRITE setPowerSavingModeBrightnessDropPercent) + uint powerSavingModeBrightnessDropPercent() const; + void setPowerSavingModeBrightnessDropPercent(uint value); + + Q_PROPERTY(bool PowerSavingModeEnabled READ powerSavingModeEnabled WRITE setPowerSavingModeEnabled) + bool powerSavingModeEnabled() const; + void setPowerSavingModeEnabled(bool value); + + Q_PROPERTY(bool PowerSystemAutoToSleepWhenFree READ powerSystemAutoToSleepWhenFree WRITE setPowerSystemAutoToSleepWhenFree) + bool powerSystemAutoToSleepWhenFree() const; + void setPowerSystemAutoToSleepWhenFree(bool value); + +public Q_SLOTS: // METHODS + QList GetBatteries(); + void Refresh(); + void RefreshBatteries(); + void RefreshMains(); + void SetMode(const QString &mode); +Q_SIGNALS: // SIGNALS + void BatteryAdded(const QDBusObjectPath &objpath); + void BatteryDisplayUpdate(qlonglong timestamp); + void BatteryRemoved(const QDBusObjectPath &objpath); + void LidClosed(); + void LidOpened(); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.cpp new file mode 100644 index 00000000..a26ca8af --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.cpp @@ -0,0 +1,239 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Timedate1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Timedate1Adaptor + */ + +Timedate1Adaptor::Timedate1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Timedate1Adaptor::~Timedate1Adaptor() +{ + // destructor +} + +bool Timedate1Adaptor::canNTP() const +{ + // get the value of property CanNTP + return qvariant_cast< bool >(parent()->property("CanNTP")); +} + +int Timedate1Adaptor::dSTOffset() const +{ + // get the value of property DSTOffset + return qvariant_cast< int >(parent()->property("DSTOffset")); +} + +void Timedate1Adaptor::setDSTOffset(int value) +{ + // set the value of property DSTOffset + parent()->setProperty("DSTOffset", QVariant::fromValue(value)); +} + +bool Timedate1Adaptor::localRTC() const +{ + // get the value of property LocalRTC + return qvariant_cast< bool >(parent()->property("LocalRTC")); +} + +int Timedate1Adaptor::longDateFormat() const +{ + // get the value of property LongDateFormat + return qvariant_cast< int >(parent()->property("LongDateFormat")); +} + +void Timedate1Adaptor::setLongDateFormat(int value) +{ + // set the value of property LongDateFormat + parent()->setProperty("LongDateFormat", QVariant::fromValue(value)); +} + +int Timedate1Adaptor::longTimeFormat() const +{ + // get the value of property LongTimeFormat + return qvariant_cast< int >(parent()->property("LongTimeFormat")); +} + +void Timedate1Adaptor::setLongTimeFormat(int value) +{ + // set the value of property LongTimeFormat + parent()->setProperty("LongTimeFormat", QVariant::fromValue(value)); +} + +bool Timedate1Adaptor::nTP() const +{ + // get the value of property NTP + return qvariant_cast< bool >(parent()->property("NTP")); +} + +QString Timedate1Adaptor::nTPServer() const +{ + // get the value of property NTPServer + return qvariant_cast< QString >(parent()->property("NTPServer")); +} + +int Timedate1Adaptor::shortDateFormat() const +{ + // get the value of property ShortDateFormat + return qvariant_cast< int >(parent()->property("ShortDateFormat")); +} + +void Timedate1Adaptor::setShortDateFormat(int value) +{ + // set the value of property ShortDateFormat + parent()->setProperty("ShortDateFormat", QVariant::fromValue(value)); +} + +int Timedate1Adaptor::shortTimeFormat() const +{ + // get the value of property ShortTimeFormat + return qvariant_cast< int >(parent()->property("ShortTimeFormat")); +} + +void Timedate1Adaptor::setShortTimeFormat(int value) +{ + // set the value of property ShortTimeFormat + parent()->setProperty("ShortTimeFormat", QVariant::fromValue(value)); +} + +QString Timedate1Adaptor::timezone() const +{ + // get the value of property Timezone + return qvariant_cast< QString >(parent()->property("Timezone")); +} + +bool Timedate1Adaptor::use24HourFormat() const +{ + // get the value of property Use24HourFormat + return qvariant_cast< bool >(parent()->property("Use24HourFormat")); +} + +void Timedate1Adaptor::setUse24HourFormat(bool value) +{ + // set the value of property Use24HourFormat + parent()->setProperty("Use24HourFormat", QVariant::fromValue(value)); +} + +QStringList Timedate1Adaptor::userTimezones() const +{ + // get the value of property UserTimezones + return qvariant_cast< QStringList >(parent()->property("UserTimezones")); +} + +int Timedate1Adaptor::weekBegins() const +{ + // get the value of property WeekBegins + return qvariant_cast< int >(parent()->property("WeekBegins")); +} + +void Timedate1Adaptor::setWeekBegins(int value) +{ + // set the value of property WeekBegins + parent()->setProperty("WeekBegins", QVariant::fromValue(value)); +} + +int Timedate1Adaptor::weekdayFormat() const +{ + // get the value of property WeekdayFormat + return qvariant_cast< int >(parent()->property("WeekdayFormat")); +} + +void Timedate1Adaptor::setWeekdayFormat(int value) +{ + // set the value of property WeekdayFormat + parent()->setProperty("WeekdayFormat", QVariant::fromValue(value)); +} + +void Timedate1Adaptor::AddUserTimezone(const QString &in0) +{ + // handle method call org.deepin.dde.Timedate1.AddUserTimezone + QMetaObject::invokeMethod(parent(), "AddUserTimezone", Q_ARG(QString, in0)); +} + +void Timedate1Adaptor::DeleteUserTimezone(const QString &in0) +{ + // handle method call org.deepin.dde.Timedate1.DeleteUserTimezone + QMetaObject::invokeMethod(parent(), "DeleteUserTimezone", Q_ARG(QString, in0)); +} + +QStringList Timedate1Adaptor::GetSampleNTPServers() +{ + // handle method call org.deepin.dde.Timedate1.GetSampleNTPServers + QStringList out0; + QMetaObject::invokeMethod(parent(), "GetSampleNTPServers", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +ZoneInfo Timedate1Adaptor::GetZoneInfo(const QString &in0) +{ + // handle method call org.deepin.dde.Timedate1.GetZoneInfo + ZoneInfo out0; + QMetaObject::invokeMethod(parent(), "GetZoneInfo", Q_RETURN_ARG(ZoneInfo, out0), Q_ARG(QString, in0)); + return out0; +} + +QStringList Timedate1Adaptor::GetZoneList() +{ + // handle method call org.deepin.dde.Timedate1.GetZoneList + QStringList out0; + QMetaObject::invokeMethod(parent(), "GetZoneList", Q_RETURN_ARG(QStringList, out0)); + return out0; +} + +void Timedate1Adaptor::SetDate(int in0, int in1, int in2, int in3, int in4, int in5, int in6) +{ + // handle method call org.deepin.dde.Timedate1.SetDate + QMetaObject::invokeMethod(parent(), "SetDate", Q_ARG(int, in0), Q_ARG(int, in1), Q_ARG(int, in2), Q_ARG(int, in3), Q_ARG(int, in4), Q_ARG(int, in5), Q_ARG(int, in6)); +} + +void Timedate1Adaptor::SetLocalRTC(bool in0, bool in1) +{ + // handle method call org.deepin.dde.Timedate1.SetLocalRTC + QMetaObject::invokeMethod(parent(), "SetLocalRTC", Q_ARG(bool, in0), Q_ARG(bool, in1)); +} + +void Timedate1Adaptor::SetNTP(bool in0) +{ + // handle method call org.deepin.dde.Timedate1.SetNTP + QMetaObject::invokeMethod(parent(), "SetNTP", Q_ARG(bool, in0)); +} + +void Timedate1Adaptor::SetNTPServer(const QString &in0) +{ + // handle method call org.deepin.dde.Timedate1.SetNTPServer + QMetaObject::invokeMethod(parent(), "SetNTPServer", Q_ARG(QString, in0)); +} + +void Timedate1Adaptor::SetTime(qlonglong in0, bool in1) +{ + // handle method call org.deepin.dde.Timedate1.SetTime + QMetaObject::invokeMethod(parent(), "SetTime", Q_ARG(qlonglong, in0), Q_ARG(bool, in1)); +} + +void Timedate1Adaptor::SetTimezone(const QString &in0) +{ + // handle method call org.deepin.dde.Timedate1.SetTimezone + QMetaObject::invokeMethod(parent(), "SetTimezone", Q_ARG(QString, in0)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.h new file mode 100644 index 00000000..dec481fa --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor.h @@ -0,0 +1,167 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Timedate1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_TIMEDATE1ADAPTOR_H +#define ORG_DEEPIN_DDE_TIMEDATE1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Timedate1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.Timedate1 + */ +class Timedate1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Timedate1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Timedate1Adaptor(QObject *parent); + virtual ~Timedate1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool CanNTP READ canNTP) + bool canNTP() const; + + Q_PROPERTY(int DSTOffset READ dSTOffset WRITE setDSTOffset) + int dSTOffset() const; + void setDSTOffset(int value); + + Q_PROPERTY(bool LocalRTC READ localRTC) + bool localRTC() const; + + Q_PROPERTY(int LongDateFormat READ longDateFormat WRITE setLongDateFormat) + int longDateFormat() const; + void setLongDateFormat(int value); + + Q_PROPERTY(int LongTimeFormat READ longTimeFormat WRITE setLongTimeFormat) + int longTimeFormat() const; + void setLongTimeFormat(int value); + + Q_PROPERTY(bool NTP READ nTP) + bool nTP() const; + + Q_PROPERTY(QString NTPServer READ nTPServer) + QString nTPServer() const; + + Q_PROPERTY(int ShortDateFormat READ shortDateFormat WRITE setShortDateFormat) + int shortDateFormat() const; + void setShortDateFormat(int value); + + Q_PROPERTY(int ShortTimeFormat READ shortTimeFormat WRITE setShortTimeFormat) + int shortTimeFormat() const; + void setShortTimeFormat(int value); + + Q_PROPERTY(QString Timezone READ timezone) + QString timezone() const; + + Q_PROPERTY(bool Use24HourFormat READ use24HourFormat WRITE setUse24HourFormat) + bool use24HourFormat() const; + void setUse24HourFormat(bool value); + + Q_PROPERTY(QStringList UserTimezones READ userTimezones) + QStringList userTimezones() const; + + Q_PROPERTY(int WeekBegins READ weekBegins WRITE setWeekBegins) + int weekBegins() const; + void setWeekBegins(int value); + + Q_PROPERTY(int WeekdayFormat READ weekdayFormat WRITE setWeekdayFormat) + int weekdayFormat() const; + void setWeekdayFormat(int value); + +public Q_SLOTS: // METHODS + void AddUserTimezone(const QString &in0); + void DeleteUserTimezone(const QString &in0); + QStringList GetSampleNTPServers(); + ZoneInfo GetZoneInfo(const QString &in0); + QStringList GetZoneList(); + void SetDate(int in0, int in1, int in2, int in3, int in4, int in5, int in6); + void SetLocalRTC(bool in0, bool in1); + void SetNTP(bool in0); + void SetNTPServer(const QString &in0); + void SetTime(qlonglong in0, bool in1); + void SetTimezone(const QString &in0); +Q_SIGNALS: // SIGNALS + void TimeUpdate(); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.cpp new file mode 100644 index 00000000..5d82719e --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.cpp @@ -0,0 +1,63 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.deepin.dde.TrayManager1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class TrayManager1Adaptor + */ + +TrayManager1Adaptor::TrayManager1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +TrayManager1Adaptor::~TrayManager1Adaptor() +{ + // destructor +} + +TrayList TrayManager1Adaptor::trayIcons() const +{ + // get the value of property TrayIcons + return qvariant_cast< TrayList >(parent()->property("TrayIcons")); +} + +void TrayManager1Adaptor::EnableNotification(uint win, bool enabled) +{ + // handle method call org.deepin.dde.TrayManager1.EnableNotification + QMetaObject::invokeMethod(parent(), "EnableNotification", Q_ARG(uint, win), Q_ARG(bool, enabled)); +} + +QString TrayManager1Adaptor::GetName(uint win) +{ + // handle method call org.deepin.dde.TrayManager1.GetName + QString name; + QMetaObject::invokeMethod(parent(), "GetName", Q_RETURN_ARG(QString, name), Q_ARG(uint, win)); + return name; +} + +bool TrayManager1Adaptor::Manage() +{ + // handle method call org.deepin.dde.TrayManager1.Manage + bool ok; + QMetaObject::invokeMethod(parent(), "Manage", Q_RETURN_ARG(bool, ok)); + return ok; +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.h new file mode 100644 index 00000000..f6d733fc --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor.h @@ -0,0 +1,81 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.deepin.dde.TrayManager1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_DEEPIN_DDE_TRAYMANAGER1ADAPTOR_H +#define ORG_DEEPIN_DDE_TRAYMANAGER1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.TrayManager1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.deepin.dde.TrayManager1 + */ +class TrayManager1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.TrayManager1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + TrayManager1Adaptor(QObject *parent); + virtual ~TrayManager1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(TrayList TrayIcons READ trayIcons) + TrayList trayIcons() const; + +public Q_SLOTS: // METHODS + void EnableNotification(uint win, bool enabled); + QString GetName(uint win); + bool Manage(); +Q_SIGNALS: // SIGNALS + void Added(uint id); + void Changed(uint id); + void Inited(); + void Removed(uint id); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.cpp new file mode 100644 index 00000000..0eb08cff --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.cpp @@ -0,0 +1,195 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/keyboard-layout/org.fcitx.Fcitx.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.Fcitx.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class InputMethodAdaptor + */ + +InputMethodAdaptor::InputMethodAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +InputMethodAdaptor::~InputMethodAdaptor() +{ + // destructor +} + +QString InputMethodAdaptor::currentIM() const +{ + // get the value of property CurrentIM + return qvariant_cast< QString >(parent()->property("CurrentIM")); +} + +void InputMethodAdaptor::setCurrentIM(const QString &value) +{ + // set the value of property CurrentIM + parent()->setProperty("CurrentIM", QVariant::fromValue(value)); +} + +FcitxQtInputMethodItemList InputMethodAdaptor::iMList() const +{ + // get the value of property IMList + return qvariant_cast< FcitxQtInputMethodItemList >(parent()->property("IMList")); +} + +void InputMethodAdaptor::setIMList(FcitxQtInputMethodItemList value) +{ + // set the value of property IMList + parent()->setProperty("IMList", QVariant::fromValue(value)); +} + +void InputMethodAdaptor::ActivateIM() +{ + // handle method call org.fcitx.Fcitx.InputMethod.ActivateIM + QMetaObject::invokeMethod(parent(), "ActivateIM"); +} + +void InputMethodAdaptor::Configure() +{ + // handle method call org.fcitx.Fcitx.InputMethod.Configure + QMetaObject::invokeMethod(parent(), "Configure"); +} + +void InputMethodAdaptor::ConfigureAddon(const QString &addon) +{ + // handle method call org.fcitx.Fcitx.InputMethod.ConfigureAddon + QMetaObject::invokeMethod(parent(), "ConfigureAddon", Q_ARG(QString, addon)); +} + +void InputMethodAdaptor::ConfigureIM(const QString &im) +{ + // handle method call org.fcitx.Fcitx.InputMethod.ConfigureIM + QMetaObject::invokeMethod(parent(), "ConfigureIM", Q_ARG(QString, im)); +} + +int InputMethodAdaptor::CreateIC(uint &keyval1, uint &state1, uint &keyval2, uint &state2) +{ + // handle method call org.fcitx.Fcitx.InputMethod.CreateIC + //return static_cast(parent())->CreateIC(keyval1, state1, keyval2, state2); +} + +int InputMethodAdaptor::CreateICv2(const QString &appname, bool &enable, uint &keyval1, uint &state1, uint &keyval2, uint &state2) +{ + // handle method call org.fcitx.Fcitx.InputMethod.CreateICv2 + //return static_cast(parent())->CreateICv2(appname, enable, keyval1, state1, keyval2, state2); +} + +int InputMethodAdaptor::CreateICv3(const QString &appname, int pid, bool &enable, uint &keyval1, uint &state1, uint &keyval2, uint &state2) +{ + // handle method call org.fcitx.Fcitx.InputMethod.CreateICv3 + //return static_cast(parent())->CreateICv3(appname, pid, enable, keyval1, state1, keyval2, state2); +} + +void InputMethodAdaptor::Exit() +{ + // handle method call org.fcitx.Fcitx.InputMethod.Exit + QMetaObject::invokeMethod(parent(), "Exit"); +} + +QString InputMethodAdaptor::GetCurrentIM() +{ + // handle method call org.fcitx.Fcitx.InputMethod.GetCurrentIM + QString im; + QMetaObject::invokeMethod(parent(), "GetCurrentIM", Q_RETURN_ARG(QString, im)); + return im; +} + +int InputMethodAdaptor::GetCurrentState() +{ + // handle method call org.fcitx.Fcitx.InputMethod.GetCurrentState + int state; + QMetaObject::invokeMethod(parent(), "GetCurrentState", Q_RETURN_ARG(int, state)); + return state; +} + +QString InputMethodAdaptor::GetCurrentUI() +{ + // handle method call org.fcitx.Fcitx.InputMethod.GetCurrentUI + QString addon; + QMetaObject::invokeMethod(parent(), "GetCurrentUI", Q_RETURN_ARG(QString, addon)); + return addon; +} + +QString InputMethodAdaptor::GetIMAddon(const QString &im) +{ + // handle method call org.fcitx.Fcitx.InputMethod.GetIMAddon + QString addon; + QMetaObject::invokeMethod(parent(), "GetIMAddon", Q_RETURN_ARG(QString, addon), Q_ARG(QString, im)); + return addon; +} + +QString InputMethodAdaptor::GetIMByIndex(int index) +{ + // handle method call org.fcitx.Fcitx.InputMethod.GetIMByIndex + QString im; + QMetaObject::invokeMethod(parent(), "GetIMByIndex", Q_RETURN_ARG(QString, im), Q_ARG(int, index)); + return im; +} + +void InputMethodAdaptor::InactivateIM() +{ + // handle method call org.fcitx.Fcitx.InputMethod.InactivateIM + QMetaObject::invokeMethod(parent(), "InactivateIM"); +} + +void InputMethodAdaptor::ReloadAddonConfig(const QString &addon) +{ + // handle method call org.fcitx.Fcitx.InputMethod.ReloadAddonConfig + QMetaObject::invokeMethod(parent(), "ReloadAddonConfig", Q_ARG(QString, addon)); +} + +void InputMethodAdaptor::ReloadConfig() +{ + // handle method call org.fcitx.Fcitx.InputMethod.ReloadConfig + QMetaObject::invokeMethod(parent(), "ReloadConfig"); +} + +void InputMethodAdaptor::ResetIMList() +{ + // handle method call org.fcitx.Fcitx.InputMethod.ResetIMList + QMetaObject::invokeMethod(parent(), "ResetIMList"); +} + +void InputMethodAdaptor::Restart() +{ + // handle method call org.fcitx.Fcitx.InputMethod.Restart + QMetaObject::invokeMethod(parent(), "Restart"); +} + +void InputMethodAdaptor::SetCurrentIM(const QString &im) +{ + // handle method call org.fcitx.Fcitx.InputMethod.SetCurrentIM + QMetaObject::invokeMethod(parent(), "SetCurrentIM", Q_ARG(QString, im)); +} + +void InputMethodAdaptor::SwitchIM() +{ + // handle method call org.fcitx.Fcitx.InputMethod.SwitchIM + QMetaObject::invokeMethod(parent(), "SwitchIM"); +} + +void InputMethodAdaptor::ToggleIM() +{ + // handle method call org.fcitx.Fcitx.InputMethod.ToggleIM + QMetaObject::invokeMethod(parent(), "ToggleIM"); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.h b/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.h new file mode 100644 index 00000000..f7a7e990 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor.h @@ -0,0 +1,149 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/keyboard-layout/org.fcitx.Fcitx.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.FcitxAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.Fcitx.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_FCITX_FCITXADAPTOR_H +#define ORG_FCITX_FCITXADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.fcitx.Fcitx.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.fcitx.Fcitx.InputMethod + */ +class InputMethodAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.fcitx.Fcitx.InputMethod") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + InputMethodAdaptor(QObject *parent); + virtual ~InputMethodAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString CurrentIM READ currentIM WRITE setCurrentIM) + QString currentIM() const; + void setCurrentIM(const QString &value); + + Q_PROPERTY(FcitxQtInputMethodItemList IMList READ iMList WRITE setIMList) + FcitxQtInputMethodItemList iMList() const; + void setIMList(FcitxQtInputMethodItemList value); + +public Q_SLOTS: // METHODS + void ActivateIM(); + void Configure(); + void ConfigureAddon(const QString &addon); + void ConfigureIM(const QString &im); + int CreateIC(uint &keyval1, uint &state1, uint &keyval2, uint &state2); + int CreateICv2(const QString &appname, bool &enable, uint &keyval1, uint &state1, uint &keyval2, uint &state2); + int CreateICv3(const QString &appname, int pid, bool &enable, uint &keyval1, uint &state1, uint &keyval2, uint &state2); + void Exit(); + QString GetCurrentIM(); + int GetCurrentState(); + QString GetCurrentUI(); + QString GetIMAddon(const QString &im); + QString GetIMByIndex(int index); + void InactivateIM(); + void ReloadAddonConfig(const QString &addon); + void ReloadConfig(); + void ResetIMList(); + void Restart(); + void SetCurrentIM(const QString &im); + void SwitchIM(); + void ToggleIM(); +Q_SIGNALS: // SIGNALS + void ReloadConfigUI(); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.cpp new file mode 100644 index 00000000..e2b7a410 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.cpp @@ -0,0 +1,475 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.freedesktop.Login1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class ManagerAdaptor + */ + +ManagerAdaptor::ManagerAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +ManagerAdaptor::~ManagerAdaptor() +{ + // destructor +} + +QString ManagerAdaptor::blockInhibited() const +{ + // get the value of property BlockInhibited + return qvariant_cast< QString >(parent()->property("BlockInhibited")); +} + +QString ManagerAdaptor::delayInhibited() const +{ + // get the value of property DelayInhibited + return qvariant_cast< QString >(parent()->property("DelayInhibited")); +} + +bool ManagerAdaptor::docked() const +{ + // get the value of property Docked + return qvariant_cast< bool >(parent()->property("Docked")); +} + +bool ManagerAdaptor::enableWallMessages() const +{ + // get the value of property EnableWallMessages + return qvariant_cast< bool >(parent()->property("EnableWallMessages")); +} + +void ManagerAdaptor::setEnableWallMessages(bool value) +{ + // set the value of property EnableWallMessages + parent()->setProperty("EnableWallMessages", QVariant::fromValue(value)); +} + +QString ManagerAdaptor::handleHibernateKey() const +{ + // get the value of property HandleHibernateKey + return qvariant_cast< QString >(parent()->property("HandleHibernateKey")); +} + +QString ManagerAdaptor::handleLidSwitch() const +{ + // get the value of property HandleLidSwitch + return qvariant_cast< QString >(parent()->property("HandleLidSwitch")); +} + +QString ManagerAdaptor::handleLidSwitchDocked() const +{ + // get the value of property HandleLidSwitchDocked + return qvariant_cast< QString >(parent()->property("HandleLidSwitchDocked")); +} + +QString ManagerAdaptor::handlePowerKey() const +{ + // get the value of property HandlePowerKey + return qvariant_cast< QString >(parent()->property("HandlePowerKey")); +} + +QString ManagerAdaptor::handleSuspendKey() const +{ + // get the value of property HandleSuspendKey + return qvariant_cast< QString >(parent()->property("HandleSuspendKey")); +} + +qulonglong ManagerAdaptor::holdoffTimeoutUSec() const +{ + // get the value of property HoldoffTimeoutUSec + return qvariant_cast< qulonglong >(parent()->property("HoldoffTimeoutUSec")); +} + +QString ManagerAdaptor::idleAction() const +{ + // get the value of property IdleAction + return qvariant_cast< QString >(parent()->property("IdleAction")); +} + +qulonglong ManagerAdaptor::idleActionUSec() const +{ + // get the value of property IdleActionUSec + return qvariant_cast< qulonglong >(parent()->property("IdleActionUSec")); +} + +bool ManagerAdaptor::idleHint() const +{ + // get the value of property IdleHint + return qvariant_cast< bool >(parent()->property("IdleHint")); +} + +qulonglong ManagerAdaptor::idleSinceHint() const +{ + // get the value of property IdleSinceHint + return qvariant_cast< qulonglong >(parent()->property("IdleSinceHint")); +} + +qulonglong ManagerAdaptor::idleSinceHintMonotonic() const +{ + // get the value of property IdleSinceHintMonotonic + return qvariant_cast< qulonglong >(parent()->property("IdleSinceHintMonotonic")); +} + +qulonglong ManagerAdaptor::inhibitDelayMaxUSec() const +{ + // get the value of property InhibitDelayMaxUSec + return qvariant_cast< qulonglong >(parent()->property("InhibitDelayMaxUSec")); +} + +qulonglong ManagerAdaptor::inhibitorsMax() const +{ + // get the value of property InhibitorsMax + return qvariant_cast< qulonglong >(parent()->property("InhibitorsMax")); +} + +QStringList ManagerAdaptor::killExcludeUsers() const +{ + // get the value of property KillExcludeUsers + return qvariant_cast< QStringList >(parent()->property("KillExcludeUsers")); +} + +QStringList ManagerAdaptor::killOnlyUsers() const +{ + // get the value of property KillOnlyUsers + return qvariant_cast< QStringList >(parent()->property("KillOnlyUsers")); +} + +bool ManagerAdaptor::killUserProcesses() const +{ + // get the value of property KillUserProcesses + return qvariant_cast< bool >(parent()->property("KillUserProcesses")); +} + +uint ManagerAdaptor::nAutoVTs() const +{ + // get the value of property NAutoVTs + return qvariant_cast< uint >(parent()->property("NAutoVTs")); +} + +qulonglong ManagerAdaptor::nCurrentInhibitors() const +{ + // get the value of property NCurrentInhibitors + return qvariant_cast< qulonglong >(parent()->property("NCurrentInhibitors")); +} + +qulonglong ManagerAdaptor::nCurrentSessions() const +{ + // get the value of property NCurrentSessions + return qvariant_cast< qulonglong >(parent()->property("NCurrentSessions")); +} + +bool ManagerAdaptor::preparingForShutdown() const +{ + // get the value of property PreparingForShutdown + return qvariant_cast< bool >(parent()->property("PreparingForShutdown")); +} + +bool ManagerAdaptor::preparingForSleep() const +{ + // get the value of property PreparingForSleep + return qvariant_cast< bool >(parent()->property("PreparingForSleep")); +} + +bool ManagerAdaptor::rebootToFirmwareSetup() const +{ + // get the value of property RebootToFirmwareSetup + return qvariant_cast< bool >(parent()->property("RebootToFirmwareSetup")); +} + +bool ManagerAdaptor::removeIPC() const +{ + // get the value of property RemoveIPC + return qvariant_cast< bool >(parent()->property("RemoveIPC")); +} + +qulonglong ManagerAdaptor::runtimeDirectorySize() const +{ + // get the value of property RuntimeDirectorySize + return qvariant_cast< qulonglong >(parent()->property("RuntimeDirectorySize")); +} + +qulonglong ManagerAdaptor::sessionsMax() const +{ + // get the value of property SessionsMax + return qvariant_cast< qulonglong >(parent()->property("SessionsMax")); +} + +qulonglong ManagerAdaptor::userTasksMax() const +{ + // get the value of property UserTasksMax + return qvariant_cast< qulonglong >(parent()->property("UserTasksMax")); +} + +QString ManagerAdaptor::wallMessage() const +{ + // get the value of property WallMessage + return qvariant_cast< QString >(parent()->property("WallMessage")); +} + +void ManagerAdaptor::setWallMessage(const QString &value) +{ + // set the value of property WallMessage + parent()->setProperty("WallMessage", QVariant::fromValue(value)); +} + +void ManagerAdaptor::ActivateSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.ActivateSession + QMetaObject::invokeMethod(parent(), "ActivateSession", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::ActivateSessionOnSeat(const QString &in0, const QString &in1) +{ + // handle method call org.freedesktop.login1.Manager.ActivateSessionOnSeat + QMetaObject::invokeMethod(parent(), "ActivateSessionOnSeat", Q_ARG(QString, in0), Q_ARG(QString, in1)); +} + +void ManagerAdaptor::AttachDevice(const QString &in0, const QString &in1, bool in2) +{ + // handle method call org.freedesktop.login1.Manager.AttachDevice + QMetaObject::invokeMethod(parent(), "AttachDevice", Q_ARG(QString, in0), Q_ARG(QString, in1), Q_ARG(bool, in2)); +} + +QString ManagerAdaptor::CanHibernate() +{ + // handle method call org.freedesktop.login1.Manager.CanHibernate + QString out0; + QMetaObject::invokeMethod(parent(), "CanHibernate", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString ManagerAdaptor::CanHybridSleep() +{ + // handle method call org.freedesktop.login1.Manager.CanHybridSleep + QString out0; + QMetaObject::invokeMethod(parent(), "CanHybridSleep", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString ManagerAdaptor::CanPowerOff() +{ + // handle method call org.freedesktop.login1.Manager.CanPowerOff + QString out0; + QMetaObject::invokeMethod(parent(), "CanPowerOff", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString ManagerAdaptor::CanReboot() +{ + // handle method call org.freedesktop.login1.Manager.CanReboot + QString out0; + QMetaObject::invokeMethod(parent(), "CanReboot", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString ManagerAdaptor::CanRebootToFirmwareSetup() +{ + // handle method call org.freedesktop.login1.Manager.CanRebootToFirmwareSetup + QString out0; + QMetaObject::invokeMethod(parent(), "CanRebootToFirmwareSetup", Q_RETURN_ARG(QString, out0)); + return out0; +} + +QString ManagerAdaptor::CanSuspend() +{ + // handle method call org.freedesktop.login1.Manager.CanSuspend + QString out0; + QMetaObject::invokeMethod(parent(), "CanSuspend", Q_RETURN_ARG(QString, out0)); + return out0; +} + +bool ManagerAdaptor::CancelScheduledShutdown() +{ + // handle method call org.freedesktop.login1.Manager.CancelScheduledShutdown + bool out0; + QMetaObject::invokeMethod(parent(), "CancelScheduledShutdown", Q_RETURN_ARG(bool, out0)); + return out0; +} + +void ManagerAdaptor::FlushDevices(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.FlushDevices + QMetaObject::invokeMethod(parent(), "FlushDevices", Q_ARG(bool, in0)); +} + +QDBusObjectPath ManagerAdaptor::GetSeat(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.GetSeat + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetSeat", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0)); + return out0; +} + +QDBusObjectPath ManagerAdaptor::GetSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.GetSession + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetSession", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(QString, in0)); + return out0; +} + +QDBusObjectPath ManagerAdaptor::GetSessionByPID(uint in0) +{ + // handle method call org.freedesktop.login1.Manager.GetSessionByPID + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetSessionByPID", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(uint, in0)); + return out0; +} + +QDBusObjectPath ManagerAdaptor::GetUser(uint in0) +{ + // handle method call org.freedesktop.login1.Manager.GetUser + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetUser", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(uint, in0)); + return out0; +} + +QDBusObjectPath ManagerAdaptor::GetUserByPID(uint in0) +{ + // handle method call org.freedesktop.login1.Manager.GetUserByPID + QDBusObjectPath out0; + QMetaObject::invokeMethod(parent(), "GetUserByPID", Q_RETURN_ARG(QDBusObjectPath, out0), Q_ARG(uint, in0)); + return out0; +} + +void ManagerAdaptor::Hibernate(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.Hibernate + QMetaObject::invokeMethod(parent(), "Hibernate", Q_ARG(bool, in0)); +} + +void ManagerAdaptor::HybridSleep(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.HybridSleep + QMetaObject::invokeMethod(parent(), "HybridSleep", Q_ARG(bool, in0)); +} + +QDBusUnixFileDescriptor ManagerAdaptor::Inhibit(const QString &in0, const QString &in1, const QString &in2, const QString &in3) +{ + // handle method call org.freedesktop.login1.Manager.Inhibit + QDBusUnixFileDescriptor out0; + QMetaObject::invokeMethod(parent(), "Inhibit", Q_RETURN_ARG(QDBusUnixFileDescriptor, out0), Q_ARG(QString, in0), Q_ARG(QString, in1), Q_ARG(QString, in2), Q_ARG(QString, in3)); + return out0; +} + +void ManagerAdaptor::KillSession(const QString &in0, const QString &in1, int in2) +{ + // handle method call org.freedesktop.login1.Manager.KillSession + QMetaObject::invokeMethod(parent(), "KillSession", Q_ARG(QString, in0), Q_ARG(QString, in1), Q_ARG(int, in2)); +} + +void ManagerAdaptor::KillUser(uint in0, int in1) +{ + // handle method call org.freedesktop.login1.Manager.KillUser + QMetaObject::invokeMethod(parent(), "KillUser", Q_ARG(uint, in0), Q_ARG(int, in1)); +} + +void ManagerAdaptor::LockSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.LockSession + QMetaObject::invokeMethod(parent(), "LockSession", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::LockSessions() +{ + // handle method call org.freedesktop.login1.Manager.LockSessions + QMetaObject::invokeMethod(parent(), "LockSessions"); +} + +void ManagerAdaptor::PowerOff(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.PowerOff + QMetaObject::invokeMethod(parent(), "PowerOff", Q_ARG(bool, in0)); +} + +void ManagerAdaptor::Reboot(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.Reboot + QMetaObject::invokeMethod(parent(), "Reboot", Q_ARG(bool, in0)); +} + +void ManagerAdaptor::ReleaseSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.ReleaseSession + QMetaObject::invokeMethod(parent(), "ReleaseSession", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::ScheduleShutdown(const QString &in0, qulonglong in1) +{ + // handle method call org.freedesktop.login1.Manager.ScheduleShutdown + QMetaObject::invokeMethod(parent(), "ScheduleShutdown", Q_ARG(QString, in0), Q_ARG(qulonglong, in1)); +} + +void ManagerAdaptor::SetRebootToFirmwareSetup(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.SetRebootToFirmwareSetup + QMetaObject::invokeMethod(parent(), "SetRebootToFirmwareSetup", Q_ARG(bool, in0)); +} + +void ManagerAdaptor::SetUserLinger(uint in0, bool in1, bool in2) +{ + // handle method call org.freedesktop.login1.Manager.SetUserLinger + QMetaObject::invokeMethod(parent(), "SetUserLinger", Q_ARG(uint, in0), Q_ARG(bool, in1), Q_ARG(bool, in2)); +} + +void ManagerAdaptor::SetWallMessage(const QString &in0, bool in1) +{ + // handle method call org.freedesktop.login1.Manager.SetWallMessage + QMetaObject::invokeMethod(parent(), "SetWallMessage", Q_ARG(QString, in0), Q_ARG(bool, in1)); +} + +void ManagerAdaptor::Suspend(bool in0) +{ + // handle method call org.freedesktop.login1.Manager.Suspend + QMetaObject::invokeMethod(parent(), "Suspend", Q_ARG(bool, in0)); +} + +void ManagerAdaptor::TerminateSeat(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.TerminateSeat + QMetaObject::invokeMethod(parent(), "TerminateSeat", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::TerminateSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.TerminateSession + QMetaObject::invokeMethod(parent(), "TerminateSession", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::TerminateUser(uint in0) +{ + // handle method call org.freedesktop.login1.Manager.TerminateUser + QMetaObject::invokeMethod(parent(), "TerminateUser", Q_ARG(uint, in0)); +} + +void ManagerAdaptor::UnlockSession(const QString &in0) +{ + // handle method call org.freedesktop.login1.Manager.UnlockSession + QMetaObject::invokeMethod(parent(), "UnlockSession", Q_ARG(QString, in0)); +} + +void ManagerAdaptor::UnlockSessions() +{ + // handle method call org.freedesktop.login1.Manager.UnlockSessions + QMetaObject::invokeMethod(parent(), "UnlockSessions"); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.h new file mode 100644 index 00000000..4d843563 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor.h @@ -0,0 +1,425 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.freedesktop.Login1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_FREEDESKTOP_LOGIN1ADAPTOR_H +#define ORG_FREEDESKTOP_LOGIN1ADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.freedesktop.Login1.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.freedesktop.login1.Manager + */ +class ManagerAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.freedesktop.login1.Manager") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + ManagerAdaptor(QObject *parent); + virtual ~ManagerAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString BlockInhibited READ blockInhibited) + QString blockInhibited() const; + + Q_PROPERTY(QString DelayInhibited READ delayInhibited) + QString delayInhibited() const; + + Q_PROPERTY(bool Docked READ docked) + bool docked() const; + + Q_PROPERTY(bool EnableWallMessages READ enableWallMessages WRITE setEnableWallMessages) + bool enableWallMessages() const; + void setEnableWallMessages(bool value); + + Q_PROPERTY(QString HandleHibernateKey READ handleHibernateKey) + QString handleHibernateKey() const; + + Q_PROPERTY(QString HandleLidSwitch READ handleLidSwitch) + QString handleLidSwitch() const; + + Q_PROPERTY(QString HandleLidSwitchDocked READ handleLidSwitchDocked) + QString handleLidSwitchDocked() const; + + Q_PROPERTY(QString HandlePowerKey READ handlePowerKey) + QString handlePowerKey() const; + + Q_PROPERTY(QString HandleSuspendKey READ handleSuspendKey) + QString handleSuspendKey() const; + + Q_PROPERTY(qulonglong HoldoffTimeoutUSec READ holdoffTimeoutUSec) + qulonglong holdoffTimeoutUSec() const; + + Q_PROPERTY(QString IdleAction READ idleAction) + QString idleAction() const; + + Q_PROPERTY(qulonglong IdleActionUSec READ idleActionUSec) + qulonglong idleActionUSec() const; + + Q_PROPERTY(bool IdleHint READ idleHint) + bool idleHint() const; + + Q_PROPERTY(qulonglong IdleSinceHint READ idleSinceHint) + qulonglong idleSinceHint() const; + + Q_PROPERTY(qulonglong IdleSinceHintMonotonic READ idleSinceHintMonotonic) + qulonglong idleSinceHintMonotonic() const; + + Q_PROPERTY(qulonglong InhibitDelayMaxUSec READ inhibitDelayMaxUSec) + qulonglong inhibitDelayMaxUSec() const; + + Q_PROPERTY(qulonglong InhibitorsMax READ inhibitorsMax) + qulonglong inhibitorsMax() const; + + Q_PROPERTY(QStringList KillExcludeUsers READ killExcludeUsers) + QStringList killExcludeUsers() const; + + Q_PROPERTY(QStringList KillOnlyUsers READ killOnlyUsers) + QStringList killOnlyUsers() const; + + Q_PROPERTY(bool KillUserProcesses READ killUserProcesses) + bool killUserProcesses() const; + + Q_PROPERTY(uint NAutoVTs READ nAutoVTs) + uint nAutoVTs() const; + + Q_PROPERTY(qulonglong NCurrentInhibitors READ nCurrentInhibitors) + qulonglong nCurrentInhibitors() const; + + Q_PROPERTY(qulonglong NCurrentSessions READ nCurrentSessions) + qulonglong nCurrentSessions() const; + + Q_PROPERTY(bool PreparingForShutdown READ preparingForShutdown) + bool preparingForShutdown() const; + + Q_PROPERTY(bool PreparingForSleep READ preparingForSleep) + bool preparingForSleep() const; + + Q_PROPERTY(bool RebootToFirmwareSetup READ rebootToFirmwareSetup) + bool rebootToFirmwareSetup() const; + + Q_PROPERTY(bool RemoveIPC READ removeIPC) + bool removeIPC() const; + + Q_PROPERTY(qulonglong RuntimeDirectorySize READ runtimeDirectorySize) + qulonglong runtimeDirectorySize() const; + + Q_PROPERTY(qulonglong SessionsMax READ sessionsMax) + qulonglong sessionsMax() const; + + Q_PROPERTY(qulonglong UserTasksMax READ userTasksMax) + qulonglong userTasksMax() const; + + Q_PROPERTY(QString WallMessage READ wallMessage WRITE setWallMessage) + QString wallMessage() const; + void setWallMessage(const QString &value); + +public Q_SLOTS: // METHODS + void ActivateSession(const QString &in0); + void ActivateSessionOnSeat(const QString &in0, const QString &in1); + void AttachDevice(const QString &in0, const QString &in1, bool in2); + QString CanHibernate(); + QString CanHybridSleep(); + QString CanPowerOff(); + QString CanReboot(); + QString CanRebootToFirmwareSetup(); + QString CanSuspend(); + bool CancelScheduledShutdown(); + void FlushDevices(bool in0); + QDBusObjectPath GetSeat(const QString &in0); + QDBusObjectPath GetSession(const QString &in0); + QDBusObjectPath GetSessionByPID(uint in0); + QDBusObjectPath GetUser(uint in0); + QDBusObjectPath GetUserByPID(uint in0); + void Hibernate(bool in0); + void HybridSleep(bool in0); + QDBusUnixFileDescriptor Inhibit(const QString &in0, const QString &in1, const QString &in2, const QString &in3); + void KillSession(const QString &in0, const QString &in1, int in2); + void KillUser(uint in0, int in1); + void LockSession(const QString &in0); + void LockSessions(); + void PowerOff(bool in0); + void Reboot(bool in0); + void ReleaseSession(const QString &in0); + void ScheduleShutdown(const QString &in0, qulonglong in1); + void SetRebootToFirmwareSetup(bool in0); + void SetUserLinger(uint in0, bool in1, bool in2); + void SetWallMessage(const QString &in0, bool in1); + void Suspend(bool in0); + void TerminateSeat(const QString &in0); + void TerminateSession(const QString &in0); + void TerminateUser(uint in0); + void UnlockSession(const QString &in0); + void UnlockSessions(); +Q_SIGNALS: // SIGNALS + void PrepareForShutdown(bool in0); + void PrepareForSleep(bool in0); + void SeatNew(const QString &in0, const QDBusObjectPath &in1); + void SeatRemoved(const QString &in0, const QDBusObjectPath &in1); + void SessionNew(const QString &in0, const QDBusObjectPath &in1); + void SessionRemoved(const QString &in0, const QDBusObjectPath &in1); + void UserNew(uint in0, const QDBusObjectPath &in1); + void UserRemoved(uint in0, const QDBusObjectPath &in1); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.cpp new file mode 100644 index 00000000..1ee35bf6 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.cpp @@ -0,0 +1,155 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.kde.StatusNotifierItem.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItem.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class StatusNotifierItemAdaptor + */ + +StatusNotifierItemAdaptor::StatusNotifierItemAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +StatusNotifierItemAdaptor::~StatusNotifierItemAdaptor() +{ + // destructor +} + +QString StatusNotifierItemAdaptor::attentionIconName() const +{ + // get the value of property AttentionIconName + return qvariant_cast< QString >(parent()->property("AttentionIconName")); +} + +DBusImageList StatusNotifierItemAdaptor::attentionIconPixmap() const +{ + // get the value of property AttentionIconPixmap + return qvariant_cast< DBusImageList >(parent()->property("AttentionIconPixmap")); +} + +QString StatusNotifierItemAdaptor::attentionMovieName() const +{ + // get the value of property AttentionMovieName + return qvariant_cast< QString >(parent()->property("AttentionMovieName")); +} + +QString StatusNotifierItemAdaptor::category() const +{ + // get the value of property Category + return qvariant_cast< QString >(parent()->property("Category")); +} + +QString StatusNotifierItemAdaptor::iconName() const +{ + // get the value of property IconName + return qvariant_cast< QString >(parent()->property("IconName")); +} + +DBusImageList StatusNotifierItemAdaptor::iconPixmap() const +{ + // get the value of property IconPixmap + return qvariant_cast< DBusImageList >(parent()->property("IconPixmap")); +} + +QString StatusNotifierItemAdaptor::iconThemePath() const +{ + // get the value of property IconThemePath + return qvariant_cast< QString >(parent()->property("IconThemePath")); +} + +QString StatusNotifierItemAdaptor::id() const +{ + // get the value of property Id + return qvariant_cast< QString >(parent()->property("Id")); +} + +bool StatusNotifierItemAdaptor::itemIsMenu() const +{ + // get the value of property ItemIsMenu + return qvariant_cast< bool >(parent()->property("ItemIsMenu")); +} + +QDBusObjectPath StatusNotifierItemAdaptor::menu() const +{ + // get the value of property Menu + return qvariant_cast< QDBusObjectPath >(parent()->property("Menu")); +} + +QString StatusNotifierItemAdaptor::overlayIconName() const +{ + // get the value of property OverlayIconName + return qvariant_cast< QString >(parent()->property("OverlayIconName")); +} + +DBusImageList StatusNotifierItemAdaptor::overlayIconPixmap() const +{ + // get the value of property OverlayIconPixmap + return qvariant_cast< DBusImageList >(parent()->property("OverlayIconPixmap")); +} + +QString StatusNotifierItemAdaptor::status() const +{ + // get the value of property Status + return qvariant_cast< QString >(parent()->property("Status")); +} + +QString StatusNotifierItemAdaptor::title() const +{ + // get the value of property Title + return qvariant_cast< QString >(parent()->property("Title")); +} + +DBusToolTip StatusNotifierItemAdaptor::toolTip() const +{ + // get the value of property ToolTip + return qvariant_cast< DBusToolTip >(parent()->property("ToolTip")); +} + +int StatusNotifierItemAdaptor::windowId() const +{ + // get the value of property WindowId + return qvariant_cast< int >(parent()->property("WindowId")); +} + +void StatusNotifierItemAdaptor::Activate(int x, int y) +{ + // handle method call org.kde.StatusNotifierItem.Activate + QMetaObject::invokeMethod(parent(), "Activate", Q_ARG(int, x), Q_ARG(int, y)); +} + +void StatusNotifierItemAdaptor::ContextMenu(int x, int y) +{ + // handle method call org.kde.StatusNotifierItem.ContextMenu + QMetaObject::invokeMethod(parent(), "ContextMenu", Q_ARG(int, x), Q_ARG(int, y)); +} + +void StatusNotifierItemAdaptor::Scroll(int delta, const QString &orientation) +{ + // handle method call org.kde.StatusNotifierItem.Scroll + QMetaObject::invokeMethod(parent(), "Scroll", Q_ARG(int, delta), Q_ARG(QString, orientation)); +} + +void StatusNotifierItemAdaptor::SecondaryActivate(int x, int y) +{ + // handle method call org.kde.StatusNotifierItem.SecondaryActivate + QMetaObject::invokeMethod(parent(), "SecondaryActivate", Q_ARG(int, x), Q_ARG(int, y)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.h b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.h new file mode 100644 index 00000000..1f89ad3e --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor.h @@ -0,0 +1,153 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.kde.StatusNotifierItem.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItemAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItem.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_KDE_STATUSNOTIFIERITEMADAPTOR_H +#define ORG_KDE_STATUSNOTIFIERITEMADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierItem.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.kde.StatusNotifierItem + */ +class StatusNotifierItemAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kde.StatusNotifierItem") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + StatusNotifierItemAdaptor(QObject *parent); + virtual ~StatusNotifierItemAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString AttentionIconName READ attentionIconName) + QString attentionIconName() const; + + Q_PROPERTY(DBusImageList AttentionIconPixmap READ attentionIconPixmap) + DBusImageList attentionIconPixmap() const; + + Q_PROPERTY(QString AttentionMovieName READ attentionMovieName) + QString attentionMovieName() const; + + Q_PROPERTY(QString Category READ category) + QString category() const; + + Q_PROPERTY(QString IconName READ iconName) + QString iconName() const; + + Q_PROPERTY(DBusImageList IconPixmap READ iconPixmap) + DBusImageList iconPixmap() const; + + Q_PROPERTY(QString IconThemePath READ iconThemePath) + QString iconThemePath() const; + + Q_PROPERTY(QString Id READ id) + QString id() const; + + Q_PROPERTY(bool ItemIsMenu READ itemIsMenu) + bool itemIsMenu() const; + + Q_PROPERTY(QDBusObjectPath Menu READ menu) + QDBusObjectPath menu() const; + + Q_PROPERTY(QString OverlayIconName READ overlayIconName) + QString overlayIconName() const; + + Q_PROPERTY(DBusImageList OverlayIconPixmap READ overlayIconPixmap) + DBusImageList overlayIconPixmap() const; + + Q_PROPERTY(QString Status READ status) + QString status() const; + + Q_PROPERTY(QString Title READ title) + QString title() const; + + Q_PROPERTY(DBusToolTip ToolTip READ toolTip) + DBusToolTip toolTip() const; + + Q_PROPERTY(int WindowId READ windowId) + int windowId() const; + +public Q_SLOTS: // METHODS + void Activate(int x, int y); + void ContextMenu(int x, int y); + void Scroll(int delta, const QString &orientation); + void SecondaryActivate(int x, int y); +Q_SIGNALS: // SIGNALS + void NewAttentionIcon(); + void NewIcon(); + void NewOverlayIcon(); + void NewStatus(const QString &status); + void NewTitle(); + void NewToolTip(); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.cpp new file mode 100644 index 00000000..cd57c165 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.cpp @@ -0,0 +1,65 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.kde.StatusNotifierWatcher.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcher.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * Do not edit! All changes made to it will be lost. + */ + +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class StatusNotifierWatcherAdaptor + */ + +StatusNotifierWatcherAdaptor::StatusNotifierWatcherAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +StatusNotifierWatcherAdaptor::~StatusNotifierWatcherAdaptor() +{ + // destructor +} + +bool StatusNotifierWatcherAdaptor::isStatusNotifierHostRegistered() const +{ + // get the value of property IsStatusNotifierHostRegistered + return qvariant_cast< bool >(parent()->property("IsStatusNotifierHostRegistered")); +} + +int StatusNotifierWatcherAdaptor::protocolVersion() const +{ + // get the value of property ProtocolVersion + return qvariant_cast< int >(parent()->property("ProtocolVersion")); +} + +QStringList StatusNotifierWatcherAdaptor::registeredStatusNotifierItems() const +{ + // get the value of property RegisteredStatusNotifierItems + return qvariant_cast< QStringList >(parent()->property("RegisteredStatusNotifierItems")); +} + +void StatusNotifierWatcherAdaptor::RegisterStatusNotifierHost(const QString &serviceName) +{ + // handle method call org.kde.StatusNotifierWatcher.RegisterStatusNotifierHost + QMetaObject::invokeMethod(parent(), "RegisterStatusNotifierHost", Q_ARG(QString, serviceName)); +} + +void StatusNotifierWatcherAdaptor::RegisterStatusNotifierItem(const QString &serviceOrPath) +{ + // handle method call org.kde.StatusNotifierWatcher.RegisterStatusNotifierItem + QMetaObject::invokeMethod(parent(), "RegisterStatusNotifierItem", Q_ARG(QString, serviceOrPath)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.h b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.h new file mode 100644 index 00000000..ff1ccc75 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor.h @@ -0,0 +1,77 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/application-tray/api/dbus/org.kde.StatusNotifierWatcher.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcherAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcher.h + * + * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. + * + * This is an auto-generated file. + * This file may have been hand-edited. Look for HAND-EDIT comments + * before re-generating it. + */ + +#ifndef ORG_KDE_STATUSNOTIFIERWATCHERADAPTOR_H +#define ORG_KDE_STATUSNOTIFIERWATCHERADAPTOR_H + +#include +#include +#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.kde.StatusNotifierWatcher.h" +QT_BEGIN_NAMESPACE +class QByteArray; +template class QList; +template class QMap; +class QString; +class QStringList; +class QVariant; +QT_END_NAMESPACE + +/* + * Adaptor class for interface org.kde.StatusNotifierWatcher + */ +class StatusNotifierWatcherAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kde.StatusNotifierWatcher") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + StatusNotifierWatcherAdaptor(QObject *parent); + virtual ~StatusNotifierWatcherAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool IsStatusNotifierHostRegistered READ isStatusNotifierHostRegistered) + bool isStatusNotifierHostRegistered() const; + + Q_PROPERTY(int ProtocolVersion READ protocolVersion) + int protocolVersion() const; + + Q_PROPERTY(QStringList RegisteredStatusNotifierItems READ registeredStatusNotifierItems) + QStringList registeredStatusNotifierItems() const; + +public Q_SLOTS: // METHODS + void RegisterStatusNotifierHost(const QString &serviceName); + void RegisterStatusNotifierItem(const QString &serviceOrPath); +Q_SIGNALS: // SIGNALS + void StatusNotifierHostRegistered(); + void StatusNotifierItemRegistered(const QString &ServiceName); + void StatusNotifierItemUnregistered(const QString &ServiceName); +}; + +#endif