summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/listview.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-08 12:31:36 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-08 12:31:36 -0600
commitd796c9dd933ab96ec83b9a634feedd5d32e1ba3f (patch)
tree6e3dcca4f77e20ec8966c666aac7c35bd4704053 /examples/demo/dnd/listview.h
downloadtqt-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.tar.gz
tqt-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.zip
Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731
Diffstat (limited to 'examples/demo/dnd/listview.h')
-rw-r--r--examples/demo/dnd/listview.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/demo/dnd/listview.h b/examples/demo/dnd/listview.h
new file mode 100644
index 000000000..b6b17a0da
--- /dev/null
+++ b/examples/demo/dnd/listview.h
@@ -0,0 +1,35 @@
+#include <qlistview.h>
+
+class ListViewItem : public TQListViewItem
+{
+public:
+ ListViewItem ( TQListView * parent, const TQString& name, const TQString& tag )
+ : TQListViewItem( parent, name ), _tag( tag ) {}
+ ListViewItem ( TQListView * parent, TQListViewItem * after, const TQString& name, const TQString& tag )
+ : TQListViewItem( parent, after, name ), _tag( tag ) {}
+ virtual ~ListViewItem() {}
+
+ TQString tag() { return _tag; }
+
+private:
+ TQString _tag;
+};
+
+class ListView : public TQListView
+{
+ Q_OBJECT
+
+public:
+ ListView( TQWidget* parent = 0, const char* name = 0 );
+ ~ListView();
+
+ void dragEnterEvent( TQDragEnterEvent * );
+ void dropEvent( TQDropEvent * );
+ void contentsMousePressEvent( TQMouseEvent * );
+ void contentsMouseMoveEvent( TQMouseEvent * );
+ void contentsMouseReleaseEvent( TQMouseEvent * );
+
+private:
+ TQPoint pressPos;
+ bool dragging;
+};