diff --git a/.reuse/dep5 b/.reuse/dep5 index d620d3eb2..44388926f 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -75,3 +75,9 @@ License: CC0-1.0 Files: panels/dock/tray/* Copyright: UnionTech Software Technology Co., Ltd. License: GPL-3.0-or-later + +Files: toolGenerate/**/* +Copyright: None +License: CC0-1.0 + + diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_shell.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_shell.hpp new file mode 100644 index 000000000..97d4f9081 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_shell.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/shell/org.deepin.dde.shell.json + * Generation time: 2025-01-14T10:55:02 + * 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_SHELL_H +#define ORG_DEEPIN_DDE_SHELL_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_shell : public QObject { + Q_OBJECT + + Q_PROPERTY(QVariantMap migratedDConfigs READ migratedDConfigs WRITE setMigratedDConfigs NOTIFY migratedDConfigsChanged) +public: + explicit org_deepin_dde_shell(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_shell(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_shell(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_shell(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_shell() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QVariantMap migratedDConfigs() const { + return p_migratedDConfigs; + } + void setMigratedDConfigs(const QVariantMap &value) { + auto oldValue = p_migratedDConfigs; + p_migratedDConfigs = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("migratedDConfigs"), value); + }); + } + if (p_migratedDConfigs != oldValue) { + Q_EMIT migratedDConfigsChanged(); + } + } +Q_SIGNALS: + void migratedDConfigsChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("migratedDConfigs"), QVariant::fromValue(p_migratedDConfigs)); + } else { + updateValue(QStringLiteral("migratedDConfigs"), QVariant::fromValue(p_migratedDConfigs)); + } + + 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("migratedDConfigs")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_migratedDConfigs != newValue) { + p_migratedDConfigs = newValue; + Q_EMIT migratedDConfigsChanged(); + } + }); + 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; + QVariantMap p_migratedDConfigs { QVariantMap{} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_SHELL_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_shell_notification.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_shell_notification.hpp new file mode 100644 index 000000000..867524994 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_dde_shell_notification.hpp @@ -0,0 +1,588 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/panels/notification/server/configs/org.deepin.dde.shell.notification.json + * Generation time: 2025-01-14T10:55:02 + * 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_SHELL_NOTIFICATION_H +#define ORG_DEEPIN_DDE_SHELL_NOTIFICATION_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_dde_shell_notification : public QObject { + Q_OBJECT + + Q_PROPERTY(QVariantMap AppNamesMap READ AppNamesMap WRITE setAppNamesMap NOTIFY AppNamesMapChanged) + Q_PROPERTY(QVariantMap appsInfo READ appsInfo WRITE setAppsInfo NOTIFY appsInfoChanged) + Q_PROPERTY(double bubbleContentRowCount READ bubbleContentRowCount WRITE setBubbleContentRowCount NOTIFY bubbleContentRowCountChanged) + Q_PROPERTY(double bubbleCount READ bubbleCount WRITE setBubbleCount NOTIFY bubbleCountChanged) + Q_PROPERTY(bool dndMode READ dndMode WRITE setDndMode NOTIFY dndModeChanged) + Q_PROPERTY(QString endTime READ endTime WRITE setEndTime NOTIFY endTimeChanged) + Q_PROPERTY(bool lockScreenOpenDndMode READ lockScreenOpenDndMode WRITE setLockScreenOpenDndMode NOTIFY lockScreenOpenDndModeChanged) + Q_PROPERTY(double maxCount READ maxCount WRITE setMaxCount NOTIFY maxCountChanged) + Q_PROPERTY(bool notificationClosed READ notificationClosed WRITE setNotificationClosed NOTIFY notificationClosedChanged) + Q_PROPERTY(bool openByTimeInterval READ openByTimeInterval WRITE setOpenByTimeInterval NOTIFY openByTimeIntervalChanged) + Q_PROPERTY(QList pinnedApps READ pinnedApps WRITE setPinnedApps NOTIFY pinnedAppsChanged) + Q_PROPERTY(QString startTime READ startTime WRITE setStartTime NOTIFY startTimeChanged) + Q_PROPERTY(QList systemApps READ systemApps WRITE setSystemApps NOTIFY systemAppsChanged) +public: + explicit org_deepin_dde_shell_notification(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_shell_notification(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_shell_notification(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_shell_notification(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_shell_notification() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QVariantMap AppNamesMap() const { + return p_AppNamesMap; + } + void setAppNamesMap(const QVariantMap &value) { + auto oldValue = p_AppNamesMap; + p_AppNamesMap = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("AppNamesMap"), value); + }); + } + if (p_AppNamesMap != oldValue) { + Q_EMIT AppNamesMapChanged(); + } + } + QVariantMap appsInfo() const { + return p_appsInfo; + } + void setAppsInfo(const QVariantMap &value) { + auto oldValue = p_appsInfo; + p_appsInfo = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("appsInfo"), value); + }); + } + if (p_appsInfo != oldValue) { + Q_EMIT appsInfoChanged(); + } + } + double bubbleContentRowCount() const { + return p_bubbleContentRowCount; + } + void setBubbleContentRowCount(const double &value) { + auto oldValue = p_bubbleContentRowCount; + p_bubbleContentRowCount = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("bubbleContentRowCount"), value); + }); + } + if (p_bubbleContentRowCount != oldValue) { + Q_EMIT bubbleContentRowCountChanged(); + } + } + double bubbleCount() const { + return p_bubbleCount; + } + void setBubbleCount(const double &value) { + auto oldValue = p_bubbleCount; + p_bubbleCount = value; + markPropertySet(3); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("bubbleCount"), value); + }); + } + if (p_bubbleCount != oldValue) { + Q_EMIT bubbleCountChanged(); + } + } + bool dndMode() const { + return p_dndMode; + } + void setDndMode(const bool &value) { + auto oldValue = p_dndMode; + p_dndMode = value; + markPropertySet(4); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dndMode"), value); + }); + } + if (p_dndMode != oldValue) { + Q_EMIT dndModeChanged(); + } + } + QString endTime() const { + return p_endTime; + } + void setEndTime(const QString &value) { + auto oldValue = p_endTime; + p_endTime = value; + markPropertySet(5); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("endTime"), value); + }); + } + if (p_endTime != oldValue) { + Q_EMIT endTimeChanged(); + } + } + bool lockScreenOpenDndMode() const { + return p_lockScreenOpenDndMode; + } + void setLockScreenOpenDndMode(const bool &value) { + auto oldValue = p_lockScreenOpenDndMode; + p_lockScreenOpenDndMode = value; + markPropertySet(6); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("lockScreenOpenDndMode"), value); + }); + } + if (p_lockScreenOpenDndMode != oldValue) { + Q_EMIT lockScreenOpenDndModeChanged(); + } + } + double maxCount() const { + return p_maxCount; + } + void setMaxCount(const double &value) { + auto oldValue = p_maxCount; + p_maxCount = value; + markPropertySet(7); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("maxCount"), value); + }); + } + if (p_maxCount != oldValue) { + Q_EMIT maxCountChanged(); + } + } + bool notificationClosed() const { + return p_notificationClosed; + } + void setNotificationClosed(const bool &value) { + auto oldValue = p_notificationClosed; + p_notificationClosed = value; + markPropertySet(8); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("notificationClosed"), value); + }); + } + if (p_notificationClosed != oldValue) { + Q_EMIT notificationClosedChanged(); + } + } + bool openByTimeInterval() const { + return p_openByTimeInterval; + } + void setOpenByTimeInterval(const bool &value) { + auto oldValue = p_openByTimeInterval; + p_openByTimeInterval = value; + markPropertySet(9); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("openByTimeInterval"), value); + }); + } + if (p_openByTimeInterval != oldValue) { + Q_EMIT openByTimeIntervalChanged(); + } + } + QList pinnedApps() const { + return p_pinnedApps; + } + void setPinnedApps(const QList &value) { + auto oldValue = p_pinnedApps; + p_pinnedApps = value; + markPropertySet(10); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("pinnedApps"), value); + }); + } + if (p_pinnedApps != oldValue) { + Q_EMIT pinnedAppsChanged(); + } + } + QString startTime() const { + return p_startTime; + } + void setStartTime(const QString &value) { + auto oldValue = p_startTime; + p_startTime = value; + markPropertySet(11); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("startTime"), value); + }); + } + if (p_startTime != oldValue) { + Q_EMIT startTimeChanged(); + } + } + QList systemApps() const { + return p_systemApps; + } + void setSystemApps(const QList &value) { + auto oldValue = p_systemApps; + p_systemApps = value; + markPropertySet(12); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("systemApps"), value); + }); + } + if (p_systemApps != oldValue) { + Q_EMIT systemAppsChanged(); + } + } +Q_SIGNALS: + void AppNamesMapChanged(); + void appsInfoChanged(); + void bubbleContentRowCountChanged(); + void bubbleCountChanged(); + void dndModeChanged(); + void endTimeChanged(); + void lockScreenOpenDndModeChanged(); + void maxCountChanged(); + void notificationClosedChanged(); + void openByTimeIntervalChanged(); + void pinnedAppsChanged(); + void startTimeChanged(); + void systemAppsChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("AppNamesMap"), QVariant::fromValue(p_AppNamesMap)); + } else { + updateValue(QStringLiteral("AppNamesMap"), QVariant::fromValue(p_AppNamesMap)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("appsInfo"), QVariant::fromValue(p_appsInfo)); + } else { + updateValue(QStringLiteral("appsInfo"), QVariant::fromValue(p_appsInfo)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("bubbleContentRowCount"), QVariant::fromValue(p_bubbleContentRowCount)); + } else { + updateValue(QStringLiteral("bubbleContentRowCount"), QVariant::fromValue(p_bubbleContentRowCount)); + } + if (testPropertySet(3)) { + config->setValue(QStringLiteral("bubbleCount"), QVariant::fromValue(p_bubbleCount)); + } else { + updateValue(QStringLiteral("bubbleCount"), QVariant::fromValue(p_bubbleCount)); + } + if (testPropertySet(4)) { + config->setValue(QStringLiteral("dndMode"), QVariant::fromValue(p_dndMode)); + } else { + updateValue(QStringLiteral("dndMode"), QVariant::fromValue(p_dndMode)); + } + if (testPropertySet(5)) { + config->setValue(QStringLiteral("endTime"), QVariant::fromValue(p_endTime)); + } else { + updateValue(QStringLiteral("endTime"), QVariant::fromValue(p_endTime)); + } + if (testPropertySet(6)) { + config->setValue(QStringLiteral("lockScreenOpenDndMode"), QVariant::fromValue(p_lockScreenOpenDndMode)); + } else { + updateValue(QStringLiteral("lockScreenOpenDndMode"), QVariant::fromValue(p_lockScreenOpenDndMode)); + } + if (testPropertySet(7)) { + config->setValue(QStringLiteral("maxCount"), QVariant::fromValue(p_maxCount)); + } else { + updateValue(QStringLiteral("maxCount"), QVariant::fromValue(p_maxCount)); + } + if (testPropertySet(8)) { + config->setValue(QStringLiteral("notificationClosed"), QVariant::fromValue(p_notificationClosed)); + } else { + updateValue(QStringLiteral("notificationClosed"), QVariant::fromValue(p_notificationClosed)); + } + if (testPropertySet(9)) { + config->setValue(QStringLiteral("openByTimeInterval"), QVariant::fromValue(p_openByTimeInterval)); + } else { + updateValue(QStringLiteral("openByTimeInterval"), QVariant::fromValue(p_openByTimeInterval)); + } + if (testPropertySet(10)) { + config->setValue(QStringLiteral("pinnedApps"), QVariant::fromValue(p_pinnedApps)); + } else { + updateValue(QStringLiteral("pinnedApps"), QVariant::fromValue(p_pinnedApps)); + } + if (testPropertySet(11)) { + config->setValue(QStringLiteral("startTime"), QVariant::fromValue(p_startTime)); + } else { + updateValue(QStringLiteral("startTime"), QVariant::fromValue(p_startTime)); + } + if (testPropertySet(12)) { + config->setValue(QStringLiteral("systemApps"), QVariant::fromValue(p_systemApps)); + } else { + updateValue(QStringLiteral("systemApps"), QVariant::fromValue(p_systemApps)); + } + + 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("AppNamesMap")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_AppNamesMap != newValue) { + p_AppNamesMap = newValue; + Q_EMIT AppNamesMapChanged(); + } + }); + return; + } + if (key == QStringLiteral("appsInfo")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_appsInfo != newValue) { + p_appsInfo = newValue; + Q_EMIT appsInfoChanged(); + } + }); + return; + } + if (key == QStringLiteral("bubbleContentRowCount")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_bubbleContentRowCount != newValue) { + p_bubbleContentRowCount = newValue; + Q_EMIT bubbleContentRowCountChanged(); + } + }); + return; + } + if (key == QStringLiteral("bubbleCount")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_bubbleCount != newValue) { + p_bubbleCount = newValue; + Q_EMIT bubbleCountChanged(); + } + }); + return; + } + if (key == QStringLiteral("dndMode")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dndMode != newValue) { + p_dndMode = newValue; + Q_EMIT dndModeChanged(); + } + }); + return; + } + if (key == QStringLiteral("endTime")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_endTime != newValue) { + p_endTime = newValue; + Q_EMIT endTimeChanged(); + } + }); + return; + } + if (key == QStringLiteral("lockScreenOpenDndMode")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_lockScreenOpenDndMode != newValue) { + p_lockScreenOpenDndMode = newValue; + Q_EMIT lockScreenOpenDndModeChanged(); + } + }); + return; + } + if (key == QStringLiteral("maxCount")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_maxCount != newValue) { + p_maxCount = newValue; + Q_EMIT maxCountChanged(); + } + }); + return; + } + if (key == QStringLiteral("notificationClosed")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_notificationClosed != newValue) { + p_notificationClosed = newValue; + Q_EMIT notificationClosedChanged(); + } + }); + return; + } + if (key == QStringLiteral("openByTimeInterval")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_openByTimeInterval != newValue) { + p_openByTimeInterval = newValue; + Q_EMIT openByTimeIntervalChanged(); + } + }); + return; + } + if (key == QStringLiteral("pinnedApps")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_pinnedApps != newValue) { + p_pinnedApps = newValue; + Q_EMIT pinnedAppsChanged(); + } + }); + return; + } + if (key == QStringLiteral("startTime")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_startTime != newValue) { + p_startTime = newValue; + Q_EMIT startTimeChanged(); + } + }); + return; + } + if (key == QStringLiteral("systemApps")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_systemApps != newValue) { + p_systemApps = newValue; + Q_EMIT systemAppsChanged(); + } + }); + 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; + QVariantMap p_AppNamesMap { QVariantMap{{QStringLiteral("dde-control-center"), QVariant(QStringLiteral("org.deepin.dde.control-center"))}} }; + QVariantMap p_appsInfo { QVariantMap{} }; + double p_bubbleContentRowCount { 6 }; + double p_bubbleCount { 3 }; + bool p_dndMode { false }; + QString p_endTime { QStringLiteral("07:00") }; + bool p_lockScreenOpenDndMode { false }; + double p_maxCount { 2000 }; + bool p_notificationClosed { false }; + bool p_openByTimeInterval { false }; + QList p_pinnedApps { QList{} }; + QString p_startTime { QStringLiteral("22:00") }; + QList p_systemApps { QList{QVariant(QStringLiteral("org.deepin.dde.control-center"))} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DDE_SHELL_NOTIFICATION_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_ds_dde-apps.hpp b/toolGenerate/dconfig2cpp/org_deepin_ds_dde-apps.hpp new file mode 100644 index 000000000..b0a469d1b --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_ds_dde-apps.hpp @@ -0,0 +1,180 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/applets/dde-apps/configs/org.deepin.ds.dde-apps.json + * Generation time: 2025-01-14T10:55:02 + * 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_DS_DDE-APPS_H +#define ORG_DEEPIN_DS_DDE-APPS_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_ds_dde-apps : public QObject { + Q_OBJECT + + Q_PROPERTY(QList Groups READ Groups WRITE setGroups NOTIFY GroupsChanged) +public: + explicit org_deepin_ds_dde-apps(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_ds_dde-apps(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_ds_dde-apps(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_ds_dde-apps(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_ds_dde-apps() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList Groups() const { + return p_Groups; + } + void setGroups(const QList &value) { + auto oldValue = p_Groups; + p_Groups = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Groups"), value); + }); + } + if (p_Groups != oldValue) { + Q_EMIT GroupsChanged(); + } + } +Q_SIGNALS: + void GroupsChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("Groups"), QVariant::fromValue(p_Groups)); + } else { + updateValue(QStringLiteral("Groups"), QVariant::fromValue(p_Groups)); + } + + 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("Groups")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Groups != newValue) { + p_Groups = newValue; + Q_EMIT GroupsChanged(); + } + }); + 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_Groups { QList{} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DS_DDE-APPS_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_ds_dock.hpp b/toolGenerate/dconfig2cpp/org_deepin_ds_dock.hpp new file mode 100644 index 000000000..fad3531f4 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_ds_dock.hpp @@ -0,0 +1,384 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/panels/dock/dconfig/org.deepin.ds.dock.json + * Generation time: 2025-01-14T10:55:02 + * 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_DS_DOCK_H +#define ORG_DEEPIN_DS_DOCK_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_ds_dock : public QObject { + Q_OBJECT + + Q_PROPERTY(double Dock_Size READ Dock_Size WRITE setDock_Size NOTIFY Dock_SizeChanged) + Q_PROPERTY(QString Hide_Mode READ Hide_Mode WRITE setHide_Mode NOTIFY Hide_ModeChanged) + Q_PROPERTY(QString Indicator_Style READ Indicator_Style WRITE setIndicator_Style NOTIFY Indicator_StyleChanged) + Q_PROPERTY(QString Item_Alignment READ Item_Alignment WRITE setItem_Alignment NOTIFY Item_AlignmentChanged) + Q_PROPERTY(QVariantMap Plugins_Visible READ Plugins_Visible WRITE setPlugins_Visible NOTIFY Plugins_VisibleChanged) + Q_PROPERTY(QString Position READ Position WRITE setPosition NOTIFY PositionChanged) + Q_PROPERTY(bool Show_In_Primary READ Show_In_Primary WRITE setShow_In_Primary NOTIFY Show_In_PrimaryChanged) +public: + explicit org_deepin_ds_dock(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_ds_dock(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_ds_dock(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_ds_dock(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_ds_dock() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + double Dock_Size() const { + return p_Dock_Size; + } + void setDock_Size(const double &value) { + auto oldValue = p_Dock_Size; + p_Dock_Size = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Dock_Size"), value); + }); + } + if (p_Dock_Size != oldValue) { + Q_EMIT Dock_SizeChanged(); + } + } + QString Hide_Mode() const { + return p_Hide_Mode; + } + void setHide_Mode(const QString &value) { + auto oldValue = p_Hide_Mode; + p_Hide_Mode = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Hide_Mode"), value); + }); + } + if (p_Hide_Mode != oldValue) { + Q_EMIT Hide_ModeChanged(); + } + } + QString Indicator_Style() const { + return p_Indicator_Style; + } + void setIndicator_Style(const QString &value) { + auto oldValue = p_Indicator_Style; + p_Indicator_Style = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Indicator_Style"), value); + }); + } + if (p_Indicator_Style != oldValue) { + Q_EMIT Indicator_StyleChanged(); + } + } + QString Item_Alignment() const { + return p_Item_Alignment; + } + void setItem_Alignment(const QString &value) { + auto oldValue = p_Item_Alignment; + p_Item_Alignment = value; + markPropertySet(3); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Item_Alignment"), value); + }); + } + if (p_Item_Alignment != oldValue) { + Q_EMIT Item_AlignmentChanged(); + } + } + QVariantMap Plugins_Visible() const { + return p_Plugins_Visible; + } + void setPlugins_Visible(const QVariantMap &value) { + auto oldValue = p_Plugins_Visible; + p_Plugins_Visible = value; + markPropertySet(4); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Plugins_Visible"), value); + }); + } + if (p_Plugins_Visible != oldValue) { + Q_EMIT Plugins_VisibleChanged(); + } + } + QString Position() const { + return p_Position; + } + void setPosition(const QString &value) { + auto oldValue = p_Position; + p_Position = value; + markPropertySet(5); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Position"), value); + }); + } + if (p_Position != oldValue) { + Q_EMIT PositionChanged(); + } + } + bool Show_In_Primary() const { + return p_Show_In_Primary; + } + void setShow_In_Primary(const bool &value) { + auto oldValue = p_Show_In_Primary; + p_Show_In_Primary = value; + markPropertySet(6); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Show_In_Primary"), value); + }); + } + if (p_Show_In_Primary != oldValue) { + Q_EMIT Show_In_PrimaryChanged(); + } + } +Q_SIGNALS: + void Dock_SizeChanged(); + void Hide_ModeChanged(); + void Indicator_StyleChanged(); + void Item_AlignmentChanged(); + void Plugins_VisibleChanged(); + void PositionChanged(); + void Show_In_PrimaryChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("Dock_Size"), QVariant::fromValue(p_Dock_Size)); + } else { + updateValue(QStringLiteral("Dock_Size"), QVariant::fromValue(p_Dock_Size)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("Hide_Mode"), QVariant::fromValue(p_Hide_Mode)); + } else { + updateValue(QStringLiteral("Hide_Mode"), QVariant::fromValue(p_Hide_Mode)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("Indicator_Style"), QVariant::fromValue(p_Indicator_Style)); + } else { + updateValue(QStringLiteral("Indicator_Style"), QVariant::fromValue(p_Indicator_Style)); + } + if (testPropertySet(3)) { + config->setValue(QStringLiteral("Item_Alignment"), QVariant::fromValue(p_Item_Alignment)); + } else { + updateValue(QStringLiteral("Item_Alignment"), QVariant::fromValue(p_Item_Alignment)); + } + if (testPropertySet(4)) { + config->setValue(QStringLiteral("Plugins_Visible"), QVariant::fromValue(p_Plugins_Visible)); + } else { + updateValue(QStringLiteral("Plugins_Visible"), QVariant::fromValue(p_Plugins_Visible)); + } + if (testPropertySet(5)) { + config->setValue(QStringLiteral("Position"), QVariant::fromValue(p_Position)); + } else { + updateValue(QStringLiteral("Position"), QVariant::fromValue(p_Position)); + } + if (testPropertySet(6)) { + config->setValue(QStringLiteral("Show_In_Primary"), QVariant::fromValue(p_Show_In_Primary)); + } else { + updateValue(QStringLiteral("Show_In_Primary"), QVariant::fromValue(p_Show_In_Primary)); + } + + 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("Dock_Size")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Dock_Size != newValue) { + p_Dock_Size = newValue; + Q_EMIT Dock_SizeChanged(); + } + }); + return; + } + if (key == QStringLiteral("Hide_Mode")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Hide_Mode != newValue) { + p_Hide_Mode = newValue; + Q_EMIT Hide_ModeChanged(); + } + }); + return; + } + if (key == QStringLiteral("Indicator_Style")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Indicator_Style != newValue) { + p_Indicator_Style = newValue; + Q_EMIT Indicator_StyleChanged(); + } + }); + return; + } + if (key == QStringLiteral("Item_Alignment")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Item_Alignment != newValue) { + p_Item_Alignment = newValue; + Q_EMIT Item_AlignmentChanged(); + } + }); + return; + } + if (key == QStringLiteral("Plugins_Visible")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Plugins_Visible != newValue) { + p_Plugins_Visible = newValue; + Q_EMIT Plugins_VisibleChanged(); + } + }); + return; + } + if (key == QStringLiteral("Position")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Position != newValue) { + p_Position = newValue; + Q_EMIT PositionChanged(); + } + }); + return; + } + if (key == QStringLiteral("Show_In_Primary")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Show_In_Primary != newValue) { + p_Show_In_Primary = newValue; + Q_EMIT Show_In_PrimaryChanged(); + } + }); + 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_Dock_Size { 48 }; + QString p_Hide_Mode { QStringLiteral("keep-showing") }; + QString p_Indicator_Style { QStringLiteral("Fashion") }; + QString p_Item_Alignment { QStringLiteral("center") }; + QVariantMap p_Plugins_Visible { QVariantMap{} }; + QString p_Position { QStringLiteral("bottom") }; + bool p_Show_In_Primary { true }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DS_DOCK_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_ds_dock_taskmanager.hpp b/toolGenerate/dconfig2cpp/org_deepin_ds_dock_taskmanager.hpp new file mode 100644 index 000000000..18b800683 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_ds_dock_taskmanager.hpp @@ -0,0 +1,248 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/panels/dock/taskmanager/dconfig/org.deepin.ds.dock.taskmanager.json + * Generation time: 2025-01-14T10:55:02 + * 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_DS_DOCK_TASKMANAGER_H +#define ORG_DEEPIN_DS_DOCK_TASKMANAGER_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_ds_dock_taskmanager : public QObject { + Q_OBJECT + + Q_PROPERTY(QString Allow_Force_Quit READ Allow_Force_Quit WRITE setAllow_Force_Quit NOTIFY Allow_Force_QuitChanged) + Q_PROPERTY(QList Docked_Items READ Docked_Items WRITE setDocked_Items NOTIFY Docked_ItemsChanged) + Q_PROPERTY(QString Window_Split READ Window_Split WRITE setWindow_Split NOTIFY Window_SplitChanged) +public: + explicit org_deepin_ds_dock_taskmanager(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_ds_dock_taskmanager(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_ds_dock_taskmanager(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_ds_dock_taskmanager(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_ds_dock_taskmanager() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QString Allow_Force_Quit() const { + return p_Allow_Force_Quit; + } + void setAllow_Force_Quit(const QString &value) { + auto oldValue = p_Allow_Force_Quit; + p_Allow_Force_Quit = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Allow_Force_Quit"), value); + }); + } + if (p_Allow_Force_Quit != oldValue) { + Q_EMIT Allow_Force_QuitChanged(); + } + } + QList Docked_Items() const { + return p_Docked_Items; + } + void setDocked_Items(const QList &value) { + auto oldValue = p_Docked_Items; + p_Docked_Items = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Docked_Items"), value); + }); + } + if (p_Docked_Items != oldValue) { + Q_EMIT Docked_ItemsChanged(); + } + } + QString Window_Split() const { + return p_Window_Split; + } + void setWindow_Split(const QString &value) { + auto oldValue = p_Window_Split; + p_Window_Split = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("Window_Split"), value); + }); + } + if (p_Window_Split != oldValue) { + Q_EMIT Window_SplitChanged(); + } + } +Q_SIGNALS: + void Allow_Force_QuitChanged(); + void Docked_ItemsChanged(); + void Window_SplitChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("Allow_Force_Quit"), QVariant::fromValue(p_Allow_Force_Quit)); + } else { + updateValue(QStringLiteral("Allow_Force_Quit"), QVariant::fromValue(p_Allow_Force_Quit)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("Docked_Items"), QVariant::fromValue(p_Docked_Items)); + } else { + updateValue(QStringLiteral("Docked_Items"), QVariant::fromValue(p_Docked_Items)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("Window_Split"), QVariant::fromValue(p_Window_Split)); + } else { + updateValue(QStringLiteral("Window_Split"), QVariant::fromValue(p_Window_Split)); + } + + 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("Allow_Force_Quit")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Allow_Force_Quit != newValue) { + p_Allow_Force_Quit = newValue; + Q_EMIT Allow_Force_QuitChanged(); + } + }); + return; + } + if (key == QStringLiteral("Docked_Items")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Docked_Items != newValue) { + p_Docked_Items = newValue; + Q_EMIT Docked_ItemsChanged(); + } + }); + return; + } + if (key == QStringLiteral("Window_Split")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_Window_Split != newValue) { + p_Window_Split = newValue; + Q_EMIT Window_SplitChanged(); + } + }); + 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; + QString p_Allow_Force_Quit { QStringLiteral("enabled") }; + QList p_Docked_Items { QList{QVariant(QStringLiteral("id: dde-file-manager,type: amAPP")), QVariant(QStringLiteral("id: deepin-app-store,type: amAPP")), QVariant(QStringLiteral("id: org.deepin.browser,type: amAPP")), QVariant(QStringLiteral("id: deepin-mail,type: amAPP")), QVariant(QStringLiteral("id: deepin-terminal,type: amAPP")), QVariant(QStringLiteral("id: dde-calendar,type: amAPP")), QVariant(QStringLiteral("id: deepin-music,type: amAPP")), QVariant(QStringLiteral("id: deepin-editor,type: amAPP")), QVariant(QStringLiteral("id: deepin-calculator,type: amAPP")), QVariant(QStringLiteral("id: org.deepin.dde.control-center, type: amAPP")), QVariant(QStringLiteral("id: dde-trash,type: amAPP"))} }; + QString p_Window_Split { QStringLiteral("disabled") }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DS_DOCK_TASKMANAGER_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_ds_dock_tray.hpp b/toolGenerate/dconfig2cpp/org_deepin_ds_dock_tray.hpp new file mode 100644 index 000000000..b8cdb0434 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_ds_dock_tray.hpp @@ -0,0 +1,452 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/panels/dock/dconfig/org.deepin.ds.dock.tray.json + * Generation time: 2025-01-14T10:55:02 + * 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_DS_DOCK_TRAY_H +#define ORG_DEEPIN_DS_DOCK_TRAY_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_ds_dock_tray : public QObject { + Q_OBJECT + + Q_PROPERTY(QList collapsableSurfaceIds READ collapsableSurfaceIds WRITE setCollapsableSurfaceIds NOTIFY collapsableSurfaceIdsChanged) + Q_PROPERTY(QList crashProneTrayPlugins READ crashProneTrayPlugins WRITE setCrashProneTrayPlugins NOTIFY crashProneTrayPluginsChanged) + Q_PROPERTY(QList hiddenSurfaceIds READ hiddenSurfaceIds WRITE setHiddenSurfaceIds NOTIFY hiddenSurfaceIdsChanged) + Q_PROPERTY(bool isCollapsed READ isCollapsed WRITE setIsCollapsed NOTIFY isCollapsedChanged) + Q_PROPERTY(QList pinnedSurfaceIds READ pinnedSurfaceIds WRITE setPinnedSurfaceIds NOTIFY pinnedSurfaceIdsChanged) + Q_PROPERTY(QList quickPlugins READ quickPlugins WRITE setQuickPlugins NOTIFY quickPluginsChanged) + Q_PROPERTY(QList selfMaintenanceTrayPlugins READ selfMaintenanceTrayPlugins WRITE setSelfMaintenanceTrayPlugins NOTIFY selfMaintenanceTrayPluginsChanged) + Q_PROPERTY(QList stashedSurfaceIds READ stashedSurfaceIds WRITE setStashedSurfaceIds NOTIFY stashedSurfaceIdsChanged) + Q_PROPERTY(QList subprojectTrayPlugins READ subprojectTrayPlugins WRITE setSubprojectTrayPlugins NOTIFY subprojectTrayPluginsChanged) +public: + explicit org_deepin_ds_dock_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_ds_dock_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_ds_dock_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_ds_dock_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_ds_dock_tray() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList collapsableSurfaceIds() const { + return p_collapsableSurfaceIds; + } + void setCollapsableSurfaceIds(const QList &value) { + auto oldValue = p_collapsableSurfaceIds; + p_collapsableSurfaceIds = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("collapsableSurfaceIds"), value); + }); + } + if (p_collapsableSurfaceIds != oldValue) { + Q_EMIT collapsableSurfaceIdsChanged(); + } + } + QList crashProneTrayPlugins() const { + return p_crashProneTrayPlugins; + } + void setCrashProneTrayPlugins(const QList &value) { + auto oldValue = p_crashProneTrayPlugins; + p_crashProneTrayPlugins = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("crashProneTrayPlugins"), value); + }); + } + if (p_crashProneTrayPlugins != oldValue) { + Q_EMIT crashProneTrayPluginsChanged(); + } + } + QList hiddenSurfaceIds() const { + return p_hiddenSurfaceIds; + } + void setHiddenSurfaceIds(const QList &value) { + auto oldValue = p_hiddenSurfaceIds; + p_hiddenSurfaceIds = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("hiddenSurfaceIds"), value); + }); + } + if (p_hiddenSurfaceIds != oldValue) { + Q_EMIT hiddenSurfaceIdsChanged(); + } + } + bool isCollapsed() const { + return p_isCollapsed; + } + void setIsCollapsed(const bool &value) { + auto oldValue = p_isCollapsed; + p_isCollapsed = value; + markPropertySet(3); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("isCollapsed"), value); + }); + } + if (p_isCollapsed != oldValue) { + Q_EMIT isCollapsedChanged(); + } + } + QList pinnedSurfaceIds() const { + return p_pinnedSurfaceIds; + } + void setPinnedSurfaceIds(const QList &value) { + auto oldValue = p_pinnedSurfaceIds; + p_pinnedSurfaceIds = value; + markPropertySet(4); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("pinnedSurfaceIds"), value); + }); + } + if (p_pinnedSurfaceIds != oldValue) { + Q_EMIT pinnedSurfaceIdsChanged(); + } + } + QList quickPlugins() const { + return p_quickPlugins; + } + void setQuickPlugins(const QList &value) { + auto oldValue = p_quickPlugins; + p_quickPlugins = value; + markPropertySet(5); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("quickPlugins"), value); + }); + } + if (p_quickPlugins != oldValue) { + Q_EMIT quickPluginsChanged(); + } + } + QList selfMaintenanceTrayPlugins() const { + return p_selfMaintenanceTrayPlugins; + } + void setSelfMaintenanceTrayPlugins(const QList &value) { + auto oldValue = p_selfMaintenanceTrayPlugins; + p_selfMaintenanceTrayPlugins = value; + markPropertySet(6); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("selfMaintenanceTrayPlugins"), value); + }); + } + if (p_selfMaintenanceTrayPlugins != oldValue) { + Q_EMIT selfMaintenanceTrayPluginsChanged(); + } + } + QList stashedSurfaceIds() const { + return p_stashedSurfaceIds; + } + void setStashedSurfaceIds(const QList &value) { + auto oldValue = p_stashedSurfaceIds; + p_stashedSurfaceIds = value; + markPropertySet(7); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("stashedSurfaceIds"), value); + }); + } + if (p_stashedSurfaceIds != oldValue) { + Q_EMIT stashedSurfaceIdsChanged(); + } + } + QList subprojectTrayPlugins() const { + return p_subprojectTrayPlugins; + } + void setSubprojectTrayPlugins(const QList &value) { + auto oldValue = p_subprojectTrayPlugins; + p_subprojectTrayPlugins = value; + markPropertySet(8); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("subprojectTrayPlugins"), value); + }); + } + if (p_subprojectTrayPlugins != oldValue) { + Q_EMIT subprojectTrayPluginsChanged(); + } + } +Q_SIGNALS: + void collapsableSurfaceIdsChanged(); + void crashProneTrayPluginsChanged(); + void hiddenSurfaceIdsChanged(); + void isCollapsedChanged(); + void pinnedSurfaceIdsChanged(); + void quickPluginsChanged(); + void selfMaintenanceTrayPluginsChanged(); + void stashedSurfaceIdsChanged(); + void subprojectTrayPluginsChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("collapsableSurfaceIds"), QVariant::fromValue(p_collapsableSurfaceIds)); + } else { + updateValue(QStringLiteral("collapsableSurfaceIds"), QVariant::fromValue(p_collapsableSurfaceIds)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("crashProneTrayPlugins"), QVariant::fromValue(p_crashProneTrayPlugins)); + } else { + updateValue(QStringLiteral("crashProneTrayPlugins"), QVariant::fromValue(p_crashProneTrayPlugins)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("hiddenSurfaceIds"), QVariant::fromValue(p_hiddenSurfaceIds)); + } else { + updateValue(QStringLiteral("hiddenSurfaceIds"), QVariant::fromValue(p_hiddenSurfaceIds)); + } + if (testPropertySet(3)) { + config->setValue(QStringLiteral("isCollapsed"), QVariant::fromValue(p_isCollapsed)); + } else { + updateValue(QStringLiteral("isCollapsed"), QVariant::fromValue(p_isCollapsed)); + } + if (testPropertySet(4)) { + config->setValue(QStringLiteral("pinnedSurfaceIds"), QVariant::fromValue(p_pinnedSurfaceIds)); + } else { + updateValue(QStringLiteral("pinnedSurfaceIds"), QVariant::fromValue(p_pinnedSurfaceIds)); + } + if (testPropertySet(5)) { + config->setValue(QStringLiteral("quickPlugins"), QVariant::fromValue(p_quickPlugins)); + } else { + updateValue(QStringLiteral("quickPlugins"), QVariant::fromValue(p_quickPlugins)); + } + if (testPropertySet(6)) { + config->setValue(QStringLiteral("selfMaintenanceTrayPlugins"), QVariant::fromValue(p_selfMaintenanceTrayPlugins)); + } else { + updateValue(QStringLiteral("selfMaintenanceTrayPlugins"), QVariant::fromValue(p_selfMaintenanceTrayPlugins)); + } + if (testPropertySet(7)) { + config->setValue(QStringLiteral("stashedSurfaceIds"), QVariant::fromValue(p_stashedSurfaceIds)); + } else { + updateValue(QStringLiteral("stashedSurfaceIds"), QVariant::fromValue(p_stashedSurfaceIds)); + } + if (testPropertySet(8)) { + config->setValue(QStringLiteral("subprojectTrayPlugins"), QVariant::fromValue(p_subprojectTrayPlugins)); + } else { + updateValue(QStringLiteral("subprojectTrayPlugins"), QVariant::fromValue(p_subprojectTrayPlugins)); + } + + 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("collapsableSurfaceIds")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_collapsableSurfaceIds != newValue) { + p_collapsableSurfaceIds = newValue; + Q_EMIT collapsableSurfaceIdsChanged(); + } + }); + return; + } + if (key == QStringLiteral("crashProneTrayPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_crashProneTrayPlugins != newValue) { + p_crashProneTrayPlugins = newValue; + Q_EMIT crashProneTrayPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("hiddenSurfaceIds")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_hiddenSurfaceIds != newValue) { + p_hiddenSurfaceIds = newValue; + Q_EMIT hiddenSurfaceIdsChanged(); + } + }); + return; + } + if (key == QStringLiteral("isCollapsed")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_isCollapsed != newValue) { + p_isCollapsed = newValue; + Q_EMIT isCollapsedChanged(); + } + }); + return; + } + if (key == QStringLiteral("pinnedSurfaceIds")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_pinnedSurfaceIds != newValue) { + p_pinnedSurfaceIds = newValue; + Q_EMIT pinnedSurfaceIdsChanged(); + } + }); + return; + } + if (key == QStringLiteral("quickPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_quickPlugins != newValue) { + p_quickPlugins = newValue; + Q_EMIT quickPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("selfMaintenanceTrayPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_selfMaintenanceTrayPlugins != newValue) { + p_selfMaintenanceTrayPlugins = newValue; + Q_EMIT selfMaintenanceTrayPluginsChanged(); + } + }); + return; + } + if (key == QStringLiteral("stashedSurfaceIds")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_stashedSurfaceIds != newValue) { + p_stashedSurfaceIds = newValue; + Q_EMIT stashedSurfaceIdsChanged(); + } + }); + return; + } + if (key == QStringLiteral("subprojectTrayPlugins")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_subprojectTrayPlugins != newValue) { + p_subprojectTrayPlugins = newValue; + Q_EMIT subprojectTrayPluginsChanged(); + } + }); + 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_collapsableSurfaceIds { QList{QVariant(QStringLiteral("application-tray::SNI:Fcitx-0")), QVariant(QStringLiteral("bluetooth::bluetooth-item-key")), QVariant(QStringLiteral("battery::power")), QVariant(QStringLiteral("shutdown::shutdown"))} }; + QList p_crashProneTrayPlugins { QList{} }; + QList p_hiddenSurfaceIds { QList{} }; + bool p_isCollapsed { false }; + QList p_pinnedSurfaceIds { QList{QVariant(QStringLiteral("disk-mount::mount-item-key")), QVariant(QStringLiteral("uosai::uosai")), QVariant(QStringLiteral("network::network-item-key"))} }; + QList p_quickPlugins { 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"))} }; + QList p_selfMaintenanceTrayPlugins { QList{QVariant(QStringLiteral("libapplication-tray.so")), QVariant(QStringLiteral("libbrightness.so")), QVariant(QStringLiteral("libdatetime.so")), QVariant(QStringLiteral("libdnd-mode.so")), QVariant(QStringLiteral("libeye-comfort-mode.so")), QVariant(QStringLiteral("libmedia.so")), QVariant(QStringLiteral("libnotification.so")), QVariant(QStringLiteral("libonboard.so")), QVariant(QStringLiteral("libshutdown.so")), QVariant(QStringLiteral("libairplane-mode.so")), QVariant(QStringLiteral("libbluetooth.so")), QVariant(QStringLiteral("libdock-tray-network-plugin.so")), QVariant(QStringLiteral("libdock-wirelesscasting-plugin.so")), QVariant(QStringLiteral("libkeyboard-layout.so")), QVariant(QStringLiteral("libpower.so")), QVariant(QStringLiteral("libsound.so"))} }; + QList p_stashedSurfaceIds { QList{} }; + QList p_subprojectTrayPlugins { QList{QVariant(QStringLiteral("libdock-clipboard-plugin.so")), QVariant(QStringLiteral("libddegrandsearch_dockplugin.so")), QVariant(QStringLiteral("libdeepin-screen-recorder-plugin.so")), QVariant(QStringLiteral("libdeepin-system-monitor-plugin.so")), QVariant(QStringLiteral("libshot-start-plugin.so")), QVariant(QStringLiteral("libshot-start-record-plugin.so")), QVariant(QStringLiteral("libdde-disk-mount-plugin.so"))} }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DS_DOCK_TRAY_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_ds_example.hpp b/toolGenerate/dconfig2cpp/org_deepin_ds_example.hpp new file mode 100644 index 000000000..4220fcccf --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_ds_example.hpp @@ -0,0 +1,214 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./dde-shell/toolGenerate/dconfig2cpp ./dde-shell/example/panel-example/org.deepin.ds.example.json + * Generation time: 2025-01-14T10:55:02 + * 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_DS_EXAMPLE_H +#define ORG_DEEPIN_DS_EXAMPLE_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_ds_example : public QObject { + Q_OBJECT + + Q_PROPERTY(QList appletExamples READ appletExamples WRITE setAppletExamples NOTIFY appletExamplesChanged) + Q_PROPERTY(bool loadAppletExampleData READ loadAppletExampleData WRITE setLoadAppletExampleData NOTIFY loadAppletExampleDataChanged) +public: + explicit org_deepin_ds_example(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_ds_example(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_ds_example(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_ds_example(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_ds_example() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + QList appletExamples() const { + return p_appletExamples; + } + void setAppletExamples(const QList &value) { + auto oldValue = p_appletExamples; + p_appletExamples = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("appletExamples"), value); + }); + } + if (p_appletExamples != oldValue) { + Q_EMIT appletExamplesChanged(); + } + } + bool loadAppletExampleData() const { + return p_loadAppletExampleData; + } + void setLoadAppletExampleData(const bool &value) { + auto oldValue = p_loadAppletExampleData; + p_loadAppletExampleData = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("loadAppletExampleData"), value); + }); + } + if (p_loadAppletExampleData != oldValue) { + Q_EMIT loadAppletExampleDataChanged(); + } + } +Q_SIGNALS: + void appletExamplesChanged(); + void loadAppletExampleDataChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("appletExamples"), QVariant::fromValue(p_appletExamples)); + } else { + updateValue(QStringLiteral("appletExamples"), QVariant::fromValue(p_appletExamples)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("loadAppletExampleData"), QVariant::fromValue(p_loadAppletExampleData)); + } else { + updateValue(QStringLiteral("loadAppletExampleData"), QVariant::fromValue(p_loadAppletExampleData)); + } + + 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("appletExamples")) { + auto newValue = qvariant_cast>(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_appletExamples != newValue) { + p_appletExamples = newValue; + Q_EMIT appletExamplesChanged(); + } + }); + return; + } + if (key == QStringLiteral("loadAppletExampleData")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_loadAppletExampleData != newValue) { + p_loadAppletExampleData = newValue; + Q_EMIT loadAppletExampleDataChanged(); + } + }); + 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_appletExamples { QList{} }; + bool p_loadAppletExampleData { true }; + QAtomicInteger m_propertySetStatus0 = 0; +}; + +#endif // ORG_DEEPIN_DS_EXAMPLE_H diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp new file mode 100644 index 000000000..5749b98eb --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp @@ -0,0 +1,233 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/applets/dde-appearance/org.deepin.dde.Appearance1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-shell/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-shell/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)); +} + +QString Appearance1Adaptor::GetCurrentWorkspaceBackgroundForMonitor(const QString &strMonitorName) +{ + // handle method call org.deepin.dde.Appearance1.GetCurrentWorkspaceBackgroundForMonitor + QString uri; + QMetaObject::invokeMethod(parent(), "GetCurrentWorkspaceBackgroundForMonitor", Q_RETURN_ARG(QString, uri), Q_ARG(QString, strMonitorName)); + return uri; +} + +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 000000000..5f27ff602 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h @@ -0,0 +1,160 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/applets/dde-appearance/org.deepin.dde.Appearance1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-shell/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-shell/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" +" \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); + QString GetCurrentWorkspaceBackgroundForMonitor(const QString &strMonitorName); + 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.SessionManager1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.cpp new file mode 100644 index 000000000..cfa9135b1 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.cpp @@ -0,0 +1,199 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/notification/server/dbus/xml/org.deepin.dde.SessionManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class SessionManager1Adaptor + */ + +SessionManager1Adaptor::SessionManager1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +SessionManager1Adaptor::~SessionManager1Adaptor() +{ + // destructor +} + +QString SessionManager1Adaptor::currentUid() const +{ + // get the value of property CurrentUid + return qvariant_cast< QString >(parent()->property("CurrentUid")); +} + +bool SessionManager1Adaptor::locked() const +{ + // get the value of property Locked + return qvariant_cast< bool >(parent()->property("Locked")); +} + +int SessionManager1Adaptor::stage() const +{ + // get the value of property Stage + return qvariant_cast< int >(parent()->property("Stage")); +} + +bool SessionManager1Adaptor::AllowSessionDaemonRun() +{ + // handle method call org.deepin.dde.SessionManager1.AllowSessionDaemonRun + bool out0; + QMetaObject::invokeMethod(parent(), "AllowSessionDaemonRun", Q_RETURN_ARG(bool, out0)); + return out0; +} + +bool SessionManager1Adaptor::CanHibernate() +{ + // handle method call org.deepin.dde.SessionManager1.CanHibernate + bool out0; + QMetaObject::invokeMethod(parent(), "CanHibernate", Q_RETURN_ARG(bool, out0)); + return out0; +} + +bool SessionManager1Adaptor::CanLogout() +{ + // handle method call org.deepin.dde.SessionManager1.CanLogout + bool out0; + QMetaObject::invokeMethod(parent(), "CanLogout", Q_RETURN_ARG(bool, out0)); + return out0; +} + +bool SessionManager1Adaptor::CanReboot() +{ + // handle method call org.deepin.dde.SessionManager1.CanReboot + bool out0; + QMetaObject::invokeMethod(parent(), "CanReboot", Q_RETURN_ARG(bool, out0)); + return out0; +} + +bool SessionManager1Adaptor::CanShutdown() +{ + // handle method call org.deepin.dde.SessionManager1.CanShutdown + bool out0; + QMetaObject::invokeMethod(parent(), "CanShutdown", Q_RETURN_ARG(bool, out0)); + return out0; +} + +bool SessionManager1Adaptor::CanSuspend() +{ + // handle method call org.deepin.dde.SessionManager1.CanSuspend + bool out0; + QMetaObject::invokeMethod(parent(), "CanSuspend", Q_RETURN_ARG(bool, out0)); + return out0; +} + +void SessionManager1Adaptor::ForceLogout() +{ + // handle method call org.deepin.dde.SessionManager1.ForceLogout + QMetaObject::invokeMethod(parent(), "ForceLogout"); +} + +void SessionManager1Adaptor::ForceReboot() +{ + // handle method call org.deepin.dde.SessionManager1.ForceReboot + QMetaObject::invokeMethod(parent(), "ForceReboot"); +} + +void SessionManager1Adaptor::ForceShutdown() +{ + // handle method call org.deepin.dde.SessionManager1.ForceShutdown + QMetaObject::invokeMethod(parent(), "ForceShutdown"); +} + +void SessionManager1Adaptor::Logout() +{ + // handle method call org.deepin.dde.SessionManager1.Logout + QMetaObject::invokeMethod(parent(), "Logout"); +} + +void SessionManager1Adaptor::PowerOffChoose() +{ + // handle method call org.deepin.dde.SessionManager1.PowerOffChoose + QMetaObject::invokeMethod(parent(), "PowerOffChoose"); +} + +void SessionManager1Adaptor::Reboot() +{ + // handle method call org.deepin.dde.SessionManager1.Reboot + QMetaObject::invokeMethod(parent(), "Reboot"); +} + +bool SessionManager1Adaptor::Register(const QString &in0) +{ + // handle method call org.deepin.dde.SessionManager1.Register + bool out0; + QMetaObject::invokeMethod(parent(), "Register", Q_RETURN_ARG(bool, out0), Q_ARG(QString, in0)); + return out0; +} + +void SessionManager1Adaptor::RequestHibernate() +{ + // handle method call org.deepin.dde.SessionManager1.RequestHibernate + QMetaObject::invokeMethod(parent(), "RequestHibernate"); +} + +void SessionManager1Adaptor::RequestLock() +{ + // handle method call org.deepin.dde.SessionManager1.RequestLock + QMetaObject::invokeMethod(parent(), "RequestLock"); +} + +void SessionManager1Adaptor::RequestLogout() +{ + // handle method call org.deepin.dde.SessionManager1.RequestLogout + QMetaObject::invokeMethod(parent(), "RequestLogout"); +} + +void SessionManager1Adaptor::RequestReboot() +{ + // handle method call org.deepin.dde.SessionManager1.RequestReboot + QMetaObject::invokeMethod(parent(), "RequestReboot"); +} + +void SessionManager1Adaptor::RequestShutdown() +{ + // handle method call org.deepin.dde.SessionManager1.RequestShutdown + QMetaObject::invokeMethod(parent(), "RequestShutdown"); +} + +void SessionManager1Adaptor::RequestSuspend() +{ + // handle method call org.deepin.dde.SessionManager1.RequestSuspend + QMetaObject::invokeMethod(parent(), "RequestSuspend"); +} + +void SessionManager1Adaptor::SetLocked(bool in0) +{ + // handle method call org.deepin.dde.SessionManager1.SetLocked + QMetaObject::invokeMethod(parent(), "SetLocked", Q_ARG(bool, in0)); +} + +void SessionManager1Adaptor::Shutdown() +{ + // handle method call org.deepin.dde.SessionManager1.Shutdown + QMetaObject::invokeMethod(parent(), "Shutdown"); +} + +void SessionManager1Adaptor::ToggleDebug() +{ + // handle method call org.deepin.dde.SessionManager1.ToggleDebug + QMetaObject::invokeMethod(parent(), "ToggleDebug"); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.h new file mode 100644 index 000000000..1fbc76410 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor.h @@ -0,0 +1,122 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/notification/server/dbus/xml/org.deepin.dde.SessionManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1.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_SESSIONMANAGER1ADAPTOR_H +#define ORG_DEEPIN_DDE_SESSIONMANAGER1ADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.SessionManager1.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.SessionManager1 + */ +class SessionManager1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.SessionManager1") + 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" + "") +public: + SessionManager1Adaptor(QObject *parent); + virtual ~SessionManager1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString CurrentUid READ currentUid) + QString currentUid() const; + + Q_PROPERTY(bool Locked READ locked) + bool locked() const; + + Q_PROPERTY(int Stage READ stage) + int stage() const; + +public Q_SLOTS: // METHODS + bool AllowSessionDaemonRun(); + bool CanHibernate(); + bool CanLogout(); + bool CanReboot(); + bool CanShutdown(); + bool CanSuspend(); + void ForceLogout(); + void ForceReboot(); + void ForceShutdown(); + void Logout(); + void PowerOffChoose(); + void Reboot(); + bool Register(const QString &in0); + void RequestHibernate(); + void RequestLock(); + void RequestLogout(); + void RequestReboot(); + void RequestShutdown(); + void RequestSuspend(); + void SetLocked(bool in0); + void Shutdown(); + void ToggleDebug(); +Q_SIGNALS: // SIGNALS + void Unlock(); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.cpp new file mode 100644 index 000000000..9b9076e8e --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.cpp @@ -0,0 +1,131 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/old/org.deepin.dde.daemon.Dock1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Dock1Adaptor + */ + +Dock1Adaptor::Dock1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Dock1Adaptor::~Dock1Adaptor() +{ + // destructor +} + +int Dock1Adaptor::displayMode() const +{ + // get the value of property DisplayMode + return qvariant_cast< int >(parent()->property("DisplayMode")); +} + +void Dock1Adaptor::setDisplayMode(int value) +{ + // set the value of property DisplayMode + parent()->setProperty("DisplayMode", QVariant::fromValue(value)); +} + +QRect Dock1Adaptor::frontendWindowRect() const +{ + // get the value of property FrontendWindowRect + return qvariant_cast< QRect >(parent()->property("FrontendWindowRect")); +} + +int Dock1Adaptor::hideMode() const +{ + // get the value of property HideMode + return qvariant_cast< int >(parent()->property("HideMode")); +} + +void Dock1Adaptor::setHideMode(int value) +{ + // set the value of property HideMode + parent()->setProperty("HideMode", QVariant::fromValue(value)); +} + +int Dock1Adaptor::hideState() const +{ + // get the value of property HideState + return qvariant_cast< int >(parent()->property("HideState")); +} + +int Dock1Adaptor::position() const +{ + // get the value of property Position + return qvariant_cast< int >(parent()->property("Position")); +} + +void Dock1Adaptor::setPosition(int value) +{ + // set the value of property Position + parent()->setProperty("Position", QVariant::fromValue(value)); +} + +uint Dock1Adaptor::windowSizeEfficient() const +{ + // get the value of property WindowSizeEfficient + return qvariant_cast< uint >(parent()->property("WindowSizeEfficient")); +} + +void Dock1Adaptor::setWindowSizeEfficient(uint value) +{ + // set the value of property WindowSizeEfficient + parent()->setProperty("WindowSizeEfficient", QVariant::fromValue(value)); +} + +uint Dock1Adaptor::windowSizeFashion() const +{ + // get the value of property WindowSizeFashion + return qvariant_cast< uint >(parent()->property("WindowSizeFashion")); +} + +void Dock1Adaptor::setWindowSizeFashion(uint value) +{ + // set the value of property WindowSizeFashion + parent()->setProperty("WindowSizeFashion", QVariant::fromValue(value)); +} + +bool Dock1Adaptor::IsDocked(const QString &desktopFile) +{ + // handle method call org.deepin.dde.daemon.Dock1.IsDocked + bool docked; + QMetaObject::invokeMethod(parent(), "IsDocked", Q_RETURN_ARG(bool, docked), Q_ARG(QString, desktopFile)); + return docked; +} + +bool Dock1Adaptor::RequestDock(const QString &desktopFile, int index) +{ + // handle method call org.deepin.dde.daemon.Dock1.RequestDock + bool docked; + QMetaObject::invokeMethod(parent(), "RequestDock", Q_RETURN_ARG(bool, docked), Q_ARG(QString, desktopFile), Q_ARG(int, index)); + return docked; +} + +bool Dock1Adaptor::RequestUndock(const QString &desktopFile) +{ + // handle method call org.deepin.dde.daemon.Dock1.RequestUndock + bool docked; + QMetaObject::invokeMethod(parent(), "RequestUndock", Q_RETURN_ARG(bool, docked), Q_ARG(QString, desktopFile)); + return docked; +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.h new file mode 100644 index 000000000..dae189785 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor.h @@ -0,0 +1,123 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/old/org.deepin.dde.daemon.Dock1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1.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_DAEMON_DOCK1ADAPTOR_H +#define ORG_DEEPIN_DDE_DAEMON_DOCK1ADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.daemon.Dock1.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.daemon.Dock1 + */ +class Dock1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.daemon.Dock1") + 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" + "") +public: + Dock1Adaptor(QObject *parent); + virtual ~Dock1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(int DisplayMode READ displayMode WRITE setDisplayMode) + int displayMode() const; + void setDisplayMode(int value); + + Q_PROPERTY(QRect FrontendWindowRect READ frontendWindowRect) + QRect frontendWindowRect() const; + + Q_PROPERTY(int HideMode READ hideMode WRITE setHideMode) + int hideMode() const; + void setHideMode(int value); + + Q_PROPERTY(int HideState READ hideState) + int hideState() const; + + Q_PROPERTY(int Position READ position WRITE setPosition) + int position() const; + void setPosition(int value); + + Q_PROPERTY(uint WindowSizeEfficient READ windowSizeEfficient WRITE setWindowSizeEfficient) + uint windowSizeEfficient() const; + void setWindowSizeEfficient(uint value); + + Q_PROPERTY(uint WindowSizeFashion READ windowSizeFashion WRITE setWindowSizeFashion) + uint windowSizeFashion() const; + void setWindowSizeFashion(uint value); + +public Q_SLOTS: // METHODS + bool IsDocked(const QString &desktopFile); + bool RequestDock(const QString &desktopFile, int index); + bool RequestUndock(const QString &desktopFile); +Q_SIGNALS: // SIGNALS + void DisplayModeChanged(int displaymode); + void FrontendWindowRectChanged(const QRect &FrontendWindowRect); + void HideModeChanged(int hideMode); + void PositionChanged(int Position); + void WindowSizeEfficientChanged(uint size); + void WindowSizeFashionChanged(uint size); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.cpp new file mode 100644 index 000000000..6e009947d --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.cpp @@ -0,0 +1,115 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/old/org.deepin.dde.dock1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Dock1Adaptor + */ + +Dock1Adaptor::Dock1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Dock1Adaptor::~Dock1Adaptor() +{ + // destructor +} + +QRect Dock1Adaptor::geometry() const +{ + // get the value of property geometry + return qvariant_cast< QRect >(parent()->property("geometry")); +} + +bool Dock1Adaptor::showInPrimary() const +{ + // get the value of property showInPrimary + return qvariant_cast< bool >(parent()->property("showInPrimary")); +} + +void Dock1Adaptor::setShowInPrimary(bool value) +{ + // set the value of property showInPrimary + parent()->setProperty("showInPrimary", QVariant::fromValue(value)); +} + +QStringList Dock1Adaptor::GetLoadedPlugins() +{ + // handle method call org.deepin.dde.Dock1.GetLoadedPlugins + QStringList list; + QMetaObject::invokeMethod(parent(), "GetLoadedPlugins", Q_RETURN_ARG(QStringList, list)); + return list; +} + +void Dock1Adaptor::ReloadPlugins() +{ + // handle method call org.deepin.dde.Dock1.ReloadPlugins + QMetaObject::invokeMethod(parent(), "ReloadPlugins"); +} + +void Dock1Adaptor::callShow() +{ + // handle method call org.deepin.dde.Dock1.callShow + QMetaObject::invokeMethod(parent(), "callShow"); +} + +QString Dock1Adaptor::getPluginKey(const QString &pluginName) +{ + // handle method call org.deepin.dde.Dock1.getPluginKey + QString key; + QMetaObject::invokeMethod(parent(), "getPluginKey", Q_RETURN_ARG(QString, key), Q_ARG(QString, pluginName)); + return key; +} + +bool Dock1Adaptor::getPluginVisible(const QString &pluginName) +{ + // handle method call org.deepin.dde.Dock1.getPluginVisible + bool visible; + QMetaObject::invokeMethod(parent(), "getPluginVisible", Q_RETURN_ARG(bool, visible), Q_ARG(QString, pluginName)); + return visible; +} + +DockItemInfos Dock1Adaptor::plugins() +{ + // handle method call org.deepin.dde.Dock1.plugins + DockItemInfos out0; + QMetaObject::invokeMethod(parent(), "plugins", Q_RETURN_ARG(DockItemInfos, out0)); + return out0; +} + +void Dock1Adaptor::resizeDock(int offset, bool dragging) +{ + // handle method call org.deepin.dde.Dock1.resizeDock + QMetaObject::invokeMethod(parent(), "resizeDock", Q_ARG(int, offset), Q_ARG(bool, dragging)); +} + +void Dock1Adaptor::setItemOnDock(const QString &settingKey, const QString &itemKey, bool visible) +{ + // handle method call org.deepin.dde.Dock1.setItemOnDock + QMetaObject::invokeMethod(parent(), "setItemOnDock", Q_ARG(QString, settingKey), Q_ARG(QString, itemKey), Q_ARG(bool, visible)); +} + +void Dock1Adaptor::setPluginVisible(const QString &pluginName, bool visible) +{ + // handle method call org.deepin.dde.Dock1.setPluginVisible + QMetaObject::invokeMethod(parent(), "setPluginVisible", Q_ARG(QString, pluginName), Q_ARG(bool, visible)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.h new file mode 100644 index 000000000..19fb8c63f --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor.h @@ -0,0 +1,102 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/old/org.deepin.dde.dock1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1.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_DOCK1ADAPTOR_H +#define ORG_DEEPIN_DDE_DOCK1ADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.dde.dock1.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.Dock1 + */ +class Dock1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Dock1") + 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" + "") +public: + Dock1Adaptor(QObject *parent); + virtual ~Dock1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QRect geometry READ geometry) + QRect geometry() const; + + Q_PROPERTY(bool showInPrimary READ showInPrimary WRITE setShowInPrimary) + bool showInPrimary() const; + void setShowInPrimary(bool value); + +public Q_SLOTS: // METHODS + QStringList GetLoadedPlugins(); + void ReloadPlugins(); + void callShow(); + QString getPluginKey(const QString &pluginName); + bool getPluginVisible(const QString &pluginName); + DockItemInfos plugins(); + void resizeDock(int offset, bool dragging); + void setItemOnDock(const QString &settingKey, const QString &itemKey, bool visible); + void setPluginVisible(const QString &pluginName, bool visible); +Q_SIGNALS: // SIGNALS + void pluginVisibleChanged(const QString &in0, bool in1); +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.cpp new file mode 100644 index 000000000..e731ae31e --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.cpp @@ -0,0 +1,95 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/dbus/org.deepin.ds.dock.taskmanager.item.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.item.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class ItemAdaptor + */ + +ItemAdaptor::ItemAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +ItemAdaptor::~ItemAdaptor() +{ + // destructor +} + +QString ItemAdaptor::icon() const +{ + // get the value of property icon + return qvariant_cast< QString >(parent()->property("icon")); +} + +QString ItemAdaptor::id() const +{ + // get the value of property id + return qvariant_cast< QString >(parent()->property("id")); +} + +bool ItemAdaptor::isActive() const +{ + // get the value of property isActive + return qvariant_cast< bool >(parent()->property("isActive")); +} + +void ItemAdaptor::setIsActive(bool value) +{ + // set the value of property isActive + parent()->setProperty("isActive", QVariant::fromValue(value)); +} + +bool ItemAdaptor::isDocked() const +{ + // get the value of property isDocked + return qvariant_cast< bool >(parent()->property("isDocked")); +} + +void ItemAdaptor::setIsDocked(bool value) +{ + // set the value of property isDocked + parent()->setProperty("isDocked", QVariant::fromValue(value)); +} + +QString ItemAdaptor::menus() const +{ + // get the value of property menus + return qvariant_cast< QString >(parent()->property("menus")); +} + +QString ItemAdaptor::name() const +{ + // get the value of property name + return qvariant_cast< QString >(parent()->property("name")); +} + +void ItemAdaptor::handleClick(const QString &action) +{ + // handle method call org.deepin.ds.Dock.TaskManager.Item.handleClick + QMetaObject::invokeMethod(parent(), "handleClick", Q_ARG(QString, action)); +} + +void ItemAdaptor::setDocked(bool docked) +{ + // handle method call org.deepin.ds.Dock.TaskManager.Item.setDocked + QMetaObject::invokeMethod(parent(), "setDocked", Q_ARG(bool, docked)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.h new file mode 100644 index 000000000..edfca8918 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor.h @@ -0,0 +1,81 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/dbus/org.deepin.ds.dock.taskmanager.item.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.itemAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.item.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_DS_DOCK_TASKMANAGER_ITEMADAPTOR_H +#define ORG_DEEPIN_DS_DOCK_TASKMANAGER_ITEMADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.item.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.ds.Dock.TaskManager.Item + */ +class ItemAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.ds.Dock.TaskManager.Item") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + ItemAdaptor(QObject *parent); + virtual ~ItemAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(QString icon READ icon) + QString icon() const; + + Q_PROPERTY(QString id READ id) + QString id() const; + + Q_PROPERTY(bool isActive READ isActive WRITE setIsActive) + bool isActive() const; + void setIsActive(bool value); + + Q_PROPERTY(bool isDocked READ isDocked WRITE setIsDocked) + bool isDocked() const; + void setIsDocked(bool value); + + Q_PROPERTY(QString menus READ menus) + QString menus() const; + + Q_PROPERTY(QString name READ name) + QString name() const; + +public Q_SLOTS: // METHODS + void handleClick(const QString &action); + void setDocked(bool docked); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.cpp new file mode 100644 index 000000000..882a30129 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.cpp @@ -0,0 +1,59 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/dbus/org.deepin.ds.dock.taskmanager.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class TaskManagerAdaptor + */ + +TaskManagerAdaptor::TaskManagerAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +TaskManagerAdaptor::~TaskManagerAdaptor() +{ + // destructor +} + +bool TaskManagerAdaptor::allowForceQuit() const +{ + // get the value of property allowForceQuit + return qvariant_cast< bool >(parent()->property("allowForceQuit")); +} + +void TaskManagerAdaptor::setAllowForceQuit(bool value) +{ + // set the value of property allowForceQuit + parent()->setProperty("allowForceQuit", QVariant::fromValue(value)); +} + +bool TaskManagerAdaptor::windowSplit() const +{ + // get the value of property windowSplit + return qvariant_cast< bool >(parent()->property("windowSplit")); +} + +void TaskManagerAdaptor::setWindowSplit(bool value) +{ + // set the value of property windowSplit + parent()->setProperty("windowSplit", QVariant::fromValue(value)); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.h new file mode 100644 index 000000000..69f62d7f2 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor.h @@ -0,0 +1,57 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/dbus/org.deepin.ds.dock.taskmanager.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanagerAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.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_DS_DOCK_TASKMANAGERADAPTOR_H +#define ORG_DEEPIN_DS_DOCK_TASKMANAGERADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.taskmanager.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.ds.Dock.TaskManager + */ +class TaskManagerAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.ds.Dock.TaskManager") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" + "") +public: + TaskManagerAdaptor(QObject *parent); + virtual ~TaskManagerAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(bool allowForceQuit READ allowForceQuit WRITE setAllowForceQuit) + bool allowForceQuit() const; + void setAllowForceQuit(bool value); + + Q_PROPERTY(bool windowSplit READ windowSplit WRITE setWindowSplit) + bool windowSplit() const; + void setWindowSplit(bool value); + +public Q_SLOTS: // METHODS +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.cpp new file mode 100644 index 000000000..6531383e6 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.cpp @@ -0,0 +1,77 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/dbus/org.deepin.ds.dock.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.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-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class Dock1Adaptor + */ + +Dock1Adaptor::Dock1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +Dock1Adaptor::~Dock1Adaptor() +{ + // destructor +} + +QRect Dock1Adaptor::geometry() const +{ + // get the value of property geometry + return qvariant_cast< QRect >(parent()->property("geometry")); +} + +int Dock1Adaptor::position() const +{ + // get the value of property position + return qvariant_cast< int >(parent()->property("position")); +} + +void Dock1Adaptor::setPosition(int value) +{ + // set the value of property position + parent()->setProperty("position", QVariant::fromValue(value)); +} + +bool Dock1Adaptor::showInPrimary() const +{ + // get the value of property showInPrimary + return qvariant_cast< bool >(parent()->property("showInPrimary")); +} + +void Dock1Adaptor::setShowInPrimary(bool value) +{ + // set the value of property showInPrimary + parent()->setProperty("showInPrimary", QVariant::fromValue(value)); +} + +void Dock1Adaptor::ReloadPlugins() +{ + // handle method call org.deepin.dde.Dock1.ReloadPlugins + QMetaObject::invokeMethod(parent(), "ReloadPlugins"); +} + +void Dock1Adaptor::callShow() +{ + // handle method call org.deepin.dde.Dock1.callShow + QMetaObject::invokeMethod(parent(), "callShow"); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.h new file mode 100644 index 000000000..63ab21a8b --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor.h @@ -0,0 +1,67 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/api/dbus/org.deepin.ds.dock.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dockAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.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_DS_DOCKADAPTOR_H +#define ORG_DEEPIN_DS_DOCKADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.deepin.ds.dock.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.Dock1 + */ +class Dock1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Dock1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + Dock1Adaptor(QObject *parent); + virtual ~Dock1Adaptor(); + +public: // PROPERTIES + Q_PROPERTY(QRect geometry READ geometry) + QRect geometry() const; + + Q_PROPERTY(int position READ position WRITE setPosition) + int position() const; + void setPosition(int value); + + Q_PROPERTY(bool showInPrimary READ showInPrimary WRITE setShowInPrimary) + bool showInPrimary() const; + void setShowInPrimary(bool value); + +public Q_SLOTS: // METHODS + void ReloadPlugins(); + void callShow(); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.cpp new file mode 100644 index 000000000..dcdc33a68 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.cpp @@ -0,0 +1,197 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ApplicationManager1.Application.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.Application.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-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class ApplicationAdaptor + */ + +ApplicationAdaptor::ApplicationAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +ApplicationAdaptor::~ApplicationAdaptor() +{ + // destructor +} + +PropMap ApplicationAdaptor::actionName() const +{ + // get the value of property ActionName + return qvariant_cast< PropMap >(parent()->property("ActionName")); +} + +QStringList ApplicationAdaptor::actions() const +{ + // get the value of property Actions + return qvariant_cast< QStringList >(parent()->property("Actions")); +} + +bool ApplicationAdaptor::autoStart() const +{ + // get the value of property AutoStart + return qvariant_cast< bool >(parent()->property("AutoStart")); +} + +void ApplicationAdaptor::setAutoStart(bool value) +{ + // set the value of property AutoStart + parent()->setProperty("AutoStart", QVariant::fromValue(value)); +} + +QStringList ApplicationAdaptor::categories() const +{ + // get the value of property Categories + return qvariant_cast< QStringList >(parent()->property("Categories")); +} + +QString ApplicationAdaptor::environ() const +{ + // get the value of property Environ + return qvariant_cast< QString >(parent()->property("Environ")); +} + +void ApplicationAdaptor::setEnviron(const QString &value) +{ + // set the value of property Environ + parent()->setProperty("Environ", QVariant::fromValue(value)); +} + +QStringMap ApplicationAdaptor::genericName() const +{ + // get the value of property GenericName + return qvariant_cast< QStringMap >(parent()->property("GenericName")); +} + +QString ApplicationAdaptor::iD() const +{ + // get the value of property ID + return qvariant_cast< QString >(parent()->property("ID")); +} + +QStringMap ApplicationAdaptor::icons() const +{ + // get the value of property Icons + return qvariant_cast< QStringMap >(parent()->property("Icons")); +} + +qlonglong ApplicationAdaptor::installedTime() const +{ + // get the value of property InstalledTime + return qvariant_cast< qlonglong >(parent()->property("InstalledTime")); +} + +QList ApplicationAdaptor::instances() const +{ + // get the value of property Instances + return qvariant_cast< QList >(parent()->property("Instances")); +} + +qlonglong ApplicationAdaptor::lastLaunchedTime() const +{ + // get the value of property LastLaunchedTime + return qvariant_cast< qlonglong >(parent()->property("LastLaunchedTime")); +} + +qlonglong ApplicationAdaptor::launchedTimes() const +{ + // get the value of property LaunchedTimes + return qvariant_cast< qlonglong >(parent()->property("LaunchedTimes")); +} + +QStringList ApplicationAdaptor::mimeTypes() const +{ + // get the value of property MimeTypes + return qvariant_cast< QStringList >(parent()->property("MimeTypes")); +} + +void ApplicationAdaptor::setMimeTypes(const QStringList &value) +{ + // set the value of property MimeTypes + parent()->setProperty("MimeTypes", QVariant::fromValue(value)); +} + +QStringMap ApplicationAdaptor::name() const +{ + // get the value of property Name + return qvariant_cast< QStringMap >(parent()->property("Name")); +} + +bool ApplicationAdaptor::noDisplay() const +{ + // get the value of property NoDisplay + return qvariant_cast< bool >(parent()->property("NoDisplay")); +} + +bool ApplicationAdaptor::terminal() const +{ + // get the value of property Terminal + return qvariant_cast< bool >(parent()->property("Terminal")); +} + +QString ApplicationAdaptor::x_Deepin_Vendor() const +{ + // get the value of property X_Deepin_Vendor + return qvariant_cast< QString >(parent()->property("X_Deepin_Vendor")); +} + +bool ApplicationAdaptor::x_Flatpak() const +{ + // get the value of property X_Flatpak + return qvariant_cast< bool >(parent()->property("X_Flatpak")); +} + +bool ApplicationAdaptor::x_linglong() const +{ + // get the value of property X_linglong + return qvariant_cast< bool >(parent()->property("X_linglong")); +} + +bool ApplicationAdaptor::isOnDesktop() const +{ + // get the value of property isOnDesktop + return qvariant_cast< bool >(parent()->property("isOnDesktop")); +} + +QDBusObjectPath ApplicationAdaptor::Launch(const QString &action, const QStringList &fields, const QVariantMap &options) +{ + // handle method call org.desktopspec.ApplicationManager1.Application.Launch + QDBusObjectPath job; + QMetaObject::invokeMethod(parent(), "Launch", Q_RETURN_ARG(QDBusObjectPath, job), Q_ARG(QString, action), Q_ARG(QStringList, fields), Q_ARG(QVariantMap, options)); + return job; +} + +bool ApplicationAdaptor::RemoveFromDesktop() +{ + // handle method call org.desktopspec.ApplicationManager1.Application.RemoveFromDesktop + bool success; + QMetaObject::invokeMethod(parent(), "RemoveFromDesktop", Q_RETURN_ARG(bool, success)); + return success; +} + +bool ApplicationAdaptor::SendToDesktop() +{ + // handle method call org.desktopspec.ApplicationManager1.Application.SendToDesktop + bool success; + QMetaObject::invokeMethod(parent(), "SendToDesktop", Q_RETURN_ARG(bool, success)); + return success; +} + diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.h b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.h new file mode 100644 index 000000000..b2dbf0ebc --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor.h @@ -0,0 +1,178 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ApplicationManager1.Application.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.ApplicationAdaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.Application.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_DESKTOPSPEC_APPLICATIONMANAGER1_APPLICATIONADAPTOR_H +#define ORG_DESKTOPSPEC_APPLICATIONMANAGER1_APPLICATIONADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.Application.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.desktopspec.ApplicationManager1.Application + */ +class ApplicationAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.desktopspec.ApplicationManager1.Application") + 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" + "") +public: + ApplicationAdaptor(QObject *parent); + virtual ~ApplicationAdaptor(); + +public: // PROPERTIES + Q_PROPERTY(PropMap ActionName READ actionName) + PropMap actionName() const; + + Q_PROPERTY(QStringList Actions READ actions) + QStringList actions() const; + + Q_PROPERTY(bool AutoStart READ autoStart WRITE setAutoStart) + bool autoStart() const; + void setAutoStart(bool value); + + Q_PROPERTY(QStringList Categories READ categories) + QStringList categories() const; + + Q_PROPERTY(QString Environ READ environ WRITE setEnviron) + QString environ() const; + void setEnviron(const QString &value); + + Q_PROPERTY(QStringMap GenericName READ genericName) + QStringMap genericName() const; + + Q_PROPERTY(QString ID READ iD) + QString iD() const; + + Q_PROPERTY(QStringMap Icons READ icons) + QStringMap icons() const; + + Q_PROPERTY(qlonglong InstalledTime READ installedTime) + qlonglong installedTime() const; + + Q_PROPERTY(QList Instances READ instances) + QList instances() const; + + Q_PROPERTY(qlonglong LastLaunchedTime READ lastLaunchedTime) + qlonglong lastLaunchedTime() const; + + Q_PROPERTY(qlonglong LaunchedTimes READ launchedTimes) + qlonglong launchedTimes() const; + + Q_PROPERTY(QStringList MimeTypes READ mimeTypes WRITE setMimeTypes) + QStringList mimeTypes() const; + void setMimeTypes(const QStringList &value); + + Q_PROPERTY(QStringMap Name READ name) + QStringMap name() const; + + Q_PROPERTY(bool NoDisplay READ noDisplay) + bool noDisplay() const; + + Q_PROPERTY(bool Terminal READ terminal) + bool terminal() const; + + Q_PROPERTY(QString X_Deepin_Vendor READ x_Deepin_Vendor) + QString x_Deepin_Vendor() const; + + Q_PROPERTY(bool X_Flatpak READ x_Flatpak) + bool x_Flatpak() const; + + Q_PROPERTY(bool X_linglong READ x_linglong) + bool x_linglong() const; + + Q_PROPERTY(bool isOnDesktop READ isOnDesktop) + bool isOnDesktop() const; + +public Q_SLOTS: // METHODS + QDBusObjectPath Launch(const QString &action, const QStringList &fields, const QVariantMap &options); + bool RemoveFromDesktop(); + bool SendToDesktop(); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.cpp new file mode 100644 index 000000000..6e2e32a01 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.cpp @@ -0,0 +1,41 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ApplicationManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.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-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class ApplicationManager1Adaptor + */ + +ApplicationManager1Adaptor::ApplicationManager1Adaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +ApplicationManager1Adaptor::~ApplicationManager1Adaptor() +{ + // destructor +} + +QString ApplicationManager1Adaptor::Identify(const QDBusUnixFileDescriptor &pidfd, QDBusObjectPath &instance, ObjectInterfaceMap &application_instance_info) +{ + // handle method call org.desktopspec.ApplicationManager1.Identify + //return static_cast(parent())->Identify(pidfd, instance, application_instance_info); +} + diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.h new file mode 100644 index 000000000..d6918b725 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor.h @@ -0,0 +1,56 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ApplicationManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.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_DESKTOPSPEC_APPLICATIONMANAGER1ADAPTOR_H +#define ORG_DESKTOPSPEC_APPLICATIONMANAGER1ADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ApplicationManager1.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.desktopspec.ApplicationManager1 + */ +class ApplicationManager1Adaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.desktopspec.ApplicationManager1") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + ApplicationManager1Adaptor(QObject *parent); + virtual ~ApplicationManager1Adaptor(); + +public: // PROPERTIES +public Q_SLOTS: // METHODS + QString Identify(const QDBusUnixFileDescriptor &pidfd, QDBusObjectPath &instance, ObjectInterfaceMap &application_instance_info); +Q_SIGNALS: // SIGNALS +}; + +#endif diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.cpp new file mode 100644 index 000000000..973571182 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.cpp @@ -0,0 +1,43 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ObjectManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1.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-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.h" +#include +#include +#include +#include +#include +#include +#include + +/* + * Implementation of adaptor class ObjectManagerAdaptor + */ + +ObjectManagerAdaptor::ObjectManagerAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + // constructor + setAutoRelaySignals(true); +} + +ObjectManagerAdaptor::~ObjectManagerAdaptor() +{ + // destructor +} + +ObjectMap ObjectManagerAdaptor::GetManagedObjects() +{ + // handle method call org.desktopspec.DBus.ObjectManager.GetManagedObjects + ObjectMap objpath_interfaces_and_properties; + QMetaObject::invokeMethod(parent(), "GetManagedObjects", Q_RETURN_ARG(ObjectMap, objpath_interfaces_and_properties)); + return objpath_interfaces_and_properties; +} + diff --git a/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.h new file mode 100644 index 000000000..a1cbc0c73 --- /dev/null +++ b/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor.h @@ -0,0 +1,63 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp ./dde-shell/panels/dock/taskmanager/api/amdbus/org.desktopspec.ObjectManager1.xml -a ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1Adaptor -i ./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1.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_DESKTOPSPEC_OBJECTMANAGER1ADAPTOR_H +#define ORG_DESKTOPSPEC_OBJECTMANAGER1ADAPTOR_H + +#include +#include +#include "./dde-shell/toolGenerate/qdbusxml2cpp/org.desktopspec.ObjectManager1.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.desktopspec.DBus.ObjectManager + */ +class ObjectManagerAdaptor: public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.desktopspec.DBus.ObjectManager") + Q_CLASSINFO("D-Bus Introspection", "" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" + "") +public: + ObjectManagerAdaptor(QObject *parent); + virtual ~ObjectManagerAdaptor(); + +public: // PROPERTIES +public Q_SLOTS: // METHODS + ObjectMap GetManagedObjects(); +Q_SIGNALS: // SIGNALS + void InterfacesAdded(const QDBusObjectPath &object_path, ObjectInterfaceMap interfaces_and_properties); + void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces); +}; + +#endif