nodeinstancemetaobject.h 1.08 KB
Newer Older
1
2
3
#ifndef NODEINSTANCEMETAOBJECT_H
#define NODEINSTANCEMETAOBJECT_H

4
#include <QDeclarativeContext>
5
#include <private/qdeclarativeopenmetaobject_p.h>
6
7
8
9

namespace QmlDesigner {
namespace Internal {

10
11
12
13
class ObjectNodeInstance;
typedef QSharedPointer<ObjectNodeInstance> ObjectNodeInstancePointer;
typedef QWeakPointer<ObjectNodeInstance> ObjectNodeInstanceWeakPointer;

14
class NodeInstanceMetaObject : public QDeclarativeOpenMetaObject
15
16
{
public:
Kai Koehne's avatar
Kai Koehne committed
17
18
    NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QDeclarativeEngine *engine);
    NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QObject *object, const QString &prefix, QDeclarativeEngine *engine);
19
20
21
22
    void createNewProperty(const QString &name);

protected:
    int metaCall(QMetaObject::Call _c, int _id, void **_a);
23
24
    void dynamicPropertyWritten(int);
    void notifyPropertyChange(int id);
25
26

private:
27
28
    ObjectNodeInstanceWeakPointer m_nodeInstance;
    QString m_prefix;
29
    QWeakPointer<QDeclarativeContext> m_context;
30
31
32
33
34
35
};

} // namespace Internal
} // namespace QmlDesigner

#endif // NODEINSTANCEMETAOBJECT_H