diff options
Diffstat (limited to 'doc/man/man3/quridrag.3qt')
-rw-r--r-- | doc/man/man3/quridrag.3qt | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/doc/man/man3/quridrag.3qt b/doc/man/man3/quridrag.3qt new file mode 100644 index 0000000..a130bd6 --- /dev/null +++ b/doc/man/man3/quridrag.3qt @@ -0,0 +1,168 @@ +'\" t +.TH QUriDrag 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 +QUriDrag \- Drag object for a list of URI references +.SH SYNOPSIS +\fC#include <qdragobject.h>\fR +.PP +Inherits QStoredDrag. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "\fBQUriDrag\fR ( QStrList uris, QWidget * dragSource = 0, const char * name = 0 )" +.br +.ti -1c +.BI "\fBQUriDrag\fR ( QWidget * dragSource = 0, const char * name = 0 )" +.br +.ti -1c +.BI "\fB~QUriDrag\fR ()" +.br +.ti -1c +.BI "void setFilenames ( const QStringList & fnames ) \fI(obsolete)\fR" +.br +.ti -1c +.BI "void \fBsetFileNames\fR ( const QStringList & fnames )" +.br +.ti -1c +.BI "void \fBsetUnicodeUris\fR ( const QStringList & uuris )" +.br +.ti -1c +.BI "virtual void \fBsetUris\fR ( QStrList uris )" +.br +.in -1c +.SS "Static Public Members" +.in +1c +.ti -1c +.BI "QString \fBuriToLocalFile\fR ( const char * uri )" +.br +.ti -1c +.BI "QCString \fBlocalFileToUri\fR ( const QString & filename )" +.br +.ti -1c +.BI "QString \fBuriToUnicodeUri\fR ( const char * uri )" +.br +.ti -1c +.BI "QCString \fBunicodeUriToUri\fR ( const QString & uuri )" +.br +.ti -1c +.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(). +.PP +See also Drag And Drop Classes. +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QUriDrag::QUriDrag ( QStrList uris, QWidget * 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 QStoredDrag. Note that URIs are always in escaped UTF8 encoding. +.SH "QUriDrag::QUriDrag ( QWidget * 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 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. +.SH "QCString QUriDrag::localFileToUri ( const QString & filename )\fC [static]\fR" +Returns the URI equivalent to the absolute local file \fIfilename\fR. +.PP +See also uriToLocalFile(). +.SH "void QUriDrag::setFileNames ( const QStringList & 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 QUriDrag::setFilenames ( const QStringList & 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 QUriDrag::setUnicodeUris ( const QStringList & 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 QUriDrag::setUris ( QStrList 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 QUriDrag::unicodeUriToUri ( const QString & 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 "QString QUriDrag::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 "QString QUriDrag::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/quridrag.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 Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt 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 [email protected] . +Please include the name of the manual page (quridrag.3qt) and the Qt +version (3.3.8). |