summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpeninput.cpp
Side-by-side diff
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
@@ -33,12 +33,13 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qtimer.h>
#include <qdir.h>
+#include <opie2/odebug.h>
#include <limits.h>
// We'll use little pixmaps for the buttons to save screen space.
/* XPM */
@@ -316,13 +317,13 @@ void QIMPenInput::wordPicked( const QString &w )
wordPicker->clear();
}
void QIMPenInput::selectCharSet( int idx )
{
if ( mode == Switch ) {
- //qDebug( "Switch back to normal" );
+ //odebug << "Switch back to normal" << oendl;
pw->changeCharSet( baseSets.at(currCharSet), currCharSet );
mode = Normal;
}
currCharSet = idx;
}
@@ -350,55 +351,56 @@ void QIMPenInput::matchedCharacters( const QIMPenCharMatchList &cl )
// We matched a special character...
switch ( scan ) {
case QIMPenChar::Caps:
if ( profile->style() == QIMPenProfile::ToggleCases ) {
-// qDebug( "Caps" );
+// odebug << "Caps" << oendl;
+//
if ( mode == SwitchLock ) {
-// qDebug( "Switch to normal" );
+// odebug << "Switch to normal" << oendl;
pw->changeCharSet( profile->lowercase(), currCharSet );
mode = Switch;
} else {
-// qDebug( "Switch to upper" );
+// odebug << "Switch to upper" << oendl;
pw->changeCharSet( profile->uppercase(), currCharSet );
mode = Switch;
}
}
break;
case QIMPenChar::CapsLock:
if ( profile->style() == QIMPenProfile::ToggleCases ) {
-// qDebug( "CapsLock" );
+// odebug << "CapsLock" << oendl;
if ( mode == Switch &&
baseSets.at(currCharSet) == profile->uppercase() ) {
-// qDebug( "Switch to normal" );
+// odebug << "Switch to normal" << oendl;
pw->changeCharSet( profile->lowercase(), currCharSet );
// change our base set back to lower.
baseSets.remove( currCharSet );
baseSets.insert( currCharSet, profile->lowercase() );
mode = Normal;
} else {
-// qDebug( "Switch to caps lock" );
+// odebug << "Switch to caps lock" << oendl;
pw->changeCharSet( profile->uppercase(), currCharSet );
// change our base set to upper.
baseSets.remove( currCharSet );
baseSets.insert( currCharSet, profile->uppercase() );
mode = SwitchLock;
}
}
break;
case QIMPenChar::Punctuation:
if ( profile->punctuation() ) {
- //qDebug( "Switch to punctuation" );
+ //odebug << "Switch to punctuation" << oendl;
pw->changeCharSet( profile->punctuation(), currCharSet );
mode = Switch;
}
break;
case QIMPenChar::Symbol:
if ( profile->symbol() ) {
- //qDebug( "Switch to symbol" );
+ //odebug << "Switch to symbol" << oendl ;
pw->changeCharSet( profile->symbol(), currCharSet );
mode = Switch;
}
break;
case QIMPenChar::Shortcut:
if ( shortcutCharSet ) {
@@ -440,13 +442,13 @@ void QIMPenInput::keypress( uint scan_uni )
break;
default:
break;
}
if ( mode == Switch ) {
-// qDebug( "Switch back to normal" );
+// odebug << "Switch back to normal" << oendl ;
pw->changeCharSet( baseSets.at(currCharSet), currCharSet );
if ( baseSets.at(currCharSet) == profile->uppercase() )
mode = SwitchLock;
else
mode = Normal;
}
@@ -456,13 +458,13 @@ void QIMPenInput::keypress( uint scan_uni )
}
void QIMPenInput::handleExtended( const QString &ex )
{
if ( ex.find( "Select" ) == 0 ) {
QString set = ex.mid( 7 );
- qDebug( "Select new profile: %s", set.latin1() );
+ odebug << "Select new profile: " << set.latin1() << oendl;
selectProfile( set );
}
}
void QIMPenInput::help()
{