summaryrefslogtreecommitdiffabout
path: root/microkde/klineedit.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/klineedit.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/klineedit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/klineedit.h2
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,47 +1,49 @@
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
11class KLineEdit : public QLineEdit 13class 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 );
37 break; 39 break;
38 } 40 }
39 41
40 } 42 }
41 void setTrapReturnKey( bool ) {} 43 void setTrapReturnKey( bool ) {}
42 signals: 44 signals:
43 void scrollUP(); 45 void scrollUP();
44 void scrollDOWN(); 46 void scrollDOWN();
45}; 47};
46 48
47#endif 49#endif