'\" t
.TH TQUriDrag 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQUriDrag \- Drag object for a list of URI references
.SH SYNOPSIS
\fC#include <tqdragobject.h>\fR
.PP
Inherits TQStoredDrag.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQUriDrag\fR ( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 )"
.br
.ti -1c
.BI "\fBTQUriDrag\fR ( TQWidget * dragSource = 0, const char * name = 0 )"
.br
.ti -1c
.BI "\fB~TQUriDrag\fR ()"
.br
.ti -1c
.BI "void setFilenames ( const TQStringList & fnames ) \fI(obsolete)\fR"
.br
.ti -1c
.BI "void \fBsetFileNames\fR ( const TQStringList & fnames )"
.br
.ti -1c
.BI "void \fBsetUnicodeUris\fR ( const TQStringList & uuris )"
.br
.ti -1c
.BI "virtual void \fBsetUris\fR ( TQStrList uris )"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "TQString \fBuriToLocalFile\fR ( const char * uri )"
.br
.ti -1c
.BI "QCString \fBlocalFileToUri\fR ( const TQString & filename )"
.br
.ti -1c
.BI "TQString \fBuriToUnicodeUri\fR ( const char * uri )"
.br
.ti -1c
.BI "QCString \fBunicodeUriToUri\fR ( const TQString & uuri )"
.br
.ti -1c
.BI "bool \fBcanDecode\fR ( const TQMimeSource * e )"
.br
.ti -1c
.BI "bool \fBdecode\fR ( const TQMimeSource * e, TQStrList & l )"
.br
.ti -1c
.BI "bool \fBdecodeToUnicodeUris\fR ( const TQMimeSource * e, TQStringList & l )"
.br
.ti -1c
.BI "bool \fBdecodeLocalFiles\fR ( const TQMimeSource * e, TQStringList & l )"
.br
.in -1c
.SH DESCRIPTION
The TQUriDrag 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().
.PP
See also Drag And Drop Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQUriDrag::TQUriDrag ( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 )"
Constructs an object to drag the list of URIs in \fIuris\fR. The \fIdragSource\fR and \fIname\fR arguments are passed on to TQStoredDrag. Note that URIs are always in escaped UTF8 encoding.
.SH "TQUriDrag::TQUriDrag ( TQWidget * dragSource = 0, const char * name = 0 )"
Constructs an object to drag. You must call setUris() before you start the drag(). Passes \fIdragSource\fR and \fIname\fR to the TQStoredDrag constructor.
.SH "TQUriDrag::~TQUriDrag ()"
Destroys the object.
.SH "bool TQUriDrag::canDecode ( const TQMimeSource * e )\fC [static]\fR"
Returns TRUE if decode() would be able to decode \fIe\fR; otherwise returns FALSE.
.SH "bool TQUriDrag::decode ( const TQMimeSource * e, TQStrList & 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 TQUriDrag::decodeLocalFiles ( const TQMimeSource * e, TQStringList & 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 TQUriDrag::decodeToUnicodeUris ( const TQMimeSource * e, TQStringList & 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.
.SH "QCString TQUriDrag::localFileToUri ( const TQString & filename )\fC [static]\fR"
Returns the URI equivalent to the absolute local file \fIfilename\fR.
.PP
See also uriToLocalFile().
.SH "void TQUriDrag::setFileNames ( const TQStringList & fnames )"
Sets the URIs to be the local-file URIs equivalent to \fIfnames\fR.
.PP
See also localFileToUri() and setUris().
.PP
Example: dirview/dirview.cpp.
.SH "void TQUriDrag::setFilenames ( const TQStringList & fnames )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Use setFileNames() instead (notice the N).
.SH "void TQUriDrag::setUnicodeUris ( const TQStringList & uuris )"
Sets the URIs in \fIuuris\fR to be the Unicode URIs (only useful for displaying to humans).
.PP
See also localFileToUri() and setUris().
.SH "void TQUriDrag::setUris ( TQStrList uris )\fC [virtual]\fR"
Changes the list of \fIuris\fR to be dragged.
.PP
Note that URIs are always in escaped UTF8 encoding.
.SH "QCString TQUriDrag::unicodeUriToUri ( const TQString & uuri )\fC [static]\fR"
Returns the URI equivalent of the Unicode URI given in \fIuuri\fR (only useful for displaying to humans).
.PP
See also uriToLocalFile().
.SH "TQString TQUriDrag::uriToLocalFile ( const char * uri )\fC [static]\fR"
Returns the name of a local file equivalent to \fIuri\fR or a null string if \fIuri\fR is not a local file.
.PP
Note that URIs are always in escaped UTF8 encoding.
.PP
See also localFileToUri().
.PP
Example: dirview/dirview.cpp.
.SH "TQString TQUriDrag::uriToUnicodeUri ( const char * uri )\fC [static]\fR"
Returns the Unicode URI (only useful for displaying to humans) equivalent of \fIuri\fR.
.PP
Note that URIs are always in escaped UTF8 encoding.
.PP
See also localFileToUri().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tquridrag.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tquridrag.3qt) and the Qt
version (3.3.8).