Skip to content

Commit

Permalink
feat: Add files generated by qdbusXML2cpp and DCONG2cpp
Browse files Browse the repository at this point in the history
Add files generated by qdbusXML2cpp and DCONG2cpp

Log: Add files generated by qdbusXML2cpp and DCONG2cpp
  • Loading branch information
USFunction committed Jan 14, 2025
1 parent 13c4162 commit 2895304
Show file tree
Hide file tree
Showing 43 changed files with 6,584 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,8 @@ License: CC0-1.0
Files: plugins/overlay-warning/org.deepin.dde.dock.overlay.policy
Copyright: UnionTech Software Technology Co., Ltd.
License: LGPL-3.0-or-later

Files: toolGenerate/**/*
Copyright: None
License: CC0-1.0

792 changes: 792 additions & 0 deletions toolGenerate/dconfig2cpp/com_deepin_dde_dock.hpp

Large diffs are not rendered by default.

282 changes: 282 additions & 0 deletions toolGenerate/dconfig2cpp/org_deepin_dde_dock_power.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
/**
* This file is generated by dconfig2cpp.
* Command line arguments: ./dconfig2cpp -p ./dde-dock/toolGenerate/dconfig2cpp ./dde-dock/configs/org.deepin.dde.dock.power.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_DOCK_POWER_H
#define ORG_DEEPIN_DDE_DOCK_POWER_H

#include <QThread>
#include <QVariant>
#include <QDebug>
#include <QAtomicPointer>
#include <QAtomicInteger>
#include <DConfig>

class org_deepin_dde_dock_power : public QObject {
Q_OBJECT

Q_PROPERTY(bool control READ control WRITE setControl NOTIFY controlChanged)
Q_PROPERTY(bool enable READ enable WRITE setEnable NOTIFY enableChanged)
Q_PROPERTY(bool menu-enable READ menu-enable WRITE setMenu-enable NOTIFY menu-enableChanged)
Q_PROPERTY(bool showtimetofull READ showtimetofull WRITE setShowtimetofull NOTIFY showtimetofullChanged)
public:
explicit org_deepin_dde_dock_power(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr)
: QObject(parent) {

if (!thread->isRunning()) {
qWarning() << QStringLiteral("Warning: The provided thread is not running.");
}
Q_ASSERT(QThread::currentThread() != thread);
auto worker = new QObject();
worker->moveToThread(thread);
QMetaObject::invokeMethod(worker, [=]() {
auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr);
if (!config) {
qWarning() << QStringLiteral("Failed to create DConfig instance.");
worker->deleteLater();
return;
}
config->moveToThread(QThread::currentThread());
initialize(config);
worker->deleteLater();
});
}
explicit org_deepin_dde_dock_power(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr)
: QObject(parent) {

if (!thread->isRunning()) {
qWarning() << QStringLiteral("Warning: The provided thread is not running.");
}
Q_ASSERT(QThread::currentThread() != thread);
auto worker = new QObject();
worker->moveToThread(thread);
QMetaObject::invokeMethod(worker, [=]() {
auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr);
if (!config) {
qWarning() << QStringLiteral("Failed to create DConfig instance.");
worker->deleteLater();
return;
}
config->moveToThread(QThread::currentThread());
initialize(config);
worker->deleteLater();
});
}
explicit org_deepin_dde_dock_power(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr)
: QObject(parent) {

if (!thread->isRunning()) {
qWarning() << QStringLiteral("Warning: The provided thread is not running.");
}
Q_ASSERT(QThread::currentThread() != thread);
auto worker = new QObject();
worker->moveToThread(thread);
QMetaObject::invokeMethod(worker, [=]() {
auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr);
if (!config) {
qWarning() << QStringLiteral("Failed to create DConfig instance.");
worker->deleteLater();
return;
}
config->moveToThread(QThread::currentThread());
initialize(config);
worker->deleteLater();
});
}
explicit org_deepin_dde_dock_power(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr)
: QObject(parent) {

if (!thread->isRunning()) {
qWarning() << QStringLiteral("Warning: The provided thread is not running.");
}
Q_ASSERT(QThread::currentThread() != thread);
auto worker = new QObject();
worker->moveToThread(thread);
QMetaObject::invokeMethod(worker, [=]() {
auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr);
if (!config) {
qWarning() << QStringLiteral("Failed to create DConfig instance.");
worker->deleteLater();
return;
}
config->moveToThread(QThread::currentThread());
initialize(config);
worker->deleteLater();
});
}
~org_deepin_dde_dock_power() {
if (m_config.loadRelaxed()) {
m_config.loadRelaxed()->deleteLater();
}
}

bool control() const {
return p_control;
}
void setControl(const bool &value) {
auto oldValue = p_control;
p_control = value;
markPropertySet(0);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("control"), value);
});
}
if (p_control != oldValue) {
Q_EMIT controlChanged();
}
}
bool enable() const {
return p_enable;
}
void setEnable(const bool &value) {
auto oldValue = p_enable;
p_enable = value;
markPropertySet(1);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("enable"), value);
});
}
if (p_enable != oldValue) {
Q_EMIT enableChanged();
}
}
bool menu-enable() const {
return p_menu-enable;
}
void setMenu-enable(const bool &value) {
auto oldValue = p_menu-enable;
p_menu-enable = value;
markPropertySet(2);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("menu-enable"), value);
});
}
if (p_menu-enable != oldValue) {
Q_EMIT menu-enableChanged();
}
}
bool showtimetofull() const {
return p_showtimetofull;
}
void setShowtimetofull(const bool &value) {
auto oldValue = p_showtimetofull;
p_showtimetofull = value;
markPropertySet(3);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("showtimetofull"), value);
});
}
if (p_showtimetofull != oldValue) {
Q_EMIT showtimetofullChanged();
}
}
Q_SIGNALS:
void controlChanged();
void enableChanged();
void menu-enableChanged();
void showtimetofullChanged();
private:
void initialize(DTK_CORE_NAMESPACE::DConfig *config) {
Q_ASSERT(!m_config.loadRelaxed());
m_config.storeRelaxed(config);
if (testPropertySet(0)) {
config->setValue(QStringLiteral("control"), QVariant::fromValue(p_control));
} else {
updateValue(QStringLiteral("control"), QVariant::fromValue(p_control));
}
if (testPropertySet(1)) {
config->setValue(QStringLiteral("enable"), QVariant::fromValue(p_enable));
} else {
updateValue(QStringLiteral("enable"), QVariant::fromValue(p_enable));
}
if (testPropertySet(2)) {
config->setValue(QStringLiteral("menu-enable"), QVariant::fromValue(p_menu-enable));
} else {
updateValue(QStringLiteral("menu-enable"), QVariant::fromValue(p_menu-enable));
}
if (testPropertySet(3)) {
config->setValue(QStringLiteral("showtimetofull"), QVariant::fromValue(p_showtimetofull));
} else {
updateValue(QStringLiteral("showtimetofull"), QVariant::fromValue(p_showtimetofull));
}

connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) {
updateValue(key);
}, Qt::DirectConnection);
}
void updateValue(const QString &key, const QVariant &fallback = QVariant()) {
Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread());
const QVariant &value = m_config.loadRelaxed()->value(key, fallback);
if (key == QStringLiteral("control")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_control != newValue) {
p_control = newValue;
Q_EMIT controlChanged();
}
});
return;
}
if (key == QStringLiteral("enable")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_enable != newValue) {
p_enable = newValue;
Q_EMIT enableChanged();
}
});
return;
}
if (key == QStringLiteral("menu-enable")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_menu-enable != newValue) {
p_menu-enable = newValue;
Q_EMIT menu-enableChanged();
}
});
return;
}
if (key == QStringLiteral("showtimetofull")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_showtimetofull != newValue) {
p_showtimetofull = newValue;
Q_EMIT showtimetofullChanged();
}
});
return;
}
}
inline void markPropertySet(const int index) {
if (index < 32) {
m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0));
return;
}
Q_UNREACHABLE();
}
inline bool testPropertySet(const int index) const {
if (index < 32) {
return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0)));
}
Q_UNREACHABLE();
}
QAtomicPointer<DTK_CORE_NAMESPACE::DConfig> m_config = nullptr;
bool p_control { false };
bool p_enable { true };
bool p_menu-enable { true };
bool p_showtimetofull { true };
QAtomicInteger<quint32> m_propertySetStatus0 = 0;
};

#endif // ORG_DEEPIN_DDE_DOCK_POWER_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp ./dde-dock/gschema/com.deepin.dde.dock.module.gschema.xml -a ./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor -i ./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschema.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-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.h"

Check warning on line 11 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.h" not found.

Check warning on line 11 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: "./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.h" not found.
#include <QtCore/QMetaObject>

Check warning on line 12 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QMetaObject> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 12 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QMetaObject> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QByteArray>

Check warning on line 13 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QByteArray> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 13 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QByteArray> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QList>

Check warning on line 14 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QList> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 14 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QList> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QMap>

Check warning on line 15 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QMap> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 15 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QMap> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QString>

Check warning on line 16 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QString> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 16 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QString> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QStringList>

Check warning on line 17 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QStringList> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 17 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QStringList> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QtCore/QVariant>

Check warning on line 18 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QtCore/QVariant> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 18 in toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: <QtCore/QVariant> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp ./dde-dock/gschema/com.deepin.dde.dock.module.gschema.xml -a ./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschemaAdaptor -i ./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschema.h
*
* qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
* before re-generating it.
*/

#ifndef COM_DEEPIN_DDE_DOCK_MODULE_GSCHEMAADAPTOR_H
#define COM_DEEPIN_DDE_DOCK_MODULE_GSCHEMAADAPTOR_H

#include <QtCore/QObject>
#include <QtDBus/QtDBus>
#include "./dde-dock/toolGenerate/qdbusxml2cpp/com.deepin.dde.dock.module.gschema.h"
QT_BEGIN_NAMESPACE
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
class QString;
class QStringList;
class QVariant;
QT_END_NAMESPACE

#endif
Loading

0 comments on commit 2895304

Please sign in to comment.