dde-dock/toolGenerate/dconfig2cpp/com_deepin_dde_dock.hpp
jingshenghao a90f386ddc feat: Add files generated by qdbusXML2cpp and DCONG2cpp
Add files generated by qdbusXML2cpp and DCONG2cpp

Log: Add files generated by qdbusXML2cpp and DCONG2cpp
2025-01-14 19:32:23 +08:00

793 lines
34 KiB
C++

/**
* This file is generated by dconfig2cpp.
* Command line arguments: ./dconfig2cpp -p ./dde-dock/toolGenerate/dconfig2cpp ./dde-dock/configs/com.deepin.dde.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 COM_DEEPIN_DDE_DOCK_H
#define COM_DEEPIN_DDE_DOCK_H
#include <QThread>
#include <QVariant>
#include <QDebug>
#include <QAtomicPointer>
#include <QAtomicInteger>
#include <DConfig>
class com_deepin_dde_dock : public QObject {
Q_OBJECT
Q_PROPERTY(double Delay_Plugins_Time READ Delay_Plugins_Time WRITE setDelay_Plugins_Time NOTIFY Delay_Plugins_TimeChanged)
Q_PROPERTY(QString Display_Mode READ Display_Mode WRITE setDisplay_Mode NOTIFY Display_ModeChanged)
Q_PROPERTY(QList<QVariant> Dock_Quick_Plugins READ Dock_Quick_Plugins WRITE setDock_Quick_Plugins NOTIFY Dock_Quick_PluginsChanged)
Q_PROPERTY(QList<QVariant> Dock_Quick_Tray_Name READ Dock_Quick_Tray_Name WRITE setDock_Quick_Tray_Name NOTIFY Dock_Quick_Tray_NameChanged)
Q_PROPERTY(double Dock_Show_Window_name READ Dock_Show_Window_name WRITE setDock_Show_Window_name NOTIFY Dock_Show_Window_nameChanged)
Q_PROPERTY(QList<QVariant> Docked_Apps READ Docked_Apps WRITE setDocked_Apps NOTIFY Docked_AppsChanged)
Q_PROPERTY(QString Force_Quit_App READ Force_Quit_App WRITE setForce_Quit_App NOTIFY Force_Quit_AppChanged)
Q_PROPERTY(QString Hide_Mode READ Hide_Mode WRITE setHide_Mode NOTIFY Hide_ModeChanged)
Q_PROPERTY(double Hide_Timeout READ Hide_Timeout WRITE setHide_Timeout NOTIFY Hide_TimeoutChanged)
Q_PROPERTY(double Icon_Size READ Icon_Size WRITE setIcon_Size NOTIFY Icon_SizeChanged)
Q_PROPERTY(QString Plugin_Settings READ Plugin_Settings WRITE setPlugin_Settings NOTIFY Plugin_SettingsChanged)
Q_PROPERTY(QString Position READ Position WRITE setPosition NOTIFY PositionChanged)
Q_PROPERTY(QList<QVariant> Recent_App READ Recent_App WRITE setRecent_App NOTIFY Recent_AppChanged)
Q_PROPERTY(bool Show_MultiWindow READ Show_MultiWindow WRITE setShow_MultiWindow NOTIFY Show_MultiWindowChanged)
Q_PROPERTY(bool Show_Recent READ Show_Recent WRITE setShow_Recent NOTIFY Show_RecentChanged)
Q_PROPERTY(double Show_Timeout READ Show_Timeout WRITE setShow_Timeout NOTIFY Show_TimeoutChanged)
Q_PROPERTY(QList<QVariant> Win_Icon_Preferred_Apps READ Win_Icon_Preferred_Apps WRITE setWin_Icon_Preferred_Apps NOTIFY Win_Icon_Preferred_AppsChanged)
Q_PROPERTY(double Window_Size_Efficient READ Window_Size_Efficient WRITE setWindow_Size_Efficient NOTIFY Window_Size_EfficientChanged)
Q_PROPERTY(double Window_Size_Fashion READ Window_Size_Fashion WRITE setWindow_Size_Fashion NOTIFY Window_Size_FashionChanged)
public:
explicit com_deepin_dde_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 com_deepin_dde_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 com_deepin_dde_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 com_deepin_dde_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();
});
}
~com_deepin_dde_dock() {
if (m_config.loadRelaxed()) {
m_config.loadRelaxed()->deleteLater();
}
}
double Delay_Plugins_Time() const {
return p_Delay_Plugins_Time;
}
void setDelay_Plugins_Time(const double &value) {
auto oldValue = p_Delay_Plugins_Time;
p_Delay_Plugins_Time = value;
markPropertySet(0);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Delay_Plugins_Time"), value);
});
}
if (p_Delay_Plugins_Time != oldValue) {
Q_EMIT Delay_Plugins_TimeChanged();
}
}
QString Display_Mode() const {
return p_Display_Mode;
}
void setDisplay_Mode(const QString &value) {
auto oldValue = p_Display_Mode;
p_Display_Mode = value;
markPropertySet(1);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Display_Mode"), value);
});
}
if (p_Display_Mode != oldValue) {
Q_EMIT Display_ModeChanged();
}
}
QList<QVariant> Dock_Quick_Plugins() const {
return p_Dock_Quick_Plugins;
}
void setDock_Quick_Plugins(const QList<QVariant> &value) {
auto oldValue = p_Dock_Quick_Plugins;
p_Dock_Quick_Plugins = value;
markPropertySet(2);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Dock_Quick_Plugins"), value);
});
}
if (p_Dock_Quick_Plugins != oldValue) {
Q_EMIT Dock_Quick_PluginsChanged();
}
}
QList<QVariant> Dock_Quick_Tray_Name() const {
return p_Dock_Quick_Tray_Name;
}
void setDock_Quick_Tray_Name(const QList<QVariant> &value) {
auto oldValue = p_Dock_Quick_Tray_Name;
p_Dock_Quick_Tray_Name = value;
markPropertySet(3);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Dock_Quick_Tray_Name"), value);
});
}
if (p_Dock_Quick_Tray_Name != oldValue) {
Q_EMIT Dock_Quick_Tray_NameChanged();
}
}
double Dock_Show_Window_name() const {
return p_Dock_Show_Window_name;
}
void setDock_Show_Window_name(const double &value) {
auto oldValue = p_Dock_Show_Window_name;
p_Dock_Show_Window_name = value;
markPropertySet(4);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Dock_Show_Window_name"), value);
});
}
if (p_Dock_Show_Window_name != oldValue) {
Q_EMIT Dock_Show_Window_nameChanged();
}
}
QList<QVariant> Docked_Apps() const {
return p_Docked_Apps;
}
void setDocked_Apps(const QList<QVariant> &value) {
auto oldValue = p_Docked_Apps;
p_Docked_Apps = value;
markPropertySet(5);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Docked_Apps"), value);
});
}
if (p_Docked_Apps != oldValue) {
Q_EMIT Docked_AppsChanged();
}
}
QString Force_Quit_App() const {
return p_Force_Quit_App;
}
void setForce_Quit_App(const QString &value) {
auto oldValue = p_Force_Quit_App;
p_Force_Quit_App = value;
markPropertySet(6);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Force_Quit_App"), value);
});
}
if (p_Force_Quit_App != oldValue) {
Q_EMIT Force_Quit_AppChanged();
}
}
QString Hide_Mode() const {
return p_Hide_Mode;
}
void setHide_Mode(const QString &value) {
auto oldValue = p_Hide_Mode;
p_Hide_Mode = value;
markPropertySet(7);
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();
}
}
double Hide_Timeout() const {
return p_Hide_Timeout;
}
void setHide_Timeout(const double &value) {
auto oldValue = p_Hide_Timeout;
p_Hide_Timeout = value;
markPropertySet(8);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Hide_Timeout"), value);
});
}
if (p_Hide_Timeout != oldValue) {
Q_EMIT Hide_TimeoutChanged();
}
}
double Icon_Size() const {
return p_Icon_Size;
}
void setIcon_Size(const double &value) {
auto oldValue = p_Icon_Size;
p_Icon_Size = value;
markPropertySet(9);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Icon_Size"), value);
});
}
if (p_Icon_Size != oldValue) {
Q_EMIT Icon_SizeChanged();
}
}
QString Plugin_Settings() const {
return p_Plugin_Settings;
}
void setPlugin_Settings(const QString &value) {
auto oldValue = p_Plugin_Settings;
p_Plugin_Settings = value;
markPropertySet(10);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Plugin_Settings"), value);
});
}
if (p_Plugin_Settings != oldValue) {
Q_EMIT Plugin_SettingsChanged();
}
}
QString Position() const {
return p_Position;
}
void setPosition(const QString &value) {
auto oldValue = p_Position;
p_Position = value;
markPropertySet(11);
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();
}
}
QList<QVariant> Recent_App() const {
return p_Recent_App;
}
void setRecent_App(const QList<QVariant> &value) {
auto oldValue = p_Recent_App;
p_Recent_App = value;
markPropertySet(12);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Recent_App"), value);
});
}
if (p_Recent_App != oldValue) {
Q_EMIT Recent_AppChanged();
}
}
bool Show_MultiWindow() const {
return p_Show_MultiWindow;
}
void setShow_MultiWindow(const bool &value) {
auto oldValue = p_Show_MultiWindow;
p_Show_MultiWindow = value;
markPropertySet(13);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Show_MultiWindow"), value);
});
}
if (p_Show_MultiWindow != oldValue) {
Q_EMIT Show_MultiWindowChanged();
}
}
bool Show_Recent() const {
return p_Show_Recent;
}
void setShow_Recent(const bool &value) {
auto oldValue = p_Show_Recent;
p_Show_Recent = value;
markPropertySet(14);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Show_Recent"), value);
});
}
if (p_Show_Recent != oldValue) {
Q_EMIT Show_RecentChanged();
}
}
double Show_Timeout() const {
return p_Show_Timeout;
}
void setShow_Timeout(const double &value) {
auto oldValue = p_Show_Timeout;
p_Show_Timeout = value;
markPropertySet(15);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Show_Timeout"), value);
});
}
if (p_Show_Timeout != oldValue) {
Q_EMIT Show_TimeoutChanged();
}
}
QList<QVariant> Win_Icon_Preferred_Apps() const {
return p_Win_Icon_Preferred_Apps;
}
void setWin_Icon_Preferred_Apps(const QList<QVariant> &value) {
auto oldValue = p_Win_Icon_Preferred_Apps;
p_Win_Icon_Preferred_Apps = value;
markPropertySet(16);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Win_Icon_Preferred_Apps"), value);
});
}
if (p_Win_Icon_Preferred_Apps != oldValue) {
Q_EMIT Win_Icon_Preferred_AppsChanged();
}
}
double Window_Size_Efficient() const {
return p_Window_Size_Efficient;
}
void setWindow_Size_Efficient(const double &value) {
auto oldValue = p_Window_Size_Efficient;
p_Window_Size_Efficient = value;
markPropertySet(17);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Window_Size_Efficient"), value);
});
}
if (p_Window_Size_Efficient != oldValue) {
Q_EMIT Window_Size_EfficientChanged();
}
}
double Window_Size_Fashion() const {
return p_Window_Size_Fashion;
}
void setWindow_Size_Fashion(const double &value) {
auto oldValue = p_Window_Size_Fashion;
p_Window_Size_Fashion = value;
markPropertySet(18);
if (auto config = m_config.loadRelaxed()) {
QMetaObject::invokeMethod(config, [this, value]() {
m_config.loadRelaxed()->setValue(QStringLiteral("Window_Size_Fashion"), value);
});
}
if (p_Window_Size_Fashion != oldValue) {
Q_EMIT Window_Size_FashionChanged();
}
}
Q_SIGNALS:
void Delay_Plugins_TimeChanged();
void Display_ModeChanged();
void Dock_Quick_PluginsChanged();
void Dock_Quick_Tray_NameChanged();
void Dock_Show_Window_nameChanged();
void Docked_AppsChanged();
void Force_Quit_AppChanged();
void Hide_ModeChanged();
void Hide_TimeoutChanged();
void Icon_SizeChanged();
void Plugin_SettingsChanged();
void PositionChanged();
void Recent_AppChanged();
void Show_MultiWindowChanged();
void Show_RecentChanged();
void Show_TimeoutChanged();
void Win_Icon_Preferred_AppsChanged();
void Window_Size_EfficientChanged();
void Window_Size_FashionChanged();
private:
void initialize(DTK_CORE_NAMESPACE::DConfig *config) {
Q_ASSERT(!m_config.loadRelaxed());
m_config.storeRelaxed(config);
if (testPropertySet(0)) {
config->setValue(QStringLiteral("Delay_Plugins_Time"), QVariant::fromValue(p_Delay_Plugins_Time));
} else {
updateValue(QStringLiteral("Delay_Plugins_Time"), QVariant::fromValue(p_Delay_Plugins_Time));
}
if (testPropertySet(1)) {
config->setValue(QStringLiteral("Display_Mode"), QVariant::fromValue(p_Display_Mode));
} else {
updateValue(QStringLiteral("Display_Mode"), QVariant::fromValue(p_Display_Mode));
}
if (testPropertySet(2)) {
config->setValue(QStringLiteral("Dock_Quick_Plugins"), QVariant::fromValue(p_Dock_Quick_Plugins));
} else {
updateValue(QStringLiteral("Dock_Quick_Plugins"), QVariant::fromValue(p_Dock_Quick_Plugins));
}
if (testPropertySet(3)) {
config->setValue(QStringLiteral("Dock_Quick_Tray_Name"), QVariant::fromValue(p_Dock_Quick_Tray_Name));
} else {
updateValue(QStringLiteral("Dock_Quick_Tray_Name"), QVariant::fromValue(p_Dock_Quick_Tray_Name));
}
if (testPropertySet(4)) {
config->setValue(QStringLiteral("Dock_Show_Window_name"), QVariant::fromValue(p_Dock_Show_Window_name));
} else {
updateValue(QStringLiteral("Dock_Show_Window_name"), QVariant::fromValue(p_Dock_Show_Window_name));
}
if (testPropertySet(5)) {
config->setValue(QStringLiteral("Docked_Apps"), QVariant::fromValue(p_Docked_Apps));
} else {
updateValue(QStringLiteral("Docked_Apps"), QVariant::fromValue(p_Docked_Apps));
}
if (testPropertySet(6)) {
config->setValue(QStringLiteral("Force_Quit_App"), QVariant::fromValue(p_Force_Quit_App));
} else {
updateValue(QStringLiteral("Force_Quit_App"), QVariant::fromValue(p_Force_Quit_App));
}
if (testPropertySet(7)) {
config->setValue(QStringLiteral("Hide_Mode"), QVariant::fromValue(p_Hide_Mode));
} else {
updateValue(QStringLiteral("Hide_Mode"), QVariant::fromValue(p_Hide_Mode));
}
if (testPropertySet(8)) {
config->setValue(QStringLiteral("Hide_Timeout"), QVariant::fromValue(p_Hide_Timeout));
} else {
updateValue(QStringLiteral("Hide_Timeout"), QVariant::fromValue(p_Hide_Timeout));
}
if (testPropertySet(9)) {
config->setValue(QStringLiteral("Icon_Size"), QVariant::fromValue(p_Icon_Size));
} else {
updateValue(QStringLiteral("Icon_Size"), QVariant::fromValue(p_Icon_Size));
}
if (testPropertySet(10)) {
config->setValue(QStringLiteral("Plugin_Settings"), QVariant::fromValue(p_Plugin_Settings));
} else {
updateValue(QStringLiteral("Plugin_Settings"), QVariant::fromValue(p_Plugin_Settings));
}
if (testPropertySet(11)) {
config->setValue(QStringLiteral("Position"), QVariant::fromValue(p_Position));
} else {
updateValue(QStringLiteral("Position"), QVariant::fromValue(p_Position));
}
if (testPropertySet(12)) {
config->setValue(QStringLiteral("Recent_App"), QVariant::fromValue(p_Recent_App));
} else {
updateValue(QStringLiteral("Recent_App"), QVariant::fromValue(p_Recent_App));
}
if (testPropertySet(13)) {
config->setValue(QStringLiteral("Show_MultiWindow"), QVariant::fromValue(p_Show_MultiWindow));
} else {
updateValue(QStringLiteral("Show_MultiWindow"), QVariant::fromValue(p_Show_MultiWindow));
}
if (testPropertySet(14)) {
config->setValue(QStringLiteral("Show_Recent"), QVariant::fromValue(p_Show_Recent));
} else {
updateValue(QStringLiteral("Show_Recent"), QVariant::fromValue(p_Show_Recent));
}
if (testPropertySet(15)) {
config->setValue(QStringLiteral("Show_Timeout"), QVariant::fromValue(p_Show_Timeout));
} else {
updateValue(QStringLiteral("Show_Timeout"), QVariant::fromValue(p_Show_Timeout));
}
if (testPropertySet(16)) {
config->setValue(QStringLiteral("Win_Icon_Preferred_Apps"), QVariant::fromValue(p_Win_Icon_Preferred_Apps));
} else {
updateValue(QStringLiteral("Win_Icon_Preferred_Apps"), QVariant::fromValue(p_Win_Icon_Preferred_Apps));
}
if (testPropertySet(17)) {
config->setValue(QStringLiteral("Window_Size_Efficient"), QVariant::fromValue(p_Window_Size_Efficient));
} else {
updateValue(QStringLiteral("Window_Size_Efficient"), QVariant::fromValue(p_Window_Size_Efficient));
}
if (testPropertySet(18)) {
config->setValue(QStringLiteral("Window_Size_Fashion"), QVariant::fromValue(p_Window_Size_Fashion));
} else {
updateValue(QStringLiteral("Window_Size_Fashion"), QVariant::fromValue(p_Window_Size_Fashion));
}
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("Delay_Plugins_Time")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Delay_Plugins_Time != newValue) {
p_Delay_Plugins_Time = newValue;
Q_EMIT Delay_Plugins_TimeChanged();
}
});
return;
}
if (key == QStringLiteral("Display_Mode")) {
auto newValue = qvariant_cast<QString>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Display_Mode != newValue) {
p_Display_Mode = newValue;
Q_EMIT Display_ModeChanged();
}
});
return;
}
if (key == QStringLiteral("Dock_Quick_Plugins")) {
auto newValue = qvariant_cast<QList<QVariant>>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Dock_Quick_Plugins != newValue) {
p_Dock_Quick_Plugins = newValue;
Q_EMIT Dock_Quick_PluginsChanged();
}
});
return;
}
if (key == QStringLiteral("Dock_Quick_Tray_Name")) {
auto newValue = qvariant_cast<QList<QVariant>>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Dock_Quick_Tray_Name != newValue) {
p_Dock_Quick_Tray_Name = newValue;
Q_EMIT Dock_Quick_Tray_NameChanged();
}
});
return;
}
if (key == QStringLiteral("Dock_Show_Window_name")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Dock_Show_Window_name != newValue) {
p_Dock_Show_Window_name = newValue;
Q_EMIT Dock_Show_Window_nameChanged();
}
});
return;
}
if (key == QStringLiteral("Docked_Apps")) {
auto newValue = qvariant_cast<QList<QVariant>>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Docked_Apps != newValue) {
p_Docked_Apps = newValue;
Q_EMIT Docked_AppsChanged();
}
});
return;
}
if (key == QStringLiteral("Force_Quit_App")) {
auto newValue = qvariant_cast<QString>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Force_Quit_App != newValue) {
p_Force_Quit_App = newValue;
Q_EMIT Force_Quit_AppChanged();
}
});
return;
}
if (key == QStringLiteral("Hide_Mode")) {
auto newValue = qvariant_cast<QString>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Hide_Mode != newValue) {
p_Hide_Mode = newValue;
Q_EMIT Hide_ModeChanged();
}
});
return;
}
if (key == QStringLiteral("Hide_Timeout")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Hide_Timeout != newValue) {
p_Hide_Timeout = newValue;
Q_EMIT Hide_TimeoutChanged();
}
});
return;
}
if (key == QStringLiteral("Icon_Size")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Icon_Size != newValue) {
p_Icon_Size = newValue;
Q_EMIT Icon_SizeChanged();
}
});
return;
}
if (key == QStringLiteral("Plugin_Settings")) {
auto newValue = qvariant_cast<QString>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Plugin_Settings != newValue) {
p_Plugin_Settings = newValue;
Q_EMIT Plugin_SettingsChanged();
}
});
return;
}
if (key == QStringLiteral("Position")) {
auto newValue = qvariant_cast<QString>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Position != newValue) {
p_Position = newValue;
Q_EMIT PositionChanged();
}
});
return;
}
if (key == QStringLiteral("Recent_App")) {
auto newValue = qvariant_cast<QList<QVariant>>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Recent_App != newValue) {
p_Recent_App = newValue;
Q_EMIT Recent_AppChanged();
}
});
return;
}
if (key == QStringLiteral("Show_MultiWindow")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Show_MultiWindow != newValue) {
p_Show_MultiWindow = newValue;
Q_EMIT Show_MultiWindowChanged();
}
});
return;
}
if (key == QStringLiteral("Show_Recent")) {
auto newValue = qvariant_cast<bool>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Show_Recent != newValue) {
p_Show_Recent = newValue;
Q_EMIT Show_RecentChanged();
}
});
return;
}
if (key == QStringLiteral("Show_Timeout")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Show_Timeout != newValue) {
p_Show_Timeout = newValue;
Q_EMIT Show_TimeoutChanged();
}
});
return;
}
if (key == QStringLiteral("Win_Icon_Preferred_Apps")) {
auto newValue = qvariant_cast<QList<QVariant>>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Win_Icon_Preferred_Apps != newValue) {
p_Win_Icon_Preferred_Apps = newValue;
Q_EMIT Win_Icon_Preferred_AppsChanged();
}
});
return;
}
if (key == QStringLiteral("Window_Size_Efficient")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Window_Size_Efficient != newValue) {
p_Window_Size_Efficient = newValue;
Q_EMIT Window_Size_EfficientChanged();
}
});
return;
}
if (key == QStringLiteral("Window_Size_Fashion")) {
auto newValue = qvariant_cast<double>(value);
QMetaObject::invokeMethod(this, [this, newValue]() {
if (p_Window_Size_Fashion != newValue) {
p_Window_Size_Fashion = newValue;
Q_EMIT Window_Size_FashionChanged();
}
});
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;
double p_Delay_Plugins_Time { 0 };
QString p_Display_Mode { QStringLiteral("fashion") };
QList<QVariant> p_Dock_Quick_Plugins { QList<QVariant>{QVariant(QStringLiteral("power")), QVariant(QStringLiteral("network")), QVariant(QStringLiteral("shutdown")), QVariant(QStringLiteral("show-desktop")), QVariant(QStringLiteral("multitasking")), QVariant(QStringLiteral("notification")), QVariant(QStringLiteral("uosai"))} };
QList<QVariant> p_Dock_Quick_Tray_Name { QList<QVariant>{QVariant(QStringLiteral("fcitx")), QVariant(QStringLiteral("indicator:keybord_layout"))} };
double p_Dock_Show_Window_name { 0 };
QList<QVariant> p_Docked_Apps { QList<QVariant>{QVariant(QStringLiteral("/usr/share/applications/dde-file-manager")), QVariant(QStringLiteral("/usr/share/applications/uos-browser")), QVariant(QStringLiteral("/usr/share/applications/org.deepin.browser")), QVariant(QStringLiteral("/usr/share/applications/deepin-appstore")), QVariant(QStringLiteral("/usr/share/applications/deepin-app-store")), QVariant(QStringLiteral("/usr/share/applications/com.deepin.store.intranet")), QVariant(QStringLiteral("/usr/share/applications/deepin-album")), QVariant(QStringLiteral("/usr/share/applications/deepin-music")), QVariant(QStringLiteral("/usr/share/applications/deepin-contacts")), QVariant(QStringLiteral("/usr/share/applications/dde-calendar")), QVariant(QStringLiteral("/usr/share/applications/dde-control-center"))} };
QString p_Force_Quit_App { QStringLiteral("enabled") };
QString p_Hide_Mode { QStringLiteral("keep-showing") };
double p_Hide_Timeout { 0 };
double p_Icon_Size { 36 };
QString p_Plugin_Settings { QStringLiteral("{}") };
QString p_Position { QStringLiteral("bottom") };
QList<QVariant> p_Recent_App { QList<QVariant>{} };
bool p_Show_MultiWindow { false };
bool p_Show_Recent { false };
double p_Show_Timeout { 100 };
QList<QVariant> p_Win_Icon_Preferred_Apps { QList<QVariant>{QVariant(QStringLiteral("apps.com.qq.im")), QVariant(QStringLiteral("deepin.com.qq.im")), QVariant(QStringLiteral("apps.com.qq.im.light")), QVariant(QStringLiteral("apps.com.qq.b.eim")), QVariant(QStringLiteral("apps.com.qq.rtxclient"))} };
double p_Window_Size_Efficient { 40 };
double p_Window_Size_Fashion { 48 };
QAtomicInteger<quint32> m_propertySetStatus0 = 0;
};
#endif // COM_DEEPIN_DDE_DOCK_H