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.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/inputmethods/handwriting/qimpeninput.cpp b/inputmethods/handwriting/qimpeninput.cpp
index d073cdf..6ea1bb4 100644
--- a/inputmethods/handwriting/qimpeninput.cpp
+++ b/inputmethods/handwriting/qimpeninput.cpp
@@ -36,6 +36,7 @@
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qtimer.h> 37#include <qtimer.h>
38#include <qdir.h> 38#include <qdir.h>
39#include <opie2/odebug.h>
39 40
40#include <limits.h> 41#include <limits.h>
41 42
@@ -319,7 +320,7 @@ void QIMPenInput::wordPicked( const QString &w )
319void QIMPenInput::selectCharSet( int idx ) 320void QIMPenInput::selectCharSet( int idx )
320{ 321{
321 if ( mode == Switch ) { 322 if ( mode == Switch ) {
322 //qDebug( "Switch back to normal" ); 323 //odebug << "Switch back to normal" << oendl;
323 pw->changeCharSet( baseSets.at(currCharSet), currCharSet ); 324 pw->changeCharSet( baseSets.at(currCharSet), currCharSet );
324 mode = Normal; 325 mode = Normal;
325 } 326 }
@@ -353,13 +354,14 @@ void QIMPenInput::matchedCharacters( const QIMPenCharMatchList &cl )
353 switch ( scan ) { 354 switch ( scan ) {
354 case QIMPenChar::Caps: 355 case QIMPenChar::Caps:
355 if ( profile->style() == QIMPenProfile::ToggleCases ) { 356 if ( profile->style() == QIMPenProfile::ToggleCases ) {
356 // qDebug( "Caps" ); 357 // odebug << "Caps" << oendl;
358 //
357 if ( mode == SwitchLock ) { 359 if ( mode == SwitchLock ) {
358 // qDebug( "Switch to normal" ); 360 // odebug << "Switch to normal" << oendl;
359 pw->changeCharSet( profile->lowercase(), currCharSet ); 361 pw->changeCharSet( profile->lowercase(), currCharSet );
360 mode = Switch; 362 mode = Switch;
361 } else { 363 } else {
362 // qDebug( "Switch to upper" ); 364 // odebug << "Switch to upper" << oendl;
363 pw->changeCharSet( profile->uppercase(), currCharSet ); 365 pw->changeCharSet( profile->uppercase(), currCharSet );
364 mode = Switch; 366 mode = Switch;
365 } 367 }
@@ -367,17 +369,17 @@ void QIMPenInput::matchedCharacters( const QIMPenCharMatchList &cl )
367 break; 369 break;
368 case QIMPenChar::CapsLock: 370 case QIMPenChar::CapsLock:
369 if ( profile->style() == QIMPenProfile::ToggleCases ) { 371 if ( profile->style() == QIMPenProfile::ToggleCases ) {
370 // qDebug( "CapsLock" ); 372 // odebug << "CapsLock" << oendl;
371 if ( mode == Switch && 373 if ( mode == Switch &&
372 baseSets.at(currCharSet) == profile->uppercase() ) { 374 baseSets.at(currCharSet) == profile->uppercase() ) {
373 // qDebug( "Switch to normal" ); 375 // odebug << "Switch to normal" << oendl;
374 pw->changeCharSet( profile->lowercase(), currCharSet ); 376 pw->changeCharSet( profile->lowercase(), currCharSet );
375 // change our base set back to lower. 377 // change our base set back to lower.
376 baseSets.remove( currCharSet ); 378 baseSets.remove( currCharSet );
377 baseSets.insert( currCharSet, profile->lowercase() ); 379 baseSets.insert( currCharSet, profile->lowercase() );
378 mode = Normal; 380 mode = Normal;
379 } else { 381 } else {
380 // qDebug( "Switch to caps lock" ); 382 // odebug << "Switch to caps lock" << oendl;
381 pw->changeCharSet( profile->uppercase(), currCharSet ); 383 pw->changeCharSet( profile->uppercase(), currCharSet );
382 // change our base set to upper. 384 // change our base set to upper.
383 baseSets.remove( currCharSet ); 385 baseSets.remove( currCharSet );
@@ -388,14 +390,14 @@ void QIMPenInput::matchedCharacters( const QIMPenCharMatchList &cl )
388 break; 390 break;
389 case QIMPenChar::Punctuation: 391 case QIMPenChar::Punctuation:
390 if ( profile->punctuation() ) { 392 if ( profile->punctuation() ) {
391 //qDebug( "Switch to punctuation" ); 393 //odebug << "Switch to punctuation" << oendl;
392 pw->changeCharSet( profile->punctuation(), currCharSet ); 394 pw->changeCharSet( profile->punctuation(), currCharSet );
393 mode = Switch; 395 mode = Switch;
394 } 396 }
395 break; 397 break;
396 case QIMPenChar::Symbol: 398 case QIMPenChar::Symbol:
397 if ( profile->symbol() ) { 399 if ( profile->symbol() ) {
398 //qDebug( "Switch to symbol" ); 400 //odebug << "Switch to symbol" << oendl ;
399 pw->changeCharSet( profile->symbol(), currCharSet ); 401 pw->changeCharSet( profile->symbol(), currCharSet );
400 mode = Switch; 402 mode = Switch;
401 } 403 }
@@ -443,7 +445,7 @@ void QIMPenInput::keypress( uint scan_uni )
443 } 445 }
444 446
445 if ( mode == Switch ) { 447 if ( mode == Switch ) {
446 //qDebug( "Switch back to normal" ); 448 //odebug << "Switch back to normal" << oendl ;
447 pw->changeCharSet( baseSets.at(currCharSet), currCharSet ); 449 pw->changeCharSet( baseSets.at(currCharSet), currCharSet );
448 if ( baseSets.at(currCharSet) == profile->uppercase() ) 450 if ( baseSets.at(currCharSet) == profile->uppercase() )
449 mode = SwitchLock; 451 mode = SwitchLock;
@@ -459,7 +461,7 @@ void QIMPenInput::handleExtended( const QString &ex )
459{ 461{
460 if ( ex.find( "Select" ) == 0 ) { 462 if ( ex.find( "Select" ) == 0 ) {
461 QString set = ex.mid( 7 ); 463 QString set = ex.mid( 7 );
462 qDebug( "Select new profile: %s", set.latin1() ); 464 odebug << "Select new profile: " << set.latin1() << oendl;
463 selectProfile( set ); 465 selectProfile( set );
464 } 466 }
465} 467}