[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qdragobject.cpp:981 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QImageDrag Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QImageDrag Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QImageDrag class provides a drag and drop object for
|
---|
| 35 | transferring images.
|
---|
| 36 | <a href="#details">More...</a>
|
---|
| 37 | <p><tt>#include <<a href="qdragobject-h.html">qdragobject.h</a>></tt>
|
---|
| 38 | <p>Inherits <a href="qdragobject.html">QDragObject</a>.
|
---|
| 39 | <p><a href="qimagedrag-members.html">List of all member functions.</a>
|
---|
| 40 | <h2>Public Members</h2>
|
---|
| 41 | <ul>
|
---|
| 42 | <li class=fn><a href="#QImageDrag"><b>QImageDrag</b></a> ( QImage image, QWidget * dragSource = 0, const char * name = 0 )</li>
|
---|
| 43 | <li class=fn><a href="#QImageDrag-2"><b>QImageDrag</b></a> ( QWidget * dragSource = 0, const char * name = 0 )</li>
|
---|
| 44 | <li class=fn><a href="#~QImageDrag"><b>~QImageDrag</b></a> ()</li>
|
---|
| 45 | <li class=fn>virtual void <a href="#setImage"><b>setImage</b></a> ( QImage image )</li>
|
---|
| 46 | </ul>
|
---|
| 47 | <h2>Static Public Members</h2>
|
---|
| 48 | <ul>
|
---|
| 49 | <li class=fn>bool <a href="#canDecode"><b>canDecode</b></a> ( const QMimeSource * e )</li>
|
---|
| 50 | <li class=fn>bool <a href="#decode"><b>decode</b></a> ( const QMimeSource * e, QImage & img )</li>
|
---|
| 51 | <li class=fn>bool <a href="#decode-2"><b>decode</b></a> ( const QMimeSource * e, QPixmap & pm )</li>
|
---|
| 52 | </ul>
|
---|
| 53 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | <p> The QImageDrag class provides a drag and drop object for
|
---|
| 57 | transferring images.
|
---|
| 58 | <p>
|
---|
| 59 | <p> Images are offered to the receiving application in multiple
|
---|
| 60 | formats, determined by Qt's <a href="qimage.html#outputFormats">output
|
---|
| 61 | formats</a>.
|
---|
| 62 | <p> For more information about drag and drop, see the <a href="qdragobject.html">QDragObject</a>
|
---|
| 63 | class and the <a href="dnd.html">drag and drop documentation</a>.
|
---|
| 64 | <p>See also <a href="draganddrop.html">Drag And Drop Classes</a>.
|
---|
| 65 |
|
---|
| 66 | <hr><h2>Member Function Documentation</h2>
|
---|
| 67 | <h3 class=fn><a name="QImageDrag"></a>QImageDrag::QImageDrag ( <a href="qimage.html">QImage</a> image, <a href="qwidget.html">QWidget</a> * dragSource = 0, const char * name = 0 )
|
---|
| 68 | </h3>
|
---|
| 69 | Constructs an image drag object and sets its data to <em>image</em>. <em>dragSource</em> must be the drag source; <em>name</em> is the object name.
|
---|
| 70 |
|
---|
| 71 | <h3 class=fn><a name="QImageDrag-2"></a>QImageDrag::QImageDrag ( <a href="qwidget.html">QWidget</a> * dragSource = 0, const char * name = 0 )
|
---|
| 72 | </h3>
|
---|
| 73 | Constructs a default image drag object. <em>dragSource</em> must be the
|
---|
| 74 | drag source; <em>name</em> is the object name.
|
---|
| 75 |
|
---|
| 76 | <h3 class=fn><a name="~QImageDrag"></a>QImageDrag::~QImageDrag ()
|
---|
| 77 | </h3>
|
---|
| 78 | Destroys the image drag object and frees up all allocated
|
---|
| 79 | resources.
|
---|
| 80 |
|
---|
| 81 | <h3 class=fn>bool <a name="canDecode"></a>QImageDrag::canDecode ( const <a href="qmimesource.html">QMimeSource</a> * e )<tt> [static]</tt>
|
---|
| 82 | </h3>
|
---|
| 83 | Returns TRUE if the information in mime source <em>e</em> can be decoded
|
---|
| 84 | into an image; otherwise returns FALSE.
|
---|
| 85 | <p> <p>See also <a href="#decode">decode</a>().
|
---|
| 86 |
|
---|
| 87 | <p>Example: <a href="desktop-example.html#x1731">desktop/desktop.cpp</a>.
|
---|
| 88 | <h3 class=fn>bool <a name="decode"></a>QImageDrag::decode ( const <a href="qmimesource.html">QMimeSource</a> * e, <a href="qimage.html">QImage</a> & img )<tt> [static]</tt>
|
---|
| 89 | </h3>
|
---|
| 90 | Attempts to decode the dropped information in mime source <em>e</em>
|
---|
| 91 | into <em>img</em>. Returns TRUE if successful; otherwise returns FALSE.
|
---|
| 92 | <p> <p>See also <a href="#canDecode">canDecode</a>().
|
---|
| 93 |
|
---|
| 94 | <p>Example: <a href="desktop-example.html#x1732">desktop/desktop.cpp</a>.
|
---|
| 95 | <h3 class=fn>bool <a name="decode-2"></a>QImageDrag::decode ( const <a href="qmimesource.html">QMimeSource</a> * e, <a href="qpixmap.html">QPixmap</a> & pm )<tt> [static]</tt>
|
---|
| 96 | </h3>
|
---|
| 97 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 98 | <p> Attempts to decode the dropped information in mime source <em>e</em>
|
---|
| 99 | into pixmap <em>pm</em>. Returns TRUE if successful; otherwise returns
|
---|
| 100 | FALSE.
|
---|
| 101 | <p> This is a convenience function that converts to a <a href="qpixmap.html">QPixmap</a> via a
|
---|
| 102 | <a href="qimage.html">QImage</a>.
|
---|
| 103 | <p> <p>See also <a href="#canDecode">canDecode</a>().
|
---|
| 104 |
|
---|
| 105 | <h3 class=fn>void <a name="setImage"></a>QImageDrag::setImage ( <a href="qimage.html">QImage</a> image )<tt> [virtual]</tt>
|
---|
| 106 | </h3>
|
---|
| 107 | Sets the image to be dragged to <em>image</em>. You will need to call
|
---|
| 108 | this if you did not pass the image during construction.
|
---|
| 109 |
|
---|
| 110 | <!-- eof -->
|
---|
| 111 | <hr><p>
|
---|
| 112 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 113 | Copyright © 1995-2007
|
---|
| 114 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 115 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 116 | <td>Copyright © 2007
|
---|
| 117 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 118 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 119 | </table></div></address></body>
|
---|
| 120 | </html>
|
---|