summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpenhelp.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/handwriting/qimpenhelp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenhelp.cpp43
1 files changed, 22 insertions, 21 deletions
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,5 +1,5 @@
/**********************************************************************
-** 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.
**
@@ -137,6 +137,5 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
{
- 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);
@@ -152,16 +151,12 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
charList->setHScrollBarMode( QListBox::AlwaysOff );
- charList->setFixedWidth( 80 );
+ 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);
@@ -174,3 +169,3 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
QHBoxLayout *hb = new QHBoxLayout();
- gl->addLayout( hb, 3, 0 );
+ gl->addLayout( hb, 2, 0 );
prevBtn = new QPushButton( this );
@@ -187,3 +182,3 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
refPw->setReadOnly( TRUE );
- gl->addWidget( refPw, 4, 0 );
+ gl->addWidget( refPw, 3, 0 );
@@ -199,3 +194,3 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
matcher, SLOT(strokeEntered( QIMPenStroke * )) );
- gl->addWidget( pracPw, 4, 1 );
+ gl->addWidget( pracPw, 3, 1 );
@@ -229,3 +224,2 @@ void HandwritingTrainer::setCurrentChar( QIMPenChar *c )
}
- result->setText( "" );
redrawTimer->start( 5000 );
@@ -235,2 +229,8 @@ void HandwritingTrainer::selectChar( int i )
{
+ static int last_char = 0;
+
+ if (last_char != i) {
+ result->setText("");
+ }
+
currentChar = 0;
@@ -254,2 +254,3 @@ void HandwritingTrainer::selectCharSet( int i )
pracPw->removeCharSet( 0 );
+ result->setText("");
}
@@ -268,3 +269,3 @@ void HandwritingTrainer::noMatch()
{
- result->setText( "No match" );
+ result->setText( tr("No match") );
}