statemachine/qkeyeventtransition.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6class QKeyEventTransitionPrivate : public QEventTransitionPrivate -
7{ -
8 inline QKeyEventTransition* q_func() { return static_cast<QKeyEventTransition *>(q_ptr); } inline const QKeyEventTransition* q_func() const { return static_cast<const QKeyEventTransition *>(q_ptr); } friend class QKeyEventTransition; -
9public: -
10 QKeyEventTransitionPrivate() {} -
11 -
12 QBasicKeyEventTransition *transition; -
13}; -
14 -
15 -
16 -
17 -
18QKeyEventTransition::QKeyEventTransition(QState *sourceState) -
19 : QEventTransition(*new QKeyEventTransitionPrivate, sourceState) -
20{ -
21 QKeyEventTransitionPrivate * const d = d_func(); -
22 d->transition = new QBasicKeyEventTransition(); -
23}
executed: }
Execution Count:1
1
24 -
25 -
26 -
27 -
28 -
29QKeyEventTransition::QKeyEventTransition(QObject *object, QEvent::Type type, -
30 int key, QState *sourceState) -
31 : QEventTransition(*new QKeyEventTransitionPrivate, object, type, sourceState) -
32{ -
33 QKeyEventTransitionPrivate * const d = d_func(); -
34 d->transition = new QBasicKeyEventTransition(type, key); -
35}
executed: }
Execution Count:1
1
36 -
37 -
38 -
39 -
40QKeyEventTransition::~QKeyEventTransition() -
41{ -
42 QKeyEventTransitionPrivate * const d = d_func(); -
43 delete d->transition; -
44}
executed: }
Execution Count:2
2
45 -
46 -
47 -
48 -
49int QKeyEventTransition::key() const -
50{ -
51 const QKeyEventTransitionPrivate * const d = d_func(); -
52 return d->transition->key();
executed: return d->transition->key();
Execution Count:2
2
53} -
54 -
55 -
56 -
57 -
58void QKeyEventTransition::setKey(int key) -
59{ -
60 QKeyEventTransitionPrivate * const d = d_func(); -
61 d->transition->setKey(key); -
62}
executed: }
Execution Count:1
1
63 -
64 -
65 -
66 -
67 -
68Qt::KeyboardModifiers QKeyEventTransition::modifierMask() const -
69{ -
70 const QKeyEventTransitionPrivate * const d = d_func(); -
71 return d->transition->modifierMask();
never executed: return d->transition->modifierMask();
0
72} -
73 -
74 -
75 -
76 -
77 -
78void QKeyEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask) -
79{ -
80 QKeyEventTransitionPrivate * const d = d_func(); -
81 d->transition->setModifierMask(modifierMask); -
82}
never executed: }
0
83 -
84 -
85 -
86 -
87bool QKeyEventTransition::eventTest(QEvent *event) -
88{ -
89 const QKeyEventTransitionPrivate * const d = d_func(); -
90 if (!QEventTransition::eventTest(event))
evaluated: !QEventTransition::eventTest(event)
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:2
2-4
91 return false;
executed: return false;
Execution Count:4
4
92 QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event); -
93 d->transition->setEventType(we->event()->type()); -
94 return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
executed: return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
Execution Count:2
2
95} -
96 -
97 -
98 -
99 -
100void QKeyEventTransition::onTransition(QEvent *event) -
101{ -
102 QEventTransition::onTransition(event); -
103}
executed: }
Execution Count:2
2
104 -
105 -
106 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial