summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpeninput.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/handwriting/qimpeninput.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpeninput.cpp15
1 files changed, 6 insertions, 9 deletions
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,16 +1,16 @@
/**********************************************************************
-** 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
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
@@ -125,26 +125,26 @@ static char * help_xpm[] = {
" .+. ",
" .+. ",
" #.# ",
" .+. ",
" #.# "};
/*!
\class QIMPenInput qimpeninput.h
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 );
profileList.setAutoDelete( true );
matcher = new QIMPenMatch( this );
connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) );
connect( matcher, SIGNAL(erase()), this, SLOT(erase()) );
QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 );
gl->setColStretch( 0, 1 );
@@ -229,61 +229,58 @@ QSize QIMPenInput::sizeHint() const
{
int fw = frameWidth();
int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height();
return pw->sizeHint() + QSize( fw*2, fw*2+ps );
}
void QIMPenInput::loadProfiles()
{
profileList.clear();
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();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
QIMPenProfile *p = new QIMPenProfile( path + "/" + *it );
profileList.append( p );
if ( p->shortcut() ) {
QIMPenCharIterator it( p->shortcut()->characters() );
for ( ; it.current(); ++it ) {
shortcutCharSet->addChar( new QIMPenChar(*it.current()) );
}
}
}
-
Config config( "handwriting" );
config.setGroup( "Settings" );
QString prof = config.readEntry( "Profile", "Default" );
selectProfile( prof );
}
void QIMPenInput::selectProfile( const QString &name )
{
QListIterator<QIMPenProfile> it( profileList );
for ( ; it.current(); ++it ) {
if ( it.current()->name() == name ) {
profile = it.current();
break;
}
}
- if ( !it.current() ) {
- qWarning("No profile selected!\n");
+ if ( !it.current() )
return;
- }
pw->clearCharSets();
baseSets.clear();
matcher->setMultiStrokeTimeout( profile->multiStrokeTimeout() );
matcher->setWordMatchingEnabled( profile->matchWords() );
if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() )
wordPicker->hide();
else
wordPicker->show();