1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSCXMLDATAMODEL_P_H
5#define QSCXMLDATAMODEL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qscxmldatamodel.h"
19#include "qscxmlcompiler_p.h"
20#include <private/qobject_p.h>
21#include <private/qproperty_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QScxmlDataModelPrivate : public QObjectPrivate
26{
27 Q_DECLARE_PUBLIC(QScxmlDataModel)
28public:
29 QScxmlDataModelPrivate() = default;
30
31 static QScxmlDataModel *instantiateDataModel(DocumentModel::Scxml::DataModelType type);
32
33 void setStateMachine(QScxmlStateMachine* stateMachine)
34 {
35 q_func()->setStateMachine(stateMachine);
36 }
37
38 void emitStateMachineChanged(QScxmlStateMachine* newValue)
39 {
40 emit q_func()->stateMachineChanged(stateMachine: newValue);
41 }
42
43 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QScxmlDataModelPrivate, QScxmlStateMachine*, m_stateMachine,
44 &QScxmlDataModelPrivate::setStateMachine,
45 &QScxmlDataModelPrivate::emitStateMachineChanged, nullptr)
46};
47
48QT_END_NAMESPACE
49
50#endif // QSCXMLDATAMODEL_P_H
51

source code of qtscxml/src/scxml/qscxmldatamodel_p.h