-rw-r--r-- | microkde/klineedit.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/microkde/klineedit.h b/microkde/klineedit.h index 65e2f59..70c72d1 100644 --- a/microkde/klineedit.h +++ b/microkde/klineedit.h | |||
@@ -10,15 +10,38 @@ | |||
10 | 10 | ||
11 | class KLineEdit : public QLineEdit | 11 | class 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 | } |
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 | } | ||
20 | 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 |