summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpenprofile.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/handwriting/qimpenprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenprofile.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpenprofile.cpp b/inputmethods/handwriting/qimpenprofile.cpp
index 3b1b5e9..b1a6592 100644
--- a/inputmethods/handwriting/qimpenprofile.cpp
+++ b/inputmethods/handwriting/qimpenprofile.cpp
@@ -45,12 +45,15 @@ QIMPenProfile::QIMPenProfile( const QString &fn )
pstyle = BothCases;
QString s = config.readEntry( "Style", "BothCases" );
if ( s == "ToggleCases" )
pstyle = ToggleCases;
+ QString t = config.readEntry( "Mono", "Dual" );
+ pmono = (QString::fromLatin1("Mono") == t );
+
msTimeout = config.readNumEntry( "MultiTimeout", 500 );
// Read user configuration
Config usrConfig( userConfig() );
usrConfig.setGroup( "Settings" );
msTimeout = usrConfig.readNumEntry( "MultiTimeout", msTimeout );
@@ -116,13 +119,13 @@ void QIMPenProfile::loadData()
combining = 0;
}
}
// uppercase latin1
QIMPenCharSet *cs = 0;
s = config.readEntry( "Uppercase" );
- if ( !s.isEmpty() ) {
+ if ( !s.isEmpty() && !mono() ) {
cs = new QIMPenCharSet( baseDir + "qimpen/" + s );
cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User );
if ( !cs->isEmpty() ) {
if ( combining )
combining->addCombined( cs );
sets.append( cs );
@@ -130,12 +133,32 @@ void QIMPenProfile::loadData()
delete cs;
}
}
// lowercase latin1
s = config.readEntry( "Lowercase" );
if ( !s.isEmpty() ) {
+ if ( mono() ) {
+ cs = new QIMPenCharSet ( baseDir + "qimpen/" + s );
+ cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User );
+ if ( !cs->isEmpty() ) {
+ cs->setTitle( cs->title().upper() );
+ cs->setType( QIMPenCharSet::Upper );
+ cs->setHidden ( true );
+ QIMPenCharIterator it( cs->characters() );
+ for ( ; it.current(); ++it ) {
+ uint ch = it.current()->character();
+ if ( ch >= 'a' && ch <= 'z' )
+ it.current()->setCharacter( QChar(ch).upper() );
+ }
+ if ( combining )
+ combining->addCombined( cs );
+ sets.append( cs );
+ } else {
+ delete cs;
+ }
+ }
cs = new QIMPenCharSet( baseDir + "qimpen/" + s );
cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User );
if ( !cs->isEmpty() ) {
if ( combining )
combining->addCombined( cs );
sets.append( cs );