#pragma once #include #include #include #include "node.hpp" namespace ZShell::settings { class ObjectNode : public Node { Q_OBJECT public: explicit ObjectNode( ObjectNode* fallback, QObject* parent = nullptr, bool globalOnly = false); Q_INVOKABLE void resetOption(const QString& key); [[nodiscard]] Q_INVOKABLE Descriptor descriptorFor(const QString& key) const; [[nodiscard]] QJsonValue toJson(bool sparse = true) const override; bool syncJson( const QJsonValue& json, QList& diagnostics) override; private: void quarantineKey(const QString& key, const QJsonValue& value); QSet loadFromJson( const QJsonObject& json, QList& diagnostics); void resetUnvisited(const QSet& visited); }; } // namespace ZShell::settings