Diffstat (limited to 'noncore/apps/zsafe/zlistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/zsafe/zlistview.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/noncore/apps/zsafe/zlistview.cpp b/noncore/apps/zsafe/zlistview.cpp new file mode 100644 index 0000000..23bbc4e --- a/dev/null +++ b/noncore/apps/zsafe/zlistview.cpp | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | ** $Id$ | ||
3 | */ | ||
4 | |||
5 | #include "zlistview.h" | ||
6 | #include <qlistview.h> | ||
7 | #include <qevent.h> | ||
8 | #include <stdio.h> | ||
9 | #include "zsafe.h" | ||
10 | |||
11 | ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) | ||
12 | { | ||
13 | zs = zsafe; | ||
14 | } | ||
15 | |||
16 | ZListView::~ZListView() | ||
17 | { | ||
18 | } | ||
19 | |||
20 | void ZListView::keyPressEvent ( QKeyEvent *e ) | ||
21 | { | ||
22 | /* | ||
23 | char buf[64]; | ||
24 | sprintf (buf, "key: %d\n", e->key()); | ||
25 | qWarning (buf); | ||
26 | */ | ||
27 | |||
28 | switch (e->key()) | ||
29 | { | ||
30 | case 32: // middle cursor key pressed | ||
31 | zs->showInfo (zs->selectedItem); | ||
32 | break; | ||
33 | default: | ||
34 | QListView::keyPressEvent( e ); | ||
35 | } | ||
36 | |||
37 | } | ||
38 | |||