summaryrefslogtreecommitdiff
Unidiff
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
@@ -101,6 +101,5 @@ QPixmap *KeyboardImpl::icon()
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
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
@@ -84,6 +84,5 @@ QPixmap *HandwritingImpl::icon()
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
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,6 +1,6 @@
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
@@ -136,8 +136,7 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
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 );
@@ -151,18 +150,14 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
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 );
@@ -173,5 +168,5 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
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 ) );
@@ -186,5 +181,5 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
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 );
@@ -198,5 +193,5 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
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 );
@@ -228,5 +223,4 @@ void HandwritingTrainer::setCurrentChar( QIMPenChar *c )
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}
@@ -234,4 +228,10 @@ void HandwritingTrainer::setCurrentChar( QIMPenChar *c )
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();
@@ -253,4 +253,5 @@ void HandwritingTrainer::selectCharSet( int i )
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 );
@@ -267,5 +268,5 @@ void HandwritingTrainer::selectCharSet( int i )
267void HandwritingTrainer::noMatch() 268void HandwritingTrainer::noMatch()
268{ 269{
269 result->setText( "No match" ); 270 result->setText( tr("No match") );
270} 271}
271 272
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,6 +1,6 @@
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
@@ -135,6 +135,6 @@ static char * help_xpm[] = {
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 );
@@ -239,5 +239,5 @@ void QIMPenInput::loadProfiles()
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" );
@@ -255,5 +255,4 @@ void QIMPenInput::loadProfiles()
255 } 255 }
256 256
257
258 Config config( "handwriting" ); 257 Config config( "handwriting" );
259 config.setGroup( "Settings" ); 258 config.setGroup( "Settings" );
@@ -272,8 +271,6 @@ void QIMPenInput::selectProfile( const QString &name )
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();
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,6 +1,6 @@
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
@@ -95,5 +95,5 @@ QString QIMPenProfile::userConfig()
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;
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,6 +1,6 @@
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
@@ -236,5 +236,5 @@ QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name,
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
@@ -374,9 +374,9 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
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 );
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
@@ -68,6 +68,5 @@ QPixmap *KeyboardImpl::icon()
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
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
@@ -101,6 +101,5 @@ QPixmap *KeyboardImpl::icon()
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
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
@@ -68,6 +68,5 @@ QPixmap *KeyboardImpl::icon()
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
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
@@ -71,6 +71,5 @@ QPixmap *PickboardImpl::icon()
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
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
@@ -76,6 +76,5 @@ QPixmap *UniKeyboardImpl::icon()
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