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 QGraphicsSceneDragDropEvent

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.core.QEvent
                      com.trolltech.qt.gui.QGraphicsSceneEvent
                          com.trolltech.qt.gui.QGraphicsSceneDragDropEvent

All Implemented Interfaces:
  QtJambiInterface

    public class QGraphicsSceneDragDropEvent

extends QGraphicsSceneEvent

The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framework. `QGraphicsView` inherits the drag and drop functionality provided by `QWidget`. When it receives a drag and drop event, it translates it to a QGraphicsSceneDragDropEvent.

QGraphicsSceneDragDropEvent stores events of type `GraphicsSceneDragEnter` , `GraphicsSceneDragLeave` , `GraphicsSceneDragMove` , or `GraphicsSceneDrop` .

QGraphicsSceneDragDropEvent contains the position of the mouse cursor in both item, scene, and screen coordinates; this can be retrieved with `pos()`, `scenePos()`, and `screenPos()`.

The scene sends the event to the first `QGraphicsItem` under the mouse cursor that accepts drops; a graphics item is set to accept drops with `setAcceptDrops()`.

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.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Method Summary
`void` | `acceptProposedAction()` Sets the proposed action as accepted, i.
`Qt.MouseButtons` | `buttons()` Returns a Qt.:MouseButtons value indicating which buttons were pressed on the mouse when this mouse event was generated.
`Qt.DropAction` | `dropAction()` Returns the action that was performed in this drag and drop.
`QMimeData` | `mimeData()` This function returns the MIME data of the event.
`Qt.KeyboardModifiers` | `modifiers()` Returns the keyboard modifiers that were pressed when the drag and drop event was created.
`QPointF` | `pos()` Returns the mouse position of the event relative to the view that sent the event.
`Qt.DropActions` | `possibleActions()` Returns the possible drop actions that the drag and drop can result in.
`Qt.DropAction` | `proposedAction()` Returns the drop action that is proposed, i.
`QPointF` | `scenePos()` Returns the position of the mouse in scene coordinates.
`QPoint` | `screenPos()` Returns the position of the mouse relative to the screen.
`void` | `setButtons(Qt.MouseButton[] buttons)`
`void` | `setDropAction(Qt.DropAction action)` This function lets the receiver of the drop set the drop action that was performed to `action`, which should be one of the `possible actions`.
`void` | `setModifiers(Qt.KeyboardModifier[] modifiers)`
`void` | `setPossibleActions(Qt.DropAction[] actions)`
`QWidget` | `source()` This function returns the `QGraphicsView` that created the QGraphicsSceneDragDropEvent.
`java.lang.String` | `toString()` Returns a string representation of the `this QGraphicsSceneDragDropEvent`.

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 com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

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

### acceptProposedAction

    public final void acceptProposedAction()

  Sets the proposed action as accepted, i. , the drop action is set to the proposed action. This is equal to:

          setDropAction(proposedAction());

  When using this function, one should not call `accept()`.

See also:
  `dropAction()`, `setDropAction()`, and `proposedAction()`.

### buttons

    public final Qt.MouseButtons buttons()

  Returns a Qt.:MouseButtons value indicating which buttons were pressed on the mouse when this mouse event was generated.

See also:
  Qt::MouseButtons.

### dropAction

    public final Qt.DropAction dropAction()

  Returns the action that was performed in this drag and drop. This should be set by the receiver of the drop and is returned by QDrag::start().

See also:
  `setDropAction()`, and `acceptProposedAction()`.

### mimeData

    public final QMimeData mimeData()

  This function returns the MIME data of the event.

### modifiers

    public final Qt.KeyboardModifiers modifiers()

  Returns the keyboard modifiers that were pressed when the drag and drop event was created.

See also:
  Qt::KeyboardModifiers.

### pos

    public final QPointF pos()

  Returns the mouse position of the event relative to the view that sent the event.

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

### possibleActions

    public final Qt.DropActions possibleActions()

  Returns the possible drop actions that the drag and drop can result in.

See also:
  Qt::DropActions.

### proposedAction

    public final Qt.DropAction proposedAction()

  Returns the drop action that is proposed, i. ., preferred. The action must be one of the possible actions as defined by `possibleActions()`.

See also:
  `Qt::DropAction` , and `possibleActions()`.

### scenePos

    public final QPointF scenePos()

  Returns the position of the mouse in scene coordinates.

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

### screenPos

    public final QPoint screenPos()

  Returns the position of the mouse relative to the screen.

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

### setButtons

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

### setDropAction

    public final void setDropAction(Qt.DropAction action)

  This function lets the receiver of the drop set the drop action that was performed to `action`, which should be one of the `possible actions`. Call `accept()` in stead of `acceptProposedAction()` if you use this function.

See also:
  `dropAction()`, `accept()`, and `possibleActions()`.

### setModifiers

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

### setPossibleActions

    public final void setPossibleActions(Qt.DropAction[] actions)

### source

    public final QWidget source()

  This function returns the `QGraphicsView` that created the QGraphicsSceneDragDropEvent.

### toString

    public java.lang.String toString()

  Returns a string representation of the `this QGraphicsSceneDragDropEvent`.

  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