blob: b9cbd8b39b0afd6c3cb2ff117ef38b7e254187c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "qmlobjectnode.h"
#include <QJsonObject>
#include <QByteArrayList>
namespace QmlDesigner {
class Component;
class ModelNode;
class NodeDumper
{
public:
NodeDumper(const QByteArrayList &lineage, const ModelNode &node);
virtual ~NodeDumper() = default;
virtual int priority() const = 0;
virtual bool isExportable() const = 0;
virtual QJsonObject json(Component& component) const = 0;
const QByteArrayList& lineage() const { return m_lineage; }
const QmlObjectNode& objectNode() const { return m_objectNode; }
QVariant propertyValue(const PropertyName &name) const;
QString uuid() const;
protected:
const ModelNode &m_node;
private:
QmlObjectNode m_objectNode;
QByteArrayList m_lineage;
};
}
|