aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h
blob: ef0f89e27c6bee503a05c8b406871e97b41162c1 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "objectnodeinstance.h"

QT_BEGIN_NAMESPACE
class QQmlComponent;
QT_END_NAMESPACE

namespace QmlDesigner {
namespace Internal {

class ComponentNodeInstance : public ObjectNodeInstance
{
public:
    using Pointer = QSharedPointer<ComponentNodeInstance>;
    using WeakPointer = QWeakPointer<ComponentNodeInstance>;

    ComponentNodeInstance(QQmlComponent *component);
    static Pointer create(QObject *objectToBeWrapped);

    bool hasContent() const override;

    void setNodeSource(const QString &source) override;

private: //function
    QQmlComponent *component() const;

};

} // Internal
} // QmlDesigner