Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/statemachine/qmouseeventtransition.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | class QMouseEventTransitionPrivate : public QEventTransitionPrivate | - | ||||||
7 | { | - | ||||||
8 | inline QMouseEventTransition* q_func() { return static_cast<QMouseEventTransition *>(q_ptr); } inline const QMouseEventTransition* q_func() const { return static_cast<const QMouseEventTransition *>(q_ptr); } friend class QMouseEventTransition; | - | ||||||
9 | public: | - | ||||||
10 | QMouseEventTransitionPrivate(); | - | ||||||
11 | - | |||||||
12 | QBasicMouseEventTransition *transition; | - | ||||||
13 | }; | - | ||||||
14 | - | |||||||
15 | QMouseEventTransitionPrivate::QMouseEventTransitionPrivate() | - | ||||||
16 | { | - | ||||||
17 | } | - | ||||||
18 | - | |||||||
19 | - | |||||||
20 | - | |||||||
21 | - | |||||||
22 | QMouseEventTransition::QMouseEventTransition(QState *sourceState) | - | ||||||
23 | : QEventTransition(*new QMouseEventTransitionPrivate, sourceState) | - | ||||||
24 | { | - | ||||||
25 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
26 | d->transition = new QBasicMouseEventTransition(); | - | ||||||
27 | } never executed: end of block | 0 | ||||||
28 | - | |||||||
29 | - | |||||||
30 | - | |||||||
31 | - | |||||||
32 | - | |||||||
33 | QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type, | - | ||||||
34 | Qt::MouseButton button, | - | ||||||
35 | QState *sourceState) | - | ||||||
36 | : QEventTransition(*new QMouseEventTransitionPrivate, object, type, sourceState) | - | ||||||
37 | { | - | ||||||
38 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
39 | d->transition = new QBasicMouseEventTransition(type, button); | - | ||||||
40 | } never executed: end of block | 0 | ||||||
41 | - | |||||||
42 | - | |||||||
43 | - | |||||||
44 | - | |||||||
45 | QMouseEventTransition::~QMouseEventTransition() | - | ||||||
46 | { | - | ||||||
47 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
48 | delete d->transition; | - | ||||||
49 | } never executed: end of block | 0 | ||||||
50 | - | |||||||
51 | - | |||||||
52 | - | |||||||
53 | - | |||||||
54 | Qt::MouseButton QMouseEventTransition::button() const | - | ||||||
55 | { | - | ||||||
56 | const QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
57 | return never executed: d->transition->button();return d->transition->button(); never executed: return d->transition->button(); | 0 | ||||||
58 | } | - | ||||||
59 | - | |||||||
60 | - | |||||||
61 | - | |||||||
62 | - | |||||||
63 | void QMouseEventTransition::setButton(Qt::MouseButton button) | - | ||||||
64 | { | - | ||||||
65 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
66 | d->transition->setButton(button); | - | ||||||
67 | } never executed: end of block | 0 | ||||||
68 | - | |||||||
69 | - | |||||||
70 | - | |||||||
71 | - | |||||||
72 | - | |||||||
73 | Qt::KeyboardModifiers QMouseEventTransition::modifierMask() const | - | ||||||
74 | { | - | ||||||
75 | const QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
76 | return never executed: d->transition->modifierMask();return d->transition->modifierMask(); never executed: return d->transition->modifierMask(); | 0 | ||||||
77 | } | - | ||||||
78 | - | |||||||
79 | - | |||||||
80 | - | |||||||
81 | - | |||||||
82 | - | |||||||
83 | void QMouseEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask) | - | ||||||
84 | { | - | ||||||
85 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
86 | d->transition->setModifierMask(modifierMask); | - | ||||||
87 | } never executed: end of block | 0 | ||||||
88 | - | |||||||
89 | - | |||||||
90 | - | |||||||
91 | - | |||||||
92 | QPainterPath QMouseEventTransition::hitTestPath() const | - | ||||||
93 | { | - | ||||||
94 | const QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
95 | return never executed: d->transition->hitTestPath();return d->transition->hitTestPath(); never executed: return d->transition->hitTestPath(); | 0 | ||||||
96 | } | - | ||||||
97 | void QMouseEventTransition::setHitTestPath(const QPainterPath &path) | - | ||||||
98 | { | - | ||||||
99 | QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
100 | d->transition->setHitTestPath(path); | - | ||||||
101 | } never executed: end of block | 0 | ||||||
102 | - | |||||||
103 | - | |||||||
104 | - | |||||||
105 | - | |||||||
106 | bool QMouseEventTransition::eventTest(QEvent *event) | - | ||||||
107 | { | - | ||||||
108 | const QMouseEventTransitionPrivate * const d = d_func(); | - | ||||||
109 | if (!QEventTransition::eventTest(event)
| 0 | ||||||
110 | return never executed: false;return false; never executed: return false; | 0 | ||||||
111 | QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event); | - | ||||||
112 | d->transition->setEventType(we->event()->type()); | - | ||||||
113 | return never executed: QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event()); never executed: return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event()); | 0 | ||||||
114 | } | - | ||||||
115 | - | |||||||
116 | - | |||||||
117 | - | |||||||
118 | - | |||||||
119 | void QMouseEventTransition::onTransition(QEvent *event) | - | ||||||
120 | { | - | ||||||
121 | QEventTransition::onTransition(event); | - | ||||||
122 | } never executed: end of block | 0 | ||||||
123 | - | |||||||
124 | - | |||||||
125 | - | |||||||
Switch to Source code | Preprocessed file |