summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-22 11:58:33 (UTC)
committer sandman <sandman>2002-10-22 11:58:33 (UTC)
commit486280adc2ab5dc383a56d8516c36727eb382812 (patch) (unidiff)
tree583cf961ec5c62c46137be36fcd9789d7d01158e
parent1ee836bd1bb777dded54810909e508dc0470ada3 (diff)
downloadopie-486280adc2ab5dc383a56d8516c36727eb382812.zip
opie-486280adc2ab5dc383a56d8516c36727eb382812.tar.gz
opie-486280adc2ab5dc383a56d8516c36727eb382812.tar.bz2
handwriting: qtopia 1.6 merge
all: someone made all inputmethod name()s untranslateable. This cured a symptom (opie crashing), but it was not real a bug-fix. I have marked them as translateable again and found no problems doing so.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dvorak/dvorakimpl.cpp3
-rw-r--r--inputmethods/handwriting/handwritingimpl.cpp3
-rw-r--r--inputmethods/handwriting/qimpenhelp.cpp43
-rw-r--r--inputmethods/handwriting/qimpeninput.cpp17
-rw-r--r--inputmethods/handwriting/qimpenprofile.cpp6
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp10
-rw-r--r--inputmethods/jumpx/keyboardimpl.cpp3
-rw-r--r--inputmethods/keyboard/keyboardimpl.cpp3
-rw-r--r--inputmethods/kjumpx/keyboardimpl.cpp3
-rw-r--r--inputmethods/pickboard/pickboardimpl.cpp3
-rw-r--r--inputmethods/unikeyboard/unikeyboardimpl.cpp3
11 files changed, 44 insertions, 53 deletions
diff --git a/inputmethods/dvorak/dvorakimpl.cpp b/inputmethods/dvorak/dvorakimpl.cpp
index d58b6b9..3c83464 100644
--- a/inputmethods/dvorak/dvorakimpl.cpp
+++ b/inputmethods/dvorak/dvorakimpl.cpp
@@ -87,34 +87,33 @@ QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
87 87
88void KeyboardImpl::resetState() 88void KeyboardImpl::resetState()
89{ 89{
90 if ( input ) 90 if ( input )
91 input->resetState(); 91 input->resetState();
92} 92}
93 93
94QPixmap *KeyboardImpl::icon() 94QPixmap *KeyboardImpl::icon()
95{ 95{
96 if ( !icn ) 96 if ( !icn )
97 icn = new QPixmap( (const char **)kb_xpm ); 97 icn = new QPixmap( (const char **)kb_xpm );
98 return icn; 98 return icn;
99} 99}
100 100
101QString KeyboardImpl::name() 101QString KeyboardImpl::name()
102{ 102{
103 // return qApp->translate( "InputMethods", "Dvorak" ); 103 return qApp->translate( "InputMethods", "Dvorak" );
104 return "Dvorak";
105} 104}
106 105
107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 106void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
108{ 107{
109 if ( input ) 108 if ( input )
110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 109 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
111} 110}
112 111
113#ifndef QT_NO_COMPONENT 112#ifndef QT_NO_COMPONENT
114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 113QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
115{ 114{
116 *iface = 0; 115 *iface = 0;
117 if ( uuid == IID_QUnknown ) 116 if ( uuid == IID_QUnknown )
118 *iface = this; 117 *iface = this;
119 else if ( uuid == IID_InputMethod ) 118 else if ( uuid == IID_InputMethod )
120 *iface = this; 119 *iface = this;
diff --git a/inputmethods/handwriting/handwritingimpl.cpp b/inputmethods/handwriting/handwritingimpl.cpp
index 0ea140c..c39e1aa 100644
--- a/inputmethods/handwriting/handwritingimpl.cpp
+++ b/inputmethods/handwriting/handwritingimpl.cpp
@@ -70,34 +70,33 @@ QWidget *HandwritingImpl::inputMethod( QWidget *parent, Qt::WFlags f )
70 70
71void HandwritingImpl::resetState() 71void HandwritingImpl::resetState()
72{ 72{
73 if ( input ) 73 if ( input )
74 input->resetState(); 74 input->resetState();
75} 75}
76 76
77QPixmap *HandwritingImpl::icon() 77QPixmap *HandwritingImpl::icon()
78{ 78{
79 if ( !icn ) 79 if ( !icn )
80 icn = new QPixmap( (const char **)pen_xpm ); 80 icn = new QPixmap( (const char **)pen_xpm );
81 return icn; 81 return icn;
82} 82}
83 83
84QString HandwritingImpl::name() 84QString HandwritingImpl::name()
85{ 85{
86 // return qApp->translate( "InputMethods", "Handwriting" ); 86 return qApp->translate( "InputMethods", "Handwriting" );
87 return "Handwriting";
88} 87}
89 88
90void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot ) 89void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot )
91{ 90{
92 if ( input ) 91 if ( input )
93 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 92 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
94} 93}
95 94
96#ifndef QT_NO_COMPONENT 95#ifndef QT_NO_COMPONENT
97QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 96QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
98{ 97{
99 *iface = 0; 98 *iface = 0;
100 if ( uuid == IID_QUnknown ) 99 if ( uuid == IID_QUnknown )
101 *iface = this; 100 *iface = this;
102 else if ( uuid == IID_InputMethod ) 101 else if ( uuid == IID_InputMethod )
103 *iface = this; 102 *iface = this;
diff --git a/inputmethods/handwriting/qimpenhelp.cpp b/inputmethods/handwriting/qimpenhelp.cpp
index 5ee46a2..a294301 100644
--- a/inputmethods/handwriting/qimpenhelp.cpp
+++ b/inputmethods/handwriting/qimpenhelp.cpp
@@ -1,20 +1,20 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
@@ -122,164 +122,165 @@ HandwritingHelp::HandwritingHelp( QIMPenProfile *p, QWidget *parent, const char
122 122
123void HandwritingHelp::showEvent( QShowEvent * ) 123void HandwritingHelp::showEvent( QShowEvent * )
124{ 124{
125 Global::hideInputMethod(); 125 Global::hideInputMethod();
126} 126}
127 127
128void HandwritingHelp::hideEvent( QHideEvent * ) 128void HandwritingHelp::hideEvent( QHideEvent * )
129{ 129{
130 Global::showInputMethod(); 130 Global::showInputMethod();
131} 131}
132 132
133//--------------------------------------------------------------------------- 133//---------------------------------------------------------------------------
134 134
135HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const char *name ) 135HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const char *name )
136 : QWidget( parent, name ), profile(p) 136 : QWidget( parent, name ), profile(p)
137{ 137{
138 QGridLayout *gl = new QGridLayout( this, 5, 2, 0, 4 ); 138 QGridLayout *gl = new QGridLayout( this, 4, 2, 0, 4 );
139 gl->setRowStretch( 1, 1 );
140 gl->setRowStretch( 2, 1 );
141 gl->setColStretch( 1, 1 ); 139 gl->setColStretch( 1, 1 );
140 gl->setRowStretch(3, 1);
142 141
143 charSetCombo = new QComboBox( this ); 142 charSetCombo = new QComboBox( this );
144 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); 143 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 );
145 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); 144 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int)));
146 QIMPenCharSetIterator it( profile->charSets() ); 145 QIMPenCharSetIterator it( profile->charSets() );
147 for ( ; it.current(); ++it ) { 146 for ( ; it.current(); ++it ) {
148 charSetCombo->insertItem( it.current()->description() ); 147 charSetCombo->insertItem( it.current()->description() );
149 } 148 }
150 149
151 charList = new QListBox( this ); 150 charList = new QListBox( this );
152 charList->setHScrollBarMode( QListBox::AlwaysOff ); 151 charList->setHScrollBarMode( QListBox::AlwaysOff );
153 charList->setFixedWidth( 80 ); 152 charList->setFixedWidth(80);
154 connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); 153 connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) );
155 gl->addMultiCellWidget( charList, 1, 2, 0, 0 ); 154 gl->addWidget(charList, 1, 0);
156
157 QLabel *help = new QLabel( this );
158 help->setAlignment( AlignLeft | AlignVCenter | WordBreak );
159 gl->addWidget( help, 1, 1 );
160 help->setText(
161 tr( "Select a character from the list. The writing area on the left "
162 "shows the reference character. Practice writing in the area on "
163 "the right.") );
164 155
165 result = new QLabel( this ); 156 result = new QLabel( this );
166 gl->addMultiCellWidget( result, 2, 3, 1, 1 ); 157 result->setAlignment(AlignLeft | AlignVCenter | WordBreak);
158 result->setText(
159 tr( "Select a reference character from the list. Practice writing in "
160 "the area on the right."));
161 gl->addMultiCellWidget(result, 1, 2, 1, 1);
167 162
168 matcher = new QIMPenMatch( this ); 163 matcher = new QIMPenMatch( this );
169 matcher->setCharSet( currentSet ); 164 matcher->setCharSet( currentSet );
170 connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) ); 165 connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) );
171 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), 166 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)),
172 this, SLOT(matched(const QIMPenCharMatchList &)) ); 167 this, SLOT(matched(const QIMPenCharMatchList &)) );
173 168
174 QHBoxLayout *hb = new QHBoxLayout(); 169 QHBoxLayout *hb = new QHBoxLayout();
175 gl->addLayout( hb, 3, 0 ); 170 gl->addLayout( hb, 2, 0 );
176 prevBtn = new QPushButton( this ); 171 prevBtn = new QPushButton( this );
177 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); 172 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) );
178 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); 173 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar()));
179 hb->addWidget( prevBtn ); 174 hb->addWidget( prevBtn );
180 175
181 nextBtn = new QPushButton( this ); 176 nextBtn = new QPushButton( this );
182 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); 177 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) );
183 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); 178 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar()));
184 hb->addWidget( nextBtn ); 179 hb->addWidget( nextBtn );
185 180
186 refPw = new QIMPenWidget( this ); 181 refPw = new QIMPenWidget( this );
187 refPw->setReadOnly( TRUE ); 182 refPw->setReadOnly( TRUE );
188 gl->addWidget( refPw, 4, 0 ); 183 gl->addWidget( refPw, 3, 0 );
189 184
190 pracPw = new QIMPenWidget( this ); 185 pracPw = new QIMPenWidget( this );
191 connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); 186 connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) );
192 connect( pracPw, SIGNAL(beginStroke()), 187 connect( pracPw, SIGNAL(beginStroke()),
193 this, SLOT(beginStroke()) ); 188 this, SLOT(beginStroke()) );
194 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), 189 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )),
195 this, SLOT(strokeEntered( QIMPenStroke * )) ); 190 this, SLOT(strokeEntered( QIMPenStroke * )) );
196 connect( pracPw, SIGNAL(beginStroke()), 191 connect( pracPw, SIGNAL(beginStroke()),
197 matcher, SLOT(beginStroke()) ); 192 matcher, SLOT(beginStroke()) );
198 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), 193 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )),
199 matcher, SLOT(strokeEntered( QIMPenStroke * )) ); 194 matcher, SLOT(strokeEntered( QIMPenStroke * )) );
200 gl->addWidget( pracPw, 4, 1 ); 195 gl->addWidget( pracPw, 3, 1 );
201 196
202 redrawTimer = new QTimer( this ); 197 redrawTimer = new QTimer( this );
203 connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) ); 198 connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) );
204 redrawTimer->start( 5000 ); 199 redrawTimer->start( 5000 );
205 200
206 currentSet = 0; 201 currentSet = 0;
207 charSetCombo->setCurrentItem( 1 ); 202 charSetCombo->setCurrentItem( 1 );
208 selectCharSet( 1 ); 203 selectCharSet( 1 );
209} 204}
210 205
211HandwritingTrainer::~HandwritingTrainer() 206HandwritingTrainer::~HandwritingTrainer()
212{ 207{
213} 208}
214 209
215void HandwritingTrainer::showEvent( QShowEvent * ) 210void HandwritingTrainer::showEvent( QShowEvent * )
216{ 211{
217 redrawChar(); 212 redrawChar();
218 redrawTimer->start( 5000 ); 213 redrawTimer->start( 5000 );
219} 214}
220 215
221void HandwritingTrainer::setCurrentChar( QIMPenChar *c ) 216void HandwritingTrainer::setCurrentChar( QIMPenChar *c )
222{ 217{
223 currentChar = c; 218 currentChar = c;
224 refPw->showCharacter( currentChar ); 219 refPw->showCharacter( currentChar );
225 pracPw->clear(); 220 pracPw->clear();
226 if ( currentChar ) { 221 if ( currentChar ) {
227 prevBtn->setEnabled( findPrev() != 0 ); 222 prevBtn->setEnabled( findPrev() != 0 );
228 nextBtn->setEnabled( findNext() != 0 ); 223 nextBtn->setEnabled( findNext() != 0 );
229 } 224 }
230 result->setText( "" );
231 redrawTimer->start( 5000 ); 225 redrawTimer->start( 5000 );
232} 226}
233 227
234void HandwritingTrainer::selectChar( int i ) 228void HandwritingTrainer::selectChar( int i )
235{ 229{
230 static int last_char = 0;
231
232 if (last_char != i) {
233 result->setText("");
234 }
235
236 currentChar = 0; 236 currentChar = 0;
237 currentCode = ((CharListItem *)charList->item(i))->code(); 237 currentCode = ((CharListItem *)charList->item(i))->code();
238 QIMPenCharIterator it(currentSet->characters() ); 238 QIMPenCharIterator it(currentSet->characters() );
239 for ( ; it.current(); ++it ) { 239 for ( ; it.current(); ++it ) {
240 if ( it.current()->character() == currentCode && 240 if ( it.current()->character() == currentCode &&
241 !it.current()->testFlag( QIMPenChar::Deleted ) ) { 241 !it.current()->testFlag( QIMPenChar::Deleted ) ) {
242 setCurrentChar( it.current() ); 242 setCurrentChar( it.current() );
243 break; 243 break;
244 } 244 }
245 } 245 }
246 if ( !it.current() ) 246 if ( !it.current() )
247 setCurrentChar( 0 ); 247 setCurrentChar( 0 );
248} 248}
249 249
250void HandwritingTrainer::selectCharSet( int i ) 250void HandwritingTrainer::selectCharSet( int i )
251{ 251{
252 if ( currentSet ) { 252 if ( currentSet ) {
253 refPw->removeCharSet( 0 ); 253 refPw->removeCharSet( 0 );
254 pracPw->removeCharSet( 0 ); 254 pracPw->removeCharSet( 0 );
255 result->setText("");
255 } 256 }
256 currentSet = profile->charSets().at( i ); 257 currentSet = profile->charSets().at( i );
257 fillCharList(); 258 fillCharList();
258 refPw->insertCharSet( currentSet ); 259 refPw->insertCharSet( currentSet );
259 pracPw->insertCharSet( currentSet ); 260 pracPw->insertCharSet( currentSet );
260 matcher->setCharSet( currentSet ); 261 matcher->setCharSet( currentSet );
261 if ( charList->count() ) { 262 if ( charList->count() ) {
262 charList->setSelected( 0, TRUE ); 263 charList->setSelected( 0, TRUE );
263 selectChar(0); 264 selectChar(0);
264 } 265 }
265} 266}
266 267
267void HandwritingTrainer::noMatch() 268void HandwritingTrainer::noMatch()
268{ 269{
269 result->setText( "No match" ); 270 result->setText( tr("No match") );
270} 271}
271 272
272void HandwritingTrainer::matched( const QIMPenCharMatchList &ml ) 273void HandwritingTrainer::matched( const QIMPenCharMatchList &ml )
273{ 274{
274 int maxErr = 20000 + (*ml.begin()).penChar->strokeLength(0) * 1000; 275 int maxErr = 20000 + (*ml.begin()).penChar->strokeLength(0) * 1000;
275 int baseErr = (*ml.begin()).penChar->strokeLength(0) * 250; 276 int baseErr = (*ml.begin()).penChar->strokeLength(0) * 250;
276 unsigned int numStrokes = (*ml.begin()).penChar->strokeCount(); 277 unsigned int numStrokes = (*ml.begin()).penChar->strokeCount();
277 QIMPenCharMatchList::ConstIterator it; 278 QIMPenCharMatchList::ConstIterator it;
278 /* 279 /*
279 for ( it = ml.begin(); it != ml.end(); ++it ) { 280 for ( it = ml.begin(); it != ml.end(); ++it ) {
280 if ( (*it).penChar->strokeCount() == numStrokes ) { 281 if ( (*it).penChar->strokeCount() == numStrokes ) {
281 if ( (*it).error > maxErr ) 282 if ( (*it).error > maxErr )
282 maxErr = (*it).error; 283 maxErr = (*it).error;
283 } 284 }
284 } 285 }
285 */ 286 */
diff --git a/inputmethods/handwriting/qimpeninput.cpp b/inputmethods/handwriting/qimpeninput.cpp
index 6a21931..3f7a347 100644
--- a/inputmethods/handwriting/qimpeninput.cpp
+++ b/inputmethods/handwriting/qimpeninput.cpp
@@ -1,20 +1,20 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
@@ -121,34 +121,34 @@ static char * help_xpm[] = {
121" .+..@+. ", 121" .+..@+. ",
122" #.# .+. ", 122" #.# .+. ",
123" .+. ", 123" .+. ",
124" .+. ", 124" .+. ",
125" .+. ", 125" .+. ",
126" .+. ", 126" .+. ",
127" #.# ", 127" #.# ",
128" .+. ", 128" .+. ",
129" #.# "}; 129" #.# "};
130 130
131 131
132/*! 132/*!
133 \class QIMPenInput qimpeninput.h 133 \class QIMPenInput qimpeninput.h
134 134
135 Pen input widget. 135 Pen input widget.
136*/ 136*/
137QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags flags ) 137QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags f )
138 : QFrame( parent, name, flags ), helpDlg(0), profile(0) 138 : QFrame( parent, name, f ), helpDlg(0), profile(0)
139{ 139{
140 setFrameStyle( Box | Plain ); 140 setFrameStyle( Box | Plain );
141 141
142 profileList.setAutoDelete( true ); 142 profileList.setAutoDelete( true );
143 143
144 matcher = new QIMPenMatch( this ); 144 matcher = new QIMPenMatch( this );
145 connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) ); 145 connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) );
146 connect( matcher, SIGNAL(erase()), this, SLOT(erase()) ); 146 connect( matcher, SIGNAL(erase()), this, SLOT(erase()) );
147 147
148 QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 ); 148 QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 );
149 gl->setColStretch( 0, 1 ); 149 gl->setColStretch( 0, 1 );
150 150
151 wordPicker = new QIMPenWordPick( this ); 151 wordPicker = new QIMPenWordPick( this );
152 connect( wordPicker, SIGNAL(wordClicked(const QString &)), 152 connect( wordPicker, SIGNAL(wordClicked(const QString &)),
153 this, SLOT(wordPicked(const QString &)) ); 153 this, SLOT(wordPicked(const QString &)) );
154 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), 154 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)),
@@ -225,69 +225,66 @@ QIMPenInput::~QIMPenInput()
225 delete (HandwritingHelp*) helpDlg; 225 delete (HandwritingHelp*) helpDlg;
226} 226}
227 227
228QSize QIMPenInput::sizeHint() const 228QSize QIMPenInput::sizeHint() const
229{ 229{
230 int fw = frameWidth(); 230 int fw = frameWidth();
231 int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height(); 231 int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height();
232 return pw->sizeHint() + QSize( fw*2, fw*2+ps ); 232 return pw->sizeHint() + QSize( fw*2, fw*2+ps );
233} 233}
234 234
235void QIMPenInput::loadProfiles() 235void QIMPenInput::loadProfiles()
236{ 236{
237 profileList.clear(); 237 profileList.clear();
238 profile = 0; 238 profile = 0;
239 delete shortcutCharSet; 239 delete shortcutCharSet;
240 shortcutCharSet = new QIMPenCharSet(); 240 shortcutCharSet = new QIMPenCharSet();
241 shortcutCharSet->setTitle( "Shortcut" ); 241 shortcutCharSet->setTitle( tr("Shortcut") );
242 QString path = QPEApplication::qpeDir() + "etc/qimpen"; 242 QString path = QPEApplication::qpeDir() + "etc/qimpen";
243 QDir dir( path, "*.conf" ); 243 QDir dir( path, "*.conf" );
244 QStringList list = dir.entryList(); 244 QStringList list = dir.entryList();
245 QStringList::Iterator it; 245 QStringList::Iterator it;
246 for ( it = list.begin(); it != list.end(); ++it ) { 246 for ( it = list.begin(); it != list.end(); ++it ) {
247 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it ); 247 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it );
248 profileList.append( p ); 248 profileList.append( p );
249 if ( p->shortcut() ) { 249 if ( p->shortcut() ) {
250 QIMPenCharIterator it( p->shortcut()->characters() ); 250 QIMPenCharIterator it( p->shortcut()->characters() );
251 for ( ; it.current(); ++it ) { 251 for ( ; it.current(); ++it ) {
252 shortcutCharSet->addChar( new QIMPenChar(*it.current()) ); 252 shortcutCharSet->addChar( new QIMPenChar(*it.current()) );
253 } 253 }
254 } 254 }
255 } 255 }
256 256
257
258 Config config( "handwriting" ); 257 Config config( "handwriting" );
259 config.setGroup( "Settings" ); 258 config.setGroup( "Settings" );
260 QString prof = config.readEntry( "Profile", "Default" ); 259 QString prof = config.readEntry( "Profile", "Default" );
261 selectProfile( prof ); 260 selectProfile( prof );
262} 261}
263 262
264void QIMPenInput::selectProfile( const QString &name ) 263void QIMPenInput::selectProfile( const QString &name )
265{ 264{
266 QListIterator<QIMPenProfile> it( profileList ); 265 QListIterator<QIMPenProfile> it( profileList );
267 for ( ; it.current(); ++it ) { 266 for ( ; it.current(); ++it ) {
268 if ( it.current()->name() == name ) { 267 if ( it.current()->name() == name ) {
269 profile = it.current(); 268 profile = it.current();
270 break; 269 break;
271 } 270 }
272 } 271 }
273 272
274 if ( !it.current() ) { 273 if ( !it.current() )
275 qWarning("No profile selected!\n"); 274 return;
276 return;
277 }
278 275
279 pw->clearCharSets(); 276 pw->clearCharSets();
280 baseSets.clear(); 277 baseSets.clear();
281 278
282 matcher->setMultiStrokeTimeout( profile->multiStrokeTimeout() ); 279 matcher->setMultiStrokeTimeout( profile->multiStrokeTimeout() );
283 matcher->setWordMatchingEnabled( profile->matchWords() ); 280 matcher->setWordMatchingEnabled( profile->matchWords() );
284 281
285 if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() ) 282 if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() )
286 wordPicker->hide(); 283 wordPicker->hide();
287 else 284 else
288 wordPicker->show(); 285 wordPicker->show();
289 286
290 if ( profile->uppercase() && profile->style() == QIMPenProfile::BothCases ) { 287 if ( profile->uppercase() && profile->style() == QIMPenProfile::BothCases ) {
291 baseSets.append( profile->uppercase() ); 288 baseSets.append( profile->uppercase() );
292 pw->insertCharSet( profile->uppercase() ); 289 pw->insertCharSet( profile->uppercase() );
293 } 290 }
diff --git a/inputmethods/handwriting/qimpenprofile.cpp b/inputmethods/handwriting/qimpenprofile.cpp
index 4b5bb83..3b1b5e9 100644
--- a/inputmethods/handwriting/qimpenprofile.cpp
+++ b/inputmethods/handwriting/qimpenprofile.cpp
@@ -1,20 +1,20 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
@@ -81,33 +81,33 @@ void QIMPenProfile::setMultiStrokeTimeout( int t )
81 Config config( userConfig() ); 81 Config config( userConfig() );
82 config.setGroup( "Settings" ); 82 config.setGroup( "Settings" );
83 config.writeEntry( "MultiTimeout", msTimeout ); 83 config.writeEntry( "MultiTimeout", msTimeout );
84 } 84 }
85} 85}
86 86
87QString QIMPenProfile::userConfig() 87QString QIMPenProfile::userConfig()
88{ 88{
89 QString un = filename; 89 QString un = filename;
90 int pos = un.findRev( '/' ); 90 int pos = un.findRev( '/' );
91 if ( pos >= 0 ) 91 if ( pos >= 0 )
92 un = un.mid( pos + 1 ); 92 un = un.mid( pos + 1 );
93 pos = un.find( '.' ); 93 pos = un.find( '.' );
94 if ( pos > 0 ) 94 if ( pos > 0 )
95 un.truncate( pos ); 95 un.truncate( pos );
96 96
97 un = "handwriting-" + un; 97 un = "handwriting-" + un; // No tr
98 98
99 return un; 99 return un;
100} 100}
101 101
102void QIMPenProfile::loadData() 102void QIMPenProfile::loadData()
103{ 103{
104 Config config( filename, Config::File ); 104 Config config( filename, Config::File );
105 config.setGroup( "CharSets" ); 105 config.setGroup( "CharSets" );
106 106
107 QString baseDir = QPEApplication::qpeDir(); 107 QString baseDir = QPEApplication::qpeDir();
108 baseDir += "/etc/"; 108 baseDir += "/etc/";
109 // accents 109 // accents
110 QIMPenCombining *combining = 0; 110 QIMPenCombining *combining = 0;
111 QString s = config.readEntry( "Combining" ); 111 QString s = config.readEntry( "Combining" );
112 if ( !s.isEmpty() ) { 112 if ( !s.isEmpty() ) {
113 combining = new QIMPenCombining( baseDir + "qimpen/" + s ); 113 combining = new QIMPenCombining( baseDir + "qimpen/" + s );
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index 2c06fbc..5d49e03 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -1,20 +1,20 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
@@ -222,33 +222,33 @@ void QIMPenSetup::accept()
222} 222}
223 223
224//--------------------------------------------------------------------------- 224//---------------------------------------------------------------------------
225 225
226QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name, 226QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name,
227 bool modal, int WFlags) 227 bool modal, int WFlags)
228 : QDialog( parent, name, modal, WFlags ) 228 : QDialog( parent, name, modal, WFlags )
229{ 229{
230 setCaption( tr("Enter new character") ); 230 setCaption( tr("Enter new character") );
231 uni = 0; 231 uni = 0;
232 232
233 QVBoxLayout *vb = new QVBoxLayout( this, 10 ); 233 QVBoxLayout *vb = new QVBoxLayout( this, 10 );
234 234
235 QHBoxLayout *hb = new QHBoxLayout(); 235 QHBoxLayout *hb = new QHBoxLayout();
236 vb->addLayout( hb ); 236 vb->addLayout( hb );
237 237
238 QLabel *label = new QLabel( "Character:", this ); 238 QLabel *label = new QLabel( tr("Character:"), this );
239 hb->addWidget( label ); 239 hb->addWidget( label );
240 240
241 QComboBox *cb = new QComboBox( TRUE, this ); 241 QComboBox *cb = new QComboBox( TRUE, this );
242 connect( cb, SIGNAL(activated(int)), SLOT(setSpecial(int)) ); 242 connect( cb, SIGNAL(activated(int)), SLOT(setSpecial(int)) );
243 connect( cb, SIGNAL(textChanged(const QString &)), 243 connect( cb, SIGNAL(textChanged(const QString &)),
244 SLOT(setCharacter(const QString &)) ); 244 SLOT(setCharacter(const QString &)) );
245 addSpecial( cb ); 245 addSpecial( cb );
246 cb->setEditText( "" ); 246 cb->setEditText( "" );
247 hb->addWidget( cb ); 247 hb->addWidget( cb );
248 248
249 hb = new QHBoxLayout(); 249 hb = new QHBoxLayout();
250 vb->addLayout( hb ); 250 vb->addLayout( hb );
251 251
252 QPushButton *pb = new QPushButton( "OK", this ); 252 QPushButton *pb = new QPushButton( "OK", this );
253 connect( pb, SIGNAL(clicked()), SLOT(accept())); 253 connect( pb, SIGNAL(clicked()), SLOT(accept()));
254 hb->addWidget( pb ); 254 hb->addWidget( pb );
@@ -360,37 +360,37 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
360 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); 360 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) );
361 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); 361 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar()));
362 hb->addWidget( prevBtn ); 362 hb->addWidget( prevBtn );
363 363
364 nextBtn = new QPushButton( this ); 364 nextBtn = new QPushButton( this );
365 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); 365 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) );
366 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); 366 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar()));
367 hb->addWidget( nextBtn ); 367 hb->addWidget( nextBtn );
368 368
369 pb = new QPushButton( tr("Clear"), this ); 369 pb = new QPushButton( tr("Clear"), this );
370 connect( pb, SIGNAL(clicked()), SLOT(clearChar()) ); 370 connect( pb, SIGNAL(clicked()), SLOT(clearChar()) );
371 gl->addWidget( pb, 3, 1 ); 371 gl->addWidget( pb, 3, 1 );
372 372
373 //-- 373 //--
374#if !defined(Q_WS_QWS) 374#if !defined(Q_WS_QWS)
375 hb = new QHBoxLayout( tvb ); 375 hb = new QHBoxLayout( tvb );
376 pb = new QPushButton( "OK", this ); 376 pb = new QPushButton( tr("OK"), this );
377 connect( pb, SIGNAL(clicked()), SLOT(accept()) ); 377 connect( pb, SIGNAL(clicked()), SLOT(accept()) );
378 hb->addWidget( pb ); 378 hb->addWidget( pb );
379 379
380 pb = new QPushButton( "Cancel", this ); 380 pb = new QPushButton( tr("Cancel"), this );
381 connect( pb, SIGNAL(clicked()), SLOT(reject()) ); 381 connect( pb, SIGNAL(clicked()), SLOT(reject()) );
382 hb->addWidget( pb ); 382 hb->addWidget( pb );
383#endif 383#endif
384 selectCharSet( 0 ); 384 selectCharSet( 0 );
385 charList->setFocus(); 385 charList->setFocus();
386 386
387 resize( minimumSize() ); 387 resize( minimumSize() );
388 enableButtons(); 388 enableButtons();
389} 389}
390 390
391void QIMPenEdit::setProfile( QIMPenProfile *p ) 391void QIMPenEdit::setProfile( QIMPenProfile *p )
392{ 392{
393 profile = p; 393 profile = p;
394 charSetCombo->clear(); 394 charSetCombo->clear();
395 QIMPenCharSetIterator it( profile->charSets() ); 395 QIMPenCharSetIterator it( profile->charSets() );
396 for ( ; it.current(); ++it ) { 396 for ( ; it.current(); ++it ) {
diff --git a/inputmethods/jumpx/keyboardimpl.cpp b/inputmethods/jumpx/keyboardimpl.cpp
index 004f0b0..92abb09 100644
--- a/inputmethods/jumpx/keyboardimpl.cpp
+++ b/inputmethods/jumpx/keyboardimpl.cpp
@@ -54,34 +54,33 @@ QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
54 54
55void KeyboardImpl::resetState() 55void KeyboardImpl::resetState()
56{ 56{
57 if ( input ) 57 if ( input )
58 input->resetState(); 58 input->resetState();
59} 59}
60 60
61QPixmap *KeyboardImpl::icon() 61QPixmap *KeyboardImpl::icon()
62{ 62{
63 if ( !icn ) 63 if ( !icn )
64 icn = new QPixmap( (const char **)icon_xpm ); 64 icn = new QPixmap( (const char **)icon_xpm );
65 return icn; 65 return icn;
66} 66}
67 67
68QString KeyboardImpl::name() 68QString KeyboardImpl::name()
69{ 69{
70 // return qApp->translate( "InputMethods", "JumpX" ); 70 return qApp->translate( "InputMethods", "JumpX" );
71 return "JumpX";
72} 71}
73 72
74void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
75{ 74{
76 if ( input ) 75 if ( input )
77 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
78} 77}
79 78
80#ifndef QT_NO_COMPONENT 79#ifndef QT_NO_COMPONENT
81QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
82{ 81{
83 *iface = 0; 82 *iface = 0;
84 if ( uuid == IID_QUnknown ) 83 if ( uuid == IID_QUnknown )
85 *iface = this; 84 *iface = this;
86 else if ( uuid == IID_InputMethod ) 85 else if ( uuid == IID_InputMethod )
87 *iface = this; 86 *iface = this;
diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp
index 56e6870..bc96402 100644
--- a/inputmethods/keyboard/keyboardimpl.cpp
+++ b/inputmethods/keyboard/keyboardimpl.cpp
@@ -87,34 +87,33 @@ QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
87 87
88void KeyboardImpl::resetState() 88void KeyboardImpl::resetState()
89{ 89{
90 if ( input ) 90 if ( input )
91 input->resetState(); 91 input->resetState();
92} 92}
93 93
94QPixmap *KeyboardImpl::icon() 94QPixmap *KeyboardImpl::icon()
95{ 95{
96 if ( !icn ) 96 if ( !icn )
97 icn = new QPixmap( (const char **)kb_xpm ); 97 icn = new QPixmap( (const char **)kb_xpm );
98 return icn; 98 return icn;
99} 99}
100 100
101QString KeyboardImpl::name() 101QString KeyboardImpl::name()
102{ 102{
103 // return qApp->translate( "InputMethods", "Keyboard" ); 103 return qApp->translate( "InputMethods", "Keyboard" );
104 return "Keyboard";
105} 104}
106 105
107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 106void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
108{ 107{
109 if ( input ) 108 if ( input )
110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 109 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
111} 110}
112 111
113#ifndef QT_NO_COMPONENT 112#ifndef QT_NO_COMPONENT
114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 113QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
115{ 114{
116 *iface = 0; 115 *iface = 0;
117 if ( uuid == IID_QUnknown ) 116 if ( uuid == IID_QUnknown )
118 *iface = this; 117 *iface = this;
119 else if ( uuid == IID_InputMethod ) 118 else if ( uuid == IID_InputMethod )
120 *iface = this; 119 *iface = this;
diff --git a/inputmethods/kjumpx/keyboardimpl.cpp b/inputmethods/kjumpx/keyboardimpl.cpp
index dbae2b4..5d8e0d3 100644
--- a/inputmethods/kjumpx/keyboardimpl.cpp
+++ b/inputmethods/kjumpx/keyboardimpl.cpp
@@ -54,34 +54,33 @@ QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
54 54
55void KeyboardImpl::resetState() 55void KeyboardImpl::resetState()
56{ 56{
57 if ( input ) 57 if ( input )
58 input->resetState(); 58 input->resetState();
59} 59}
60 60
61QPixmap *KeyboardImpl::icon() 61QPixmap *KeyboardImpl::icon()
62{ 62{
63 if ( !icn ) 63 if ( !icn )
64 icn = new QPixmap( (const char **)icon_xpm ); 64 icn = new QPixmap( (const char **)icon_xpm );
65 return icn; 65 return icn;
66} 66}
67 67
68QString KeyboardImpl::name() 68QString KeyboardImpl::name()
69{ 69{
70 // return qApp->translate( "InputMethods", "KJumpX" ); 70 return qApp->translate( "InputMethods", "KJumpX" );
71 return "KJumpX";
72} 71}
73 72
74void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
75{ 74{
76 if ( input ) 75 if ( input )
77 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
78} 77}
79 78
80#ifndef QT_NO_COMPONENT 79#ifndef QT_NO_COMPONENT
81QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
82{ 81{
83 *iface = 0; 82 *iface = 0;
84 if ( uuid == IID_QUnknown ) 83 if ( uuid == IID_QUnknown )
85 *iface = this; 84 *iface = this;
86 else if ( uuid == IID_InputMethod ) 85 else if ( uuid == IID_InputMethod )
87 *iface = this; 86 *iface = this;
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp
index 617acff..a4e8f02 100644
--- a/inputmethods/pickboard/pickboardimpl.cpp
+++ b/inputmethods/pickboard/pickboardimpl.cpp
@@ -57,34 +57,33 @@ QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
57 57
58void PickboardImpl::resetState() 58void PickboardImpl::resetState()
59{ 59{
60 if ( pickboard ) 60 if ( pickboard )
61 pickboard->resetState(); 61 pickboard->resetState();
62} 62}
63 63
64QPixmap *PickboardImpl::icon() 64QPixmap *PickboardImpl::icon()
65{ 65{
66 if ( !icn ) 66 if ( !icn )
67 icn = new QPixmap( (const char **)pb_xpm ); 67 icn = new QPixmap( (const char **)pb_xpm );
68 return icn; 68 return icn;
69} 69}
70 70
71QString PickboardImpl::name() 71QString PickboardImpl::name()
72{ 72{
73 // return qApp->translate( "InputMethods", "Pickboard" ); 73 return qApp->translate( "InputMethods", "Pickboard" );
74 return "Pickboard";
75} 74}
76 75
77void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) 76void PickboardImpl::onKeyPress( QObject *receiver, const char *slot )
78{ 77{
79 if ( pickboard ) 78 if ( pickboard )
80 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 79 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
81} 80}
82 81
83#ifndef QT_NO_COMPONENT 82#ifndef QT_NO_COMPONENT
84QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 83QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
85{ 84{
86 *iface = 0; 85 *iface = 0;
87 if ( uuid == IID_QUnknown ) 86 if ( uuid == IID_QUnknown )
88 *iface = this; 87 *iface = this;
89 else if ( uuid == IID_InputMethod ) 88 else if ( uuid == IID_InputMethod )
90 *iface = this; 89 *iface = this;
diff --git a/inputmethods/unikeyboard/unikeyboardimpl.cpp b/inputmethods/unikeyboard/unikeyboardimpl.cpp
index aa05b31..fe601e0 100644
--- a/inputmethods/unikeyboard/unikeyboardimpl.cpp
+++ b/inputmethods/unikeyboard/unikeyboardimpl.cpp
@@ -62,34 +62,33 @@ QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
62 62
63void UniKeyboardImpl::resetState() 63void UniKeyboardImpl::resetState()
64{ 64{
65 if ( input ) 65 if ( input )
66 input->resetState(); 66 input->resetState();
67} 67}
68 68
69QPixmap *UniKeyboardImpl::icon() 69QPixmap *UniKeyboardImpl::icon()
70{ 70{
71 if ( !icn ) 71 if ( !icn )
72 icn = new QPixmap( (const char **)uni_xpm ); 72 icn = new QPixmap( (const char **)uni_xpm );
73 return icn; 73 return icn;
74} 74}
75 75
76QString UniKeyboardImpl::name() 76QString UniKeyboardImpl::name()
77{ 77{
78 // return qApp->translate( "InputMethods", "Unicode" ); 78 return qApp->translate( "InputMethods", "Unicode" );
79 return "Unicode";
80} 79}
81 80
82void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 81void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
83{ 82{
84 if ( input ) 83 if ( input )
85 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 84 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
86} 85}
87 86
88QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 87QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
89{ 88{
90 *iface = 0; 89 *iface = 0;
91 if ( uuid == IID_QUnknown ) 90 if ( uuid == IID_QUnknown )
92 *iface = this; 91 *iface = this;
93 else if ( uuid == IID_InputMethod ) 92 else if ( uuid == IID_InputMethod )
94 *iface = this; 93 *iface = this;
95 94