Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QGraphicsSceneMouseEvent Class

TheQGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.More...

Header:#include <QGraphicsSceneMouseEvent>
Since: Qt 4.2
Inherits:QGraphicsSceneEvent

Public Functions

~QGraphicsSceneMouseEvent()
Qt::MouseButtonbutton() const
QPointFbuttonDownPos(Qt::MouseButton button) const
QPointFbuttonDownScenePos(Qt::MouseButton button) const
QPointbuttonDownScreenPos(Qt::MouseButton button) const
Qt::MouseButtonsbuttons() const
QPointFlastPos() const
QPointFlastScenePos() const
QPointlastScreenPos() const
Qt::KeyboardModifiersmodifiers() const
QPointFpos() const
QPointFscenePos() const
QPointscreenPos() const

Additional Inherited Members

  • 1 property inherited fromQEvent
  • 1 static public member inherited fromQEvent

Detailed Description

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.

Member Function Documentation

QGraphicsSceneMouseEvent::~QGraphicsSceneMouseEvent()

Destroys the event.

Qt::MouseButton QGraphicsSceneMouseEvent::button() const

Returns the mouse button (if any) that caused the event.

See alsobuttons() andmodifiers().

QPointF QGraphicsSceneMouseEvent::buttonDownPos(Qt::MouseButton button) const

Returns the mouse cursor position in item coordinates where the specifiedbutton was clicked.

See alsobuttonDownScenePos(),buttonDownScreenPos(), andpos().

QPointF QGraphicsSceneMouseEvent::buttonDownScenePos(Qt::MouseButton button) const

Returns the mouse cursor position in scene coordinates where the specifiedbutton was clicked.

See alsobuttonDownPos(),buttonDownScreenPos(), andscenePos().

QPoint QGraphicsSceneMouseEvent::buttonDownScreenPos(Qt::MouseButton button) const

Returns the mouse cursor position in screen coordinates where the specifiedbutton was clicked.

See alsoscreenPos(),buttonDownPos(), andbuttonDownScenePos().

Qt::MouseButtons QGraphicsSceneMouseEvent::buttons() const

Returns the combination of mouse buttons that were pressed at the time the event was sent.

See alsobutton() andmodifiers().

QPointF QGraphicsSceneMouseEvent::lastPos() const

Returns the last recorded mouse cursor position in item coordinates.

See alsolastScenePos(),lastScreenPos(), andpos().

QPointF QGraphicsSceneMouseEvent::lastScenePos() const

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().

QPoint QGraphicsSceneMouseEvent::lastScreenPos() const

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().

Qt::KeyboardModifiers QGraphicsSceneMouseEvent::modifiers() const

Returns the keyboard modifiers in use at the time the event was sent.

See alsobuttons() andbutton().

QPointF QGraphicsSceneMouseEvent::pos() const

Returns the mouse cursor position in item coordinates.

See alsoscenePos(),screenPos(), andlastPos().

QPointF QGraphicsSceneMouseEvent::scenePos() const

Returns the mouse cursor position in scene coordinates.

See alsopos(),screenPos(), andlastScenePos().

QPoint QGraphicsSceneMouseEvent::screenPos() const

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.


[8]ページ先頭

©2009-2025 Movatter.jp