|
|||||||||
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.QDropEvent
com.trolltech.qt.gui.QDragMoveEvent
public class QDragMoveEvent
The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress. A widget will receive drag move events repeatedly while the drag is within its boundaries, if it accepts drop events
and enter events
. The widget should examine the event to see what kind of data it provides, and call the accept()
function to accept the drop if appropriate.
The rectangle supplied by the answerRect()
function can be used to restrict drops to certain parts of the widget. For example, we can check whether the rectangle intersects with the geometry of a certain child widget and only call acceptProposedAction()
if that is the case.
Note that this class inherits most of its functionality from QDropEvent
.
QDragEnterEvent
, QDragLeaveEvent
, and QDropEvent
.
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 |
Constructor Summary | |
---|---|
QDragMoveEvent(QPoint pos,
Qt.DropActions actions,
QMimeData data,
Qt.MouseButtons buttons,
Qt.KeyboardModifiers modifiers)
Creates a QDragMoveEvent of the required type indicating that the mouse is at position pos given within a widget. |
|
QDragMoveEvent(QPoint pos,
Qt.DropActions actions,
QMimeData data,
Qt.MouseButtons buttons,
Qt.KeyboardModifiers modifiers,
QEvent.Type type)
Creates a QDragMoveEvent of the required type indicating that the mouse is at position pos given within a widget. |
Method Summary | |
---|---|
void |
accept(QRect r)
The same as accept() , but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. |
QRect |
answerRect()
Returns the rectangle in the widget where the drop will occur if accepted. |
void |
ignore(QRect r)
The opposite of the accept(const QRect &) function. |
protected QRect |
rect()
|
protected void |
setRect(QRect rect)
|
java.lang.String |
toString()
|
Methods inherited from class com.trolltech.qt.gui.QDropEvent |
---|
acceptProposedAction, act, default_action, drop_action, dropAction, keyboardModifiers, mdata, mimeData, modState, mouseButtons, mouseState, p, pos, possibleActions, proposedAction, setAct, setAct, setDefault_action, setDrop_action, setDropAction, setModState, setModState, setMouseState, setMouseState, setP, source |
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 |
Constructor Detail |
---|
public QDragMoveEvent(QPoint pos, Qt.DropActions actions, QMimeData data, Qt.MouseButtons buttons, Qt.KeyboardModifiers modifiers)
The mouse and keyboard states are specified by buttons and modifiers, and the actions describe the types of drag and drop operation that are possible. The drag data is passed as MIME-encoded information in data.
Warning: Do not attempt to create a QDragMoveEvent yourself. These objects rely on Qt's internal state.
public QDragMoveEvent(QPoint pos, Qt.DropActions actions, QMimeData data, Qt.MouseButtons buttons, Qt.KeyboardModifiers modifiers, QEvent.Type type)
The mouse and keyboard states are specified by buttons and modifiers, and the actions describe the types of drag and drop operation that are possible. The drag data is passed as MIME-encoded information in data.
Warning: Do not attempt to create a QDragMoveEvent yourself. These objects rely on Qt's internal state.
Method Detail |
---|
public final void accept(QRect r)
accept()
, but also notifies that future moves will also be acceptable if they remain within the rectangle given on the widget. This can improve performance, but may also be ignored by the underlying system. If the rectangle is empty, drag move events will be sent continuously. This is useful if the source is scrolling in a timer event.
public final QRect answerRect()
public final void ignore(QRect r)
QRect
&) function. Moves within the rectangle are not acceptable, and will be ignored.
protected final void setRect(QRect rect)
protected final QRect rect()
public java.lang.String toString()
toString
in class QDropEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |