Diffstat (limited to 'noncore/unsupported/mail2/listviewplus.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/listviewplus.h | 37 |
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 | |||
6 | class QPopupMenu; | ||
7 | class QPoint; | ||
8 | class QTimer; | ||
9 | |||
10 | class ListViewPlus : public QListView | ||
11 | { | ||
12 | Q_OBJECT | ||
13 | |||
14 | public: | ||
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 | |||
20 | protected: | ||
21 | void keyPressEvent(QKeyEvent *event); | ||
22 | |||
23 | private slots: | ||
24 | void _initPopup(QListViewItem *, const QPoint &point, int); | ||
25 | void _cancelPopup(QListViewItem *, const QPoint &, int); | ||
26 | void _showPopup(); | ||
27 | |||
28 | private: | ||
29 | QPopupMenu *_popup; | ||
30 | QPoint _point; | ||
31 | QTimer *_timer; | ||
32 | int _delay; | ||
33 | |||
34 | }; | ||
35 | |||
36 | #endif | ||
37 | |||