summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/klineedit.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/microkde/klineedit.h b/microkde/klineedit.h
index 65e2f59..70c72d1 100644
--- a/microkde/klineedit.h
+++ b/microkde/klineedit.h
@@ -1,24 +1,47 @@
1#ifndef MINIKDE_KLINEEDIT_H 1#ifndef MINIKDE_KLINEEDIT_H
2#define MINIKDE_KLINEEDIT_H 2#define MINIKDE_KLINEEDIT_H
3 3
4#include <qlineedit.h> 4#include <qlineedit.h>
5 5
6#ifndef DESKTOP_VERSION 6#ifndef DESKTOP_VERSION
7#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
8#endif 8#endif
9 9
10 10
11class KLineEdit : public QLineEdit 11class KLineEdit : public QLineEdit
12{ 12{
13
14 Q_OBJECT
15
13 public: 16 public:
14 KLineEdit( QWidget *parent=0, const char *name=0 ) : 17 KLineEdit( QWidget *parent=0, const char *name=0 ) :
15 QLineEdit( parent, name ) { 18 QLineEdit( parent, name )
19 {
16#ifndef DESKTOP_VERSION 20#ifndef DESKTOP_VERSION
17 QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); 21 QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
18#endif 22#endif
19} 23 }
20 24 void keyPressEvent ( QKeyEvent * e)
25 {
26 switch ( e->key() ) {
27 case Qt::Key_Down:
28 emit scrollDOWN();
29 e->accept();
30 break;
31 case Qt::Key_Up:
32 emit scrollUP();
33 e->accept();
34 break;
35 default:
36 QLineEdit::keyPressEvent ( e );
37 break;
38 }
39
40 }
21 void setTrapReturnKey( bool ) {} 41 void setTrapReturnKey( bool ) {}
42 signals:
43 void scrollUP();
44 void scrollDOWN();
22}; 45};
23 46
24#endif 47#endif