QUriDrag(3qt)
π QUriDrag π
okay bestie, gather round, because today we're talking about QUriDrag from the Qt 3qt era β the drag object that carries a whole lil list of URI references around. yes it's giving old-school Qt, yes it still eats, let's go β¨
πΈ NAME πΈ
QUriDrag β drag object for a list of URI references π¦
π SYNOPSIS π
#include <qdragobject.h>
Inherits QStoredDrag. periodt.
π Public Members π
QUriDrag ( QStrList uris, QWidget * dragSource = 0, const char * name = 0 )
QUriDrag ( QWidget * dragSource = 0, const char * name = 0 )
~QUriDrag ()
void setFilenames ( const QStringList & fnames ) (obsolete)
void setFileNames ( const QStringList & fnames )
void setUnicodeUris ( const QStringList & uuris )
virtual void setUris ( QStrList uris )
β Static Public Members β
QString uriToLocalFile ( const char * uri )
QCString localFileToUri ( const QString & filename )
QString uriToUnicodeUri ( const char * uri )
QCString unicodeUriToUri ( const QString & uuri )
bool canDecode ( const QMimeSource * e )
bool decode ( const QMimeSource * e, QStrList & l )
bool decodeToUnicodeUris ( const QMimeSource * e, QStringList & l )
bool decodeLocalFiles ( const QMimeSource * e, QStringList & l )
β¨ DESCRIPTION β¨
So like, the QUriDrag class hands you a drag object for a list of URI references. that's the whole gig. π
URIs are lowkey a genius way to refer to files that might be scattered across multiple machines. a URI will often point at a file on a machine that's local to both the drag source and the drop target β so the URI can be equivalent to just passing a file name, except it's way more extensible. main character energy fr fr.
Use URIs in Unicode form so the user can comfortably edit and view them. but for HTTP or any other protocol? use the correctly escaped ASCII form. no cap.
You can convert a list of file names into file URIs with setFileNames(), or into human-readable form with setUnicodeUris().
There are static functions for converting between filenames and URIs β like uriToLocalFile() and localFileToUri() β and to and from human-readable form, like uriToUnicodeUri() and unicodeUriToUri(). You can also decode URIs out of a mimesource into a list using decodeLocalFiles() and decodeToUnicodeUris(). π«Ά
See also Drag And Drop Classes.
π§ MEMBER FUNCTION DOCUMENTATION π§
π QUriDrag::QUriDrag ( QStrList uris, QWidget * dragSource = 0, const char * name = 0 )
Constructs an object to drag the list of URIs sitting in uris. the dragSource and name arguments get passed straight on to QStoredDrag. heads up though β URIs are always in escaped UTF8 encoding. always. π
π QUriDrag::QUriDrag ( QWidget * dragSource = 0, const char * name = 0 )
Constructs an object to drag. but bestie, you must call setUris() before you start the drag(), okay? don't skip that step. it passes dragSource and name to the QStoredDrag constructor. π
π QUriDrag::~QUriDrag ()
Destroys the object. bye queen π¦
π bool QUriDrag::canDecode ( const QMimeSource * e ) [static]
Returns TRUE if decode() would be able to decode e; otherwise returns FALSE. simple vibe check. β¨
π bool QUriDrag::decode ( const QMimeSource * e, QStrList & l ) [static]
Decodes URIs from e, dropping the result into l β and yes, l gets cleared first, so don't come crying about leftovers.
Returns TRUE if e contained a valid list of URIs; otherwise returns FALSE.
Example: dirview/dirview.cpp.
π bool QUriDrag::decodeLocalFiles ( const QMimeSource * e, QStringList & l ) [static]
Decodes URIs from the mime source event e, converts them to local files if they actually refer to local files, and places them in l (which is cleared first, same deal).
Returns TRUE if it contained a valid list of URIs; otherwise returns FALSE. the list will be empty if none of the URIs were local files. π
Example: fileiconview/qfileiconview.cpp.
π bool QUriDrag::decodeToUnicodeUris ( const QMimeSource * e, QStringList & l ) [static]
Decodes URIs from the mime source event e, converts them to Unicode URIs β which is only useful for displaying to humans, fyi β and places them in l (cleared first, as always).
Returns TRUE if it contained a valid list of URIs; otherwise returns FALSE.
π QCString QUriDrag::localFileToUri ( const QString & filename ) [static]
Returns the URI equivalent to the absolute local file filename. iconic conversion tbh.
See also uriToLocalFile().
π void QUriDrag::setFileNames ( const QStringList & fnames )
Sets the URIs to be the local-file URIs equivalent to fnames. slay.
See also localFileToUri() and setUris().
Example: dirview/dirview.cpp.
π void QUriDrag::setFilenames ( const QStringList & fnames )
β οΈ This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.
Use setFileNames() instead β notice the N, bestie, the N matters π
π void QUriDrag::setUnicodeUris ( const QStringList & uuris )
Sets the URIs in uuris to be the Unicode URIs β again, only useful for displaying to humans.
See also localFileToUri() and setUris().
π void QUriDrag::setUris ( QStrList uris ) [virtual]
Changes the list of uris to be dragged. go off. π₯
Note that URIs are always in escaped UTF8 encoding.
π QCString QUriDrag::unicodeUriToUri ( const QString & uuri ) [static]
Returns the URI equivalent of the Unicode URI given in uuri β only useful for displaying to humans, iykyk.
See also uriToLocalFile().
π QString QUriDrag::uriToLocalFile ( const char * uri ) [static]
Returns the name of a local file equivalent to uri, or a null string if uri is not a local file. π
Note that URIs are always in escaped UTF8 encoding.
See also localFileToUri().
Example: dirview/dirview.cpp.
π QString QUriDrag::uriToUnicodeUri ( const char * uri ) [static]
Returns the Unicode URI β only useful for displaying to humans, remember β equivalent of uri.
Note that URIs are always in escaped UTF8 encoding.
See also localFileToUri().
π SEE ALSO π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.
πΈ AUTHOR πΈ
Generated automatically from the source code. (not a human, not a girlie, just a script doing its thing π )
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. π«Ά
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.
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (quridrag.3qt) and the Qt version (3.3.8).
and that's the whole page, bestie π this lil relic comes courtesy of Trolltech AS, dated 2 February 2007, and it's the man page for quridrag.3qt from the Qt 3.3.8 era. drink some water, hydrate your drag objects, mwah πβ¨
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms