Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QGraphicsSceneMouseEvent

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QEvent
                  com.trolltech.qt.gui.QGraphicsSceneEvent
                      com.trolltech.qt.gui.QGraphicsSceneMouseEvent

All Implemented Interfaces:
  QtJambiInterface

    public class QGraphicsSceneMouseEvent

extends QGraphicsSceneEvent

The `QGraphicsSceneMouseEvent` class provides mouse events in the graphics view framework. When a `QGraphicsView` receives a `QMouseEvent`, it translates it to a `QGraphicsSceneMouseEvent`. The event is then forwarded to the `QGraphicsScene` associated with the view.

In addition to containing the item, scene, and screen coordinates of the event (as `pos()`, `scenePos()`, and `screenPos()`), mouse events also contain the coordinates of the previous mouse event received by the view. These can be retrieved with `lastPos()`, `lastScreenPos()`, and `lastScenePos()`.

See also:
  `QGraphicsSceneContextMenuEvent`, `QGraphicsSceneHoverEvent`, `QGraphicsSceneWheelEvent`, and `QMouseEvent`.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent
`QEvent.Type`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Method Summary
`Qt.MouseButton` | `button()` Returns the mouse button (if any) that caused the event.
`QPointF` | `buttonDownPos(Qt.MouseButton button)` Returns the mouse cursor position in item coordinates where the specified `button` was clicked.
`QPointF` | `buttonDownScenePos(Qt.MouseButton button)` Returns the mouse cursor position in scene coordinates where the specified `button` was clicked.
`QPoint` | `buttonDownScreenPos(Qt.MouseButton button)` Returns the mouse cursor position in screen coordinates where the specified `button` was clicked.
`Qt.MouseButtons` | `buttons()` Returns the combination of mouse buttons that were pressed at the time the event was sent.
`static QGraphicsSceneMouseEvent` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QGraphicsSceneMouseEvent instance pointed to by `nativePointer`.
`QPointF` | `lastPos()` Returns the last recorded mouse cursor position in item coordinates.
`QPointF` | `lastScenePos()` Returns the last recorded mouse cursor position in scene coordinates.
`QPoint` | `lastScreenPos()` Returns the last recorded mouse cursor position in screen coordinates.
`Qt.KeyboardModifiers` | `modifiers()` Returns the keyboard modifiers in use at the time the event was sent.
`QPointF` | `pos()` Returns the mouse cursor position in item coordinates.
`QPointF` | `scenePos()` Returns the mouse cursor position in scene coordinates.
`QPoint` | `screenPos()` Returns the mouse cursor position in screen coordinates.
`java.lang.String` | `toString()` Returns a string representation of the `this QGraphicsSceneMouseEvent`.

Methods inherited from class com.trolltech.qt.gui.QGraphicsSceneEvent
`widget`

Methods inherited from class com.trolltech.qt.core.QEvent
`accept, ignore, isAccepted, registerEventType, registerEventType, setAccepted, setT, spontaneous, t, type`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Method Detail

### button

    public final Qt.MouseButton button()

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

See also:
  `buttons()`, and `modifiers()`.

### buttonDownPos

    public final QPointF buttonDownPos(Qt.MouseButton button)

  Returns the mouse cursor position in item coordinates where the specified `button` was clicked.

See also:
  `buttonDownScenePos()`, `buttonDownScreenPos()`, and `pos()`.

### buttonDownScenePos

    public final QPointF buttonDownScenePos(Qt.MouseButton button)

  Returns the mouse cursor position in scene coordinates where the specified `button` was clicked.

See also:
  `buttonDownPos()`, `buttonDownScreenPos()`, and `scenePos()`.

### buttonDownScreenPos

    public final QPoint buttonDownScreenPos(Qt.MouseButton button)

  Returns the mouse cursor position in screen coordinates where the specified `button` was clicked.

See also:
  `screenPos()`, `buttonDownPos()`, and `buttonDownScenePos()`.

### buttons

    public final Qt.MouseButtons buttons()

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

See also:
  `button()`, and `modifiers()`.

### lastPos

    public final QPointF lastPos()

  Returns the last recorded mouse cursor position in item coordinates.

See also:
  `lastScenePos()`, `lastScreenPos()`, and `pos()`.

### lastScenePos

    public final QPointF lastScenePos()

  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 also:
  `lastPos()`, `lastScreenPos()`, and `scenePos()`.

### lastScreenPos

    public final QPoint lastScreenPos()

  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 also:
  `lastPos()`, `lastScenePos()`, and `screenPos()`.

### modifiers

    public final Qt.KeyboardModifiers modifiers()

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

See also:
  `buttons()`, and `button()`.

### pos

    public final QPointF pos()

  Returns the mouse cursor position in item coordinates.

See also:
  `scenePos()`, `screenPos()`, and `lastPos()`.

### scenePos

    public final QPointF scenePos()

  Returns the mouse cursor position in scene coordinates.

See also:
  `pos()`, `screenPos()`, and `lastScenePos()`.

### screenPos

    public final QPoint screenPos()

  Returns the mouse cursor position in screen coordinates.

See also:
  `pos()`, `scenePos()`, and `lastScreenPos()`.

### fromNativePointer

    public static QGraphicsSceneMouseEvent fromNativePointer(QNativePointer nativePointer)

  This method returns the QGraphicsSceneMouseEvent instance pointed to by `nativePointer`.

### toString

    public java.lang.String toString()

  Returns a string representation of the `this QGraphicsSceneMouseEvent`.

  Overrides:
    `toString` in class `QGraphicsSceneEvent`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD