From d796c9dd933ab96ec83b9a634feedd5d32e1ba3f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 8 Nov 2011 12:31:36 -0600 Subject: Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731 --- examples/demo/dnd/listview.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/demo/dnd/listview.h (limited to 'examples/demo/dnd/listview.h') 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 + +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; +}; -- cgit v1.2.1