QUrlDrag(3qt)

NAME
QUrlDrag - Provides for drag-and-drop of a list of file references

SYNOPSIS

#include <qdragobject.h>

Inherits QStoredDrag.

  Public Members
QUrlDrag ( QStrList urls, QWidget * dragSource = 0, const char * name = 0 )
QUrlDrag ( QWidget * dragSource = 0, const char * name = 0 )
~QUrlDrag ()
void setUrls ( QStrList urls )

  Static Public Members
QString urlToLocalFile ( const char * )
bool canDecode ( QDragMoveEvent * e )
bool decode ( QDropEvent * e, QStrList & i )
bool decodeLocalFiles ( QDropEvent * e, QStrList & i )

DESCRIPTION
Provides for drag-and-drop of a list of file references.

URLs are a useful way to refer to files that may be distributed across multiple machines. Much of the time a URL will refer to a file on a machine local to both the drag source and the drop target, and so the URL will be equivalent to passing a filename, but more extensible.

MEMBER FUNCTION DOCUMENTATION

QUrlDrag::QUrlDrag ( QStrList urls, QWidget * dragSource = 0, const char * name = 0 )
Creates an object to drag the list of urls in urls. The dragSource and name arguments are passed on to QStoredDrag.

QUrlDrag::QUrlDrag ( QWidget * dragSource = 0, const char * name = 0 )
Creates a object to drag. You will need to call setUrls() before you start the drag().

QUrlDrag::~QUrlDrag ()
Destroys the object.

bool QUrlDrag::canDecode ( QDragMoveEvent * e ) [static]
Returns TRUE if decode() would be able to decode e.

bool QUrlDrag::decode ( QDropEvent * e, QStrList & l ) [static]
Decodes URLs from e, placing the result in l (which is first cleared).

Returns TRUE if the event contained a valid list of URLs.

bool QUrlDrag::decodeLocalFiles ( QDropEvent * e, QStrList & l ) [static]
Decodes URLs from e, converts them to local files if they refer to local files, and places them in l (which is first cleared).

Returns TRUE if the event contained a valid list of URLs. The list will be empty if no URLs were local files.

void QUrlDrag::setUrls ( QStrList urls )
Changes the list of urls to be dragged.

QString QUrlDrag::urlToLocalFile ( const char * url ) [static]
Returns the name of a local file equivalent to url, or a null string if url is not a local file.

SEE ALSO
http://www.troll.no/qt/qurldrag.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.