|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.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 | |
---|---|
QGraphicsSceneDragDropEvent()
Equivalent to QGraphicsSceneDragDropEvent(None). |
|
QGraphicsSceneDragDropEvent(QEvent.Type type)
|
Method Summary | |
---|---|
void |
acceptProposedAction()
Sets the proposed action as accepted, i.e, the drop action is set to the proposed action. |
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. |
static QGraphicsSceneDragDropEvent |
fromNativePointer(QNativePointer nativePointer)
This function returns the QGraphicsSceneDragDropEvent instance pointed to by nativePointer |
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.e., preferred. |
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 |
setButtons(Qt.MouseButtons 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 |
setModifiers(Qt.KeyboardModifiers modifiers)
|
void |
setPos(QPointF pos)
|
void |
setPossibleActions(Qt.DropAction... actions)
|
void |
setPossibleActions(Qt.DropActions actions)
|
void |
setProposedAction(Qt.DropAction action)
|
void |
setScenePos(QPointF pos)
|
void |
setScreenPos(QPoint pos)
|
QWidget |
source()
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent. |
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 |
---|
public QGraphicsSceneDragDropEvent()
Equivalent to QGraphicsSceneDragDropEvent(None).
public QGraphicsSceneDragDropEvent(QEvent.Type type)
Method Detail |
---|
public final void acceptProposedAction()
Sets the proposed action as accepted, i.e, the drop action is set to the proposed action. This is equal to:
setDropAction(proposedAction());
When using this function, one should not call accept().
public final Qt.MouseButtons buttons()
Returns a Qt::MouseButtons value indicating which buttons were pressed on the mouse when this mouse event was generated.
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().
public final QMimeData mimeData()
This function returns the MIME data of the event.
public final Qt.KeyboardModifiers modifiers()
Returns the keyboard modifiers that were pressed when the drag and drop event was created.
public final QPointF pos()
Returns the mouse position of the event relative to the view that sent the event.
public final Qt.DropActions possibleActions()
Returns the possible drop actions that the drag and drop can result in.
public final Qt.DropAction proposedAction()
Returns the drop action that is proposed, i.e., preferred. The action must be one of the possible actions as defined by possibleActions().
public final QPointF scenePos()
Returns the position of the mouse in scene coordinates.
public final QPoint screenPos()
Returns the position of the mouse relative to the screen.
public final void setButtons(Qt.MouseButton... buttons)
public final void setButtons(Qt.MouseButtons buttons)
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.
public final void setModifiers(Qt.KeyboardModifier... modifiers)
public final void setModifiers(Qt.KeyboardModifiers modifiers)
public final void setPos(QPointF pos)
public final void setPossibleActions(Qt.DropAction... actions)
public final void setPossibleActions(Qt.DropActions actions)
public final void setProposedAction(Qt.DropAction action)
public final void setScenePos(QPointF pos)
public final void setScreenPos(QPoint pos)
public final QWidget source()
This function returns the QGraphicsView that created the QGraphicsSceneDragDropEvent.
public static QGraphicsSceneDragDropEvent fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |