com.trolltech.qt.gui
Class QGraphicsSceneMouseEvent

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QEvent
              extended by com.trolltech.qt.gui.QGraphicsSceneEvent
                  extended by 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, 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<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QGraphicsSceneMouseEvent()
          Equivalent to QGraphicsSceneMouseEvent(None).
QGraphicsSceneMouseEvent(QEvent.Type type)
          This method is used internally by Qt Jambi.
 
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 function 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.
 void setButton(Qt.MouseButton button)
          This method is used internally by Qt Jambi.
 void setButtonDownPos(Qt.MouseButton button, QPointF pos)
          This method is used internally by Qt Jambi.
 void setButtonDownScenePos(Qt.MouseButton button, QPointF pos)
          This method is used internally by Qt Jambi.
 void setButtonDownScreenPos(Qt.MouseButton button, QPoint pos)
          This method is used internally by Qt Jambi.
 void setButtons(Qt.MouseButton... buttons)
          This method is used internally by Qt Jambi.
 void setButtons(Qt.MouseButtons buttons)
          This method is used internally by Qt Jambi.
 void setLastPos(QPointF pos)
          This method is used internally by Qt Jambi.
 void setLastScenePos(QPointF pos)
          This method is used internally by Qt Jambi.
 void setLastScreenPos(QPoint pos)
          This method is used internally by Qt Jambi.
 void setModifiers(Qt.KeyboardModifier... modifiers)
          This method is used internally by Qt Jambi.
 void setModifiers(Qt.KeyboardModifiers modifiers)
          This method is used internally by Qt Jambi.
 void setPos(QPointF pos)
          This method is used internally by Qt Jambi.
 void setScenePos(QPointF pos)
          This method is used internally by Qt Jambi.
 void setScreenPos(QPoint pos)
          This method is used internally by Qt Jambi.
 
Methods inherited from class com.trolltech.qt.gui.QGraphicsSceneEvent
widget
 
Methods inherited from class com.trolltech.qt.core.QEvent
accept, ignore, isAccepted, setAccepted, setT, spontaneous, t, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, 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, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QGraphicsSceneMouseEvent

public QGraphicsSceneMouseEvent()

Equivalent to QGraphicsSceneMouseEvent(None).


QGraphicsSceneMouseEvent

public QGraphicsSceneMouseEvent(QEvent.Type type)

This method is used internally by Qt Jambi. Do not use it in your applications.

Method Detail

button

public final Qt.MouseButton button()

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

See Also:
setButton, buttons, 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:
setButtonDownPos, buttonDownScenePos, buttonDownScreenPos, 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:
setButtonDownScenePos, buttonDownPos, buttonDownScreenPos, 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:
setButtonDownScreenPos, screenPos, buttonDownPos, 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:
setButtons, button, modifiers

lastPos

public final QPointF lastPos()

Returns the last recorded mouse cursor position in item coordinates.

See Also:
setLastPos, lastScenePos, lastScreenPos, 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:
setLastScenePos, lastPos, lastScreenPos, 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:
setLastScreenPos, lastPos, lastScenePos, screenPos

modifiers

public final Qt.KeyboardModifiers modifiers()

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

See Also:
setModifiers, buttons, button

pos

public final QPointF pos()

Returns the mouse cursor position in item coordinates.

See Also:
setPos, scenePos, screenPos, lastPos

scenePos

public final QPointF scenePos()

Returns the mouse cursor position in scene coordinates.

See Also:
setScenePos, pos, screenPos, lastScenePos

screenPos

public final QPoint screenPos()

Returns the mouse cursor position in screen coordinates.

See Also:
setScreenPos, pos, scenePos, lastScreenPos

setButton

public final void setButton(Qt.MouseButton button)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
button

setButtonDownPos

public final void setButtonDownPos(Qt.MouseButton button,
                                   QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
buttonDownPos

setButtonDownScenePos

public final void setButtonDownScenePos(Qt.MouseButton button,
                                        QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
buttonDownScenePos

setButtonDownScreenPos

public final void setButtonDownScreenPos(Qt.MouseButton button,
                                         QPoint pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
buttonDownScreenPos

setButtons

public final void setButtons(Qt.MouseButton... buttons)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
buttons

setButtons

public final void setButtons(Qt.MouseButtons buttons)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
buttons

setLastPos

public final void setLastPos(QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
lastPos

setLastScenePos

public final void setLastScenePos(QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
lastScenePos

setLastScreenPos

public final void setLastScreenPos(QPoint pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
lastScreenPos

setModifiers

public final void setModifiers(Qt.KeyboardModifier... modifiers)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
modifiers

setModifiers

public final void setModifiers(Qt.KeyboardModifiers modifiers)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
modifiers

setPos

public final void setPos(QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
pos

setScenePos

public final void setScenePos(QPointF pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
scenePos

setScreenPos

public final void setScreenPos(QPoint pos)

This method is used internally by Qt Jambi. Do not use it in your applications.

See Also:
screenPos

fromNativePointer

public static QGraphicsSceneMouseEvent fromNativePointer(QNativePointer nativePointer)
This function returns the QGraphicsSceneMouseEvent instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.