graphicsview/qgraphicssceneevent.cpp

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
1/**************************************************************************** -
2** -
3** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -
4** Contact: http://www.qt-project.org/legal -
5** -
6** This file is part of the QtGui module of the Qt Toolkit. -
7** -
8** $QT_BEGIN_LICENSE:LGPL$ -
9** Commercial License Usage -
10** Licensees holding valid commercial Qt licenses may use this file in -
11** accordance with the commercial license agreement provided with the -
12** Software or, alternatively, in accordance with the terms contained in -
13** a written agreement between you and Digia. For licensing terms and -
14** conditions see http://qt.digia.com/licensing. For further information -
15** use the contact form at http://qt.digia.com/contact-us. -
16** -
17** GNU Lesser General Public License Usage -
18** Alternatively, this file may be used under the terms of the GNU Lesser -
19** General Public License version 2.1 as published by the Free Software -
20** Foundation and appearing in the file LICENSE.LGPL included in the -
21** packaging of this file. Please review the following information to -
22** ensure the GNU Lesser General Public License version 2.1 requirements -
23** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -
24** -
25** In addition, as a special exception, Digia gives you certain additional -
26** rights. These rights are described in the Digia Qt LGPL Exception -
27** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -
28** -
29** GNU General Public License Usage -
30** Alternatively, this file may be used under the terms of the GNU -
31** General Public License version 3.0 as published by the Free Software -
32** Foundation and appearing in the file LICENSE.GPL included in the -
33** packaging of this file. Please review the following information to -
34** ensure the GNU General Public License version 3.0 requirements will be -
35** met: http://www.gnu.org/copyleft/gpl.html. -
36** -
37** -
38** $QT_END_LICENSE$ -
39** -
40****************************************************************************/ -
41 -
42/*! -
43 \class QGraphicsSceneEvent -
44 \brief The QGraphicsSceneEvent class provides a base class for all -
45 graphics view related events. -
46 \since 4.2 -
47 \ingroup graphicsview-api -
48 \inmodule QtWidgets -
49 -
50 When a QGraphicsView receives Qt mouse, keyboard, and drag and -
51 drop events (QMouseEvent, QKeyEvent, QDragEvent, etc.), it -
52 translates them into instances of QGraphicsSceneEvent subclasses -
53 and forwards them to the QGraphicsScene it displays. The scene -
54 then forwards the events to the relevant items. -
55 -
56 For example, when a QGraphicsView receives a QMouseEvent of type -
57 MousePress as a response to a user click, the view sends a -
58 QGraphicsSceneMouseEvent of type GraphicsSceneMousePress to the -
59 underlying QGraphicsScene through its -
60 \l{QGraphicsScene::}{mousePressEvent()} function. The default -
61 QGraphicsScene::mousePressEvent() implementation determines which -
62 item was clicked and forwards the event to -
63 QGraphicsItem::mousePressEvent(). -
64 -
65 \omit ### Beskrive widget() \endomit -
66 -
67 Subclasses such as QGraphicsSceneMouseEvent and -
68 QGraphicsSceneContextMenuEvent provide the coordinates from the -
69 original QEvent in screen, scene, and item coordinates (see -
70 \l{QGraphicsSceneMouseEvent::}{screenPos()}, -
71 \l{QGraphicsSceneMouseEvent::}{scenePos()}, and -
72 \l{QGraphicsSceneMouseEvent::}{pos()}). The item coordinates are -
73 set by the QGraphicsScene before it forwards the event to the -
74 event to a QGraphicsItem. The mouse events also add the -
75 possibility to retrieve the coordinates from the last event -
76 received by the view (see -
77 \l{QGraphicsSceneMouseEvent::}{lastScreenPos()}, -
78 \l{QGraphicsSceneMouseEvent::}{lastScenePos()}, and -
79 \l{QGraphicsSceneMouseEvent::}{lastPos()}). -
80 -
81 \sa QEvent -
82*/ -
83 -
84/*! -
85 \class QGraphicsSceneMouseEvent -
86 \brief The QGraphicsSceneMouseEvent class provides mouse events -
87 in the graphics view framework. -
88 \since 4.2 -
89 \ingroup graphicsview-api -
90 \inmodule QtWidgets -
91 -
92 When a QGraphicsView receives a QMouseEvent, it translates it to a -
93 QGraphicsSceneMouseEvent. The event is then forwarded to the -
94 QGraphicsScene associated with the view. If the event is not -
95 handled by the scene, the view may use it, e.g., for the -
96 \l{QGraphicsView::}{DragMode}. -
97 -
98 In addition to containing the item, scene, and screen coordinates -
99 of the event (as pos(), scenePos(), and screenPos()), mouse -
100 events also contain the coordinates of the previous mouse -
101 event received by the view. These can be retrieved with -
102 lastPos(), lastScreenPos(), and lastScenePos(). -
103 -
104 \sa QGraphicsSceneContextMenuEvent, -
105 QGraphicsSceneHoverEvent, QGraphicsSceneWheelEvent, -
106 QMouseEvent -
107*/ -
108 -
109/*! -
110 \class QGraphicsSceneWheelEvent -
111 \brief The QGraphicsSceneWheelEvent class provides wheel events -
112 in the graphics view framework. -
113 \brief The QGraphicsSceneWheelEvent class provides wheel events in the -
114 graphics view framework. -
115 \since 4.2 -
116 \ingroup graphicsview-api -
117 \inmodule QtWidgets -
118 -
119 \l{QWheelEvent}{QWheelEvent}s received by a QGraphicsView are translated -
120 into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() -
121 into item, scene, and screen coordinates (pos(), scenePos(), and -
122 screenPos()). -
123 -
124 \sa QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, -
125 QGraphicsSceneHoverEvent, QWheelEvent -
126*/ -
127 -
128/*! -
129 \class QGraphicsSceneContextMenuEvent -
130 \brief The QGraphicsSceneContextMenuEvent class provides context -
131 menu events in the graphics view framework. -
132 \since 4.2 -
133 \ingroup graphicsview-api -
134 \inmodule QtWidgets -
135 -
136 A QContextMenuEvent received by a QGraphicsView is translated -
137 into a QGraphicsSceneContextMenuEvent. The -
138 QContextMenuEvent::globalPos() is translated into item, scene, and -
139 screen coordinates (pos(), scenePos(), and screenPos()). -
140 -
141 \sa QGraphicsSceneMouseEvent, QGraphicsSceneWheelEvent, -
142 QContextMenuEvent -
143*/ -
144 -
145/*! -
146 \enum QGraphicsSceneContextMenuEvent::Reason -
147 -
148 This enum describes the reason why the context event was sent. -
149 -
150 \value Mouse The mouse caused the event to be sent. On most -
151 platforms, this means the right mouse button was clicked. -
152 -
153 \value Keyboard The keyboard caused this event to be sent. On -
154 Windows and Mac OS X, this means the menu button was pressed. -
155 -
156 \value Other The event was sent by some other means (i.e. not -
157 by the mouse or keyboard). -
158*/ -
159 -
160/*! -
161 \class QGraphicsSceneHoverEvent -
162 \brief The QGraphicsSceneHoverEvent class provides hover events -
163 in the graphics view framework. -
164 \since 4.2 -
165 \ingroup graphicsview-api -
166 \inmodule QtWidgets -
167 -
168 When a QGraphicsView receives a QHoverEvent event, it translates -
169 it into QGraphicsSceneHoverEvent. The event is then forwarded to -
170 the QGraphicsScene associated with the view. -
171 -
172 \sa QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, -
173 QGraphicsSceneWheelEvent, QHoverEvent -
174*/ -
175 -
176/*! -
177 \class QGraphicsSceneHelpEvent -
178 \brief The QGraphicsSceneHelpEvent class provides events when a -
179 tooltip is requested. -
180 \since 4.2 -
181 \ingroup graphicsview-api -
182 \inmodule QtWidgets -
183 -
184 When a QGraphicsView receives a QEvent of type -
185 QEvent::ToolTip, it creates a QGraphicsSceneHelpEvent, which is -
186 forwarded to the scene. You can set a tooltip on a QGraphicsItem -
187 with \l{QGraphicsItem::}{setToolTip()}; by default QGraphicsScene -
188 displays the tooltip of the QGraphicsItem with the highest -
189 z-value (i.e, the top-most item) under the mouse position. -
190 -
191 QGraphicsView does not forward events when -
192 \l{QWhatsThis}{"What's This"} and \l{QStatusTipEvent}{status tip} -
193 help is requested. If you need this, you can reimplement -
194 QGraphicsView::viewportEvent() and forward QStatusTipEvent -
195 events and \l{QEvent}{QEvents} of type QEvent::WhatsThis to the -
196 scene. -
197 -
198 \sa QEvent -
199*/ -
200 -
201/*! -
202 \class QGraphicsSceneDragDropEvent -
203 \brief The QGraphicsSceneDragDropEvent class provides events for -
204 drag and drop in the graphics view framework. -
205 \since 4.2 -
206 \ingroup graphicsview-api -
207 \inmodule QtWidgets -
208 -
209 QGraphicsView inherits the drag and drop functionality provided -
210 by QWidget. When it receives a drag and drop event, it translates -
211 it to a QGraphicsSceneDragDropEvent. -
212 -
213 QGraphicsSceneDragDropEvent stores events of type -
214 GraphicsSceneDragEnter, GraphicsSceneDragLeave, -
215 GraphicsSceneDragMove, or GraphicsSceneDrop. -
216 -
217 QGraphicsSceneDragDropEvent contains the position of the mouse -
218 cursor in both item, scene, and screen coordinates; this can be -
219 retrieved with pos(), scenePos(), and screenPos(). -
220 -
221 The scene sends the event to the first QGraphicsItem under the -
222 mouse cursor that accepts drops; a graphics item is set to accept -
223 drops with \l{QGraphicsItem::}{setAcceptDrops()}. -
224*/ -
225 -
226/*! -
227 \class QGraphicsSceneResizeEvent -
228 \brief The QGraphicsSceneResizeEvent class provides events for widget -
229 resizing in the graphics view framework. -
230 \since 4.4 -
231 \ingroup graphicsview-api -
232 \inmodule QtWidgets -
233 -
234 A QGraphicsWidget sends itself a QGraphicsSceneResizeEvent immediately -
235 when its geometry changes. -
236 -
237 It's similar to QResizeEvent, but its sizes, oldSize() and newSize(), use -
238 QSizeF instead of QSize. -
239 -
240 \sa QGraphicsWidget::setGeometry(), QGraphicsWidget::resize() -
241*/ -
242 -
243/*! -
244 \class QGraphicsSceneMoveEvent -
245 \brief The QGraphicsSceneMoveEvent class provides events for widget -
246 moving in the graphics view framework. -
247 \since 4.4 -
248 \ingroup graphicsview-api -
249 \inmodule QtWidgets -
250 -
251 A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when -
252 its local position changes. The delivery is implemented as part of -
253 QGraphicsItem::itemChange(). -
254 -
255 It's similar to QMoveEvent, but its positions, oldPos() and newPos(), use -
256 QPointF instead of QPoint. -
257 -
258 \sa QGraphicsItem::setPos(), QGraphicsItem::ItemPositionChange, -
259 QGraphicsItem::ItemPositionHasChanged -
260*/ -
261 -
262#include "qgraphicssceneevent.h" -
263 -
264#ifndef QT_NO_GRAPHICSVIEW -
265 -
266#ifndef QT_NO_DEBUG -
267#include <QtCore/qdebug.h> -
268#endif -
269#include <QtCore/qmap.h> -
270#include <QtCore/qpoint.h> -
271#include <QtCore/qsize.h> -
272#include <QtCore/qstring.h> -
273#include "qgraphicsview.h" -
274#include "qgraphicsitem.h" -
275#include <QtWidgets/qgesture.h> -
276#include <private/qevent_p.h> -
277 -
278QT_BEGIN_NAMESPACE -
279 -
280class QGraphicsSceneEventPrivate -
281{ -
282public: -
283 inline QGraphicsSceneEventPrivate() -
284 : widget(0), -
285 q_ptr(0) -
286 { }
executed: }
Execution Count:3153
3153
287 -
288 inline virtual ~QGraphicsSceneEventPrivate() -
289 { } -
290 -
291 QWidget *widget; -
292 QGraphicsSceneEvent *q_ptr; -
293}; -
294 -
295/*! -
296 \internal -
297 -
298 Constructs a generic graphics scene event of the specified \a type. -
299*/ -
300QGraphicsSceneEvent::QGraphicsSceneEvent(Type type) -
301 : QEvent(type), d_ptr(new QGraphicsSceneEventPrivate) -
302{ -
303 d_ptr->q_ptr = this;
never executed (the execution status of this line is deduced): d_ptr->q_ptr = this;
-
304}
never executed: }
0
305 -
306/*! -
307 \internal -
308 -
309 Constructs a generic graphics scene event. -
310*/ -
311QGraphicsSceneEvent::QGraphicsSceneEvent(QGraphicsSceneEventPrivate &dd, Type type) -
312 : QEvent(type), d_ptr(&dd) -
313{ -
314 d_ptr->q_ptr = this;
executed (the execution status of this line is deduced): d_ptr->q_ptr = this;
-
315}
executed: }
Execution Count:3153
3153
316 -
317/*! -
318 Destroys the event. -
319*/ -
320QGraphicsSceneEvent::~QGraphicsSceneEvent() -
321{ -
322} -
323 -
324/*! -
325 Returns the widget where the event originated, or 0 if the event -
326 originates from another application. -
327*/ -
328QWidget *QGraphicsSceneEvent::widget() const -
329{ -
330 return d_ptr->widget;
executed: return d_ptr->widget;
Execution Count:2119
2119
331} -
332 -
333/*! -
334 \internal -
335 -
336 Sets the \a widget related to this event. -
337 -
338 \sa widget() -
339*/ -
340void QGraphicsSceneEvent::setWidget(QWidget *widget) -
341{ -
342 d_ptr->widget = widget;
executed (the execution status of this line is deduced): d_ptr->widget = widget;
-
343}
executed: }
Execution Count:651
651
344 -
345class QGraphicsSceneMouseEventPrivate : public QGraphicsSceneEventPrivate -
346{ -
347 Q_DECLARE_PUBLIC(QGraphicsSceneMouseEvent) -
348public: -
349 inline QGraphicsSceneMouseEventPrivate() -
350 : button(Qt::NoButton), -
351 buttons(0), modifiers(0) -
352 { }
executed: }
Execution Count:287
287
353 -
354 QPointF pos; -
355 QPointF scenePos; -
356 QPoint screenPos; -
357 QPointF lastPos; -
358 QPointF lastScenePos; -
359 QPoint lastScreenPos; -
360 QMap<Qt::MouseButton, QPointF> buttonDownPos; -
361 QMap<Qt::MouseButton, QPointF> buttonDownScenePos; -
362 QMap<Qt::MouseButton, QPoint> buttonDownScreenPos; -
363 Qt::MouseButton button; -
364 Qt::MouseButtons buttons; -
365 Qt::KeyboardModifiers modifiers; -
366}; -
367 -
368/*! -
369 \internal -
370 -
371 Constructs a generic graphics scene mouse event of the specified \a type. -
372*/ -
373QGraphicsSceneMouseEvent::QGraphicsSceneMouseEvent(Type type) -
374 : QGraphicsSceneEvent(*new QGraphicsSceneMouseEventPrivate, type) -
375{ -
376}
executed: }
Execution Count:287
287
377 -
378/*! -
379 Destroys the event. -
380*/ -
381QGraphicsSceneMouseEvent::~QGraphicsSceneMouseEvent() -
382{ -
383} -
384 -
385/*! -
386 Returns the mouse cursor position in item coordinates. -
387 -
388 \sa scenePos(), screenPos(), lastPos() -
389*/ -
390QPointF QGraphicsSceneMouseEvent::pos() const -
391{ -
392 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
393 return d->pos;
executed: return d->pos;
Execution Count:262
262
394} -
395 -
396/*! -
397 \internal -
398*/ -
399void QGraphicsSceneMouseEvent::setPos(const QPointF &pos) -
400{ -
401 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
402 d->pos = pos;
executed (the execution status of this line is deduced): d->pos = pos;
-
403}
executed: }
Execution Count:212
212
404 -
405/*! -
406 Returns the mouse cursor position in scene coordinates. -
407 -
408 \sa pos(), screenPos(), lastScenePos() -
409*/ -
410QPointF QGraphicsSceneMouseEvent::scenePos() const -
411{ -
412 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
413 return d->scenePos;
executed: return d->scenePos;
Execution Count:2854
2854
414} -
415 -
416/*! -
417 \internal -
418*/ -
419void QGraphicsSceneMouseEvent::setScenePos(const QPointF &pos) -
420{ -
421 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
422 d->scenePos = pos;
executed (the execution status of this line is deduced): d->scenePos = pos;
-
423}
executed: }
Execution Count:286
286
424 -
425/*! -
426 Returns the mouse cursor position in screen coordinates. -
427 -
428 \sa pos(), scenePos(), lastScreenPos() -
429*/ -
430QPoint QGraphicsSceneMouseEvent::screenPos() const -
431{ -
432 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
433 return d->screenPos;
executed: return d->screenPos;
Execution Count:1528
1528
434} -
435 -
436/*! -
437 \internal -
438*/ -
439void QGraphicsSceneMouseEvent::setScreenPos(const QPoint &pos) -
440{ -
441 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
442 d->screenPos = pos;
executed (the execution status of this line is deduced): d->screenPos = pos;
-
443}
executed: }
Execution Count:286
286
444 -
445/*! -
446 Returns the mouse cursor position in item coordinates where the specified -
447 \a button was clicked. -
448 -
449 \sa buttonDownScenePos(), buttonDownScreenPos(), pos() -
450*/ -
451QPointF QGraphicsSceneMouseEvent::buttonDownPos(Qt::MouseButton button) const -
452{ -
453 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
454 return d->buttonDownPos.value(button);
executed: return d->buttonDownPos.value(button);
Execution Count:2
2
455} -
456 -
457/*! -
458 \internal -
459*/ -
460void QGraphicsSceneMouseEvent::setButtonDownPos(Qt::MouseButton button, const QPointF &pos) -
461{ -
462 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
463 d->buttonDownPos.insert(button, pos);
executed (the execution status of this line is deduced): d->buttonDownPos.insert(button, pos);
-
464}
executed: }
Execution Count:1057
1057
465 -
466/*! -
467 Returns the mouse cursor position in scene coordinates where the -
468 specified \a button was clicked. -
469 -
470 \sa buttonDownPos(), buttonDownScreenPos(), scenePos() -
471*/ -
472QPointF QGraphicsSceneMouseEvent::buttonDownScenePos(Qt::MouseButton button) const -
473{ -
474 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
475 return d->buttonDownScenePos.value(button);
executed: return d->buttonDownScenePos.value(button);
Execution Count:1
1
476} -
477 -
478/*! -
479 \internal -
480*/ -
481void QGraphicsSceneMouseEvent::setButtonDownScenePos(Qt::MouseButton button, const QPointF &pos) -
482{ -
483 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
484 d->buttonDownScenePos.insert(button, pos);
executed (the execution status of this line is deduced): d->buttonDownScenePos.insert(button, pos);
-
485}
executed: }
Execution Count:1340
1340
486 -
487/*! -
488 Returns the mouse cursor position in screen coordinates where the -
489 specified \a button was clicked. -
490 -
491 \sa screenPos(), buttonDownPos(), buttonDownScenePos() -
492*/ -
493QPoint QGraphicsSceneMouseEvent::buttonDownScreenPos(Qt::MouseButton button) const -
494{ -
495 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
496 return d->buttonDownScreenPos.value(button);
executed: return d->buttonDownScreenPos.value(button);
Execution Count:2
2
497} -
498 -
499/*! -
500 \internal -
501*/ -
502void QGraphicsSceneMouseEvent::setButtonDownScreenPos(Qt::MouseButton button, const QPoint &pos) -
503{ -
504 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
505 d->buttonDownScreenPos.insert(button, pos);
executed (the execution status of this line is deduced): d->buttonDownScreenPos.insert(button, pos);
-
506}
executed: }
Execution Count:1342
1342
507 -
508/*! -
509 Returns the last recorded mouse cursor position in item -
510 coordinates. -
511 -
512 \sa lastScenePos(), lastScreenPos(), pos() -
513*/ -
514QPointF QGraphicsSceneMouseEvent::lastPos() const -
515{ -
516 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
517 return d->lastPos;
executed: return d->lastPos;
Execution Count:262
262
518} -
519 -
520/*! -
521 \internal -
522*/ -
523void QGraphicsSceneMouseEvent::setLastPos(const QPointF &pos) -
524{ -
525 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
526 d->lastPos = pos;
executed (the execution status of this line is deduced): d->lastPos = pos;
-
527}
executed: }
Execution Count:212
212
528 -
529/*! -
530 Returns the last recorded mouse cursor position in scene -
531 coordinates. The last recorded position is the position of -
532 the previous mouse event received by the view that created -
533 the event. -
534 -
535 \sa lastPos(), lastScreenPos(), scenePos() -
536*/ -
537QPointF QGraphicsSceneMouseEvent::lastScenePos() const -
538{ -
539 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
540 return d->lastScenePos;
executed: return d->lastScenePos;
Execution Count:473
473
541} -
542 -
543/*! -
544 \internal -
545*/ -
546void QGraphicsSceneMouseEvent::setLastScenePos(const QPointF &pos) -
547{ -
548 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
549 d->lastScenePos = pos;
executed (the execution status of this line is deduced): d->lastScenePos = pos;
-
550}
executed: }
Execution Count:286
286
551 -
552/*! -
553 Returns the last recorded mouse cursor position in screen -
554 coordinates. The last recorded position is the position of -
555 the previous mouse event received by the view that created -
556 the event. -
557 -
558 \sa lastPos(), lastScenePos(), screenPos() -
559*/ -
560QPoint QGraphicsSceneMouseEvent::lastScreenPos() const -
561{ -
562 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
563 return d->lastScreenPos;
executed: return d->lastScreenPos;
Execution Count:262
262
564} -
565 -
566/*! -
567 \internal -
568*/ -
569void QGraphicsSceneMouseEvent::setLastScreenPos(const QPoint &pos) -
570{ -
571 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
572 d->lastScreenPos = pos;
executed (the execution status of this line is deduced): d->lastScreenPos = pos;
-
573}
executed: }
Execution Count:286
286
574 -
575/*! -
576 Returns the combination of mouse buttons that were pressed at the -
577 time the event was sent. -
578 -
579 \sa button(), modifiers() -
580*/ -
581Qt::MouseButtons QGraphicsSceneMouseEvent::buttons() const -
582{ -
583 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
584 return d->buttons;
executed: return d->buttons;
Execution Count:896
896
585} -
586 -
587/*! -
588 \internal -
589*/ -
590void QGraphicsSceneMouseEvent::setButtons(Qt::MouseButtons buttons) -
591{ -
592 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
593 d->buttons = buttons;
executed (the execution status of this line is deduced): d->buttons = buttons;
-
594}
executed: }
Execution Count:286
286
595 -
596/*! -
597 Returns the mouse button (if any) that caused the event. -
598 -
599 \sa buttons(), modifiers() -
600*/ -
601Qt::MouseButton QGraphicsSceneMouseEvent::button() const -
602{ -
603 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
604 return d->button;
executed: return d->button;
Execution Count:420
420
605} -
606 -
607/*! -
608 \internal -
609*/ -
610void QGraphicsSceneMouseEvent::setButton(Qt::MouseButton button) -
611{ -
612 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
613 d->button = button;
executed (the execution status of this line is deduced): d->button = button;
-
614}
executed: }
Execution Count:286
286
615 -
616/*! -
617 Returns the keyboard modifiers in use at the time the event was -
618 sent. -
619 -
620 \sa buttons(), button() -
621*/ -
622Qt::KeyboardModifiers QGraphicsSceneMouseEvent::modifiers() const -
623{ -
624 Q_D(const QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneMouseEventPrivate * const d = d_func();
-
625 return d->modifiers;
executed: return d->modifiers;
Execution Count:262
262
626} -
627 -
628/*! -
629 \internal -
630*/ -
631void QGraphicsSceneMouseEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
632{ -
633 Q_D(QGraphicsSceneMouseEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMouseEventPrivate * const d = d_func();
-
634 d->modifiers = modifiers;
executed (the execution status of this line is deduced): d->modifiers = modifiers;
-
635}
executed: }
Execution Count:286
286
636 -
637class QGraphicsSceneWheelEventPrivate : public QGraphicsSceneEventPrivate -
638{ -
639 Q_DECLARE_PUBLIC(QGraphicsSceneWheelEvent) -
640public: -
641 inline QGraphicsSceneWheelEventPrivate() -
642 : buttons(0), modifiers(0), delta(0), orientation(Qt::Horizontal) -
643 { }
executed: }
Execution Count:2
2
644 -
645 QPointF pos; -
646 QPointF scenePos; -
647 QPoint screenPos; -
648 Qt::MouseButtons buttons; -
649 Qt::KeyboardModifiers modifiers; -
650 int delta; -
651 Qt::Orientation orientation; -
652}; -
653 -
654/*! -
655 \internal -
656 -
657 Constructs a QGraphicsSceneWheelEvent of type \a type, which -
658 is always QEvent::GraphicsSceneWheel. -
659*/ -
660QGraphicsSceneWheelEvent::QGraphicsSceneWheelEvent(Type type) -
661 : QGraphicsSceneEvent(*new QGraphicsSceneWheelEventPrivate, type) -
662{ -
663}
executed: }
Execution Count:2
2
664 -
665/*! -
666 Destroys the QGraphicsSceneWheelEvent. -
667*/ -
668QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent() -
669{ -
670} -
671 -
672/*! -
673 Returns the position of the cursor in item coordinates when the -
674 wheel event occurred. -
675 -
676 \sa scenePos(), screenPos() -
677*/ -
678QPointF QGraphicsSceneWheelEvent::pos() const -
679{ -
680 Q_D(const QGraphicsSceneWheelEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
681 return d->pos;
never executed: return d->pos;
0
682} -
683 -
684/*! -
685 \internal -
686*/ -
687void QGraphicsSceneWheelEvent::setPos(const QPointF &pos) -
688{ -
689 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
690 d->pos = pos;
executed (the execution status of this line is deduced): d->pos = pos;
-
691}
executed: }
Execution Count:2
2
692 -
693/*! -
694 Returns the position of the cursor in scene coordinates when the wheel -
695 event occurred. -
696 -
697 \sa pos(), screenPos() -
698*/ -
699QPointF QGraphicsSceneWheelEvent::scenePos() const -
700{ -
701 Q_D(const QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
702 return d->scenePos;
executed: return d->scenePos;
Execution Count:4
4
703} -
704 -
705/*! -
706 \internal -
707*/ -
708void QGraphicsSceneWheelEvent::setScenePos(const QPointF &pos) -
709{ -
710 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
711 d->scenePos = pos;
executed (the execution status of this line is deduced): d->scenePos = pos;
-
712}
executed: }
Execution Count:2
2
713 -
714/*! -
715 Returns the position of the cursor in screen coordinates when the wheel -
716 event occurred. -
717 -
718 \sa pos(), scenePos() -
719*/ -
720QPoint QGraphicsSceneWheelEvent::screenPos() const -
721{ -
722 Q_D(const QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
723 return d->screenPos;
executed: return d->screenPos;
Execution Count:2
2
724} -
725 -
726/*! -
727 \internal -
728*/ -
729void QGraphicsSceneWheelEvent::setScreenPos(const QPoint &pos) -
730{ -
731 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
732 d->screenPos = pos;
executed (the execution status of this line is deduced): d->screenPos = pos;
-
733}
executed: }
Execution Count:2
2
734 -
735/*! -
736 Returns the mouse buttons that were pressed when the wheel event occurred. -
737 -
738 \sa modifiers() -
739*/ -
740Qt::MouseButtons QGraphicsSceneWheelEvent::buttons() const -
741{ -
742 Q_D(const QGraphicsSceneWheelEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
743 return d->buttons;
never executed: return d->buttons;
0
744} -
745 -
746/*! -
747 \internal -
748*/ -
749void QGraphicsSceneWheelEvent::setButtons(Qt::MouseButtons buttons) -
750{ -
751 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
752 d->buttons = buttons;
executed (the execution status of this line is deduced): d->buttons = buttons;
-
753}
executed: }
Execution Count:2
2
754 -
755/*! -
756 Returns the keyboard modifiers that were active when the wheel event -
757 occurred. -
758 -
759 \sa buttons() -
760*/ -
761Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers() const -
762{ -
763 Q_D(const QGraphicsSceneWheelEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
764 return d->modifiers;
never executed: return d->modifiers;
0
765} -
766 -
767/*! -
768 \internal -
769*/ -
770void QGraphicsSceneWheelEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
771{ -
772 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
773 d->modifiers = modifiers;
executed (the execution status of this line is deduced): d->modifiers = modifiers;
-
774}
executed: }
Execution Count:2
2
775 -
776/*! -
777 Returns the distance that the wheel is rotated, in eighths (1/8s) -
778 of a degree. A positive value indicates that the wheel was -
779 rotated forwards away from the user; a negative value indicates -
780 that the wheel was rotated backwards toward the user. -
781 -
782 Most mouse types work in steps of 15 degrees, in which case the delta -
783 value is a multiple of 120 (== 15 * 8). -
784*/ -
785int QGraphicsSceneWheelEvent::delta() const -
786{ -
787 Q_D(const QGraphicsSceneWheelEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
788 return d->delta;
never executed: return d->delta;
0
789} -
790 -
791/*! -
792 \internal -
793*/ -
794void QGraphicsSceneWheelEvent::setDelta(int delta) -
795{ -
796 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
797 d->delta = delta;
executed (the execution status of this line is deduced): d->delta = delta;
-
798}
executed: }
Execution Count:2
2
799 -
800/*! -
801 Returns the wheel orientation. -
802*/ -
803Qt::Orientation QGraphicsSceneWheelEvent::orientation() const -
804{ -
805 Q_D(const QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneWheelEventPrivate * const d = d_func();
-
806 return d->orientation;
executed: return d->orientation;
Execution Count:2
2
807} -
808 -
809/*! -
810 \internal -
811*/ -
812void QGraphicsSceneWheelEvent::setOrientation(Qt::Orientation orientation) -
813{ -
814 Q_D(QGraphicsSceneWheelEvent);
executed (the execution status of this line is deduced): QGraphicsSceneWheelEventPrivate * const d = d_func();
-
815 d->orientation = orientation;
executed (the execution status of this line is deduced): d->orientation = orientation;
-
816}
executed: }
Execution Count:2
2
817 -
818class QGraphicsSceneContextMenuEventPrivate : public QGraphicsSceneEventPrivate -
819{ -
820 Q_DECLARE_PUBLIC(QGraphicsSceneContextMenuEvent) -
821 public: -
822 inline QGraphicsSceneContextMenuEventPrivate() -
823 : modifiers(0), reason(QGraphicsSceneContextMenuEvent::Other) -
824 { }
executed: }
Execution Count:100
100
825 -
826 QPointF pos; -
827 QPointF scenePos; -
828 QPoint screenPos; -
829 Qt::KeyboardModifiers modifiers; -
830 QGraphicsSceneContextMenuEvent::Reason reason; -
831}; -
832 -
833/*! -
834 \internal -
835 -
836 Constructs a graphics scene context menu event of the specified \a type. -
837*/ -
838QGraphicsSceneContextMenuEvent::QGraphicsSceneContextMenuEvent(Type type) -
839 : QGraphicsSceneEvent(*new QGraphicsSceneContextMenuEventPrivate, type) -
840{ -
841}
executed: }
Execution Count:100
100
842 -
843/*! -
844 Destroys the event. -
845*/ -
846QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent() -
847{ -
848} -
849 -
850/*! -
851 Returns the position of the mouse cursor in item coordinates at the moment -
852 the context menu was requested. -
853 -
854 \sa scenePos(), screenPos() -
855*/ -
856QPointF QGraphicsSceneContextMenuEvent::pos() const -
857{ -
858 Q_D(const QGraphicsSceneContextMenuEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
859 return d->pos;
never executed: return d->pos;
0
860} -
861 -
862/*! -
863 \fn void QGraphicsSceneContextMenuEvent::setPos(const QPointF &point) -
864 \internal -
865 -
866 Sets the position associated with the context menu to the given \a point -
867 in item coordinates. -
868*/ -
869void QGraphicsSceneContextMenuEvent::setPos(const QPointF &pos) -
870{ -
871 Q_D(QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
872 d->pos = pos;
executed (the execution status of this line is deduced): d->pos = pos;
-
873}
executed: }
Execution Count:100
100
874 -
875/*! -
876 Returns the position of the mouse cursor in scene coordinates at the moment the -
877 the context menu was requested. -
878 -
879 \sa pos(), screenPos() -
880*/ -
881QPointF QGraphicsSceneContextMenuEvent::scenePos() const -
882{ -
883 Q_D(const QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
884 return d->scenePos;
executed: return d->scenePos;
Execution Count:200
200
885} -
886 -
887/*! -
888 \fn void QGraphicsSceneContextMenuEvent::setScenePos(const QPointF &point) -
889 \internal -
890 -
891 Sets the position associated with the context menu to the given \a point -
892 in scene coordinates. -
893*/ -
894void QGraphicsSceneContextMenuEvent::setScenePos(const QPointF &pos) -
895{ -
896 Q_D(QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
897 d->scenePos = pos;
executed (the execution status of this line is deduced): d->scenePos = pos;
-
898}
executed: }
Execution Count:100
100
899 -
900/*! -
901 Returns the position of the mouse cursor in screen coordinates at the moment the -
902 the context menu was requested. -
903 -
904 \sa pos(), scenePos() -
905*/ -
906QPoint QGraphicsSceneContextMenuEvent::screenPos() const -
907{ -
908 Q_D(const QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
909 return d->screenPos;
executed: return d->screenPos;
Execution Count:100
100
910} -
911 -
912/*! -
913 \fn void QGraphicsSceneContextMenuEvent::setScreenPos(const QPoint &point) -
914 \internal -
915 -
916 Sets the position associated with the context menu to the given \a point -
917 in screen coordinates. -
918*/ -
919void QGraphicsSceneContextMenuEvent::setScreenPos(const QPoint &pos) -
920{ -
921 Q_D(QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
922 d->screenPos = pos;
executed (the execution status of this line is deduced): d->screenPos = pos;
-
923}
executed: }
Execution Count:100
100
924 -
925/*! -
926 Returns the keyboard modifiers in use when the context menu was requested. -
927*/ -
928Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers() const -
929{ -
930 Q_D(const QGraphicsSceneContextMenuEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
931 return d->modifiers;
never executed: return d->modifiers;
0
932} -
933 -
934/*! -
935 \internal -
936 -
937 Sets the keyboard modifiers associated with the context menu to the \a -
938 modifiers specified. -
939*/ -
940void QGraphicsSceneContextMenuEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
941{ -
942 Q_D(QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
943 d->modifiers = modifiers;
executed (the execution status of this line is deduced): d->modifiers = modifiers;
-
944}
executed: }
Execution Count:100
100
945 -
946/*! -
947 Returns the reason for the context menu event. -
948 -
949 \sa QGraphicsSceneContextMenuEvent::Reason -
950*/ -
951QGraphicsSceneContextMenuEvent::Reason QGraphicsSceneContextMenuEvent::reason() const -
952{ -
953 Q_D(const QGraphicsSceneContextMenuEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
954 return d->reason;
never executed: return d->reason;
0
955} -
956 -
957/*! -
958 \internal -
959 Sets the reason for the context menu event to \a reason. -
960 -
961 \sa reason() -
962*/ -
963void QGraphicsSceneContextMenuEvent::setReason(Reason reason) -
964{ -
965 Q_D(QGraphicsSceneContextMenuEvent);
executed (the execution status of this line is deduced): QGraphicsSceneContextMenuEventPrivate * const d = d_func();
-
966 d->reason = reason;
executed (the execution status of this line is deduced): d->reason = reason;
-
967}
executed: }
Execution Count:100
100
968 -
969class QGraphicsSceneHoverEventPrivate : public QGraphicsSceneEventPrivate -
970{ -
971public: -
972 QPointF pos; -
973 QPointF scenePos; -
974 QPoint screenPos; -
975 QPointF lastPos; -
976 QPointF lastScenePos; -
977 QPoint lastScreenPos; -
978 Qt::KeyboardModifiers modifiers; -
979}; -
980 -
981/*! -
982 \internal -
983 -
984 Constructs a graphics scene hover event of the specified \a type. -
985*/ -
986QGraphicsSceneHoverEvent::QGraphicsSceneHoverEvent(Type type) -
987 : QGraphicsSceneEvent(*new QGraphicsSceneHoverEventPrivate, type) -
988{ -
989}
executed: }
Execution Count:265
265
990 -
991/*! -
992 Destroys the event. -
993*/ -
994QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent() -
995{ -
996} -
997 -
998/*! -
999 Returns the position of the mouse cursor in item coordinates at the moment -
1000 the hover event was sent. -
1001 -
1002 \sa scenePos(), screenPos() -
1003*/ -
1004QPointF QGraphicsSceneHoverEvent::pos() const -
1005{ -
1006 Q_D(const QGraphicsSceneHoverEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1007 return d->pos;
never executed: return d->pos;
0
1008} -
1009 -
1010/*! -
1011 \fn void QGraphicsSceneHoverEvent::setPos(const QPointF &point) -
1012 \internal -
1013 -
1014 Sets the position associated with the hover event to the given \a point in -
1015 item coordinates. -
1016*/ -
1017void QGraphicsSceneHoverEvent::setPos(const QPointF &pos) -
1018{ -
1019 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1020 d->pos = pos;
executed (the execution status of this line is deduced): d->pos = pos;
-
1021}
executed: }
Execution Count:261
261
1022 -
1023/*! -
1024 Returns the position of the mouse cursor in scene coordinates at the -
1025 moment the hover event was sent. -
1026 -
1027 \sa pos(), screenPos() -
1028*/ -
1029QPointF QGraphicsSceneHoverEvent::scenePos() const -
1030{ -
1031 Q_D(const QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1032 return d->scenePos;
executed: return d->scenePos;
Execution Count:2
2
1033} -
1034 -
1035/*! -
1036 \fn void QGraphicsSceneHoverEvent::setScenePos(const QPointF &point) -
1037 \internal -
1038 -
1039 Sets the position associated with the hover event to the given \a point in -
1040 scene coordinates. -
1041*/ -
1042void QGraphicsSceneHoverEvent::setScenePos(const QPointF &pos) -
1043{ -
1044 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1045 d->scenePos = pos;
executed (the execution status of this line is deduced): d->scenePos = pos;
-
1046}
executed: }
Execution Count:265
265
1047 -
1048/*! -
1049 Returns the position of the mouse cursor in screen coordinates at the -
1050 moment the hover event was sent. -
1051 -
1052 \sa pos(), scenePos() -
1053*/ -
1054QPoint QGraphicsSceneHoverEvent::screenPos() const -
1055{ -
1056 Q_D(const QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1057 return d->screenPos;
executed: return d->screenPos;
Execution Count:2
2
1058} -
1059 -
1060/*! -
1061 \fn void QGraphicsSceneHoverEvent::setScreenPos(const QPoint &point) -
1062 \internal -
1063 -
1064 Sets the position associated with the hover event to the given \a point in -
1065 screen coordinates. -
1066*/ -
1067void QGraphicsSceneHoverEvent::setScreenPos(const QPoint &pos) -
1068{ -
1069 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1070 d->screenPos = pos;
executed (the execution status of this line is deduced): d->screenPos = pos;
-
1071}
executed: }
Execution Count:263
263
1072 -
1073/*! -
1074 \since 4.4 -
1075 -
1076 Returns the last recorded mouse cursor position in item coordinates. -
1077 -
1078 \sa lastScenePos(), lastScreenPos(), pos() -
1079*/ -
1080QPointF QGraphicsSceneHoverEvent::lastPos() const -
1081{ -
1082 Q_D(const QGraphicsSceneHoverEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1083 return d->lastPos;
never executed: return d->lastPos;
0
1084} -
1085 -
1086/*! -
1087 \internal -
1088*/ -
1089void QGraphicsSceneHoverEvent::setLastPos(const QPointF &pos) -
1090{ -
1091 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1092 d->lastPos = pos;
executed (the execution status of this line is deduced): d->lastPos = pos;
-
1093}
executed: }
Execution Count:261
261
1094 -
1095/*! -
1096 \since 4.4 -
1097 -
1098 Returns the last recorded, the scene coordinates of the previous mouse or -
1099 hover event received by the view, that created the event mouse cursor -
1100 position in scene coordinates. -
1101 -
1102 \sa lastPos(), lastScreenPos(), scenePos() -
1103*/ -
1104QPointF QGraphicsSceneHoverEvent::lastScenePos() const -
1105{ -
1106 Q_D(const QGraphicsSceneHoverEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1107 return d->lastScenePos;
never executed: return d->lastScenePos;
0
1108} -
1109 -
1110/*! -
1111 \internal -
1112*/ -
1113void QGraphicsSceneHoverEvent::setLastScenePos(const QPointF &pos) -
1114{ -
1115 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1116 d->lastScenePos = pos;
executed (the execution status of this line is deduced): d->lastScenePos = pos;
-
1117}
executed: }
Execution Count:263
263
1118 -
1119/*! -
1120 \since 4.4 -
1121 -
1122 Returns the last recorded mouse cursor position in screen coordinates. The -
1123 last recorded position is the position of the previous mouse or hover -
1124 event received by the view that created the event. -
1125 -
1126 \sa lastPos(), lastScenePos(), screenPos() -
1127*/ -
1128QPoint QGraphicsSceneHoverEvent::lastScreenPos() const -
1129{ -
1130 Q_D(const QGraphicsSceneHoverEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1131 return d->lastScreenPos;
never executed: return d->lastScreenPos;
0
1132} -
1133 -
1134/*! -
1135 \internal -
1136*/ -
1137void QGraphicsSceneHoverEvent::setLastScreenPos(const QPoint &pos) -
1138{ -
1139 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1140 d->lastScreenPos = pos;
executed (the execution status of this line is deduced): d->lastScreenPos = pos;
-
1141}
executed: }
Execution Count:263
263
1142 -
1143/*! -
1144 \since 4.4 -
1145 -
1146 Returns the keyboard modifiers at the moment the hover event was sent. -
1147*/ -
1148Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers() const -
1149{ -
1150 Q_D(const QGraphicsSceneHoverEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1151 return d->modifiers;
never executed: return d->modifiers;
0
1152} -
1153 -
1154/*! -
1155 \fn void QGraphicsSceneHoverEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
1156 \internal -
1157 -
1158 Sets the modifiers for the current hover event to \a modifiers. -
1159*/ -
1160void QGraphicsSceneHoverEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
1161{ -
1162 Q_D(QGraphicsSceneHoverEvent);
executed (the execution status of this line is deduced): QGraphicsSceneHoverEventPrivate * const d = d_func();
-
1163 d->modifiers = modifiers;
executed (the execution status of this line is deduced): d->modifiers = modifiers;
-
1164}
executed: }
Execution Count:261
261
1165 -
1166class QGraphicsSceneHelpEventPrivate : public QGraphicsSceneEventPrivate -
1167{ -
1168public: -
1169 QPointF scenePos; -
1170 QPoint screenPos; -
1171}; -
1172 -
1173/*! -
1174 \internal -
1175 -
1176 Constructs a graphics scene help event of the specified \a type. -
1177*/ -
1178QGraphicsSceneHelpEvent::QGraphicsSceneHelpEvent(Type type) -
1179 : QGraphicsSceneEvent(*new QGraphicsSceneHelpEventPrivate, type) -
1180{ -
1181}
never executed: }
0
1182 -
1183/*! -
1184 Destroys the event. -
1185*/ -
1186QGraphicsSceneHelpEvent::~QGraphicsSceneHelpEvent() -
1187{ -
1188} -
1189 -
1190/*! -
1191 Returns the position of the mouse cursor in scene coordinates at the -
1192 moment the help event was sent. -
1193 -
1194 \sa screenPos() -
1195*/ -
1196QPointF QGraphicsSceneHelpEvent::scenePos() const -
1197{ -
1198 Q_D(const QGraphicsSceneHelpEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHelpEventPrivate * const d = d_func();
-
1199 return d->scenePos;
never executed: return d->scenePos;
0
1200} -
1201 -
1202/*! -
1203 \fn void QGraphicsSceneHelpEvent::setScenePos(const QPointF &point) -
1204 \internal -
1205 -
1206 Sets the position associated with the context menu to the given \a point -
1207 in scene coordinates. -
1208*/ -
1209void QGraphicsSceneHelpEvent::setScenePos(const QPointF &pos) -
1210{ -
1211 Q_D(QGraphicsSceneHelpEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneHelpEventPrivate * const d = d_func();
-
1212 d->scenePos = pos;
never executed (the execution status of this line is deduced): d->scenePos = pos;
-
1213}
never executed: }
0
1214 -
1215/*! -
1216 Returns the position of the mouse cursor in screen coordinates at the -
1217 moment the help event was sent. -
1218 -
1219 \sa scenePos() -
1220*/ -
1221QPoint QGraphicsSceneHelpEvent::screenPos() const -
1222{ -
1223 Q_D(const QGraphicsSceneHelpEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneHelpEventPrivate * const d = d_func();
-
1224 return d->screenPos;
never executed: return d->screenPos;
0
1225} -
1226 -
1227/*! -
1228 \fn void QGraphicsSceneHelpEvent::setScreenPos(const QPoint &point) -
1229 \internal -
1230 -
1231 Sets the position associated with the context menu to the given \a point -
1232 in screen coordinates. -
1233*/ -
1234void QGraphicsSceneHelpEvent::setScreenPos(const QPoint &pos) -
1235{ -
1236 Q_D(QGraphicsSceneHelpEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneHelpEventPrivate * const d = d_func();
-
1237 d->screenPos = pos;
never executed (the execution status of this line is deduced): d->screenPos = pos;
-
1238}
never executed: }
0
1239 -
1240class QGraphicsSceneDragDropEventPrivate : public QGraphicsSceneEventPrivate -
1241{ -
1242 Q_DECLARE_PUBLIC(QGraphicsSceneDragDropEvent) -
1243public: -
1244 inline QGraphicsSceneDragDropEventPrivate() -
1245 : source(0), mimeData(0) -
1246 { }
never executed: }
0
1247 -
1248 QPointF pos; -
1249 QPointF scenePos; -
1250 QPoint screenPos; -
1251 Qt::MouseButtons buttons; -
1252 Qt::KeyboardModifiers modifiers; -
1253 Qt::DropActions possibleActions; -
1254 Qt::DropAction proposedAction; -
1255 Qt::DropAction dropAction; -
1256 QWidget *source; -
1257 const QMimeData *mimeData; -
1258}; -
1259 -
1260/*! -
1261 \internal -
1262 -
1263 Constructs a new QGraphicsSceneDragDropEvent of the -
1264 specified \a type. The type can be either -
1265 QEvent::GraphicsSceneDragEnter, QEvent::GraphicsSceneDragLeave, -
1266 QEvent::GraphicsSceneDragMove, or QEvent::GraphicsSceneDrop. -
1267*/ -
1268QGraphicsSceneDragDropEvent::QGraphicsSceneDragDropEvent(Type type) -
1269 : QGraphicsSceneEvent(*new QGraphicsSceneDragDropEventPrivate, type) -
1270{ -
1271}
never executed: }
0
1272 -
1273/*! -
1274 Destroys the object. -
1275*/ -
1276QGraphicsSceneDragDropEvent::~QGraphicsSceneDragDropEvent() -
1277{ -
1278} -
1279 -
1280/*! -
1281 Returns the mouse position of the event relative to the -
1282 view that sent the event. -
1283 -
1284 \sa QGraphicsView, screenPos(), scenePos() -
1285*/ -
1286QPointF QGraphicsSceneDragDropEvent::pos() const -
1287{ -
1288 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1289 return d->pos;
never executed: return d->pos;
0
1290} -
1291 -
1292/*! -
1293 \internal -
1294 Sets the position of the mouse to \a pos; this should be -
1295 relative to the widget that generated the event, which normally -
1296 is a QGraphicsView. -
1297 -
1298 \sa pos(), setScenePos(), setScreenPos() -
1299*/ -
1300 -
1301void QGraphicsSceneDragDropEvent::setPos(const QPointF &pos) -
1302{ -
1303 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1304 d->pos = pos;
never executed (the execution status of this line is deduced): d->pos = pos;
-
1305}
never executed: }
0
1306 -
1307/*! -
1308 Returns the position of the mouse in scene coordinates. -
1309 -
1310 \sa pos(), screenPos() -
1311*/ -
1312QPointF QGraphicsSceneDragDropEvent::scenePos() const -
1313{ -
1314 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1315 return d->scenePos;
never executed: return d->scenePos;
0
1316} -
1317 -
1318/*! -
1319 \internal -
1320 Sets the scene position of the mouse to \a pos. -
1321 -
1322 \sa scenePos(), setScreenPos(), setPos() -
1323*/ -
1324void QGraphicsSceneDragDropEvent::setScenePos(const QPointF &pos) -
1325{ -
1326 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1327 d->scenePos = pos;
never executed (the execution status of this line is deduced): d->scenePos = pos;
-
1328}
never executed: }
0
1329 -
1330/*! -
1331 Returns the position of the mouse relative to the screen. -
1332 -
1333 \sa pos(), scenePos() -
1334*/ -
1335QPoint QGraphicsSceneDragDropEvent::screenPos() const -
1336{ -
1337 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1338 return d->screenPos;
never executed: return d->screenPos;
0
1339} -
1340 -
1341/*! -
1342 \internal -
1343 Sets the mouse position relative to the screen to \a pos. -
1344 -
1345 \sa screenPos(), setScenePos(), setPos() -
1346*/ -
1347void QGraphicsSceneDragDropEvent::setScreenPos(const QPoint &pos) -
1348{ -
1349 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1350 d->screenPos = pos;
never executed (the execution status of this line is deduced): d->screenPos = pos;
-
1351}
never executed: }
0
1352 -
1353/*! -
1354 Returns a Qt::MouseButtons value indicating which buttons -
1355 were pressed on the mouse when this mouse event was -
1356 generated. -
1357 -
1358 \sa Qt::MouseButtons -
1359*/ -
1360Qt::MouseButtons QGraphicsSceneDragDropEvent::buttons() const -
1361{ -
1362 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1363 return d->buttons;
never executed: return d->buttons;
0
1364} -
1365 -
1366/*! -
1367 \internal -
1368 Sets the mouse buttons that were pressed when the event was -
1369 created to \a buttons. -
1370 -
1371 \sa Qt::MouseButtons, buttons() -
1372*/ -
1373void QGraphicsSceneDragDropEvent::setButtons(Qt::MouseButtons buttons) -
1374{ -
1375 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1376 d->buttons = buttons;
never executed (the execution status of this line is deduced): d->buttons = buttons;
-
1377}
never executed: }
0
1378 -
1379/*! -
1380 Returns the keyboard modifiers that were pressed when the drag -
1381 and drop event was created. -
1382 -
1383 \sa Qt::KeyboardModifiers -
1384*/ -
1385Qt::KeyboardModifiers QGraphicsSceneDragDropEvent::modifiers() const -
1386{ -
1387 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1388 return d->modifiers;
never executed: return d->modifiers;
0
1389} -
1390 -
1391/*! -
1392 \internal -
1393 Sets the keyboard modifiers that were pressed when the event -
1394 was created to \a modifiers. -
1395 -
1396 \sa Qt::KeyboardModifiers, modifiers() -
1397*/ -
1398 -
1399void QGraphicsSceneDragDropEvent::setModifiers(Qt::KeyboardModifiers modifiers) -
1400{ -
1401 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1402 d->modifiers = modifiers;
never executed (the execution status of this line is deduced): d->modifiers = modifiers;
-
1403}
never executed: }
0
1404 -
1405/*! -
1406 Returns the possible drop actions that the drag and -
1407 drop can result in. -
1408 -
1409 \sa Qt::DropActions -
1410*/ -
1411 -
1412Qt::DropActions QGraphicsSceneDragDropEvent::possibleActions() const -
1413{ -
1414 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1415 return d->possibleActions;
never executed: return d->possibleActions;
0
1416} -
1417 -
1418/*! -
1419 \internal -
1420 Sets the possible drop actions that the drag can -
1421 result in to \a actions. -
1422 -
1423 \sa Qt::DropActions, possibleActions() -
1424*/ -
1425void QGraphicsSceneDragDropEvent::setPossibleActions(Qt::DropActions actions) -
1426{ -
1427 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1428 d->possibleActions = actions;
never executed (the execution status of this line is deduced): d->possibleActions = actions;
-
1429}
never executed: }
0
1430 -
1431/*! -
1432 Returns the drop action that is proposed, i.e., preferred. -
1433 The action must be one of the possible actions as defined by -
1434 \c possibleActions(). -
1435 -
1436 \sa Qt::DropAction, possibleActions() -
1437*/ -
1438 -
1439Qt::DropAction QGraphicsSceneDragDropEvent::proposedAction() const -
1440{ -
1441 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1442 return d->proposedAction;
never executed: return d->proposedAction;
0
1443} -
1444 -
1445/*! -
1446 \internal -
1447 Sets the proposed action to \a action. The proposed action -
1448 is a Qt::DropAction that is one of the possible actions as -
1449 given by \c possibleActions(). -
1450 -
1451 \sa proposedAction(), Qt::DropAction, possibleActions() -
1452*/ -
1453 -
1454void QGraphicsSceneDragDropEvent::setProposedAction(Qt::DropAction action) -
1455{ -
1456 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1457 d->proposedAction = action;
never executed (the execution status of this line is deduced): d->proposedAction = action;
-
1458}
never executed: }
0
1459 -
1460/*! -
1461 Sets the proposed action as accepted, i.e, the drop action -
1462 is set to the proposed action. This is equal to: -
1463 -
1464 \snippet code/src_gui_graphicsview_qgraphicssceneevent.cpp 0 -
1465 -
1466 When using this function, one should not call \c accept(). -
1467 -
1468 \sa dropAction(), setDropAction(), proposedAction() -
1469*/ -
1470 -
1471void QGraphicsSceneDragDropEvent::acceptProposedAction() -
1472{ -
1473 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1474 d->dropAction = d->proposedAction;
never executed (the execution status of this line is deduced): d->dropAction = d->proposedAction;
-
1475}
never executed: }
0
1476 -
1477/*! -
1478 Returns the action that was performed in this drag and drop. -
1479 This should be set by the receiver of the drop and is -
1480 returned by QDrag::exec(). -
1481 -
1482 \sa setDropAction(), acceptProposedAction() -
1483*/ -
1484 -
1485Qt::DropAction QGraphicsSceneDragDropEvent::dropAction() const -
1486{ -
1487 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1488 return d->dropAction;
never executed: return d->dropAction;
0
1489} -
1490 -
1491/*! -
1492 This function lets the receiver of the drop set the drop -
1493 action that was performed to \a action, which should be one -
1494 of the -
1495 \l{QGraphicsSceneDragDropEvent::possibleActions()}{possible -
1496 actions}. Call \c accept() in stead of \c -
1497 acceptProposedAction() if you use this function. -
1498 -
1499 \sa dropAction(), accept(), possibleActions() -
1500*/ -
1501void QGraphicsSceneDragDropEvent::setDropAction(Qt::DropAction action) -
1502{ -
1503 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1504 d->dropAction = action;
never executed (the execution status of this line is deduced): d->dropAction = action;
-
1505}
never executed: }
0
1506 -
1507/*! -
1508 This function returns the QGraphicsView that created the -
1509 QGraphicsSceneDragDropEvent. -
1510*/ -
1511QWidget *QGraphicsSceneDragDropEvent::source() const -
1512{ -
1513 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1514 return d->source;
never executed: return d->source;
0
1515} -
1516 -
1517/*! -
1518 \internal -
1519 This function set the source widget, i.e., the widget that -
1520 created the drop event, to \a source. -
1521*/ -
1522void QGraphicsSceneDragDropEvent::setSource(QWidget *source) -
1523{ -
1524 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1525 d->source = source;
never executed (the execution status of this line is deduced): d->source = source;
-
1526}
never executed: }
0
1527 -
1528/*! -
1529 This function returns the MIME data of the event. -
1530*/ -
1531const QMimeData *QGraphicsSceneDragDropEvent::mimeData() const -
1532{ -
1533 Q_D(const QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1534 return d->mimeData;
never executed: return d->mimeData;
0
1535} -
1536 -
1537/*! -
1538 \internal -
1539 This function sets the MIME data for the event. -
1540*/ -
1541void QGraphicsSceneDragDropEvent::setMimeData(const QMimeData *data) -
1542{ -
1543 Q_D(QGraphicsSceneDragDropEvent);
never executed (the execution status of this line is deduced): QGraphicsSceneDragDropEventPrivate * const d = d_func();
-
1544 d->mimeData = data;
never executed (the execution status of this line is deduced): d->mimeData = data;
-
1545}
never executed: }
0
1546 -
1547class QGraphicsSceneResizeEventPrivate : public QGraphicsSceneEventPrivate -
1548{ -
1549 Q_DECLARE_PUBLIC(QGraphicsSceneResizeEvent) -
1550public: -
1551 inline QGraphicsSceneResizeEventPrivate() -
1552 { } -
1553 -
1554 QSizeF oldSize; -
1555 QSizeF newSize; -
1556}; -
1557 -
1558/*! -
1559 Constructs a QGraphicsSceneResizeEvent. -
1560*/ -
1561QGraphicsSceneResizeEvent::QGraphicsSceneResizeEvent() -
1562 : QGraphicsSceneEvent(*new QGraphicsSceneResizeEventPrivate, QEvent::GraphicsSceneResize) -
1563{ -
1564}
executed: }
Execution Count:1746
1746
1565 -
1566/*! -
1567 Destroys the QGraphicsSceneResizeEvent. -
1568*/ -
1569QGraphicsSceneResizeEvent::~QGraphicsSceneResizeEvent() -
1570{ -
1571} -
1572 -
1573/*! -
1574 Returns the old size (i.e., the size immediately before the widget was -
1575 resized). -
1576 -
1577 \sa newSize(), QGraphicsWidget::resize() -
1578*/ -
1579QSizeF QGraphicsSceneResizeEvent::oldSize() const -
1580{ -
1581 Q_D(const QGraphicsSceneResizeEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneResizeEventPrivate * const d = d_func();
-
1582 return d->oldSize;
never executed: return d->oldSize;
0
1583} -
1584 -
1585/*! -
1586 \internal -
1587*/ -
1588void QGraphicsSceneResizeEvent::setOldSize(const QSizeF &size) -
1589{ -
1590 Q_D(QGraphicsSceneResizeEvent);
executed (the execution status of this line is deduced): QGraphicsSceneResizeEventPrivate * const d = d_func();
-
1591 d->oldSize = size;
executed (the execution status of this line is deduced): d->oldSize = size;
-
1592}
executed: }
Execution Count:1746
1746
1593 -
1594/*! -
1595 Returns the new size (i.e., the current size). -
1596 -
1597 \sa oldSize(), QGraphicsWidget::resize() -
1598*/ -
1599QSizeF QGraphicsSceneResizeEvent::newSize() const -
1600{ -
1601 Q_D(const QGraphicsSceneResizeEvent);
executed (the execution status of this line is deduced): const QGraphicsSceneResizeEventPrivate * const d = d_func();
-
1602 return d->newSize;
executed: return d->newSize;
Execution Count:3
3
1603} -
1604 -
1605/*! -
1606 \internal -
1607*/ -
1608void QGraphicsSceneResizeEvent::setNewSize(const QSizeF &size) -
1609{ -
1610 Q_D(QGraphicsSceneResizeEvent);
executed (the execution status of this line is deduced): QGraphicsSceneResizeEventPrivate * const d = d_func();
-
1611 d->newSize = size;
executed (the execution status of this line is deduced): d->newSize = size;
-
1612}
executed: }
Execution Count:1746
1746
1613 -
1614class QGraphicsSceneMoveEventPrivate : public QGraphicsSceneEventPrivate -
1615{ -
1616 Q_DECLARE_PUBLIC(QGraphicsSceneMoveEvent) -
1617public: -
1618 inline QGraphicsSceneMoveEventPrivate() -
1619 { } -
1620 -
1621 QPointF oldPos; -
1622 QPointF newPos; -
1623}; -
1624 -
1625/*! -
1626 Constructs a QGraphicsSceneMoveEvent. -
1627*/ -
1628QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent() -
1629 : QGraphicsSceneEvent(*new QGraphicsSceneMoveEventPrivate, QEvent::GraphicsSceneMove) -
1630{ -
1631}
executed: }
Execution Count:753
753
1632 -
1633/*! -
1634 Destroys the QGraphicsSceneMoveEvent. -
1635*/ -
1636QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent() -
1637{ -
1638} -
1639 -
1640/*! -
1641 Returns the old position (i.e., the position immediately before the widget -
1642 was moved). -
1643 -
1644 \sa newPos(), QGraphicsItem::setPos() -
1645*/ -
1646QPointF QGraphicsSceneMoveEvent::oldPos() const -
1647{ -
1648 Q_D(const QGraphicsSceneMoveEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneMoveEventPrivate * const d = d_func();
-
1649 return d->oldPos;
never executed: return d->oldPos;
0
1650} -
1651 -
1652/*! -
1653 \internal -
1654*/ -
1655void QGraphicsSceneMoveEvent::setOldPos(const QPointF &pos) -
1656{ -
1657 Q_D(QGraphicsSceneMoveEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMoveEventPrivate * const d = d_func();
-
1658 d->oldPos = pos;
executed (the execution status of this line is deduced): d->oldPos = pos;
-
1659}
executed: }
Execution Count:753
753
1660 -
1661/*! -
1662 Returns the new position (i.e., the current position). -
1663 -
1664 \sa oldPos(), QGraphicsItem::setPos() -
1665*/ -
1666QPointF QGraphicsSceneMoveEvent::newPos() const -
1667{ -
1668 Q_D(const QGraphicsSceneMoveEvent);
never executed (the execution status of this line is deduced): const QGraphicsSceneMoveEventPrivate * const d = d_func();
-
1669 return d->newPos;
never executed: return d->newPos;
0
1670} -
1671 -
1672/*! -
1673 \internal -
1674*/ -
1675void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos) -
1676{ -
1677 Q_D(QGraphicsSceneMoveEvent);
executed (the execution status of this line is deduced): QGraphicsSceneMoveEventPrivate * const d = d_func();
-
1678 d->newPos = pos;
executed (the execution status of this line is deduced): d->newPos = pos;
-
1679}
executed: }
Execution Count:753
753
1680 -
1681QT_END_NAMESPACE -
1682 -
1683#endif // QT_NO_GRAPHICSVIEW -
1684 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial