<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- q3dragobject.cpp --> <head> <title>Qt 4.6: Q3StoredDrag Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <a name="//apple_ref/cpp/cl//Q3StoredDrag"></a> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" 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="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Q3StoredDrag Class Reference<br /><span class="small-subtitle">[<a href="qt3support.html">Qt3Support</a> module]</span> </h1> <p>The Q3StoredDrag class provides a simple stored-value drag object for arbitrary MIME data. <a href="#details">More...</a></p> <pre> #include <Q3StoredDrag></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qstoreddrag">Porting to Qt 4</a> for more information.</p> <p>Inherits <a href="q3dragobject.html">Q3DragObject</a>.</p> <p>Inherited by <a href="q3colordrag.html">Q3ColorDrag</a> and <a href="q3uridrag.html">Q3UriDrag</a>.</p> <ul> <li><a href="q3storeddrag-members.html">List of all members, including inherited members</a></li> </ul> <hr /> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3storeddrag.html#Q3StoredDrag">Q3StoredDrag</a></b> ( const char * <i>mimeType</i>, QWidget * <i>dragSource</i> = 0, const char * <i>name</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3storeddrag.html#dtor.Q3StoredDrag">~Q3StoredDrag</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3storeddrag.html#setEncodedData">setEncodedData</a></b> ( const QByteArray & <i>data</i> )</td></tr> </table> <hr /> <a name="reimplemented-public-functions"></a> <h2>Reimplemented Public Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">virtual QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="q3storeddrag.html#encodedData">encodedData</a></b> ( const char * <i>format</i> ) const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><b><a href="q3storeddrag.html#format">format</a></b> ( int <i>i</i> ) const</td></tr> </table> <ul> <li><div bar="2" class="fn"></div>9 public functions inherited from <a href="q3dragobject.html#public-functions">Q3DragObject</a></li> <li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> <li><div bar="2" class="fn"></div>3 public functions inherited from <a href="qmimesource.html#public-functions">QMimeSource</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li> <li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li> <li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li> <li><div class="fn"></div>1 static public member inherited from <a href="q3dragobject.html#static-public-members">Q3DragObject</a></li> <li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li> <li><div class="fn"></div>1 protected function inherited from <a href="q3dragobject.html#protected-functions">Q3DragObject</a></li> <li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The Q3StoredDrag class provides a simple stored-value drag object for arbitrary MIME data.</p> <p>When a block of data has only one representation, you can use a Q3StoredDrag to hold it.</p> <p>For more information about drag and drop, see the <a href="q3dragobject.html">Q3DragObject</a> class and the <a href="dnd.html">drag and drop documentation</a>.</p> <hr /> <h2>Member Function Documentation</h2> <a name="//apple_ref/cpp/instm/Q3StoredDrag/Q3StoredDrag"></a> <h3 class="fn"><a name="Q3StoredDrag"></a>Q3StoredDrag::Q3StoredDrag ( const char * <i>mimeType</i>, <a href="qwidget.html">QWidget</a> * <i>dragSource</i> = 0, const char * <i>name</i> = 0 )</h3> <p>Constructs a <a href="q3storeddrag.html" class="compat">Q3StoredDrag</a>. The <i>dragSource</i> and <i>name</i> are passed to the <a href="q3dragobject.html" class="compat">Q3DragObject</a> constructor, and the format is set to <i>mimeType</i>.</p> <p>The data will be unset. Use <a href="q3storeddrag.html#setEncodedData">setEncodedData</a>() to set it.</p> <a name="//apple_ref/cpp/instm/Q3StoredDrag/~Q3StoredDrag"></a> <h3 class="fn"><a name="dtor.Q3StoredDrag"></a>Q3StoredDrag::~Q3StoredDrag ()</h3> <p>Destroys the drag object.</p> <a name="//apple_ref/cpp/instm/Q3StoredDrag/encodedData"></a> <h3 class="fn"><a name="encodedData"></a><a href="qbytearray.html">QByteArray</a> Q3StoredDrag::encodedData ( const char * <i>format</i> ) const <tt> [virtual]</tt></h3> <p>Reimplemented from <a href="qmimesource.html#encodedData">QMimeSource::encodedData</a>().</p> <p>Returns the stored data in the <i>format</i> given.</p> <p>See also <a href="q3storeddrag.html#setEncodedData">setEncodedData</a>().</p> <a name="//apple_ref/cpp/instm/Q3StoredDrag/format"></a> <h3 class="fn"><a name="format"></a>const char * Q3StoredDrag::format ( int <i>i</i> ) const <tt> [virtual]</tt></h3> <p>Reimplemented from <a href="qmimesource.html#format">QMimeSource::format</a>().</p> <a name="//apple_ref/cpp/instm/Q3StoredDrag/setEncodedData"></a> <h3 class="fn"><a name="setEncodedData"></a>void Q3StoredDrag::setEncodedData ( const <a href="qbytearray.html">QByteArray</a> & <i>data</i> ) <tt> [virtual]</tt></h3> <p>Sets the encoded <i>data</i> of this drag object. The encoded data is delivered to drop sites; it must be in a strictly defined and portable format.</p> <p>The drag object can't be dropped (by the user) until this function has been called.</p> <p>See also <a href="q3storeddrag.html#encodedData">encodedData</a>().</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td> <td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="40%" align="right"><div align="right">Qt 4.6.3</div></td> </tr></table></div></address></body> </html>