📄 quridrag.3qt
字号:
'\" t.TH QUriDrag 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQUriDrag \- Drag object for a list of URI references.PP\fC#include <qdragobject.h>\fR.PPInherits 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 DESCRIPTIONThe QUriDrag class provides a drag object for a list of URI references..PPURIs 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 will be equivalent to passing a file name but will be more extensible..PPUse 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..PPYou can convert a list of file names to file URIs using setFileNames(), or into human-readble for with setUnicodeUris()..PPStatic 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()..PPSee 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, as defined by the W3C..SH "QUriDrag::QUriDrag ( QWidget * dragSource = 0, const char * name = 0 )"Constructs a object to drag. You will need to 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)..PPReturns TRUE if the event contained a valid list of URIs; otherwise returns FALSE..PPExamples:.)l dirview/dirview.cpp and fileiconview/qfileiconview.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)..PPReturns TRUE if \fIcontained\fR a valid list of URIs; otherwise returns FALSE. The list will be empty if no URIs were local files..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)..PPReturns 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..PPSee also uriToLocalFile()..SH "void QUriDrag::setFileNames ( const QStringList & fnames )"Sets the URIs to be the local-file URIs equivalent to \fIfnames\fR..PPSee also localFileToUri() and setUris()..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..PPUse setFileNames() instead (notice the N)..SH "void QUriDrag::setUnicodeUris ( const QStringList & uuris )"Sets the URIs to be the Unicode URIs (only useful for displaying to humans) \fIuuris\fR..PPSee also localFileToUri() and setUris()..PPExample: dirview/dirview.cpp..SH "void QUriDrag::setUris ( QStrList uris )\fC [virtual]\fR"Changes the list of \fIuris\fR to be dragged..SH "QCString QUriDrag::unicodeUriToUri ( const QString & uuri )\fC [static]\fR"Returns the URI equivalent to the Unicode URI (only useful for displaying to humans) \fIuuri\fR..PPSee 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..PPSee also localFileToUri()..SH "QString QUriDrag::uriToUnicodeUri ( const char * uri )\fC [static]\fR"Returns the Unicode URI (only useful for displaying to humans) equivalent to \fIuri\fR..PPSee also localFileToUri()..SH "SEE ALSO".BR http://doc.trolltech.com/quridrag.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (quridrag.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -