QDragMoveEvent(3qt)

NAME
QDragMoveEvent - Event sent as a drag-and-drop is in progress

SYNOPSIS

#include <qevent.h>

Inherits QEvent.

Inherited by QDragEnterEvent.

  Public Members
QDragMoveEvent ( const QPoint & pos )
const QPoint& pos () const
bool isAccepted () const
void accept ()
void ignore ()
void accept ( const QRect & r )
void ignore ( const QRect & r )
QRect answerRect () const
const char* format ( int n = 0 )
bool provides ( const char * )
QByteArray data ( const char * )

  Protected Members
QDragMoveEvent ( const QPoint & pos, int type )

DESCRIPTION
Event sent as a drag-and-drop is in progress.

When a widgets accepts drop events, it will receive this event repeatedly while the the drag is inside that widget. The widget should examine the event, especially seeing what data it provides, and accept() the drop if appropriate.

MEMBER FUNCTION DOCUMENTATION

QDragMoveEvent::QDragMoveEvent ( const QPoint & pos )
Creates a QDragMoveEvent for which the mouse is at point pos.

Note that internal state is also involved with QDragMoveEvent, so it is not useful to create these yourself.

QDragMoveEvent::QDragMoveEvent ( const QPoint & pos, int type ) [protected]
Creates a QDragMoveEvent for which the mouse is at point pos, and the given event type.

Note that internal state is also involved with QDragMoveEvent, so it is not useful to create these yourself.

void QDragMoveEvent::accept ()
Call this to indicate that the event provides data which your widget can process. Use provides(), or preferrably, the canDecode() methods of existing QDragObject subclasses, such as QTextDrag::canDecode(), or your own subclasses.

void QDragMoveEvent::accept ( const QRect & r )
The same as accept() above, but also notifies that future moves will also be acceptable if they remain withing the rectangle r on the widget - this can improve performance, but may also be ignored by the underlying system.

QRect QDragMoveEvent::answerRect () const
{ return rect; }

Returns the rectangle for which the acceptance of the move event applies.

QByteArray QDragMoveEvent::data ( const char * format )
Returns a byte array containing the payload data of this drag, in format.

data() normally needs to get the data from the drag source, which is potentially very slow, so it's advisable to call this function only if you're sure that you will need the data in format.

See also: format().

const char * QDragMoveEvent::format ( int n = 0 )
Returns a string describing one of the available data types for this drag. Common examples are "text/plain" and "image/gif". If n is less than zero or greater than the number of available data types, format() returns 0.

This function is provided mainly for debugging. Most drop targets will use provides().

See also: data() and provides().

void QDragMoveEvent::ignore ()
The opposite of accept().

void QDragMoveEvent::ignore ( const QRect & r )
The opposite of accept(const QRect&).

bool QDragMoveEvent::isAccepted () const
Returns TRUE if accept() has been called.

const QPoint& QDragMoveEvent::pos () const
Returns the position of the mouse when the event occurred.

bool QDragMoveEvent::provides ( const char * mimeType )
Returns TRUE if this drag object provides format mimeType or FALSE if it does not.

See also: data().

SEE ALSO
http://www.troll.no/qt/qdragmoveevent.html

COPYRIGHT
Copyright 1992-1997 Troll Tech AS. See the LICENSE file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.