[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/iconview/qiconview.cpp:2257 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>iconview/simple_dd/main.h Example File</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>iconview/simple_dd/main.h Example File</h1>
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | <pre>/****************************************************************************
|
---|
| 36 | ** $Id: iconview-simple_dd-main-h.html 2051 2007-02-21 10:04:20Z chehrlic $
|
---|
| 37 | **
|
---|
| 38 | ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
---|
| 39 | **
|
---|
| 40 | ** This file is part of an example program for Qt. This example
|
---|
| 41 | ** program may be used, distributed and modified without limitation.
|
---|
| 42 | **
|
---|
| 43 | *****************************************************************************/
|
---|
| 44 |
|
---|
| 45 | #include <<a href="qapplication-h.html">qapplication.h</a>>
|
---|
| 46 | #include <<a href="qcursor-h.html">qcursor.h</a>>
|
---|
| 47 | #include <<a href="qsplitter-h.html">qsplitter.h</a>>
|
---|
| 48 | #include <<a href="qlistbox-h.html">qlistbox.h</a>>
|
---|
| 49 | #include <<a href="qiconview-h.html">qiconview.h</a>>
|
---|
| 50 | #include <<a href="qpixmap-h.html">qpixmap.h</a>>
|
---|
| 51 |
|
---|
| 52 | class QDragEnterEvent;
|
---|
| 53 | class QDragDropEvent;
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | class DDListBox : public <a href="qlistbox.html">QListBox</a>
|
---|
| 57 | {
|
---|
| 58 | Q_OBJECT
|
---|
| 59 | public:
|
---|
| 60 | DDListBox( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0, WFlags f = 0 );
|
---|
| 61 | // Low-level drag and drop
|
---|
| 62 | void dragEnterEvent( <a href="qdragenterevent.html">QDragEnterEvent</a> *evt );
|
---|
| 63 | void dropEvent( <a href="qdropevent.html">QDropEvent</a> *evt );
|
---|
| 64 | void mousePressEvent( <a href="qmouseevent.html">QMouseEvent</a> *evt );
|
---|
| 65 | void mouseMoveEvent( <a href="qmouseevent.html">QMouseEvent</a> * );
|
---|
| 66 | private:
|
---|
| 67 | int dragging;
|
---|
| 68 | };
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | class DDIconViewItem : public <a href="qiconviewitem.html">QIconViewItem</a>
|
---|
| 72 | {
|
---|
| 73 | public:
|
---|
| 74 | DDIconViewItem( <a href="qiconview.html">QIconView</a> *parent, const <a href="qstring.html">QString</a>& text, const <a href="qpixmap.html">QPixmap</a>& icon ) :
|
---|
| 75 | <a href="qiconviewitem.html">QIconViewItem</a>( parent, text, icon ) {}
|
---|
| 76 | DDIconViewItem( <a href="qiconview.html">QIconView</a> *parent, const <a href="qstring.html">QString</a> &text ) :
|
---|
| 77 | <a href="qiconviewitem.html">QIconViewItem</a>( parent, text ) {}
|
---|
| 78 | // High-level drag and drop
|
---|
| 79 | bool acceptDrop( const <a href="qmimesource.html">QMimeSource</a> *mime ) const;
|
---|
| 80 | void dropped( <a href="qdropevent.html">QDropEvent</a> *evt, const <a href="qvaluelist.html">QValueList</a><QIconDragItem>& );
|
---|
| 81 | };
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | class DDIconView : public <a href="qiconview.html">QIconView</a>
|
---|
| 85 | {
|
---|
| 86 | Q_OBJECT
|
---|
| 87 | public:
|
---|
| 88 | DDIconView( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0, WFlags f = 0 ) :
|
---|
| 89 | <a href="qiconview.html">QIconView</a>( parent, name, f ) {}
|
---|
| 90 | // High-level drag and drop
|
---|
| 91 | <a href="qdragobject.html">QDragObject</a> *dragObject();
|
---|
| 92 | public slots:
|
---|
| 93 | void slotNewItem( <a href="qdropevent.html">QDropEvent</a> *evt, const <a href="qvaluelist.html">QValueList</a><QIconDragItem>& list );
|
---|
| 94 | };
|
---|
| 95 |
|
---|
| 96 | </pre><!-- eof -->
|
---|
| 97 | <p><address><hr><div align=center>
|
---|
| 98 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 99 | <td>Copyright © 2007
|
---|
| 100 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 101 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 102 | </table></div></address></body>
|
---|
| 103 | </html>
|
---|