diff --git a/.reuse/dep5 b/.reuse/dep5 index 70437857..b9d467e3 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -38,6 +38,10 @@ Files: *Makefile* Copyright: None License: CC0-1.0 +Files: toolGenerate/**/* +Copyright: None +License: CC0-1.0 + # sh Files: gen.sh _tool/prop_gen/gen.sh gen_test_report.sh Copyright: None diff --git a/toolGenerate/dconfig2cpp/org_deepin_xsettings.hpp b/toolGenerate/dconfig2cpp/org_deepin_xsettings.hpp new file mode 100644 index 00000000..4d256242 --- /dev/null +++ b/toolGenerate/dconfig2cpp/org_deepin_xsettings.hpp @@ -0,0 +1,1412 @@ +/** + * This file is generated by dconfig2cpp. + * Command line arguments: ./dconfig2cpp -p ./startdde/toolGenerate/dconfig2cpp ./startdde/misc/dsettings/org.deepin.XSettings.json + * Generation time: 2025-01-14T10:54:57 + * 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_XSETTINGS_H +#define ORG_DEEPIN_XSETTINGS_H + +#include +#include +#include +#include +#include +#include + +class org_deepin_XSettings : public QObject { + Q_OBJECT + + Q_PROPERTY(bool cursor-blink READ cursor-blink WRITE setCursor-blink NOTIFY cursor-blinkChanged) + Q_PROPERTY(double cursor-blink-time READ cursor-blink-time WRITE setCursor-blink-time NOTIFY cursor-blink-timeChanged) + Q_PROPERTY(double dnd-drag-threshold READ dnd-drag-threshold WRITE setDnd-drag-threshold NOTIFY dnd-drag-thresholdChanged) + Q_PROPERTY(double double-click-distance READ double-click-distance WRITE setDouble-click-distance NOTIFY double-click-distanceChanged) + Q_PROPERTY(double double-click-time READ double-click-time WRITE setDouble-click-time NOTIFY double-click-timeChanged) + Q_PROPERTY(double dtk-size-mode READ dtk-size-mode WRITE setDtk-size-mode NOTIFY dtk-size-modeChanged) + Q_PROPERTY(double dtk-window-radius READ dtk-window-radius WRITE setDtk-window-radius NOTIFY dtk-window-radiusChanged) + Q_PROPERTY(bool enable-event-sounds READ enable-event-sounds WRITE setEnable-event-sounds NOTIFY enable-event-soundsChanged) + Q_PROPERTY(bool enable-input-feedback-sounds READ enable-input-feedback-sounds WRITE setEnable-input-feedback-sounds NOTIFY enable-input-feedback-soundsChanged) + Q_PROPERTY(double gtk-cursor-blink-timeout READ gtk-cursor-blink-timeout WRITE setGtk-cursor-blink-timeout NOTIFY gtk-cursor-blink-timeoutChanged) + Q_PROPERTY(QString gtk-cursor-theme-name READ gtk-cursor-theme-name WRITE setGtk-cursor-theme-name NOTIFY gtk-cursor-theme-nameChanged) + Q_PROPERTY(double gtk-cursor-theme-size READ gtk-cursor-theme-size WRITE setGtk-cursor-theme-size NOTIFY gtk-cursor-theme-sizeChanged) + Q_PROPERTY(QString gtk-font-name READ gtk-font-name WRITE setGtk-font-name NOTIFY gtk-font-nameChanged) + Q_PROPERTY(QString gtk-key-theme-name READ gtk-key-theme-name WRITE setGtk-key-theme-name NOTIFY gtk-key-theme-nameChanged) + Q_PROPERTY(bool gtk-recent-files-enabled READ gtk-recent-files-enabled WRITE setGtk-recent-files-enabled NOTIFY gtk-recent-files-enabledChanged) + Q_PROPERTY(double gtk-recent-files-max-age READ gtk-recent-files-max-age WRITE setGtk-recent-files-max-age NOTIFY gtk-recent-files-max-ageChanged) + Q_PROPERTY(QString gtk-theme-name READ gtk-theme-name WRITE setGtk-theme-name NOTIFY gtk-theme-nameChanged) + Q_PROPERTY(QString icon-theme-fallback READ icon-theme-fallback WRITE setIcon-theme-fallback NOTIFY icon-theme-fallbackChanged) + Q_PROPERTY(QString icon-theme-name READ icon-theme-name WRITE setIcon-theme-name NOTIFY icon-theme-nameChanged) + Q_PROPERTY(QString individual-scaling READ individual-scaling WRITE setIndividual-scaling NOTIFY individual-scalingChanged) + Q_PROPERTY(QString primary-monitor-name READ primary-monitor-name WRITE setPrimary-monitor-name NOTIFY primary-monitor-nameChanged) + Q_PROPERTY(QString primary-monitor-rect READ primary-monitor-rect WRITE setPrimary-monitor-rect NOTIFY primary-monitor-rectChanged) + Q_PROPERTY(QString qt-active-color READ qt-active-color WRITE setQt-active-color NOTIFY qt-active-colorChanged) + Q_PROPERTY(QString qt-dark-active-color READ qt-dark-active-color WRITE setQt-dark-active-color NOTIFY qt-dark-active-colorChanged) + Q_PROPERTY(QString qt-font-name READ qt-font-name WRITE setQt-font-name NOTIFY qt-font-nameChanged) + Q_PROPERTY(double qt-font-point-size READ qt-font-point-size WRITE setQt-font-point-size NOTIFY qt-font-point-sizeChanged) + Q_PROPERTY(QString qt-mono-font-name READ qt-mono-font-name WRITE setQt-mono-font-name NOTIFY qt-mono-font-nameChanged) + Q_PROPERTY(double qt-scrollbar-policy READ qt-scrollbar-policy WRITE setQt-scrollbar-policy NOTIFY qt-scrollbar-policyChanged) + Q_PROPERTY(double scale-factor READ scale-factor WRITE setScale-factor NOTIFY scale-factorChanged) + Q_PROPERTY(QString sound-theme-name READ sound-theme-name WRITE setSound-theme-name NOTIFY sound-theme-nameChanged) + Q_PROPERTY(QString theme-name READ theme-name WRITE setTheme-name NOTIFY theme-nameChanged) + Q_PROPERTY(double window-scale READ window-scale WRITE setWindow-scale NOTIFY window-scaleChanged) + Q_PROPERTY(bool xft-antialias READ xft-antialias WRITE setXft-antialias NOTIFY xft-antialiasChanged) + Q_PROPERTY(double xft-dpi READ xft-dpi WRITE setXft-dpi NOTIFY xft-dpiChanged) + Q_PROPERTY(bool xft-hinting READ xft-hinting WRITE setXft-hinting NOTIFY xft-hintingChanged) + Q_PROPERTY(QString xft-hintstyle READ xft-hintstyle WRITE setXft-hintstyle NOTIFY xft-hintstyleChanged) + Q_PROPERTY(QString xft-rgba READ xft-rgba WRITE setXft-rgba NOTIFY xft-rgbaChanged) +public: + explicit org_deepin_XSettings(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_XSettings(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_XSettings(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_XSettings(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_XSettings() { + if (m_config.loadRelaxed()) { + m_config.loadRelaxed()->deleteLater(); + } + } + + bool cursor-blink() const { + return p_cursor-blink; + } + void setCursor-blink(const bool &value) { + auto oldValue = p_cursor-blink; + p_cursor-blink = value; + markPropertySet(0); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("cursor-blink"), value); + }); + } + if (p_cursor-blink != oldValue) { + Q_EMIT cursor-blinkChanged(); + } + } + double cursor-blink-time() const { + return p_cursor-blink-time; + } + void setCursor-blink-time(const double &value) { + auto oldValue = p_cursor-blink-time; + p_cursor-blink-time = value; + markPropertySet(1); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("cursor-blink-time"), value); + }); + } + if (p_cursor-blink-time != oldValue) { + Q_EMIT cursor-blink-timeChanged(); + } + } + double dnd-drag-threshold() const { + return p_dnd-drag-threshold; + } + void setDnd-drag-threshold(const double &value) { + auto oldValue = p_dnd-drag-threshold; + p_dnd-drag-threshold = value; + markPropertySet(2); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dnd-drag-threshold"), value); + }); + } + if (p_dnd-drag-threshold != oldValue) { + Q_EMIT dnd-drag-thresholdChanged(); + } + } + double double-click-distance() const { + return p_double-click-distance; + } + void setDouble-click-distance(const double &value) { + auto oldValue = p_double-click-distance; + p_double-click-distance = value; + markPropertySet(3); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("double-click-distance"), value); + }); + } + if (p_double-click-distance != oldValue) { + Q_EMIT double-click-distanceChanged(); + } + } + double double-click-time() const { + return p_double-click-time; + } + void setDouble-click-time(const double &value) { + auto oldValue = p_double-click-time; + p_double-click-time = value; + markPropertySet(4); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("double-click-time"), value); + }); + } + if (p_double-click-time != oldValue) { + Q_EMIT double-click-timeChanged(); + } + } + double dtk-size-mode() const { + return p_dtk-size-mode; + } + void setDtk-size-mode(const double &value) { + auto oldValue = p_dtk-size-mode; + p_dtk-size-mode = value; + markPropertySet(5); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dtk-size-mode"), value); + }); + } + if (p_dtk-size-mode != oldValue) { + Q_EMIT dtk-size-modeChanged(); + } + } + double dtk-window-radius() const { + return p_dtk-window-radius; + } + void setDtk-window-radius(const double &value) { + auto oldValue = p_dtk-window-radius; + p_dtk-window-radius = value; + markPropertySet(6); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("dtk-window-radius"), value); + }); + } + if (p_dtk-window-radius != oldValue) { + Q_EMIT dtk-window-radiusChanged(); + } + } + bool enable-event-sounds() const { + return p_enable-event-sounds; + } + void setEnable-event-sounds(const bool &value) { + auto oldValue = p_enable-event-sounds; + p_enable-event-sounds = value; + markPropertySet(7); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enable-event-sounds"), value); + }); + } + if (p_enable-event-sounds != oldValue) { + Q_EMIT enable-event-soundsChanged(); + } + } + bool enable-input-feedback-sounds() const { + return p_enable-input-feedback-sounds; + } + void setEnable-input-feedback-sounds(const bool &value) { + auto oldValue = p_enable-input-feedback-sounds; + p_enable-input-feedback-sounds = value; + markPropertySet(8); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("enable-input-feedback-sounds"), value); + }); + } + if (p_enable-input-feedback-sounds != oldValue) { + Q_EMIT enable-input-feedback-soundsChanged(); + } + } + double gtk-cursor-blink-timeout() const { + return p_gtk-cursor-blink-timeout; + } + void setGtk-cursor-blink-timeout(const double &value) { + auto oldValue = p_gtk-cursor-blink-timeout; + p_gtk-cursor-blink-timeout = value; + markPropertySet(9); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-cursor-blink-timeout"), value); + }); + } + if (p_gtk-cursor-blink-timeout != oldValue) { + Q_EMIT gtk-cursor-blink-timeoutChanged(); + } + } + QString gtk-cursor-theme-name() const { + return p_gtk-cursor-theme-name; + } + void setGtk-cursor-theme-name(const QString &value) { + auto oldValue = p_gtk-cursor-theme-name; + p_gtk-cursor-theme-name = value; + markPropertySet(10); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-cursor-theme-name"), value); + }); + } + if (p_gtk-cursor-theme-name != oldValue) { + Q_EMIT gtk-cursor-theme-nameChanged(); + } + } + double gtk-cursor-theme-size() const { + return p_gtk-cursor-theme-size; + } + void setGtk-cursor-theme-size(const double &value) { + auto oldValue = p_gtk-cursor-theme-size; + p_gtk-cursor-theme-size = value; + markPropertySet(11); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-cursor-theme-size"), value); + }); + } + if (p_gtk-cursor-theme-size != oldValue) { + Q_EMIT gtk-cursor-theme-sizeChanged(); + } + } + QString gtk-font-name() const { + return p_gtk-font-name; + } + void setGtk-font-name(const QString &value) { + auto oldValue = p_gtk-font-name; + p_gtk-font-name = value; + markPropertySet(12); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-font-name"), value); + }); + } + if (p_gtk-font-name != oldValue) { + Q_EMIT gtk-font-nameChanged(); + } + } + QString gtk-key-theme-name() const { + return p_gtk-key-theme-name; + } + void setGtk-key-theme-name(const QString &value) { + auto oldValue = p_gtk-key-theme-name; + p_gtk-key-theme-name = value; + markPropertySet(13); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-key-theme-name"), value); + }); + } + if (p_gtk-key-theme-name != oldValue) { + Q_EMIT gtk-key-theme-nameChanged(); + } + } + bool gtk-recent-files-enabled() const { + return p_gtk-recent-files-enabled; + } + void setGtk-recent-files-enabled(const bool &value) { + auto oldValue = p_gtk-recent-files-enabled; + p_gtk-recent-files-enabled = value; + markPropertySet(14); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-recent-files-enabled"), value); + }); + } + if (p_gtk-recent-files-enabled != oldValue) { + Q_EMIT gtk-recent-files-enabledChanged(); + } + } + double gtk-recent-files-max-age() const { + return p_gtk-recent-files-max-age; + } + void setGtk-recent-files-max-age(const double &value) { + auto oldValue = p_gtk-recent-files-max-age; + p_gtk-recent-files-max-age = value; + markPropertySet(15); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-recent-files-max-age"), value); + }); + } + if (p_gtk-recent-files-max-age != oldValue) { + Q_EMIT gtk-recent-files-max-ageChanged(); + } + } + QString gtk-theme-name() const { + return p_gtk-theme-name; + } + void setGtk-theme-name(const QString &value) { + auto oldValue = p_gtk-theme-name; + p_gtk-theme-name = value; + markPropertySet(16); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("gtk-theme-name"), value); + }); + } + if (p_gtk-theme-name != oldValue) { + Q_EMIT gtk-theme-nameChanged(); + } + } + QString icon-theme-fallback() const { + return p_icon-theme-fallback; + } + void setIcon-theme-fallback(const QString &value) { + auto oldValue = p_icon-theme-fallback; + p_icon-theme-fallback = value; + markPropertySet(17); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("icon-theme-fallback"), value); + }); + } + if (p_icon-theme-fallback != oldValue) { + Q_EMIT icon-theme-fallbackChanged(); + } + } + QString icon-theme-name() const { + return p_icon-theme-name; + } + void setIcon-theme-name(const QString &value) { + auto oldValue = p_icon-theme-name; + p_icon-theme-name = value; + markPropertySet(18); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("icon-theme-name"), value); + }); + } + if (p_icon-theme-name != oldValue) { + Q_EMIT icon-theme-nameChanged(); + } + } + QString individual-scaling() const { + return p_individual-scaling; + } + void setIndividual-scaling(const QString &value) { + auto oldValue = p_individual-scaling; + p_individual-scaling = value; + markPropertySet(19); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("individual-scaling"), value); + }); + } + if (p_individual-scaling != oldValue) { + Q_EMIT individual-scalingChanged(); + } + } + QString primary-monitor-name() const { + return p_primary-monitor-name; + } + void setPrimary-monitor-name(const QString &value) { + auto oldValue = p_primary-monitor-name; + p_primary-monitor-name = value; + markPropertySet(20); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("primary-monitor-name"), value); + }); + } + if (p_primary-monitor-name != oldValue) { + Q_EMIT primary-monitor-nameChanged(); + } + } + QString primary-monitor-rect() const { + return p_primary-monitor-rect; + } + void setPrimary-monitor-rect(const QString &value) { + auto oldValue = p_primary-monitor-rect; + p_primary-monitor-rect = value; + markPropertySet(21); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("primary-monitor-rect"), value); + }); + } + if (p_primary-monitor-rect != oldValue) { + Q_EMIT primary-monitor-rectChanged(); + } + } + QString qt-active-color() const { + return p_qt-active-color; + } + void setQt-active-color(const QString &value) { + auto oldValue = p_qt-active-color; + p_qt-active-color = value; + markPropertySet(22); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-active-color"), value); + }); + } + if (p_qt-active-color != oldValue) { + Q_EMIT qt-active-colorChanged(); + } + } + QString qt-dark-active-color() const { + return p_qt-dark-active-color; + } + void setQt-dark-active-color(const QString &value) { + auto oldValue = p_qt-dark-active-color; + p_qt-dark-active-color = value; + markPropertySet(23); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-dark-active-color"), value); + }); + } + if (p_qt-dark-active-color != oldValue) { + Q_EMIT qt-dark-active-colorChanged(); + } + } + QString qt-font-name() const { + return p_qt-font-name; + } + void setQt-font-name(const QString &value) { + auto oldValue = p_qt-font-name; + p_qt-font-name = value; + markPropertySet(24); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-font-name"), value); + }); + } + if (p_qt-font-name != oldValue) { + Q_EMIT qt-font-nameChanged(); + } + } + double qt-font-point-size() const { + return p_qt-font-point-size; + } + void setQt-font-point-size(const double &value) { + auto oldValue = p_qt-font-point-size; + p_qt-font-point-size = value; + markPropertySet(25); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-font-point-size"), value); + }); + } + if (p_qt-font-point-size != oldValue) { + Q_EMIT qt-font-point-sizeChanged(); + } + } + QString qt-mono-font-name() const { + return p_qt-mono-font-name; + } + void setQt-mono-font-name(const QString &value) { + auto oldValue = p_qt-mono-font-name; + p_qt-mono-font-name = value; + markPropertySet(26); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-mono-font-name"), value); + }); + } + if (p_qt-mono-font-name != oldValue) { + Q_EMIT qt-mono-font-nameChanged(); + } + } + double qt-scrollbar-policy() const { + return p_qt-scrollbar-policy; + } + void setQt-scrollbar-policy(const double &value) { + auto oldValue = p_qt-scrollbar-policy; + p_qt-scrollbar-policy = value; + markPropertySet(27); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("qt-scrollbar-policy"), value); + }); + } + if (p_qt-scrollbar-policy != oldValue) { + Q_EMIT qt-scrollbar-policyChanged(); + } + } + double scale-factor() const { + return p_scale-factor; + } + void setScale-factor(const double &value) { + auto oldValue = p_scale-factor; + p_scale-factor = value; + markPropertySet(28); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("scale-factor"), value); + }); + } + if (p_scale-factor != oldValue) { + Q_EMIT scale-factorChanged(); + } + } + QString sound-theme-name() const { + return p_sound-theme-name; + } + void setSound-theme-name(const QString &value) { + auto oldValue = p_sound-theme-name; + p_sound-theme-name = value; + markPropertySet(29); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("sound-theme-name"), value); + }); + } + if (p_sound-theme-name != oldValue) { + Q_EMIT sound-theme-nameChanged(); + } + } + QString theme-name() const { + return p_theme-name; + } + void setTheme-name(const QString &value) { + auto oldValue = p_theme-name; + p_theme-name = value; + markPropertySet(30); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("theme-name"), value); + }); + } + if (p_theme-name != oldValue) { + Q_EMIT theme-nameChanged(); + } + } + double window-scale() const { + return p_window-scale; + } + void setWindow-scale(const double &value) { + auto oldValue = p_window-scale; + p_window-scale = value; + markPropertySet(31); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("window-scale"), value); + }); + } + if (p_window-scale != oldValue) { + Q_EMIT window-scaleChanged(); + } + } + bool xft-antialias() const { + return p_xft-antialias; + } + void setXft-antialias(const bool &value) { + auto oldValue = p_xft-antialias; + p_xft-antialias = value; + markPropertySet(32); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("xft-antialias"), value); + }); + } + if (p_xft-antialias != oldValue) { + Q_EMIT xft-antialiasChanged(); + } + } + double xft-dpi() const { + return p_xft-dpi; + } + void setXft-dpi(const double &value) { + auto oldValue = p_xft-dpi; + p_xft-dpi = value; + markPropertySet(33); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("xft-dpi"), value); + }); + } + if (p_xft-dpi != oldValue) { + Q_EMIT xft-dpiChanged(); + } + } + bool xft-hinting() const { + return p_xft-hinting; + } + void setXft-hinting(const bool &value) { + auto oldValue = p_xft-hinting; + p_xft-hinting = value; + markPropertySet(34); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("xft-hinting"), value); + }); + } + if (p_xft-hinting != oldValue) { + Q_EMIT xft-hintingChanged(); + } + } + QString xft-hintstyle() const { + return p_xft-hintstyle; + } + void setXft-hintstyle(const QString &value) { + auto oldValue = p_xft-hintstyle; + p_xft-hintstyle = value; + markPropertySet(35); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("xft-hintstyle"), value); + }); + } + if (p_xft-hintstyle != oldValue) { + Q_EMIT xft-hintstyleChanged(); + } + } + QString xft-rgba() const { + return p_xft-rgba; + } + void setXft-rgba(const QString &value) { + auto oldValue = p_xft-rgba; + p_xft-rgba = value; + markPropertySet(36); + if (auto config = m_config.loadRelaxed()) { + QMetaObject::invokeMethod(config, [this, value]() { + m_config.loadRelaxed()->setValue(QStringLiteral("xft-rgba"), value); + }); + } + if (p_xft-rgba != oldValue) { + Q_EMIT xft-rgbaChanged(); + } + } +Q_SIGNALS: + void cursor-blinkChanged(); + void cursor-blink-timeChanged(); + void dnd-drag-thresholdChanged(); + void double-click-distanceChanged(); + void double-click-timeChanged(); + void dtk-size-modeChanged(); + void dtk-window-radiusChanged(); + void enable-event-soundsChanged(); + void enable-input-feedback-soundsChanged(); + void gtk-cursor-blink-timeoutChanged(); + void gtk-cursor-theme-nameChanged(); + void gtk-cursor-theme-sizeChanged(); + void gtk-font-nameChanged(); + void gtk-key-theme-nameChanged(); + void gtk-recent-files-enabledChanged(); + void gtk-recent-files-max-ageChanged(); + void gtk-theme-nameChanged(); + void icon-theme-fallbackChanged(); + void icon-theme-nameChanged(); + void individual-scalingChanged(); + void primary-monitor-nameChanged(); + void primary-monitor-rectChanged(); + void qt-active-colorChanged(); + void qt-dark-active-colorChanged(); + void qt-font-nameChanged(); + void qt-font-point-sizeChanged(); + void qt-mono-font-nameChanged(); + void qt-scrollbar-policyChanged(); + void scale-factorChanged(); + void sound-theme-nameChanged(); + void theme-nameChanged(); + void window-scaleChanged(); + void xft-antialiasChanged(); + void xft-dpiChanged(); + void xft-hintingChanged(); + void xft-hintstyleChanged(); + void xft-rgbaChanged(); +private: + void initialize(DTK_CORE_NAMESPACE::DConfig *config) { + Q_ASSERT(!m_config.loadRelaxed()); + m_config.storeRelaxed(config); + if (testPropertySet(0)) { + config->setValue(QStringLiteral("cursor-blink"), QVariant::fromValue(p_cursor-blink)); + } else { + updateValue(QStringLiteral("cursor-blink"), QVariant::fromValue(p_cursor-blink)); + } + if (testPropertySet(1)) { + config->setValue(QStringLiteral("cursor-blink-time"), QVariant::fromValue(p_cursor-blink-time)); + } else { + updateValue(QStringLiteral("cursor-blink-time"), QVariant::fromValue(p_cursor-blink-time)); + } + if (testPropertySet(2)) { + config->setValue(QStringLiteral("dnd-drag-threshold"), QVariant::fromValue(p_dnd-drag-threshold)); + } else { + updateValue(QStringLiteral("dnd-drag-threshold"), QVariant::fromValue(p_dnd-drag-threshold)); + } + if (testPropertySet(3)) { + config->setValue(QStringLiteral("double-click-distance"), QVariant::fromValue(p_double-click-distance)); + } else { + updateValue(QStringLiteral("double-click-distance"), QVariant::fromValue(p_double-click-distance)); + } + if (testPropertySet(4)) { + config->setValue(QStringLiteral("double-click-time"), QVariant::fromValue(p_double-click-time)); + } else { + updateValue(QStringLiteral("double-click-time"), QVariant::fromValue(p_double-click-time)); + } + if (testPropertySet(5)) { + config->setValue(QStringLiteral("dtk-size-mode"), QVariant::fromValue(p_dtk-size-mode)); + } else { + updateValue(QStringLiteral("dtk-size-mode"), QVariant::fromValue(p_dtk-size-mode)); + } + if (testPropertySet(6)) { + config->setValue(QStringLiteral("dtk-window-radius"), QVariant::fromValue(p_dtk-window-radius)); + } else { + updateValue(QStringLiteral("dtk-window-radius"), QVariant::fromValue(p_dtk-window-radius)); + } + if (testPropertySet(7)) { + config->setValue(QStringLiteral("enable-event-sounds"), QVariant::fromValue(p_enable-event-sounds)); + } else { + updateValue(QStringLiteral("enable-event-sounds"), QVariant::fromValue(p_enable-event-sounds)); + } + if (testPropertySet(8)) { + config->setValue(QStringLiteral("enable-input-feedback-sounds"), QVariant::fromValue(p_enable-input-feedback-sounds)); + } else { + updateValue(QStringLiteral("enable-input-feedback-sounds"), QVariant::fromValue(p_enable-input-feedback-sounds)); + } + if (testPropertySet(9)) { + config->setValue(QStringLiteral("gtk-cursor-blink-timeout"), QVariant::fromValue(p_gtk-cursor-blink-timeout)); + } else { + updateValue(QStringLiteral("gtk-cursor-blink-timeout"), QVariant::fromValue(p_gtk-cursor-blink-timeout)); + } + if (testPropertySet(10)) { + config->setValue(QStringLiteral("gtk-cursor-theme-name"), QVariant::fromValue(p_gtk-cursor-theme-name)); + } else { + updateValue(QStringLiteral("gtk-cursor-theme-name"), QVariant::fromValue(p_gtk-cursor-theme-name)); + } + if (testPropertySet(11)) { + config->setValue(QStringLiteral("gtk-cursor-theme-size"), QVariant::fromValue(p_gtk-cursor-theme-size)); + } else { + updateValue(QStringLiteral("gtk-cursor-theme-size"), QVariant::fromValue(p_gtk-cursor-theme-size)); + } + if (testPropertySet(12)) { + config->setValue(QStringLiteral("gtk-font-name"), QVariant::fromValue(p_gtk-font-name)); + } else { + updateValue(QStringLiteral("gtk-font-name"), QVariant::fromValue(p_gtk-font-name)); + } + if (testPropertySet(13)) { + config->setValue(QStringLiteral("gtk-key-theme-name"), QVariant::fromValue(p_gtk-key-theme-name)); + } else { + updateValue(QStringLiteral("gtk-key-theme-name"), QVariant::fromValue(p_gtk-key-theme-name)); + } + if (testPropertySet(14)) { + config->setValue(QStringLiteral("gtk-recent-files-enabled"), QVariant::fromValue(p_gtk-recent-files-enabled)); + } else { + updateValue(QStringLiteral("gtk-recent-files-enabled"), QVariant::fromValue(p_gtk-recent-files-enabled)); + } + if (testPropertySet(15)) { + config->setValue(QStringLiteral("gtk-recent-files-max-age"), QVariant::fromValue(p_gtk-recent-files-max-age)); + } else { + updateValue(QStringLiteral("gtk-recent-files-max-age"), QVariant::fromValue(p_gtk-recent-files-max-age)); + } + if (testPropertySet(16)) { + config->setValue(QStringLiteral("gtk-theme-name"), QVariant::fromValue(p_gtk-theme-name)); + } else { + updateValue(QStringLiteral("gtk-theme-name"), QVariant::fromValue(p_gtk-theme-name)); + } + if (testPropertySet(17)) { + config->setValue(QStringLiteral("icon-theme-fallback"), QVariant::fromValue(p_icon-theme-fallback)); + } else { + updateValue(QStringLiteral("icon-theme-fallback"), QVariant::fromValue(p_icon-theme-fallback)); + } + if (testPropertySet(18)) { + config->setValue(QStringLiteral("icon-theme-name"), QVariant::fromValue(p_icon-theme-name)); + } else { + updateValue(QStringLiteral("icon-theme-name"), QVariant::fromValue(p_icon-theme-name)); + } + if (testPropertySet(19)) { + config->setValue(QStringLiteral("individual-scaling"), QVariant::fromValue(p_individual-scaling)); + } else { + updateValue(QStringLiteral("individual-scaling"), QVariant::fromValue(p_individual-scaling)); + } + if (testPropertySet(20)) { + config->setValue(QStringLiteral("primary-monitor-name"), QVariant::fromValue(p_primary-monitor-name)); + } else { + updateValue(QStringLiteral("primary-monitor-name"), QVariant::fromValue(p_primary-monitor-name)); + } + if (testPropertySet(21)) { + config->setValue(QStringLiteral("primary-monitor-rect"), QVariant::fromValue(p_primary-monitor-rect)); + } else { + updateValue(QStringLiteral("primary-monitor-rect"), QVariant::fromValue(p_primary-monitor-rect)); + } + if (testPropertySet(22)) { + config->setValue(QStringLiteral("qt-active-color"), QVariant::fromValue(p_qt-active-color)); + } else { + updateValue(QStringLiteral("qt-active-color"), QVariant::fromValue(p_qt-active-color)); + } + if (testPropertySet(23)) { + config->setValue(QStringLiteral("qt-dark-active-color"), QVariant::fromValue(p_qt-dark-active-color)); + } else { + updateValue(QStringLiteral("qt-dark-active-color"), QVariant::fromValue(p_qt-dark-active-color)); + } + if (testPropertySet(24)) { + config->setValue(QStringLiteral("qt-font-name"), QVariant::fromValue(p_qt-font-name)); + } else { + updateValue(QStringLiteral("qt-font-name"), QVariant::fromValue(p_qt-font-name)); + } + if (testPropertySet(25)) { + config->setValue(QStringLiteral("qt-font-point-size"), QVariant::fromValue(p_qt-font-point-size)); + } else { + updateValue(QStringLiteral("qt-font-point-size"), QVariant::fromValue(p_qt-font-point-size)); + } + if (testPropertySet(26)) { + config->setValue(QStringLiteral("qt-mono-font-name"), QVariant::fromValue(p_qt-mono-font-name)); + } else { + updateValue(QStringLiteral("qt-mono-font-name"), QVariant::fromValue(p_qt-mono-font-name)); + } + if (testPropertySet(27)) { + config->setValue(QStringLiteral("qt-scrollbar-policy"), QVariant::fromValue(p_qt-scrollbar-policy)); + } else { + updateValue(QStringLiteral("qt-scrollbar-policy"), QVariant::fromValue(p_qt-scrollbar-policy)); + } + if (testPropertySet(28)) { + config->setValue(QStringLiteral("scale-factor"), QVariant::fromValue(p_scale-factor)); + } else { + updateValue(QStringLiteral("scale-factor"), QVariant::fromValue(p_scale-factor)); + } + if (testPropertySet(29)) { + config->setValue(QStringLiteral("sound-theme-name"), QVariant::fromValue(p_sound-theme-name)); + } else { + updateValue(QStringLiteral("sound-theme-name"), QVariant::fromValue(p_sound-theme-name)); + } + if (testPropertySet(30)) { + config->setValue(QStringLiteral("theme-name"), QVariant::fromValue(p_theme-name)); + } else { + updateValue(QStringLiteral("theme-name"), QVariant::fromValue(p_theme-name)); + } + if (testPropertySet(31)) { + config->setValue(QStringLiteral("window-scale"), QVariant::fromValue(p_window-scale)); + } else { + updateValue(QStringLiteral("window-scale"), QVariant::fromValue(p_window-scale)); + } + if (testPropertySet(32)) { + config->setValue(QStringLiteral("xft-antialias"), QVariant::fromValue(p_xft-antialias)); + } else { + updateValue(QStringLiteral("xft-antialias"), QVariant::fromValue(p_xft-antialias)); + } + if (testPropertySet(33)) { + config->setValue(QStringLiteral("xft-dpi"), QVariant::fromValue(p_xft-dpi)); + } else { + updateValue(QStringLiteral("xft-dpi"), QVariant::fromValue(p_xft-dpi)); + } + if (testPropertySet(34)) { + config->setValue(QStringLiteral("xft-hinting"), QVariant::fromValue(p_xft-hinting)); + } else { + updateValue(QStringLiteral("xft-hinting"), QVariant::fromValue(p_xft-hinting)); + } + if (testPropertySet(35)) { + config->setValue(QStringLiteral("xft-hintstyle"), QVariant::fromValue(p_xft-hintstyle)); + } else { + updateValue(QStringLiteral("xft-hintstyle"), QVariant::fromValue(p_xft-hintstyle)); + } + if (testPropertySet(36)) { + config->setValue(QStringLiteral("xft-rgba"), QVariant::fromValue(p_xft-rgba)); + } else { + updateValue(QStringLiteral("xft-rgba"), QVariant::fromValue(p_xft-rgba)); + } + + 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("cursor-blink")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_cursor-blink != newValue) { + p_cursor-blink = newValue; + Q_EMIT cursor-blinkChanged(); + } + }); + return; + } + if (key == QStringLiteral("cursor-blink-time")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_cursor-blink-time != newValue) { + p_cursor-blink-time = newValue; + Q_EMIT cursor-blink-timeChanged(); + } + }); + return; + } + if (key == QStringLiteral("dnd-drag-threshold")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dnd-drag-threshold != newValue) { + p_dnd-drag-threshold = newValue; + Q_EMIT dnd-drag-thresholdChanged(); + } + }); + return; + } + if (key == QStringLiteral("double-click-distance")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_double-click-distance != newValue) { + p_double-click-distance = newValue; + Q_EMIT double-click-distanceChanged(); + } + }); + return; + } + if (key == QStringLiteral("double-click-time")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_double-click-time != newValue) { + p_double-click-time = newValue; + Q_EMIT double-click-timeChanged(); + } + }); + return; + } + if (key == QStringLiteral("dtk-size-mode")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dtk-size-mode != newValue) { + p_dtk-size-mode = newValue; + Q_EMIT dtk-size-modeChanged(); + } + }); + return; + } + if (key == QStringLiteral("dtk-window-radius")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_dtk-window-radius != newValue) { + p_dtk-window-radius = newValue; + Q_EMIT dtk-window-radiusChanged(); + } + }); + return; + } + if (key == QStringLiteral("enable-event-sounds")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enable-event-sounds != newValue) { + p_enable-event-sounds = newValue; + Q_EMIT enable-event-soundsChanged(); + } + }); + return; + } + if (key == QStringLiteral("enable-input-feedback-sounds")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_enable-input-feedback-sounds != newValue) { + p_enable-input-feedback-sounds = newValue; + Q_EMIT enable-input-feedback-soundsChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-cursor-blink-timeout")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-cursor-blink-timeout != newValue) { + p_gtk-cursor-blink-timeout = newValue; + Q_EMIT gtk-cursor-blink-timeoutChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-cursor-theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-cursor-theme-name != newValue) { + p_gtk-cursor-theme-name = newValue; + Q_EMIT gtk-cursor-theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-cursor-theme-size")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-cursor-theme-size != newValue) { + p_gtk-cursor-theme-size = newValue; + Q_EMIT gtk-cursor-theme-sizeChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-font-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-font-name != newValue) { + p_gtk-font-name = newValue; + Q_EMIT gtk-font-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-key-theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-key-theme-name != newValue) { + p_gtk-key-theme-name = newValue; + Q_EMIT gtk-key-theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-recent-files-enabled")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-recent-files-enabled != newValue) { + p_gtk-recent-files-enabled = newValue; + Q_EMIT gtk-recent-files-enabledChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-recent-files-max-age")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-recent-files-max-age != newValue) { + p_gtk-recent-files-max-age = newValue; + Q_EMIT gtk-recent-files-max-ageChanged(); + } + }); + return; + } + if (key == QStringLiteral("gtk-theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_gtk-theme-name != newValue) { + p_gtk-theme-name = newValue; + Q_EMIT gtk-theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("icon-theme-fallback")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_icon-theme-fallback != newValue) { + p_icon-theme-fallback = newValue; + Q_EMIT icon-theme-fallbackChanged(); + } + }); + return; + } + if (key == QStringLiteral("icon-theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_icon-theme-name != newValue) { + p_icon-theme-name = newValue; + Q_EMIT icon-theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("individual-scaling")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_individual-scaling != newValue) { + p_individual-scaling = newValue; + Q_EMIT individual-scalingChanged(); + } + }); + return; + } + if (key == QStringLiteral("primary-monitor-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_primary-monitor-name != newValue) { + p_primary-monitor-name = newValue; + Q_EMIT primary-monitor-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("primary-monitor-rect")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_primary-monitor-rect != newValue) { + p_primary-monitor-rect = newValue; + Q_EMIT primary-monitor-rectChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-active-color")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-active-color != newValue) { + p_qt-active-color = newValue; + Q_EMIT qt-active-colorChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-dark-active-color")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-dark-active-color != newValue) { + p_qt-dark-active-color = newValue; + Q_EMIT qt-dark-active-colorChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-font-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-font-name != newValue) { + p_qt-font-name = newValue; + Q_EMIT qt-font-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-font-point-size")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-font-point-size != newValue) { + p_qt-font-point-size = newValue; + Q_EMIT qt-font-point-sizeChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-mono-font-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-mono-font-name != newValue) { + p_qt-mono-font-name = newValue; + Q_EMIT qt-mono-font-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("qt-scrollbar-policy")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_qt-scrollbar-policy != newValue) { + p_qt-scrollbar-policy = newValue; + Q_EMIT qt-scrollbar-policyChanged(); + } + }); + return; + } + if (key == QStringLiteral("scale-factor")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_scale-factor != newValue) { + p_scale-factor = newValue; + Q_EMIT scale-factorChanged(); + } + }); + return; + } + if (key == QStringLiteral("sound-theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_sound-theme-name != newValue) { + p_sound-theme-name = newValue; + Q_EMIT sound-theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("theme-name")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_theme-name != newValue) { + p_theme-name = newValue; + Q_EMIT theme-nameChanged(); + } + }); + return; + } + if (key == QStringLiteral("window-scale")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_window-scale != newValue) { + p_window-scale = newValue; + Q_EMIT window-scaleChanged(); + } + }); + return; + } + if (key == QStringLiteral("xft-antialias")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_xft-antialias != newValue) { + p_xft-antialias = newValue; + Q_EMIT xft-antialiasChanged(); + } + }); + return; + } + if (key == QStringLiteral("xft-dpi")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_xft-dpi != newValue) { + p_xft-dpi = newValue; + Q_EMIT xft-dpiChanged(); + } + }); + return; + } + if (key == QStringLiteral("xft-hinting")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_xft-hinting != newValue) { + p_xft-hinting = newValue; + Q_EMIT xft-hintingChanged(); + } + }); + return; + } + if (key == QStringLiteral("xft-hintstyle")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_xft-hintstyle != newValue) { + p_xft-hintstyle = newValue; + Q_EMIT xft-hintstyleChanged(); + } + }); + return; + } + if (key == QStringLiteral("xft-rgba")) { + auto newValue = qvariant_cast(value); + QMetaObject::invokeMethod(this, [this, newValue]() { + if (p_xft-rgba != newValue) { + p_xft-rgba = newValue; + Q_EMIT xft-rgbaChanged(); + } + }); + return; + } + } + inline void markPropertySet(const int index) { + if (index < 32) { + m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); + return; + } + if (index < 64) { + m_propertySetStatus1.fetchAndOrOrdered(1 << (index - 32)); + return; + } + Q_UNREACHABLE(); + } + inline bool testPropertySet(const int index) const { + if (index < 32) { + return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); + } + if (index < 64) { + return (m_propertySetStatus1.loadRelaxed() & (1 << (index - 32))); + } + Q_UNREACHABLE(); + } + QAtomicPointer m_config = nullptr; + bool p_cursor-blink { true }; + double p_cursor-blink-time { 1200 }; + double p_dnd-drag-threshold { 8 }; + double p_double-click-distance { 5 }; + double p_double-click-time { 250 }; + double p_dtk-size-mode { 0 }; + double p_dtk-window-radius { 8 }; + bool p_enable-event-sounds { true }; + bool p_enable-input-feedback-sounds { true }; + double p_gtk-cursor-blink-timeout { 10 }; + QString p_gtk-cursor-theme-name { QStringLiteral("bloom") }; + double p_gtk-cursor-theme-size { 24 }; + QString p_gtk-font-name { QStringLiteral("sans-serif 10.5") }; + QString p_gtk-key-theme-name { QStringLiteral("Default") }; + bool p_gtk-recent-files-enabled { true }; + double p_gtk-recent-files-max-age { 30 }; + QString p_gtk-theme-name { QStringLiteral("deepin") }; + QString p_icon-theme-fallback { QStringLiteral("default") }; + QString p_icon-theme-name { QStringLiteral("bloom") }; + QString p_individual-scaling { QStringLiteral("") }; + QString p_primary-monitor-name { QStringLiteral("eDP-1") }; + QString p_primary-monitor-rect { QStringLiteral("0-0-0-0") }; + QString p_qt-active-color { QStringLiteral("0,33153,65535,65535") }; + QString p_qt-dark-active-color { QStringLiteral("0,33153,65535,65535") }; + QString p_qt-font-name { QStringLiteral("") }; + double p_qt-font-point-size { 10.5 }; + QString p_qt-mono-font-name { QStringLiteral("") }; + double p_qt-scrollbar-policy { 0 }; + double p_scale-factor { 1 }; + QString p_sound-theme-name { QStringLiteral("deepin") }; + QString p_theme-name { QStringLiteral("deepin") }; + double p_window-scale { 1 }; + bool p_xft-antialias { true }; + double p_xft-dpi { -1 }; + bool p_xft-hinting { true }; + QString p_xft-hintstyle { QStringLiteral("hintfull") }; + QString p_xft-rgba { QStringLiteral("rgb") }; + QAtomicInteger m_propertySetStatus0 = 0; + QAtomicInteger m_propertySetStatus1 = 0; +}; + +#endif // ORG_DEEPIN_XSETTINGS_H