/**
 * This file is generated by dconfig2cpp.
 * Command line arguments: ./dconfig2cpp -p ./dde-appearance/toolGenerate/dconfig2cpp ./dde-appearance/misc/dconfig/org.deepin.dde.appearance.json
 * Generation time: 2025-01-14T10:54:59
 * 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_APPEARANCE_H
#define ORG_DEEPIN_DDE_APPEARANCE_H

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

class org_deepin_dde_appearance : public QObject {
    Q_OBJECT

    Q_PROPERTY(QString Active_Colors READ Active_Colors WRITE setActive_Colors NOTIFY Active_ColorsChanged)
    Q_PROPERTY(QList<QVariant> All_Wallpaper_Uris READ All_Wallpaper_Uris WRITE setAll_Wallpaper_Uris NOTIFY All_Wallpaper_UrisChanged)
    Q_PROPERTY(QList<QVariant> Background_Uris READ Background_Uris WRITE setBackground_Uris NOTIFY Background_UrisChanged)
    Q_PROPERTY(QString Cursor_Theme READ Cursor_Theme WRITE setCursor_Theme NOTIFY Cursor_ThemeChanged)
    Q_PROPERTY(double Dtk_Size_Mode READ Dtk_Size_Mode WRITE setDtk_Size_Mode NOTIFY Dtk_Size_ModeChanged)
    Q_PROPERTY(QList<QVariant> Excluded_Icon_Themes READ Excluded_Icon_Themes WRITE setExcluded_Icon_Themes NOTIFY Excluded_Icon_ThemesChanged)
    Q_PROPERTY(QVariantMap Extra_Picture_Uris READ Extra_Picture_Uris WRITE setExtra_Picture_Uris NOTIFY Extra_Picture_UrisChanged)
    Q_PROPERTY(QString Font_Monospace READ Font_Monospace WRITE setFont_Monospace NOTIFY Font_MonospaceChanged)
    Q_PROPERTY(double Font_Size READ Font_Size WRITE setFont_Size NOTIFY Font_SizeChanged)
    Q_PROPERTY(QString Font_Standard READ Font_Standard WRITE setFont_Standard NOTIFY Font_StandardChanged)
    Q_PROPERTY(QString Global_Theme READ Global_Theme WRITE setGlobal_Theme NOTIFY Global_ThemeChanged)
    Q_PROPERTY(QString Gtk_Theme READ Gtk_Theme WRITE setGtk_Theme NOTIFY Gtk_ThemeChanged)
    Q_PROPERTY(QString Icon_Theme READ Icon_Theme WRITE setIcon_Theme NOTIFY Icon_ThemeChanged)
    Q_PROPERTY(double Opacity READ Opacity WRITE setOpacity NOTIFY OpacityChanged)
    Q_PROPERTY(double Qt_Scrollbar_Policy READ Qt_Scrollbar_Policy WRITE setQt_Scrollbar_Policy NOTIFY Qt_Scrollbar_PolicyChanged)
    Q_PROPERTY(QString Sound_Theme READ Sound_Theme WRITE setSound_Theme NOTIFY Sound_ThemeChanged)
    Q_PROPERTY(bool Theme_Auto READ Theme_Auto WRITE setTheme_Auto NOTIFY Theme_AutoChanged)
    Q_PROPERTY(QString Wallpaper_Slideshow READ Wallpaper_Slideshow WRITE setWallpaper_Slideshow NOTIFY Wallpaper_SlideshowChanged)
    Q_PROPERTY(QString Wallpaper_Uris READ Wallpaper_Uris WRITE setWallpaper_Uris NOTIFY Wallpaper_UrisChanged)
public:
    explicit org_deepin_dde_appearance(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_appearance(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_appearance(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_appearance(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_appearance() {
        if (m_config.loadRelaxed()) {
            m_config.loadRelaxed()->deleteLater();
        }
    }

    QString Active_Colors() const {
        return p_Active_Colors;
    }
    void setActive_Colors(const QString &value) {
        auto oldValue = p_Active_Colors;
        p_Active_Colors = value;
        markPropertySet(0);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Active_Colors"), value);
            });
        }
        if (p_Active_Colors != oldValue) {
            Q_EMIT Active_ColorsChanged();
        }
    }
    QList<QVariant> All_Wallpaper_Uris() const {
        return p_All_Wallpaper_Uris;
    }
    void setAll_Wallpaper_Uris(const QList<QVariant> &value) {
        auto oldValue = p_All_Wallpaper_Uris;
        p_All_Wallpaper_Uris = value;
        markPropertySet(1);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("All_Wallpaper_Uris"), value);
            });
        }
        if (p_All_Wallpaper_Uris != oldValue) {
            Q_EMIT All_Wallpaper_UrisChanged();
        }
    }
    QList<QVariant> Background_Uris() const {
        return p_Background_Uris;
    }
    void setBackground_Uris(const QList<QVariant> &value) {
        auto oldValue = p_Background_Uris;
        p_Background_Uris = value;
        markPropertySet(2);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Background_Uris"), value);
            });
        }
        if (p_Background_Uris != oldValue) {
            Q_EMIT Background_UrisChanged();
        }
    }
    QString Cursor_Theme() const {
        return p_Cursor_Theme;
    }
    void setCursor_Theme(const QString &value) {
        auto oldValue = p_Cursor_Theme;
        p_Cursor_Theme = value;
        markPropertySet(3);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Cursor_Theme"), value);
            });
        }
        if (p_Cursor_Theme != oldValue) {
            Q_EMIT Cursor_ThemeChanged();
        }
    }
    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(4);
        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();
        }
    }
    QList<QVariant> Excluded_Icon_Themes() const {
        return p_Excluded_Icon_Themes;
    }
    void setExcluded_Icon_Themes(const QList<QVariant> &value) {
        auto oldValue = p_Excluded_Icon_Themes;
        p_Excluded_Icon_Themes = value;
        markPropertySet(5);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Excluded_Icon_Themes"), value);
            });
        }
        if (p_Excluded_Icon_Themes != oldValue) {
            Q_EMIT Excluded_Icon_ThemesChanged();
        }
    }
    QVariantMap Extra_Picture_Uris() const {
        return p_Extra_Picture_Uris;
    }
    void setExtra_Picture_Uris(const QVariantMap &value) {
        auto oldValue = p_Extra_Picture_Uris;
        p_Extra_Picture_Uris = value;
        markPropertySet(6);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Extra_Picture_Uris"), value);
            });
        }
        if (p_Extra_Picture_Uris != oldValue) {
            Q_EMIT Extra_Picture_UrisChanged();
        }
    }
    QString Font_Monospace() const {
        return p_Font_Monospace;
    }
    void setFont_Monospace(const QString &value) {
        auto oldValue = p_Font_Monospace;
        p_Font_Monospace = value;
        markPropertySet(7);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Font_Monospace"), value);
            });
        }
        if (p_Font_Monospace != oldValue) {
            Q_EMIT Font_MonospaceChanged();
        }
    }
    double Font_Size() const {
        return p_Font_Size;
    }
    void setFont_Size(const double &value) {
        auto oldValue = p_Font_Size;
        p_Font_Size = value;
        markPropertySet(8);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Font_Size"), value);
            });
        }
        if (p_Font_Size != oldValue) {
            Q_EMIT Font_SizeChanged();
        }
    }
    QString Font_Standard() const {
        return p_Font_Standard;
    }
    void setFont_Standard(const QString &value) {
        auto oldValue = p_Font_Standard;
        p_Font_Standard = value;
        markPropertySet(9);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Font_Standard"), value);
            });
        }
        if (p_Font_Standard != oldValue) {
            Q_EMIT Font_StandardChanged();
        }
    }
    QString Global_Theme() const {
        return p_Global_Theme;
    }
    void setGlobal_Theme(const QString &value) {
        auto oldValue = p_Global_Theme;
        p_Global_Theme = value;
        markPropertySet(10);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Global_Theme"), value);
            });
        }
        if (p_Global_Theme != oldValue) {
            Q_EMIT Global_ThemeChanged();
        }
    }
    QString Gtk_Theme() const {
        return p_Gtk_Theme;
    }
    void setGtk_Theme(const QString &value) {
        auto oldValue = p_Gtk_Theme;
        p_Gtk_Theme = value;
        markPropertySet(11);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Gtk_Theme"), value);
            });
        }
        if (p_Gtk_Theme != oldValue) {
            Q_EMIT Gtk_ThemeChanged();
        }
    }
    QString Icon_Theme() const {
        return p_Icon_Theme;
    }
    void setIcon_Theme(const QString &value) {
        auto oldValue = p_Icon_Theme;
        p_Icon_Theme = value;
        markPropertySet(12);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Icon_Theme"), value);
            });
        }
        if (p_Icon_Theme != oldValue) {
            Q_EMIT Icon_ThemeChanged();
        }
    }
    double Opacity() const {
        return p_Opacity;
    }
    void setOpacity(const double &value) {
        auto oldValue = p_Opacity;
        p_Opacity = value;
        markPropertySet(13);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Opacity"), value);
            });
        }
        if (p_Opacity != oldValue) {
            Q_EMIT OpacityChanged();
        }
    }
    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(14);
        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();
        }
    }
    QString Sound_Theme() const {
        return p_Sound_Theme;
    }
    void setSound_Theme(const QString &value) {
        auto oldValue = p_Sound_Theme;
        p_Sound_Theme = value;
        markPropertySet(15);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Sound_Theme"), value);
            });
        }
        if (p_Sound_Theme != oldValue) {
            Q_EMIT Sound_ThemeChanged();
        }
    }
    bool Theme_Auto() const {
        return p_Theme_Auto;
    }
    void setTheme_Auto(const bool &value) {
        auto oldValue = p_Theme_Auto;
        p_Theme_Auto = value;
        markPropertySet(16);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Theme_Auto"), value);
            });
        }
        if (p_Theme_Auto != oldValue) {
            Q_EMIT Theme_AutoChanged();
        }
    }
    QString Wallpaper_Slideshow() const {
        return p_Wallpaper_Slideshow;
    }
    void setWallpaper_Slideshow(const QString &value) {
        auto oldValue = p_Wallpaper_Slideshow;
        p_Wallpaper_Slideshow = value;
        markPropertySet(17);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Wallpaper_Slideshow"), value);
            });
        }
        if (p_Wallpaper_Slideshow != oldValue) {
            Q_EMIT Wallpaper_SlideshowChanged();
        }
    }
    QString Wallpaper_Uris() const {
        return p_Wallpaper_Uris;
    }
    void setWallpaper_Uris(const QString &value) {
        auto oldValue = p_Wallpaper_Uris;
        p_Wallpaper_Uris = value;
        markPropertySet(18);
        if (auto config = m_config.loadRelaxed()) {
            QMetaObject::invokeMethod(config, [this, value]() {
                m_config.loadRelaxed()->setValue(QStringLiteral("Wallpaper_Uris"), value);
            });
        }
        if (p_Wallpaper_Uris != oldValue) {
            Q_EMIT Wallpaper_UrisChanged();
        }
    }
Q_SIGNALS:
    void Active_ColorsChanged();
    void All_Wallpaper_UrisChanged();
    void Background_UrisChanged();
    void Cursor_ThemeChanged();
    void Dtk_Size_ModeChanged();
    void Excluded_Icon_ThemesChanged();
    void Extra_Picture_UrisChanged();
    void Font_MonospaceChanged();
    void Font_SizeChanged();
    void Font_StandardChanged();
    void Global_ThemeChanged();
    void Gtk_ThemeChanged();
    void Icon_ThemeChanged();
    void OpacityChanged();
    void Qt_Scrollbar_PolicyChanged();
    void Sound_ThemeChanged();
    void Theme_AutoChanged();
    void Wallpaper_SlideshowChanged();
    void Wallpaper_UrisChanged();
private:
    void initialize(DTK_CORE_NAMESPACE::DConfig *config) {
        Q_ASSERT(!m_config.loadRelaxed());
        m_config.storeRelaxed(config);
        if (testPropertySet(0)) {
            config->setValue(QStringLiteral("Active_Colors"), QVariant::fromValue(p_Active_Colors));
        } else {
            updateValue(QStringLiteral("Active_Colors"), QVariant::fromValue(p_Active_Colors));
        }
        if (testPropertySet(1)) {
            config->setValue(QStringLiteral("All_Wallpaper_Uris"), QVariant::fromValue(p_All_Wallpaper_Uris));
        } else {
            updateValue(QStringLiteral("All_Wallpaper_Uris"), QVariant::fromValue(p_All_Wallpaper_Uris));
        }
        if (testPropertySet(2)) {
            config->setValue(QStringLiteral("Background_Uris"), QVariant::fromValue(p_Background_Uris));
        } else {
            updateValue(QStringLiteral("Background_Uris"), QVariant::fromValue(p_Background_Uris));
        }
        if (testPropertySet(3)) {
            config->setValue(QStringLiteral("Cursor_Theme"), QVariant::fromValue(p_Cursor_Theme));
        } else {
            updateValue(QStringLiteral("Cursor_Theme"), QVariant::fromValue(p_Cursor_Theme));
        }
        if (testPropertySet(4)) {
            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(5)) {
            config->setValue(QStringLiteral("Excluded_Icon_Themes"), QVariant::fromValue(p_Excluded_Icon_Themes));
        } else {
            updateValue(QStringLiteral("Excluded_Icon_Themes"), QVariant::fromValue(p_Excluded_Icon_Themes));
        }
        if (testPropertySet(6)) {
            config->setValue(QStringLiteral("Extra_Picture_Uris"), QVariant::fromValue(p_Extra_Picture_Uris));
        } else {
            updateValue(QStringLiteral("Extra_Picture_Uris"), QVariant::fromValue(p_Extra_Picture_Uris));
        }
        if (testPropertySet(7)) {
            config->setValue(QStringLiteral("Font_Monospace"), QVariant::fromValue(p_Font_Monospace));
        } else {
            updateValue(QStringLiteral("Font_Monospace"), QVariant::fromValue(p_Font_Monospace));
        }
        if (testPropertySet(8)) {
            config->setValue(QStringLiteral("Font_Size"), QVariant::fromValue(p_Font_Size));
        } else {
            updateValue(QStringLiteral("Font_Size"), QVariant::fromValue(p_Font_Size));
        }
        if (testPropertySet(9)) {
            config->setValue(QStringLiteral("Font_Standard"), QVariant::fromValue(p_Font_Standard));
        } else {
            updateValue(QStringLiteral("Font_Standard"), QVariant::fromValue(p_Font_Standard));
        }
        if (testPropertySet(10)) {
            config->setValue(QStringLiteral("Global_Theme"), QVariant::fromValue(p_Global_Theme));
        } else {
            updateValue(QStringLiteral("Global_Theme"), QVariant::fromValue(p_Global_Theme));
        }
        if (testPropertySet(11)) {
            config->setValue(QStringLiteral("Gtk_Theme"), QVariant::fromValue(p_Gtk_Theme));
        } else {
            updateValue(QStringLiteral("Gtk_Theme"), QVariant::fromValue(p_Gtk_Theme));
        }
        if (testPropertySet(12)) {
            config->setValue(QStringLiteral("Icon_Theme"), QVariant::fromValue(p_Icon_Theme));
        } else {
            updateValue(QStringLiteral("Icon_Theme"), QVariant::fromValue(p_Icon_Theme));
        }
        if (testPropertySet(13)) {
            config->setValue(QStringLiteral("Opacity"), QVariant::fromValue(p_Opacity));
        } else {
            updateValue(QStringLiteral("Opacity"), QVariant::fromValue(p_Opacity));
        }
        if (testPropertySet(14)) {
            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(15)) {
            config->setValue(QStringLiteral("Sound_Theme"), QVariant::fromValue(p_Sound_Theme));
        } else {
            updateValue(QStringLiteral("Sound_Theme"), QVariant::fromValue(p_Sound_Theme));
        }
        if (testPropertySet(16)) {
            config->setValue(QStringLiteral("Theme_Auto"), QVariant::fromValue(p_Theme_Auto));
        } else {
            updateValue(QStringLiteral("Theme_Auto"), QVariant::fromValue(p_Theme_Auto));
        }
        if (testPropertySet(17)) {
            config->setValue(QStringLiteral("Wallpaper_Slideshow"), QVariant::fromValue(p_Wallpaper_Slideshow));
        } else {
            updateValue(QStringLiteral("Wallpaper_Slideshow"), QVariant::fromValue(p_Wallpaper_Slideshow));
        }
        if (testPropertySet(18)) {
            config->setValue(QStringLiteral("Wallpaper_Uris"), QVariant::fromValue(p_Wallpaper_Uris));
        } else {
            updateValue(QStringLiteral("Wallpaper_Uris"), QVariant::fromValue(p_Wallpaper_Uris));
        }

        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("Active_Colors")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Active_Colors != newValue) {
                    p_Active_Colors = newValue;
                    Q_EMIT Active_ColorsChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("All_Wallpaper_Uris")) {
            auto newValue = qvariant_cast<QList<QVariant>>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_All_Wallpaper_Uris != newValue) {
                    p_All_Wallpaper_Uris = newValue;
                    Q_EMIT All_Wallpaper_UrisChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Background_Uris")) {
            auto newValue = qvariant_cast<QList<QVariant>>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Background_Uris != newValue) {
                    p_Background_Uris = newValue;
                    Q_EMIT Background_UrisChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Cursor_Theme")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Cursor_Theme != newValue) {
                    p_Cursor_Theme = newValue;
                    Q_EMIT Cursor_ThemeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Dtk_Size_Mode")) {
            auto newValue = qvariant_cast<double>(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("Excluded_Icon_Themes")) {
            auto newValue = qvariant_cast<QList<QVariant>>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Excluded_Icon_Themes != newValue) {
                    p_Excluded_Icon_Themes = newValue;
                    Q_EMIT Excluded_Icon_ThemesChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Extra_Picture_Uris")) {
            auto newValue = qvariant_cast<QVariantMap>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Extra_Picture_Uris != newValue) {
                    p_Extra_Picture_Uris = newValue;
                    Q_EMIT Extra_Picture_UrisChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Font_Monospace")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Font_Monospace != newValue) {
                    p_Font_Monospace = newValue;
                    Q_EMIT Font_MonospaceChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Font_Size")) {
            auto newValue = qvariant_cast<double>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Font_Size != newValue) {
                    p_Font_Size = newValue;
                    Q_EMIT Font_SizeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Font_Standard")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Font_Standard != newValue) {
                    p_Font_Standard = newValue;
                    Q_EMIT Font_StandardChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Global_Theme")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Global_Theme != newValue) {
                    p_Global_Theme = newValue;
                    Q_EMIT Global_ThemeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Gtk_Theme")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Gtk_Theme != newValue) {
                    p_Gtk_Theme = newValue;
                    Q_EMIT Gtk_ThemeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Icon_Theme")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Icon_Theme != newValue) {
                    p_Icon_Theme = newValue;
                    Q_EMIT Icon_ThemeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Opacity")) {
            auto newValue = qvariant_cast<double>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Opacity != newValue) {
                    p_Opacity = newValue;
                    Q_EMIT OpacityChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Qt_Scrollbar_Policy")) {
            auto newValue = qvariant_cast<double>(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("Sound_Theme")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Sound_Theme != newValue) {
                    p_Sound_Theme = newValue;
                    Q_EMIT Sound_ThemeChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Theme_Auto")) {
            auto newValue = qvariant_cast<bool>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Theme_Auto != newValue) {
                    p_Theme_Auto = newValue;
                    Q_EMIT Theme_AutoChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Wallpaper_Slideshow")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Wallpaper_Slideshow != newValue) {
                    p_Wallpaper_Slideshow = newValue;
                    Q_EMIT Wallpaper_SlideshowChanged();
                }
            });
            return;
        }
        if (key == QStringLiteral("Wallpaper_Uris")) {
            auto newValue = qvariant_cast<QString>(value);
            QMetaObject::invokeMethod(this, [this, newValue]() {
                if (p_Wallpaper_Uris != newValue) {
                    p_Wallpaper_Uris = newValue;
                    Q_EMIT Wallpaper_UrisChanged();
                }
            });
            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;
    QString p_Active_Colors { QStringLiteral("") };
    QList<QVariant> p_All_Wallpaper_Uris { QList<QVariant>{} };
    QList<QVariant> p_Background_Uris { QList<QVariant>{QVariant(QStringLiteral("file:///usr/share/backgrounds/default_background.jpg"))} };
    QString p_Cursor_Theme { QStringLiteral("bloom") };
    double p_Dtk_Size_Mode { 0 };
    QList<QVariant> p_Excluded_Icon_Themes { QList<QVariant>{QVariant(QStringLiteral("hicolor")), QVariant(QStringLiteral("gnome")), QVariant(QStringLiteral("Adwaita"))} };
    QVariantMap p_Extra_Picture_Uris { QVariantMap{} };
    QString p_Font_Monospace { QStringLiteral("Noto Mono") };
    double p_Font_Size { 10.5 };
    QString p_Font_Standard { QStringLiteral("Source Han Sans SC") };
    QString p_Global_Theme { QStringLiteral("nirvana.light") };
    QString p_Gtk_Theme { QStringLiteral("deepin") };
    QString p_Icon_Theme { QStringLiteral("nirvana") };
    double p_Opacity { 0.4 };
    double p_Qt_Scrollbar_Policy { 0 };
    QString p_Sound_Theme { QStringLiteral("deepin") };
    bool p_Theme_Auto { false };
    QString p_Wallpaper_Slideshow { QStringLiteral("") };
    QString p_Wallpaper_Uris { QStringLiteral("") };
    QAtomicInteger<quint32> m_propertySetStatus0 = 0;
};

#endif // ORG_DEEPIN_DDE_APPEARANCE_H
