summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/dnd.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/demo/dnd/dnd.h')
-rw-r--r--examples/demo/dnd/dnd.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/demo/dnd/dnd.h b/examples/demo/dnd/dnd.h
new file mode 100644
index 000000000..311360daf
--- /dev/null
+++ b/examples/demo/dnd/dnd.h
@@ -0,0 +1,40 @@
+#include <qpixmap.h>
+#include <qmap.h>
+#include "dndbase.h"
+
+#ifndef DNDDEMO_H
+#define DNDDEMO_H
+
+class IconItem
+{
+public:
+ IconItem( const TQString& name = TQString::null, const TQString& icon = TQString::null );
+
+ TQString name() { return _name; }
+ TQPixmap *pixmap() { return &_pixmap; }
+
+ Q_DUMMY_COMPARISON_OPERATOR( IconItem )
+
+protected:
+ TQPixmap loadPixmap( const TQString& name );
+
+private:
+ TQString _name;
+ TQPixmap _pixmap;
+};
+
+class DnDDemo : public DnDDemoBase
+{
+ Q_OBJECT
+
+public:
+ DnDDemo( TQWidget* parent = 0, const char* name = 0 );
+ ~DnDDemo();
+
+ IconItem findItem( const TQString& tag );
+
+private:
+ TQMap<TQString,IconItem> items;
+};
+
+#endif