-rw-r--r-- | microkde/klineedit.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/microkde/klineedit.h b/microkde/klineedit.h index 70c72d1..9eb749d 100644 --- a/microkde/klineedit.h +++ b/microkde/klineedit.h | |||
@@ -1,36 +1,38 @@ | |||
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 | //Added by qt3to4: | ||
6 | #include <QKeyEvent> | ||
5 | 7 | ||
6 | #ifndef DESKTOP_VERSION | 8 | #ifndef DESKTOP_VERSION |
7 | #include <qpe/qpeapplication.h> | 9 | #include <qpe/qpeapplication.h> |
8 | #endif | 10 | #endif |
9 | 11 | ||
10 | 12 | ||
11 | class KLineEdit : public QLineEdit | 13 | class KLineEdit : public QLineEdit |
12 | { | 14 | { |
13 | 15 | ||
14 | Q_OBJECT | 16 | Q_OBJECT |
15 | 17 | ||
16 | public: | 18 | public: |
17 | KLineEdit( QWidget *parent=0, const char *name=0 ) : | 19 | KLineEdit( QWidget *parent=0, const char *name=0 ) : |
18 | QLineEdit( parent, name ) | 20 | QLineEdit( parent, name ) |
19 | { | 21 | { |
20 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
21 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); | 23 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); |
22 | #endif | 24 | #endif |
23 | } | 25 | } |
24 | void keyPressEvent ( QKeyEvent * e) | 26 | void keyPressEvent ( QKeyEvent * e) |
25 | { | 27 | { |
26 | switch ( e->key() ) { | 28 | switch ( e->key() ) { |
27 | case Qt::Key_Down: | 29 | case Qt::Key_Down: |
28 | emit scrollDOWN(); | 30 | emit scrollDOWN(); |
29 | e->accept(); | 31 | e->accept(); |
30 | break; | 32 | break; |
31 | case Qt::Key_Up: | 33 | case Qt::Key_Up: |
32 | emit scrollUP(); | 34 | emit scrollUP(); |
33 | e->accept(); | 35 | e->accept(); |
34 | break; | 36 | break; |
35 | default: | 37 | default: |
36 | QLineEdit::keyPressEvent ( e ); | 38 | QLineEdit::keyPressEvent ( e ); |