statemachine/qbasicmouseeventtransition.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6class QBasicMouseEventTransitionPrivate : public QAbstractTransitionPrivate -
7{ -
8 inline QBasicMouseEventTransition* q_func() { return static_cast<QBasicMouseEventTransition *>(q_ptr); } inline const QBasicMouseEventTransition* q_func() const { return static_cast<const QBasicMouseEventTransition *>(q_ptr); } friend class QBasicMouseEventTransition; -
9public: -
10 QBasicMouseEventTransitionPrivate(); -
11 -
12 static QBasicMouseEventTransitionPrivate *get(QBasicMouseEventTransition *q); -
13 -
14 QEvent::Type eventType; -
15 Qt::MouseButton button; -
16 Qt::KeyboardModifiers modifierMask; -
17 QPainterPath path; -
18}; -
19 -
20QBasicMouseEventTransitionPrivate::QBasicMouseEventTransitionPrivate() -
21{ -
22 eventType = QEvent::None; -
23 button = Qt::NoButton; -
24}
executed: }
Execution Count:2
2
25 -
26QBasicMouseEventTransitionPrivate *QBasicMouseEventTransitionPrivate::get(QBasicMouseEventTransition *q) -
27{ -
28 return q->d_func();
never executed: return q->d_func();
0
29} -
30 -
31 -
32 -
33 -
34QBasicMouseEventTransition::QBasicMouseEventTransition(QState *sourceState) -
35 : QAbstractTransition(*new QBasicMouseEventTransitionPrivate, sourceState) -
36{ -
37}
executed: }
Execution Count:1
1
38 -
39 -
40 -
41 -
42QBasicMouseEventTransition::QBasicMouseEventTransition(QEvent::Type type, -
43 Qt::MouseButton button, -
44 QState *sourceState) -
45 : QAbstractTransition(*new QBasicMouseEventTransitionPrivate, sourceState) -
46{ -
47 QBasicMouseEventTransitionPrivate * const d = d_func(); -
48 d->eventType = type; -
49 d->button = button; -
50}
executed: }
Execution Count:1
1
51 -
52 -
53 -
54 -
55QBasicMouseEventTransition::~QBasicMouseEventTransition() -
56{ -
57} -
58 -
59 -
60 -
61 -
62QEvent::Type QBasicMouseEventTransition::eventType() const -
63{ -
64 const QBasicMouseEventTransitionPrivate * const d = d_func(); -
65 return d->eventType;
never executed: return d->eventType;
0
66} -
67 -
68 -
69 -
70 -
71void QBasicMouseEventTransition::setEventType(QEvent::Type type) -
72{ -
73 QBasicMouseEventTransitionPrivate * const d = d_func(); -
74 d->eventType = type; -
75}
executed: }
Execution Count:5
5
76 -
77 -
78 -
79 -
80Qt::MouseButton QBasicMouseEventTransition::button() const -
81{ -
82 const QBasicMouseEventTransitionPrivate * const d = d_func(); -
83 return d->button;
executed: return d->button;
Execution Count:2
2
84} -
85 -
86 -
87 -
88 -
89void QBasicMouseEventTransition::setButton(Qt::MouseButton button) -
90{ -
91 QBasicMouseEventTransitionPrivate * const d = d_func(); -
92 d->button = button; -
93}
executed: }
Execution Count:1
1
94 -
95 -
96 -
97 -
98 -
99Qt::KeyboardModifiers QBasicMouseEventTransition::modifierMask() const -
100{ -
101 const QBasicMouseEventTransitionPrivate * const d = d_func(); -
102 return d->modifierMask;
never executed: return d->modifierMask;
0
103} -
104 -
105 -
106 -
107 -
108 -
109void QBasicMouseEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask) -
110{ -
111 QBasicMouseEventTransitionPrivate * const d = d_func(); -
112 d->modifierMask = modifierMask; -
113}
never executed: }
0
114 -
115 -
116 -
117 -
118QPainterPath QBasicMouseEventTransition::hitTestPath() const -
119{ -
120 const QBasicMouseEventTransitionPrivate * const d = d_func(); -
121 return d->path;
never executed: return d->path;
0
122} -
123 -
124 -
125 -
126 -
127void QBasicMouseEventTransition::setHitTestPath(const QPainterPath &path) -
128{ -
129 QBasicMouseEventTransitionPrivate * const d = d_func(); -
130 d->path = path; -
131}
never executed: }
0
132 -
133 -
134 -
135 -
136bool QBasicMouseEventTransition::eventTest(QEvent *event) -
137{ -
138 const QBasicMouseEventTransitionPrivate * const d = d_func(); -
139 if (event->type() == d->eventType) {
partially evaluated: event->type() == d->eventType
TRUEFALSE
yes
Evaluation Count:5
no
Evaluation Count:0
0-5
140 QMouseEvent *me = static_cast<QMouseEvent*>(event); -
141 return (me->button() == d->button) 5
142 && ((me->modifiers() & d->modifierMask) == d->modifierMask) 5
143 && (d->path.isEmpty() || d->path.contains(me->pos()));
executed: return (me->button() == d->button) && ((me->modifiers() & d->modifierMask) == d->modifierMask) && (d->path.isEmpty() || d->path.contains(me->pos()));
Execution Count:5
5
144 } -
145 return false;
never executed: return false;
0
146} -
147 -
148 -
149 -
150 -
151void QBasicMouseEventTransition::onTransition(QEvent *) -
152{ -
153} -
154 -
155 -
156 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial