summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/iconview.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/demo/dnd/iconview.h')
-rw-r--r--examples/demo/dnd/iconview.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/demo/dnd/iconview.h b/examples/demo/dnd/iconview.h
new file mode 100644
index 0000000..cd917f7
--- /dev/null
+++ b/examples/demo/dnd/iconview.h
@@ -0,0 +1,31 @@
+#include <qiconview.h>
+#include <qstring.h>
+
+#include "dnd.h"
+
+class IconViewItem : public QIconViewItem
+{
+public:
+ IconViewItem( QIconView * parent, const QString & text, const QPixmap & icon, const QString& tag )
+ : QIconViewItem( parent, text, icon ), _tag( tag ) {}
+ virtual ~IconViewItem() {}
+
+ QString tag() { return _tag; }
+
+private:
+ QString _tag;
+};
+
+class IconView : public QIconView
+{
+ Q_OBJECT
+
+public:
+ IconView( QWidget* parent = 0, const char* name = 0 );
+ ~IconView();
+
+ QDragObject *dragObject();
+
+public slots:
+ void slotNewItem( QDropEvent *t, const QValueList<QIconDragItem>& );
+};