summaryrefslogtreecommitdiff
path: root/noncore/apps/zsafe/zlistview.cpp
blob: ba02a15f92b2fd2a4b8c5990e5aeea4245206bae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
** $Id$
*/

#include "zlistview.h"
#include <stdio.h>
#include "zsafe.h"

ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id)
{
   zs = zsafe;
}

ZListView::~ZListView()
{
}

void ZListView::keyPressEvent ( QKeyEvent *e )
{
/*
   char buf[64];
   sprintf (buf, "key: %d\n", e->key());
   qWarning (buf);
*/

   switch (e->key())
   {
      case 32: // middle cursor key pressed
         zs->showInfo (zs->selectedItem);
         break;
      default:
         QListView::keyPressEvent( e );
   }

}