blob: 0fd4ba41f86a8f5b48d2427116f0ff846c66cc47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QSCXMLCPPDATAMODEL_H
#define QSCXMLCPPDATAMODEL_H
#include <QtScxml/qscxmldatamodel.h>
#define Q_SCXML_DATAMODEL \
public: \
QString evaluateToString(QScxmlExecutableContent::EvaluatorId id, bool *ok) override final; \
bool evaluateToBool(QScxmlExecutableContent::EvaluatorId id, bool *ok) override final; \
QVariant evaluateToVariant(QScxmlExecutableContent::EvaluatorId id, bool *ok) override final; \
void evaluateToVoid(QScxmlExecutableContent::EvaluatorId id, bool *ok) override final; \
private:
QT_BEGIN_NAMESPACE
class QScxmlCppDataModelPrivate;
class Q_SCXML_EXPORT QScxmlCppDataModel: public QScxmlDataModel
{
Q_OBJECT
Q_DECLARE_PRIVATE(QScxmlCppDataModel)
public:
explicit QScxmlCppDataModel(QObject *parent = nullptr);
Q_INVOKABLE bool setup(const QVariantMap &initialDataValues) override;
void evaluateAssignment(QScxmlExecutableContent::EvaluatorId id, bool *ok) override;
void evaluateInitialization(QScxmlExecutableContent::EvaluatorId id, bool *ok) override;
void evaluateForeach(QScxmlExecutableContent::EvaluatorId id, bool *ok, ForeachLoopBody *body) override;
void setScxmlEvent(const QScxmlEvent &scxmlEvent) override final;
const QScxmlEvent &scxmlEvent() const;
QVariant scxmlProperty(const QString &name) const override;
bool hasScxmlProperty(const QString &name) const override;
bool setScxmlProperty(const QString &name, const QVariant &value, const QString &context) override;
bool inState(const QString &stateName) const;
};
QT_END_NAMESPACE
#endif // QSCXMLCPPDATAMODEL_H
|