|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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
public class QGraphicsSceneDragDropEvent
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.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)
This is an overloaded method provided for convenience. |
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)
This is an overloaded method provided for convenience. |
void |
setPossibleActions(Qt.DropAction[] actions)
This is an overloaded method provided for convenience. |
QWidget |
source()
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent. |
java.lang.String |
toString()
|
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 |
---|
public final void acceptProposedAction()
setDropAction(proposedAction());When using this function, one should not call accept().
dropAction()
, setDropAction()
, and proposedAction()
.
public final Qt.MouseButtons buttons()
public final Qt.DropAction dropAction()
setDropAction()
, and acceptProposedAction()
.
public final QMimeData mimeData()
public final Qt.KeyboardModifiers modifiers()
public final QPointF pos()
QGraphicsView
, screenPos()
, and scenePos()
.
public final Qt.DropActions possibleActions()
public final Qt.DropAction proposedAction()
Qt::DropAction
, and possibleActions()
.
public final QPointF scenePos()
pos()
, and screenPos()
.
public final QPoint screenPos()
pos()
, and scenePos()
.
public final void setButtons(Qt.MouseButton[] buttons)
public final void setDropAction(Qt.DropAction action)
possible actions
. Call accept() in stead of acceptProposedAction() if you use this function. dropAction()
, accept()
, and possibleActions()
.
public final void setModifiers(Qt.KeyboardModifier[] modifiers)
public final void setPossibleActions(Qt.DropAction[] actions)
public final QWidget source()
QGraphicsView
that created the QGraphicsSceneDragDropEvent.
public java.lang.String toString()
toString
in class QGraphicsSceneEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |