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 QSIGNALTRANSITION_P_H
5#define QSIGNALTRANSITION_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/qabstracttransition_p.h"
19#include <QtCore/private/qproperty_p.h>
20
21QT_REQUIRE_CONFIG(statemachine);
22
23QT_BEGIN_NAMESPACE
24
25class QSignalTransition;
26class QSignalTransitionPrivate : public QAbstractTransitionPrivate
27{
28 Q_DECLARE_PUBLIC(QSignalTransition)
29public:
30 QSignalTransitionPrivate();
31
32 static QSignalTransitionPrivate *get(QSignalTransition *q)
33 { return q->d_func(); }
34
35 void unregister();
36 void maybeRegister();
37
38 void callOnTransition(QEvent *e) override;
39
40 void setSenderObject(const QObject* sender)
41 {
42 q_func()->setSenderObject(sender);
43 }
44 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QSignalTransitionPrivate, const QObject*,
45 senderObject, &QSignalTransitionPrivate::setSenderObject,
46 nullptr);
47
48 void setSignal(const QByteArray& signal)
49 {
50 q_func()->setSignal(signal);
51 }
52 Q_OBJECT_COMPAT_PROPERTY(QSignalTransitionPrivate, QByteArray,
53 signal, &QSignalTransitionPrivate::setSignal);
54 int signalIndex;
55 int originalSignalIndex;
56};
57
58QT_END_NAMESPACE
59
60#endif
61

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