1QUriDrag(3qt)                                                    QUriDrag(3qt)
2
3
4

NAME

6       QUriDrag - Drag object for a list of URI references
7

SYNOPSIS

9       #include <qdragobject.h>
10
11       Inherits QStoredDrag.
12
13   Public Members
14       QUriDrag ( QStrList uris, QWidget * dragSource = 0, const char * name =
15           0 )
16       QUriDrag ( QWidget * dragSource = 0, const char * name = 0 )
17       ~QUriDrag ()
18       void setFilenames ( const QStringList & fnames )  (obsolete)
19       void setFileNames ( const QStringList & fnames )
20       void setUnicodeUris ( const QStringList & uuris )
21       virtual void setUris ( QStrList uris )
22
23   Static Public Members
24       QString uriToLocalFile ( const char * uri )
25       QCString localFileToUri ( const QString & filename )
26       QString uriToUnicodeUri ( const char * uri )
27       QCString unicodeUriToUri ( const QString & uuri )
28       bool canDecode ( const QMimeSource * e )
29       bool decode ( const QMimeSource * e, QStrList & l )
30       bool decodeToUnicodeUris ( const QMimeSource * e, QStringList & l )
31       bool decodeLocalFiles ( const QMimeSource * e, QStringList & l )
32

DESCRIPTION

34       The QUriDrag class provides a drag object for a list of URI references.
35
36       URIs are a useful way to refer to files that may be distributed across
37       multiple machines. A URI will often refer to a file on a machine local
38       to both the drag source and the drop target, so the URI can be
39       equivalent to passing a file name but is more extensible.
40
41       Use URIs in Unicode form so that the user can comfortably edit and view
42       them. For use in HTTP or other protocols, use the correctly escaped
43       ASCII form.
44
45       You can convert a list of file names to file URIs using setFileNames(),
46       or into human-readble form with setUnicodeUris().
47
48       Static functions are provided to convert between filenames and URIs,
49       e.g. uriToLocalFile() and localFileToUri(), and to and from human-
50       readable form, e.g. uriToUnicodeUri(), unicodeUriToUri(). You can also
51       decode URIs from a mimesource into a list with decodeLocalFiles() and
52       decodeToUnicodeUris().
53
54       See also Drag And Drop Classes.
55

MEMBER FUNCTION DOCUMENTATION

QUriDrag::QUriDrag ( QStrList uris, QWidget * dragSource = 0, const char *

58       name = 0 )
59       Constructs an object to drag the list of URIs in uris. The dragSource
60       and name arguments are passed on to QStoredDrag. Note that URIs are
61       always in escaped UTF8 encoding.
62

QUriDrag::QUriDrag ( QWidget * dragSource = 0, const char * name = 0 )

64       Constructs an object to drag. You must call setUris() before you start
65       the drag(). Passes dragSource and name to the QStoredDrag constructor.
66

QUriDrag::~QUriDrag ()

68       Destroys the object.
69

bool QUriDrag::canDecode ( const QMimeSource * e ) [static]

71       Returns TRUE if decode() would be able to decode e; otherwise returns
72       FALSE.
73

bool QUriDrag::decode ( const QMimeSource * e, QStrList & l ) [static]

75       Decodes URIs from e, placing the result in l (which is first cleared).
76
77       Returns TRUE if e contained a valid list of URIs; otherwise returns
78       FALSE.
79
80       Example: dirview/dirview.cpp.
81

bool QUriDrag::decodeLocalFiles ( const QMimeSource * e, QStringList & l )

83       [static]
84       Decodes URIs from the mime source event e, converts them to local files
85       if they refer to local files, and places them in l (which is first
86       cleared).
87
88       Returns TRUE if contained a valid list of URIs; otherwise returns
89       FALSE. The list will be empty if no URIs were local files.
90
91       Example: fileiconview/qfileiconview.cpp.
92

bool QUriDrag::decodeToUnicodeUris ( const QMimeSource * e, QStringList & l )

94       [static]
95       Decodes URIs from the mime source event e, converts them to Unicode
96       URIs (only useful for displaying to humans), placing them in l (which
97       is first cleared).
98
99       Returns TRUE if contained a valid list of URIs; otherwise returns
100       FALSE.
101

QCString QUriDrag::localFileToUri ( const QString & filename ) [static]

103       Returns the URI equivalent to the absolute local file filename.
104
105       See also uriToLocalFile().
106

void QUriDrag::setFileNames ( const QStringList & fnames )

108       Sets the URIs to be the local-file URIs equivalent to fnames.
109
110       See also localFileToUri() and setUris().
111
112       Example: dirview/dirview.cpp.
113

void QUriDrag::setFilenames ( const QStringList & fnames )

115       This function is obsolete. It is provided to keep old source working.
116       We strongly advise against using it in new code.
117
118       Use setFileNames() instead (notice the N).
119

void QUriDrag::setUnicodeUris ( const QStringList & uuris )

121       Sets the URIs in uuris to be the Unicode URIs (only useful for
122       displaying to humans).
123
124       See also localFileToUri() and setUris().
125

void QUriDrag::setUris ( QStrList uris ) [virtual]

127       Changes the list of uris to be dragged.
128
129       Note that URIs are always in escaped UTF8 encoding.
130

QCString QUriDrag::unicodeUriToUri ( const QString & uuri ) [static]

132       Returns the URI equivalent of the Unicode URI given in uuri (only
133       useful for displaying to humans).
134
135       See also uriToLocalFile().
136

QString QUriDrag::uriToLocalFile ( const char * uri ) [static]

138       Returns the name of a local file equivalent to uri or a null string if
139       uri is not a local file.
140
141       Note that URIs are always in escaped UTF8 encoding.
142
143       See also localFileToUri().
144
145       Example: dirview/dirview.cpp.
146

QString QUriDrag::uriToUnicodeUri ( const char * uri ) [static]

148       Returns the Unicode URI (only useful for displaying to humans)
149       equivalent of uri.
150
151       Note that URIs are always in escaped UTF8 encoding.
152
153       See also localFileToUri().
154
155

SEE ALSO

157       http://doc.trolltech.com/quridrag.html
158       http://www.trolltech.com/faq/tech.html
159
161       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
162       license file included in the distribution for a complete license
163       statement.
164

AUTHOR

166       Generated automatically from the source code.
167

BUGS

169       If you find a bug in Qt, please report it as described in
170       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
171       help you. Thank you.
172
173       The definitive Qt documentation is provided in HTML format; it is
174       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
175       web browser. This man page is provided as a convenience for those users
176       who prefer man pages, although this format is not officially supported
177       by Trolltech.
178
179       If you find errors in this manual page, please report them to qt-
180       bugs@trolltech.com.  Please include the name of the manual page
181       (quridrag.3qt) and the Qt version (3.3.8).
182
183
184
185Trolltech AS                    2 February 2007                  QUriDrag(3qt)
Impressum