summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpeninput.cpp
Unidiff
Diffstat (limited to 'inputmethods/handwriting/qimpeninput.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpeninput.cpp17
1 files changed, 7 insertions, 10 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,10 +1,10 @@
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**
@@ -131,14 +131,14 @@ static char * help_xpm[] = {
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 );
@@ -235,13 +235,13 @@ QSize QIMPenInput::sizeHint() const
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 );
@@ -251,13 +251,12 @@ void QIMPenInput::loadProfiles()
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
@@ -268,16 +267,14 @@ void QIMPenInput::selectProfile( const QString &name )
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() );