// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #pragma once #include "qmldesignercorelib_global.h" #include #include #include namespace QmlDesigner { namespace Internal { class InternalBindingProperty; class InternalSignalHandlerProperty; class InternalSignalDeclarationProperty; class InternalVariantProperty; class InternalNodeListProperty; class InternalNodeProperty; class InternalNodeAbstractProperty; class InternalNode; using InternalNodePointer = std::shared_ptr; class QMLDESIGNERCORE_EXPORT InternalProperty { public: using Pointer = QSharedPointer; InternalProperty(); virtual ~InternalProperty(); virtual bool isValid() const; PropertyName name() const; virtual bool isBindingProperty() const; virtual bool isVariantProperty() const; virtual bool isNodeListProperty() const; virtual bool isNodeProperty() const; virtual bool isNodeAbstractProperty() const; virtual bool isSignalHandlerProperty() const; virtual bool isSignalDeclarationProperty() const; QSharedPointer toBindingProperty() const; QSharedPointer toVariantProperty() const; QSharedPointer toNodeListProperty() const; QSharedPointer toNodeProperty() const; QSharedPointer toNodeAbstractProperty() const; QSharedPointer toSignalHandlerProperty() const; QSharedPointer toSignalDeclarationProperty() const; InternalNodePointer propertyOwner() const; virtual void remove(); TypeName dynamicTypeName() const; void resetDynamicTypeName(); protected: // functions InternalProperty(const PropertyName &name, const InternalNodePointer &propertyOwner); Pointer internalPointer() const; void setInternalWeakPointer(const Pointer &pointer); void setDynamicTypeName(const TypeName &name); private: QWeakPointer m_internalPointer; PropertyName m_name; TypeName m_dynamicType; std::weak_ptr m_propertyOwner; }; } // namespace Internal } // namespace QmlDesigner