You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
188 lines
11 KiB
188 lines
11 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qdragobject.cpp:1278 -->
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>TQUriDrag Class</title>
|
|
<style type="text/css"><!--
|
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
|
a:link { color: #004faf; text-decoration: none }
|
|
a:visited { color: #672967; text-decoration: none }
|
|
body { background: #ffffff; color: black; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr bgcolor="#E5E5E5">
|
|
<td valign=center>
|
|
<a href="index.html">
|
|
<font color="#004faf">Home</font></a>
|
|
| <a href="classes.html">
|
|
<font color="#004faf">All Classes</font></a>
|
|
| <a href="mainclasses.html">
|
|
<font color="#004faf">Main Classes</font></a>
|
|
| <a href="annotated.html">
|
|
<font color="#004faf">Annotated</font></a>
|
|
| <a href="groups.html">
|
|
<font color="#004faf">Grouped Classes</font></a>
|
|
| <a href="functions.html">
|
|
<font color="#004faf">Functions</font></a>
|
|
</td>
|
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQUriDrag Class Reference</h1>
|
|
|
|
<p>The TQUriDrag class provides a drag object for a list of URI references.
|
|
<a href="#details">More...</a>
|
|
<p><tt>#include <<a href="qdragobject-h.html">ntqdragobject.h</a>></tt>
|
|
<p>Inherits <a href="qstoreddrag.html">TQStoredDrag</a>.
|
|
<p><a href="quridrag-members.html">List of all member functions.</a>
|
|
<h2>Public Members</h2>
|
|
<ul>
|
|
<li class=fn><a href="#TQUriDrag"><b>TQUriDrag</b></a> ( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 )</li>
|
|
<li class=fn><a href="#TQUriDrag-2"><b>TQUriDrag</b></a> ( TQWidget * dragSource = 0, const char * name = 0 )</li>
|
|
<li class=fn><a href="#~TQUriDrag"><b>~TQUriDrag</b></a> ()</li>
|
|
<li class=fn>void setFilenames ( const TQStringList & fnames ) <em>(obsolete)</em></li>
|
|
<li class=fn>void <a href="#setFileNames"><b>setFileNames</b></a> ( const TQStringList & fnames )</li>
|
|
<li class=fn>void <a href="#setUnicodeUris"><b>setUnicodeUris</b></a> ( const TQStringList & uuris )</li>
|
|
<li class=fn>virtual void <a href="#setUris"><b>setUris</b></a> ( TQStrList uris )</li>
|
|
</ul>
|
|
<h2>Static Public Members</h2>
|
|
<ul>
|
|
<li class=fn>TQString <a href="#uriToLocalFile"><b>uriToLocalFile</b></a> ( const char * uri )</li>
|
|
<li class=fn>TQCString <a href="#localFileToUri"><b>localFileToUri</b></a> ( const TQString & filename )</li>
|
|
<li class=fn>TQString <a href="#uriToUnicodeUri"><b>uriToUnicodeUri</b></a> ( const char * uri )</li>
|
|
<li class=fn>TQCString <a href="#unicodeUriToUri"><b>unicodeUriToUri</b></a> ( const TQString & uuri )</li>
|
|
<li class=fn>bool <a href="#canDecode"><b>canDecode</b></a> ( const TQMimeSource * e )</li>
|
|
<li class=fn>bool <a href="#decode"><b>decode</b></a> ( const TQMimeSource * e, TQStrList & l )</li>
|
|
<li class=fn>bool <a href="#decodeToUnicodeUris"><b>decodeToUnicodeUris</b></a> ( const TQMimeSource * e, TQStringList & l )</li>
|
|
<li class=fn>bool <a href="#decodeLocalFiles"><b>decodeLocalFiles</b></a> ( const TQMimeSource * e, TQStringList & l )</li>
|
|
</ul>
|
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
|
|
|
|
|
The TQUriDrag class provides a drag object for a list of URI references.
|
|
<p>
|
|
<p> 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.
|
|
<p> 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.
|
|
<p> You can convert a list of file names to file URIs using
|
|
<a href="#setFileNames">setFileNames</a>(), or into human-readble form with <a href="#setUnicodeUris">setUnicodeUris</a>().
|
|
<p> Static functions are provided to convert between filenames and
|
|
URIs, e.g. <a href="#uriToLocalFile">uriToLocalFile</a>() and <a href="#localFileToUri">localFileToUri</a>(), and to and from
|
|
human-readable form, e.g. <a href="#uriToUnicodeUri">uriToUnicodeUri</a>(), <a href="#unicodeUriToUri">unicodeUriToUri</a>().
|
|
You can also decode URIs from a mimesource into a list with
|
|
<a href="#decodeLocalFiles">decodeLocalFiles</a>() and <a href="#decodeToUnicodeUris">decodeToUnicodeUris</a>().
|
|
<p>See also <a href="draganddrop.html">Drag And Drop Classes</a>.
|
|
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<h3 class=fn><a name="TQUriDrag"></a>TQUriDrag::TQUriDrag ( <a href="ntqstrlist.html">TQStrList</a> uris, <a href="tqwidget.html">TQWidget</a> * dragSource = 0, const char * name = 0 )
|
|
</h3>
|
|
Constructs an object to drag the list of URIs in <em>uris</em>. The <em>dragSource</em> and <em>name</em> arguments are passed on to <a href="qstoreddrag.html">TQStoredDrag</a>.
|
|
Note that URIs are always in escaped UTF8 encoding.
|
|
|
|
<h3 class=fn><a name="TQUriDrag-2"></a>TQUriDrag::TQUriDrag ( <a href="tqwidget.html">TQWidget</a> * dragSource = 0, const char * name = 0 )
|
|
</h3>
|
|
Constructs an object to drag. You must call <a href="#setUris">setUris</a>() before you
|
|
start the <a href="ntqdragobject.html#drag">drag</a>(). Passes <em>dragSource</em> and <em>name</em> to the
|
|
<a href="qstoreddrag.html">TQStoredDrag</a> constructor.
|
|
|
|
<h3 class=fn><a name="~TQUriDrag"></a>TQUriDrag::~TQUriDrag ()
|
|
</h3>
|
|
Destroys the object.
|
|
|
|
<h3 class=fn>bool <a name="canDecode"></a>TQUriDrag::canDecode ( const <a href="qmimesource.html">TQMimeSource</a> * e )<tt> [static]</tt>
|
|
</h3>
|
|
Returns TRUE if <a href="#decode">decode</a>() would be able to decode <em>e</em>; otherwise
|
|
returns FALSE.
|
|
|
|
<h3 class=fn>bool <a name="decode"></a>TQUriDrag::decode ( const <a href="qmimesource.html">TQMimeSource</a> * e, <a href="ntqstrlist.html">TQStrList</a> & l )<tt> [static]</tt>
|
|
</h3>
|
|
Decodes URIs from <em>e</em>, placing the result in <em>l</em> (which is first
|
|
cleared).
|
|
<p> Returns TRUE if <em>e</em> contained a valid list of URIs; otherwise
|
|
returns FALSE.
|
|
|
|
<p>Example: <a href="dirview-example.html#x1707">dirview/dirview.cpp</a>.
|
|
<h3 class=fn>bool <a name="decodeLocalFiles"></a>TQUriDrag::decodeLocalFiles ( const <a href="qmimesource.html">TQMimeSource</a> * e, <a href="ntqstringlist.html">TQStringList</a> & l )<tt> [static]</tt>
|
|
</h3>
|
|
Decodes URIs from the mime source event <em>e</em>, converts them to
|
|
local files if they refer to local files, and places them in <em>l</em>
|
|
(which is first cleared).
|
|
<p> Returns TRUE if <em>contained</em> a valid list of URIs; otherwise
|
|
returns FALSE. The list will be empty if no URIs were local files.
|
|
|
|
<p>Example: <a href="fileiconview-example.html#x873">fileiconview/qfileiconview.cpp</a>.
|
|
<h3 class=fn>bool <a name="decodeToUnicodeUris"></a>TQUriDrag::decodeToUnicodeUris ( const <a href="qmimesource.html">TQMimeSource</a> * e, <a href="ntqstringlist.html">TQStringList</a> & l )<tt> [static]</tt>
|
|
</h3>
|
|
Decodes URIs from the mime source event <em>e</em>, converts them to
|
|
Unicode URIs (only useful for displaying to humans), placing them
|
|
in <em>l</em> (which is first cleared).
|
|
<p> Returns TRUE if <em>contained</em> a valid list of URIs; otherwise
|
|
returns FALSE.
|
|
|
|
<h3 class=fn><a href="ntqcstring.html">TQCString</a> <a name="localFileToUri"></a>TQUriDrag::localFileToUri ( const <a href="ntqstring.html">TQString</a> & filename )<tt> [static]</tt>
|
|
</h3>
|
|
Returns the URI equivalent to the absolute local file <em>filename</em>.
|
|
<p> <p>See also <a href="#uriToLocalFile">uriToLocalFile</a>().
|
|
|
|
<h3 class=fn>void <a name="setFileNames"></a>TQUriDrag::setFileNames ( const <a href="ntqstringlist.html">TQStringList</a> & fnames )
|
|
</h3>
|
|
Sets the URIs to be the local-file URIs equivalent to <em>fnames</em>.
|
|
<p> <p>See also <a href="#localFileToUri">localFileToUri</a>() and <a href="#setUris">setUris</a>().
|
|
|
|
<p>Example: <a href="dirview-example.html#x1708">dirview/dirview.cpp</a>.
|
|
<h3 class=fn>void <a name="setFilenames"></a>TQUriDrag::setFilenames ( const <a href="ntqstringlist.html">TQStringList</a> & fnames )
|
|
</h3>
|
|
|
|
<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
|
<p> Use <a href="#setFileNames">setFileNames</a>() instead (notice the N).
|
|
|
|
<h3 class=fn>void <a name="setUnicodeUris"></a>TQUriDrag::setUnicodeUris ( const <a href="ntqstringlist.html">TQStringList</a> & uuris )
|
|
</h3>
|
|
Sets the URIs in <em>uuris</em> to be the Unicode URIs (only useful for
|
|
displaying to humans).
|
|
<p> <p>See also <a href="#localFileToUri">localFileToUri</a>() and <a href="#setUris">setUris</a>().
|
|
|
|
<h3 class=fn>void <a name="setUris"></a>TQUriDrag::setUris ( <a href="ntqstrlist.html">TQStrList</a> uris )<tt> [virtual]</tt>
|
|
</h3>
|
|
Changes the list of <em>uris</em> to be dragged.
|
|
<p> Note that URIs are always in escaped UTF8 encoding.
|
|
|
|
<h3 class=fn><a href="ntqcstring.html">TQCString</a> <a name="unicodeUriToUri"></a>TQUriDrag::unicodeUriToUri ( const <a href="ntqstring.html">TQString</a> & uuri )<tt> [static]</tt>
|
|
</h3>
|
|
Returns the URI equivalent of the Unicode URI given in <em>uuri</em>
|
|
(only useful for displaying to humans).
|
|
<p> <p>See also <a href="#uriToLocalFile">uriToLocalFile</a>().
|
|
|
|
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="uriToLocalFile"></a>TQUriDrag::uriToLocalFile ( const char * uri )<tt> [static]</tt>
|
|
</h3>
|
|
Returns the name of a local file equivalent to <em>uri</em> or a null
|
|
string if <em>uri</em> is not a local file.
|
|
<p> Note that URIs are always in escaped UTF8 encoding.
|
|
<p> <p>See also <a href="#localFileToUri">localFileToUri</a>().
|
|
|
|
<p>Example: <a href="dirview-example.html#x1709">dirview/dirview.cpp</a>.
|
|
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="uriToUnicodeUri"></a>TQUriDrag::uriToUnicodeUri ( const char * uri )<tt> [static]</tt>
|
|
</h3>
|
|
Returns the Unicode URI (only useful for displaying to humans)
|
|
equivalent of <em>uri</em>.
|
|
<p> Note that URIs are always in escaped UTF8 encoding.
|
|
<p> <p>See also <a href="#localFileToUri">localFileToUri</a>().
|
|
|
|
<!-- eof -->
|
|
<hr><p>
|
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
|
Copyright © 1995-2007
|
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
|
<table width=100% cellspacing=0 border=0><tr>
|
|
<td>Copyright © 2007
|
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
|
<td align=right><div align=right>TQt 3.3.8</div>
|
|
</table></div></address></body>
|
|
</html>
|