-rw-r--r-- | inputmethods/dvorak/dvorakimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/handwriting/handwritingimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpenhelp.cpp | 41 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpeninput.cpp | 15 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpenprofile.cpp | 6 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpensetup.cpp | 10 | ||||
-rw-r--r-- | inputmethods/jumpx/keyboardimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboardimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/kjumpx/keyboardimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/pickboard/pickboardimpl.cpp | 3 | ||||
-rw-r--r-- | inputmethods/unikeyboard/unikeyboardimpl.cpp | 3 |
11 files changed, 42 insertions, 51 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 @@ -100,8 +100,7 @@ QPixmap *KeyboardImpl::icon() QString KeyboardImpl::name() { - // return qApp->translate( "InputMethods", "Dvorak" ); - return "Dvorak"; + return qApp->translate( "InputMethods", "Dvorak" ); } void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 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 @@ -83,8 +83,7 @@ QPixmap *HandwritingImpl::icon() QString HandwritingImpl::name() { - // return qApp->translate( "InputMethods", "Handwriting" ); - return "Handwriting"; + return qApp->translate( "InputMethods", "Handwriting" ); } void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot ) 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,7 +1,7 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -135,10 +135,9 @@ void HandwritingHelp::hideEvent( QHideEvent * ) HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const char *name ) : QWidget( parent, name ), profile(p) { - QGridLayout *gl = new QGridLayout( this, 5, 2, 0, 4 ); - gl->setRowStretch( 1, 1 ); - gl->setRowStretch( 2, 1 ); + QGridLayout *gl = new QGridLayout( this, 4, 2, 0, 4 ); gl->setColStretch( 1, 1 ); + gl->setRowStretch(3, 1); charSetCombo = new QComboBox( this ); gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); @@ -152,18 +151,14 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const charList->setHScrollBarMode( QListBox::AlwaysOff ); charList->setFixedWidth( 80 ); connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); - gl->addMultiCellWidget( charList, 1, 2, 0, 0 ); - - QLabel *help = new QLabel( this ); - help->setAlignment( AlignLeft | AlignVCenter | WordBreak ); - gl->addWidget( help, 1, 1 ); - help->setText( - tr( "Select a character from the list. The writing area on the left " - "shows the reference character. Practice writing in the area on " - "the right.") ); + gl->addWidget(charList, 1, 0); result = new QLabel( this ); - gl->addMultiCellWidget( result, 2, 3, 1, 1 ); + result->setAlignment(AlignLeft | AlignVCenter | WordBreak); + result->setText( + tr( "Select a reference character from the list. Practice writing in " + "the area on the right.")); + gl->addMultiCellWidget(result, 1, 2, 1, 1); matcher = new QIMPenMatch( this ); matcher->setCharSet( currentSet ); @@ -172,7 +167,7 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const this, SLOT(matched(const QIMPenCharMatchList &)) ); QHBoxLayout *hb = new QHBoxLayout(); - gl->addLayout( hb, 3, 0 ); + gl->addLayout( hb, 2, 0 ); prevBtn = new QPushButton( this ); prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); @@ -185,7 +180,7 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const refPw = new QIMPenWidget( this ); refPw->setReadOnly( TRUE ); - gl->addWidget( refPw, 4, 0 ); + gl->addWidget( refPw, 3, 0 ); pracPw = new QIMPenWidget( this ); connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); @@ -197,7 +192,7 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const matcher, SLOT(beginStroke()) ); connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), matcher, SLOT(strokeEntered( QIMPenStroke * )) ); - gl->addWidget( pracPw, 4, 1 ); + gl->addWidget( pracPw, 3, 1 ); redrawTimer = new QTimer( this ); connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) ); @@ -227,12 +222,17 @@ void HandwritingTrainer::setCurrentChar( QIMPenChar *c ) prevBtn->setEnabled( findPrev() != 0 ); nextBtn->setEnabled( findNext() != 0 ); } - result->setText( "" ); redrawTimer->start( 5000 ); } void HandwritingTrainer::selectChar( int i ) { + static int last_char = 0; + + if (last_char != i) { + result->setText(""); + } + currentChar = 0; currentCode = ((CharListItem *)charList->item(i))->code(); QIMPenCharIterator it(currentSet->characters() ); @@ -252,6 +252,7 @@ void HandwritingTrainer::selectCharSet( int i ) if ( currentSet ) { refPw->removeCharSet( 0 ); pracPw->removeCharSet( 0 ); + result->setText(""); } currentSet = profile->charSets().at( i ); fillCharList(); @@ -266,7 +267,7 @@ void HandwritingTrainer::selectCharSet( int i ) void HandwritingTrainer::noMatch() { - result->setText( "No match" ); + result->setText( tr("No match") ); } void HandwritingTrainer::matched( const QIMPenCharMatchList &ml ) 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,7 +1,7 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -134,8 +134,8 @@ static char * help_xpm[] = { Pen input widget. */ -QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags flags ) - : QFrame( parent, name, flags ), helpDlg(0), profile(0) +QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags f ) + : QFrame( parent, name, f ), helpDlg(0), profile(0) { setFrameStyle( Box | Plain ); @@ -238,7 +238,7 @@ void QIMPenInput::loadProfiles() profile = 0; delete shortcutCharSet; shortcutCharSet = new QIMPenCharSet(); - shortcutCharSet->setTitle( "Shortcut" ); + shortcutCharSet->setTitle( tr("Shortcut") ); QString path = QPEApplication::qpeDir() + "etc/qimpen"; QDir dir( path, "*.conf" ); QStringList list = dir.entryList(); @@ -254,7 +254,6 @@ void QIMPenInput::loadProfiles() } } - Config config( "handwriting" ); config.setGroup( "Settings" ); QString prof = config.readEntry( "Profile", "Default" ); @@ -271,10 +270,8 @@ void QIMPenInput::selectProfile( const QString &name ) } } - if ( !it.current() ) { - qWarning("No profile selected!\n"); + if ( !it.current() ) return; - } pw->clearCharSets(); baseSets.clear(); 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,7 +1,7 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -94,7 +94,7 @@ QString QIMPenProfile::userConfig() if ( pos > 0 ) un.truncate( pos ); - un = "handwriting-" + un; + un = "handwriting-" + un; // No tr 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,7 +1,7 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -235,7 +235,7 @@ QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name, QHBoxLayout *hb = new QHBoxLayout(); vb->addLayout( hb ); - QLabel *label = new QLabel( "Character:", this ); + QLabel *label = new QLabel( tr("Character:"), this ); hb->addWidget( label ); QComboBox *cb = new QComboBox( TRUE, this ); @@ -373,11 +373,11 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent, //-- #if !defined(Q_WS_QWS) hb = new QHBoxLayout( tvb ); - pb = new QPushButton( "OK", this ); + pb = new QPushButton( tr("OK"), this ); connect( pb, SIGNAL(clicked()), SLOT(accept()) ); hb->addWidget( pb ); - pb = new QPushButton( "Cancel", this ); + pb = new QPushButton( tr("Cancel"), this ); connect( pb, SIGNAL(clicked()), SLOT(reject()) ); hb->addWidget( pb ); #endif 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 @@ -67,8 +67,7 @@ QPixmap *KeyboardImpl::icon() QString KeyboardImpl::name() { - // return qApp->translate( "InputMethods", "JumpX" ); - return "JumpX"; + return qApp->translate( "InputMethods", "JumpX" ); } void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 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 @@ -100,8 +100,7 @@ QPixmap *KeyboardImpl::icon() QString KeyboardImpl::name() { - // return qApp->translate( "InputMethods", "Keyboard" ); - return "Keyboard"; + return qApp->translate( "InputMethods", "Keyboard" ); } void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 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 @@ -67,8 +67,7 @@ QPixmap *KeyboardImpl::icon() QString KeyboardImpl::name() { - // return qApp->translate( "InputMethods", "KJumpX" ); - return "KJumpX"; + return qApp->translate( "InputMethods", "KJumpX" ); } void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 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 @@ -70,8 +70,7 @@ QPixmap *PickboardImpl::icon() QString PickboardImpl::name() { - // return qApp->translate( "InputMethods", "Pickboard" ); - return "Pickboard"; + return qApp->translate( "InputMethods", "Pickboard" ); } void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) 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 @@ -75,8 +75,7 @@ QPixmap *UniKeyboardImpl::icon() QString UniKeyboardImpl::name() { - // return qApp->translate( "InputMethods", "Unicode" ); - return "Unicode"; + return qApp->translate( "InputMethods", "Unicode" ); } void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |