qbasicmouseeventtransition.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/statemachine/qbasicmouseeventtransition.cpp
Switch to Source codePreprocessed file
LineSourceCount
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}
never executed: end of block
0
25-
26QBasicMouseEventTransitionPrivate *QBasicMouseEventTransitionPrivate::get(QBasicMouseEventTransition *q)-
27{-
28 return
never executed: return q->d_func();
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}
never executed: end of block
0
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}
never executed: end of block
0
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
never executed: return d->eventType;
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}
never executed: end of block
0
76-
77-
78-
79-
80Qt::MouseButton QBasicMouseEventTransition::button() const-
81{-
82 const QBasicMouseEventTransitionPrivate * const d = d_func();-
83 return
never executed: return d->button;
d->button;
never executed: return d->button;
0
84}-
85-
86-
87-
88-
89void QBasicMouseEventTransition::setButton(Qt::MouseButton button)-
90{-
91 QBasicMouseEventTransitionPrivate * const d = d_func();-
92 d->button = button;-
93}
never executed: end of block
0
94-
95-
96-
97-
98-
99Qt::KeyboardModifiers QBasicMouseEventTransition::modifierMask() const-
100{-
101 const QBasicMouseEventTransitionPrivate * const d = d_func();-
102 return
never executed: return d->modifierMask;
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: end of block
0
114-
115-
116-
117-
118QPainterPath QBasicMouseEventTransition::hitTestPath() const-
119{-
120 const QBasicMouseEventTransitionPrivate * const d = d_func();-
121 return
never executed: return d->path;
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: end of block
0
132-
133-
134-
135-
136bool QBasicMouseEventTransition::eventTest(QEvent *event)-
137{-
138 const QBasicMouseEventTransitionPrivate * const d = d_func();-
139 if (event->type() == d->eventType
event->type() == d->eventTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
140 QMouseEvent *me = static_cast<QMouseEvent*>(event);-
141 return
never executed: return (me->button() == d->button) && ((me->modifiers() & d->modifierMask) == d->modifierMask) && (d->path.isEmpty() || d->path.contains(me->pos()));
(me->button() == d->button)
never executed: return (me->button() == d->button) && ((me->modifiers() & d->modifierMask) == d->modifierMask) && (d->path.isEmpty() || d->path.contains(me->pos()));
0
142 && ((me->modifiers() & d->modifierMask) == d->modifierMask)
never executed: return (me->button() == d->button) && ((me->modifiers() & d->modifierMask) == d->modifierMask) && (d->path.isEmpty() || d->path.contains(me->pos()));
0
143 && (d->path.isEmpty() || d->path.contains(me->pos()));
never executed: return (me->button() == d->button) && ((me->modifiers() & d->modifierMask) == d->modifierMask) && (d->path.isEmpty() || d->path.contains(me->pos()));
0
144 }-
145 return
never executed: return false;
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 4.3.0-BETA-master-30-08-2018-4cb69e9