.BI "bool \fBcanDecode\fR ( const QMimeSource * e )"
.br
.ti -1c
.BI "bool \fBdecode\fR ( const QMimeSource * e, QStrList & l )"
.br
.ti -1c
.BI "bool \fBdecodeToUnicodeUris\fR ( const QMimeSource * e, QStringList & l )"
.br
.ti -1c
.BI "bool \fBdecodeLocalFiles\fR ( const QMimeSource * e, QStringList & l )"
.br
.in -1c
.SH DESCRIPTION
The QUriDrag class provides a drag object for a list of URI references.
.PP
URIs are a useful way to refer to files that may be distributed across multiple machines. A URI will often refer to a file on a machine local to both the drag source and the drop target, so the URI can be equivalent to passing a file name but is more extensible.
.PP
Use URIs in Unicode form so that the user can comfortably edit and view them. For use in HTTP or other protocols, use the correctly escaped ASCII form.
.PP
You can convert a list of file names to file URIs using setFileNames(), or into human-readble form with setUnicodeUris().
.PP
Static functions are provided to convert between filenames and URIs, e.g. uriToLocalFile() and localFileToUri(), and to and from human-readable form, e.g. uriToUnicodeUri(), unicodeUriToUri(). You can also decode URIs from a mimesource into a list with decodeLocalFiles() and decodeToUnicodeUris().
Constructs an object to drag the list of URIs in \fIuris\fR. The \fIdragSource\fR and \fIname\fR arguments are passed on to QStoredDrag. Note that URIs are always in escaped UTF8 encoding.
Constructs an object to drag. You must call setUris() before you start the drag(). Passes \fIdragSource\fR and \fIname\fR to the QStoredDrag constructor.
.SH "QUriDrag::~QUriDrag ()"
Destroys the object.
.SH "bool QUriDrag::canDecode ( const QMimeSource * e )\fC [static]\fR"
Returns TRUE if decode() would be able to decode \fIe\fR; otherwise returns FALSE.
.SH "bool QUriDrag::decode ( const QMimeSource * e, QStrList & l )\fC [static]\fR"
Decodes URIs from \fIe\fR, placing the result in \fIl\fR (which is first cleared).
.PP
Returns TRUE if \fIe\fR contained a valid list of URIs; otherwise returns FALSE.
.PP
Example: dirview/dirview.cpp.
.SH "bool QUriDrag::decodeLocalFiles ( const QMimeSource * e, QStringList & l )\fC [static]\fR"
Decodes URIs from the mime source event \fIe\fR, converts them to local files if they refer to local files, and places them in \fIl\fR (which is first cleared).
.PP
Returns TRUE if \fIcontained\fR a valid list of URIs; otherwise returns FALSE. The list will be empty if no URIs were local files.
.PP
Example: fileiconview/qfileiconview.cpp.
.SH "bool QUriDrag::decodeToUnicodeUris ( const QMimeSource * e, QStringList & l )\fC [static]\fR"
Decodes URIs from the mime source event \fIe\fR, converts them to Unicode URIs (only useful for displaying to humans), placing them in \fIl\fR (which is first cleared).
.PP
Returns TRUE if \fIcontained\fR a valid list of URIs; otherwise returns FALSE.