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

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