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 QABSTRACTTRANSITION_P_H
5#define QABSTRACTTRANSITION_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 <private/qobject_p.h>
19
20#include <QtCore/qlist.h>
21#include <QtCore/qsharedpointer.h>
22
23QT_REQUIRE_CONFIG(statemachine);
24
25QT_BEGIN_NAMESPACE
26
27class QAbstractState;
28class QState;
29class QStateMachine;
30
31class QAbstractTransition;
32class Q_STATEMACHINE_EXPORT QAbstractTransitionPrivate
33 : public QObjectPrivate
34{
35 Q_DECLARE_PUBLIC(QAbstractTransition)
36public:
37 QAbstractTransitionPrivate() = default;
38
39 static QAbstractTransitionPrivate *get(QAbstractTransition *q)
40 { return q->d_func(); }
41
42 bool callEventTest(QEvent *e);
43 virtual void callOnTransition(QEvent *e);
44 QState *sourceState() const;
45 QStateMachine *machine() const;
46 void emitTriggered();
47
48 QList<QPointer<QAbstractState>> targetStates;
49
50 Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QAbstractTransitionPrivate,
51 QAbstractTransition::TransitionType, transitionType,
52 QAbstractTransition::ExternalTransition);
53
54#if QT_CONFIG(animation)
55 QList<QAbstractAnimation*> animations;
56#endif
57};
58
59QT_END_NAMESPACE
60
61#endif
62

source code of qtscxml/src/statemachine/qabstracttransition_p.h