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
|
2016-01-15 14:59:14 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-09-19 15:57:22 +02:00
|
|
|
|
|
|
|
|
#include "objectnodeinstance.h"
|
|
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class QmlStateNodeInstance : public ObjectNodeInstance
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-07-31 17:11:50 +02:00
|
|
|
using Pointer = QSharedPointer<QmlStateNodeInstance>;
|
|
|
|
|
using WeakPointer = QWeakPointer<QmlStateNodeInstance>;
|
2012-09-19 15:57:22 +02:00
|
|
|
|
|
|
|
|
static Pointer create(QObject *objectToBeWrapped);
|
|
|
|
|
|
2015-06-03 15:34:34 +02:00
|
|
|
void setPropertyVariant(const PropertyName &name, const QVariant &value) override;
|
|
|
|
|
void setPropertyBinding(const PropertyName &name, const QString &expression) override;
|
2012-09-19 15:57:22 +02:00
|
|
|
|
2015-06-03 15:34:34 +02:00
|
|
|
void activateState() override;
|
|
|
|
|
void deactivateState() override;
|
2012-09-19 15:57:22 +02:00
|
|
|
|
2015-06-03 15:34:34 +02:00
|
|
|
bool updateStateVariant(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &value) override;
|
|
|
|
|
bool updateStateBinding(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QString &expression) override;
|
|
|
|
|
bool resetStateProperty(const ObjectNodeInstance::Pointer &target, const PropertyName &propertyName, const QVariant &resetValue) override;
|
2012-09-19 15:57:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2015-05-20 18:29:07 +02:00
|
|
|
QmlStateNodeInstance(QObject *object);
|
2012-09-19 15:57:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmlDesigner
|