
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.More...
| Header: | #include <QGraphicsSceneMouseEvent> |
| Since: | Qt 4.2 |
| Inherits: | QGraphicsSceneEvent |
| ~QGraphicsSceneMouseEvent() | |
| Qt::MouseButton | button() const |
| QPointF | buttonDownPos(Qt::MouseButton button) const |
| QPointF | buttonDownScenePos(Qt::MouseButton button) const |
| QPoint | buttonDownScreenPos(Qt::MouseButton button) const |
| Qt::MouseButtons | buttons() const |
| QPointF | lastPos() const |
| QPointF | lastScenePos() const |
| QPoint | lastScreenPos() const |
| Qt::KeyboardModifiers | modifiers() const |
| QPointF | pos() const |
| QPointF | scenePos() const |
| QPoint | screenPos() const |
TheQGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
When aQGraphicsView receives aQMouseEvent, it translates it to aQGraphicsSceneMouseEvent. The event is then forwarded to theQGraphicsScene associated with the view. If the event is not handled by the scene, the view may use it, e.g., for theDragMode.
In addition to containing the item, scene, and screen coordinates of the event (aspos(),scenePos(), andscreenPos()), mouse events also contain the coordinates of the previous mouse event received by the view. These can be retrieved withlastPos(),lastScreenPos(), andlastScenePos().
See alsoQGraphicsSceneContextMenuEvent,QGraphicsSceneHoverEvent,QGraphicsSceneWheelEvent, andQMouseEvent.
Destroys the event.
Returns the mouse button (if any) that caused the event.
See alsobuttons() andmodifiers().
Returns the mouse cursor position in item coordinates where the specifiedbutton was clicked.
See alsobuttonDownScenePos(),buttonDownScreenPos(), andpos().
Returns the mouse cursor position in scene coordinates where the specifiedbutton was clicked.
See alsobuttonDownPos(),buttonDownScreenPos(), andscenePos().
Returns the mouse cursor position in screen coordinates where the specifiedbutton was clicked.
See alsoscreenPos(),buttonDownPos(), andbuttonDownScenePos().
Returns the combination of mouse buttons that were pressed at the time the event was sent.
See alsobutton() andmodifiers().
Returns the last recorded mouse cursor position in item coordinates.
See alsolastScenePos(),lastScreenPos(), andpos().
Returns the last recorded mouse cursor position in scene coordinates. The last recorded position is the position of the previous mouse event received by the view that created the event.
See alsolastPos(),lastScreenPos(), andscenePos().
Returns the last recorded mouse cursor position in screen coordinates. The last recorded position is the position of the previous mouse event received by the view that created the event.
See alsolastPos(),lastScenePos(), andscreenPos().
Returns the keyboard modifiers in use at the time the event was sent.
See alsobuttons() andbutton().
Returns the mouse cursor position in item coordinates.
See alsoscenePos(),screenPos(), andlastPos().
Returns the mouse cursor position in scene coordinates.
See alsopos(),screenPos(), andlastScenePos().
Returns the mouse cursor position in screen coordinates.
See alsopos(),scenePos(), andlastScreenPos().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.