1// Copyright (C) 2020 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 QBASICMOUSEEVENTTRANSITION_P_H
5#define QBASICMOUSEEVENTTRANSITION_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 <QtGui/qevent.h>
19#include <QtStateMachine/qabstracttransition.h>
20#include <QtCore/private/qglobal_p.h>
21
22QT_REQUIRE_CONFIG(qeventtransition);
23
24QT_BEGIN_NAMESPACE
25
26class QPainterPath;
27
28class QBasicMouseEventTransitionPrivate;
29class Q_AUTOTEST_EXPORT QBasicMouseEventTransition : public QAbstractTransition
30{
31 Q_OBJECT
32public:
33 QBasicMouseEventTransition(QState *sourceState = nullptr);
34 QBasicMouseEventTransition(QEvent::Type type, Qt::MouseButton button,
35 QState *sourceState = nullptr);
36 ~QBasicMouseEventTransition();
37
38 QEvent::Type eventType() const;
39 void setEventType(QEvent::Type type);
40
41 Qt::MouseButton button() const;
42 void setButton(Qt::MouseButton button);
43 QBindable<Qt::MouseButton> bindableButton();
44
45 Qt::KeyboardModifiers modifierMask() const;
46 void setModifierMask(Qt::KeyboardModifiers modifiers);
47 QBindable<Qt::KeyboardModifiers> bindableModifierMask();
48
49 QPainterPath hitTestPath() const;
50 void setHitTestPath(const QPainterPath &path);
51
52protected:
53 bool eventTest(QEvent *event) override;
54 void onTransition(QEvent *) override;
55
56private:
57 Q_DISABLE_COPY_MOVE(QBasicMouseEventTransition)
58 Q_DECLARE_PRIVATE(QBasicMouseEventTransition)
59};
60
61QT_END_NAMESPACE
62
63#endif
64

source code of qtscxml/src/statemachine/gui/qbasicmouseeventtransition_p.h