2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2015-05-20 16:35:58 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2015-05-20 16:35:58 +02:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QHash>
|
|
|
|
#include <QSharedPointer>
|
|
|
|
|
|
|
|
#include "nodeinstanceglobal.h"
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
class ObjectNodeInstance;
|
2018-07-31 17:11:50 +02:00
|
|
|
|
|
|
|
using ObjectNodeInstancePointer = QSharedPointer<ObjectNodeInstance>;
|
|
|
|
using ObjectNodeInstanceWeakPointer = QWeakPointer<ObjectNodeInstance>;
|
2015-05-20 16:35:58 +02:00
|
|
|
|
|
|
|
class NodeInstanceSignalSpy : public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit NodeInstanceSignalSpy();
|
|
|
|
|
|
|
|
void setObjectNodeInstance(const ObjectNodeInstancePointer &nodeInstance);
|
|
|
|
|
2018-05-07 14:56:23 +02:00
|
|
|
int qt_metacall(QMetaObject::Call, int, void **) override;
|
2015-05-20 16:35:58 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void registerObject(QObject *spiedObject);
|
|
|
|
void registerProperty(const QMetaProperty &metaProperty, QObject *spiedObject, const PropertyName &propertyPrefix = PropertyName());
|
|
|
|
void registerChildObject(const QMetaProperty &metaProperty, QObject *spiedObject);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int methodeOffset;
|
|
|
|
QMultiHash<int, PropertyName> m_indexPropertyHash;
|
|
|
|
QObjectList m_registeredObjectList;
|
|
|
|
ObjectNodeInstanceWeakPointer m_objectNodeInstance;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
} // namespace QmlDesigner
|