more unfinished changes, process tab for dashboard
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <qjsonobject.h>
|
||||
#include <qobject.h>
|
||||
#include <qset.h>
|
||||
|
||||
#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<Diagnostic>& diagnostics) override;
|
||||
|
||||
private:
|
||||
void quarantineKey(const QString& key, const QJsonValue& value);
|
||||
|
||||
QSet<QString> loadFromJson(
|
||||
const QJsonObject& json, QList<Diagnostic>& diagnostics);
|
||||
void resetUnvisited(const QSet<QString>& visited);
|
||||
};
|
||||
|
||||
} // namespace ZShell::settings
|
||||
Reference in New Issue
Block a user