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 QEVENTTRANSITION_P_H |
5 | #define QEVENTTRANSITION_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 | |
21 | QT_REQUIRE_CONFIG(qeventtransition); |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QEventTransition; |
26 | class Q_STATEMACHINE_EXPORT QEventTransitionPrivate : public QAbstractTransitionPrivate |
27 | { |
28 | Q_DECLARE_PUBLIC(QEventTransition) |
29 | public: |
30 | QEventTransitionPrivate() = default; |
31 | ~QEventTransitionPrivate(); |
32 | |
33 | static QEventTransitionPrivate *get(QEventTransition *q) |
34 | { return q->d_func(); } |
35 | |
36 | void unregister(); |
37 | void maybeRegister(); |
38 | |
39 | void setEventSource(QObject* eventSource) |
40 | { |
41 | q_func()->setEventSource(eventSource); |
42 | } |
43 | Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QEventTransitionPrivate, QObject*, object, |
44 | &QEventTransitionPrivate::setEventSource, nullptr); |
45 | |
46 | void setEventType(QEvent::Type eventType) |
47 | { |
48 | q_func()->setEventType(eventType); |
49 | } |
50 | Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QEventTransitionPrivate, QEvent::Type, eventType, |
51 | &QEventTransitionPrivate::setEventType, QEvent::None); |
52 | bool registered = false; |
53 | }; |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif |
58 |