-rw-r--r-- | microkde/klineedit.h | 29 |
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 | |||
@@ -12,5 +12,9 @@ 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 |
@@ -18,5 +22,24 @@ class KLineEdit : public QLineEdit | |||
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 | }; |