summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-05-02 10:59:23 (UTC)
committer harlekin <harlekin>2002-05-02 10:59:23 (UTC)
commit3e4ce540942b6342a00c272dac171e729ae2b08b (patch) (unidiff)
tree9251a7389328a4d581b9e1c9848f8d6dc139a555
parent9b22572f07ec954e9dda33e99f7fc681e3c50827 (diff)
downloadopie-3e4ce540942b6342a00c272dac171e729ae2b08b.zip
opie-3e4ce540942b6342a00c272dac171e729ae2b08b.tar.gz
opie-3e4ce540942b6342a00c272dac171e729ae2b08b.tar.bz2
removed the hack that limited the bad influence of the sticky bug on ipaq, since it is not needed any more. Sticky bug is fixed in 2.4.18-rmk3 hh6
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/keyboard/keyboard.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp
index a04c45a..0f0b188 100644
--- a/inputmethods/keyboard/keyboard.cpp
+++ b/inputmethods/keyboard/keyboard.cpp
@@ -25,74 +25,74 @@
25#include <qwindowsystem_qws.h> 25#include <qwindowsystem_qws.h>
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <ctype.h> 29#include <ctype.h>
30 30
31#include <sys/utsname.h> 31#include <sys/utsname.h>
32 32
33 33
34#define USE_SMALL_BACKSPACE 34#define USE_SMALL_BACKSPACE
35 35
36Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : 36Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
37 QFrame(parent, _name, f), shift(FALSE), lock(FALSE), ctrl(FALSE), 37 QFrame(parent, _name, f), shift(FALSE), lock(FALSE), ctrl(FALSE),
38 alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1), 38 alt(FALSE), useLargeKeys(TRUE), useOptiKeys(0), pressedKey(-1),
39 unicode(-1), qkeycode(0), modifiers(0) 39 unicode(-1), qkeycode(0), modifiers(0)
40{ 40{
41 // setPalette(QPalette(QColor(240,240,230))); // Beige! 41 // setPalette(QPalette(QColor(240,240,230))); // Beige!
42 // setFont( QFont( "Helvetica", 8 ) ); 42 // setFont( QFont( "Helvetica", 8 ) );
43// setPalette(QPalette(QColor(200,200,200))); // Gray 43// setPalette(QPalette(QColor(200,200,200))); // Gray
44 setPalette(QPalette(QColor(220,220,220))); // Gray 44 setPalette(QPalette(QColor(220,220,220))); // Gray
45 45
46 picks = new KeyboardPicks( this ); 46 picks = new KeyboardPicks( this );
47 picks->setFont( QFont( "smallsmooth", 9 ) ); 47 picks->setFont( QFont( "smallsmooth", 9 ) );
48 setFont( QFont( "smallsmooth", 9 ) ); 48 setFont( QFont( "smallsmooth", 9 ) );
49 picks->initialise(); 49 picks->initialise();
50 QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), 50 QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ),
51 this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); 51 this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) );
52 52
53 repeatTimer = new QTimer( this ); 53 repeatTimer = new QTimer( this );
54 54
55 // temporary quick and dirty fix for the "sticky keyboard bug" 55 // temporary quick and dirty fix for the "sticky keyboard bug"
56 // on ipaq. 56 // on ipaq.
57 struct utsname name; 57// struct utsname name;
58 if (uname(&name) != -1) 58// if (uname(&name) != -1)
59 { 59 // {
60 QString release=name.release; 60 //QString release=name.release;
61 qWarning("System release: %s\n", name.release); 61 //qWarning("System release: %s\n", name.release);
62 if(release.find("embedix",0,TRUE) !=-1) 62 //if(release.find("embedix",0,TRUE) !=-1)
63 { 63 // {
64 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); 64 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
65 } 65 // }
66 } 66 // }
67} 67}
68 68
69void Keyboard::resizeEvent(QResizeEvent*) 69void Keyboard::resizeEvent(QResizeEvent*)
70{ 70{
71 int ph = picks->sizeHint().height(); 71 int ph = picks->sizeHint().height();
72 picks->setGeometry( 0, 0, width(), ph ); 72 picks->setGeometry( 0, 0, width(), ph );
73 keyHeight = (height()-ph)/5; 73 keyHeight = (height()-ph)/5;
74 int nk; 74 int nk;
75 if ( useOptiKeys ) { 75 if ( useOptiKeys ) {
76 nk = 15; 76 nk = 15;
77 } else if ( useLargeKeys ) { 77 } else if ( useLargeKeys ) {
78 nk = 15; 78 nk = 15;
79 } else { 79 } else {
80 nk = 19; 80 nk = 19;
81 } 81 }
82 defaultKeyWidth = width()/nk; 82 defaultKeyWidth = width()/nk;
83 xoffs = (width()-defaultKeyWidth*nk)/2; 83 xoffs = (width()-defaultKeyWidth*nk)/2;
84} 84}
85 85
86void KeyboardPicks::initialise() 86void KeyboardPicks::initialise()
87{ 87{
88 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 88 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
89 mode = 0; 89 mode = 0;
90 dc = new KeyboardConfig(this); 90 dc = new KeyboardConfig(this);
91 configs.append(dc); 91 configs.append(dc);
92} 92}
93 93
94QSize KeyboardPicks::sizeHint() const 94QSize KeyboardPicks::sizeHint() const
95{ 95{
96 return QSize(240,fontMetrics().lineSpacing()); 96 return QSize(240,fontMetrics().lineSpacing());
97} 97}
98 98