Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/statemachine/qkeyeventtransition.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | class 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; | - | ||||||
9 | public: | - | ||||||
10 | QKeyEventTransitionPrivate() {} | - | ||||||
11 | - | |||||||
12 | QBasicKeyEventTransition *transition; | - | ||||||
13 | }; | - | ||||||
14 | - | |||||||
15 | - | |||||||
16 | - | |||||||
17 | - | |||||||
18 | QKeyEventTransition::QKeyEventTransition(QState *sourceState) | - | ||||||
19 | : QEventTransition(*new QKeyEventTransitionPrivate, sourceState) | - | ||||||
20 | { | - | ||||||
21 | QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
22 | d->transition = new QBasicKeyEventTransition(); | - | ||||||
23 | } never executed: end of block | 0 | ||||||
24 | - | |||||||
25 | - | |||||||
26 | - | |||||||
27 | - | |||||||
28 | - | |||||||
29 | QKeyEventTransition::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 | } never executed: end of block | 0 | ||||||
36 | - | |||||||
37 | - | |||||||
38 | - | |||||||
39 | - | |||||||
40 | QKeyEventTransition::~QKeyEventTransition() | - | ||||||
41 | { | - | ||||||
42 | QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
43 | delete d->transition; | - | ||||||
44 | } never executed: end of block | 0 | ||||||
45 | - | |||||||
46 | - | |||||||
47 | - | |||||||
48 | - | |||||||
49 | int QKeyEventTransition::key() const | - | ||||||
50 | { | - | ||||||
51 | const QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
52 | return never executed: d->transition->key();return d->transition->key(); never executed: return d->transition->key(); | 0 | ||||||
53 | } | - | ||||||
54 | - | |||||||
55 | - | |||||||
56 | - | |||||||
57 | - | |||||||
58 | void QKeyEventTransition::setKey(int key) | - | ||||||
59 | { | - | ||||||
60 | QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
61 | d->transition->setKey(key); | - | ||||||
62 | } never executed: end of block | 0 | ||||||
63 | - | |||||||
64 | - | |||||||
65 | - | |||||||
66 | - | |||||||
67 | - | |||||||
68 | Qt::KeyboardModifiers QKeyEventTransition::modifierMask() const | - | ||||||
69 | { | - | ||||||
70 | const QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
71 | return never executed: d->transition->modifierMask();return d->transition->modifierMask(); never executed: return d->transition->modifierMask(); | 0 | ||||||
72 | } | - | ||||||
73 | - | |||||||
74 | - | |||||||
75 | - | |||||||
76 | - | |||||||
77 | - | |||||||
78 | void QKeyEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask) | - | ||||||
79 | { | - | ||||||
80 | QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
81 | d->transition->setModifierMask(modifierMask); | - | ||||||
82 | } never executed: end of block | 0 | ||||||
83 | - | |||||||
84 | - | |||||||
85 | - | |||||||
86 | - | |||||||
87 | bool QKeyEventTransition::eventTest(QEvent *event) | - | ||||||
88 | { | - | ||||||
89 | const QKeyEventTransitionPrivate * const d = d_func(); | - | ||||||
90 | if (!QEventTransition::eventTest(event)
| 0 | ||||||
91 | return never executed: false;return false; never executed: return false; | 0 | ||||||
92 | QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event); | - | ||||||
93 | d->transition->setEventType(we->event()->type()); | - | ||||||
94 | 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 | ||||||
95 | } | - | ||||||
96 | - | |||||||
97 | - | |||||||
98 | - | |||||||
99 | - | |||||||
100 | void QKeyEventTransition::onTransition(QEvent *event) | - | ||||||
101 | { | - | ||||||
102 | QEventTransition::onTransition(event); | - | ||||||
103 | } never executed: end of block | 0 | ||||||
104 | - | |||||||
105 | - | |||||||
106 | - | |||||||
Switch to Source code | Preprocessed file |