summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/listviewplus.h
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/listviewplus.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/listviewplus.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/listviewplus.h b/noncore/unsupported/mail2/listviewplus.h
new file mode 100644
index 0000000..519bc39
--- a/dev/null
+++ b/noncore/unsupported/mail2/listviewplus.h
@@ -0,0 +1,37 @@
1#ifndef LISTVIEWPLUS_H
2#define LISTVIEWPLUS_H
3
4#include <qlistview.h>
5
6class QPopupMenu;
7class QPoint;
8class QTimer;
9
10class ListViewPlus : public QListView
11{
12 Q_OBJECT
13
14public:
15 ListViewPlus(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
16
17 void setPopup(QPopupMenu *popup, int delay = 800);
18 QPopupMenu *popup() { return _popup; }
19
20protected:
21 void keyPressEvent(QKeyEvent *event);
22
23private slots:
24 void _initPopup(QListViewItem *, const QPoint &point, int);
25 void _cancelPopup(QListViewItem *, const QPoint &, int);
26 void _showPopup();
27
28private:
29 QPopupMenu *_popup;
30 QPoint _point;
31 QTimer *_timer;
32 int _delay;
33
34};
35
36#endif
37