summaryrefslogtreecommitdiff
path: root/inputmethods
Side-by-side diff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenchar.cpp5
-rw-r--r--inputmethods/handwriting/qimpenchar.h3
-rw-r--r--inputmethods/handwriting/qimpenprofile.cpp25
-rw-r--r--inputmethods/handwriting/qimpenprofile.h2
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp3
5 files changed, 35 insertions, 3 deletions
diff --git a/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp
index 0c37e5c..929f370 100644
--- a/inputmethods/handwriting/qimpenchar.cpp
+++ b/inputmethods/handwriting/qimpenchar.cpp
@@ -347,5 +347,5 @@ bool QIMPenCharSet::load( const QString &fn, Domain d )
ok = TRUE;
}
-
+ setHidden ( false );
return ok;
}
@@ -359,4 +359,7 @@ bool QIMPenCharSet::save( Domain d )
return FALSE;
+ if ( hidden() )
+ return TRUE;
+
bool ok = FALSE;
diff --git a/inputmethods/handwriting/qimpenchar.h b/inputmethods/handwriting/qimpenchar.h
index efd6f16..e4e7645 100644
--- a/inputmethods/handwriting/qimpenchar.h
+++ b/inputmethods/handwriting/qimpenchar.h
@@ -118,4 +118,6 @@ public:
void removeChar( QIMPenChar *ch );
QIMPenChar *at( int i );
+ void setHidden ( const bool &b ) { phidden = &b; }
+ bool hidden() const { return phidden; }
unsigned maximumStrokes() const { return maxStrokes; }
@@ -150,4 +152,5 @@ protected:
QIMPenCharList chars;
QIMPenCharMatchList matches;
+ bool phidden : 1;
};
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
@@ -49,4 +49,7 @@ QIMPenProfile::QIMPenProfile( const QString &fn )
pstyle = ToggleCases;
+ QString t = config.readEntry( "Mono", "Dual" );
+ pmono = (QString::fromLatin1("Mono") == t );
+
msTimeout = config.readNumEntry( "MultiTimeout", 500 );
@@ -120,5 +123,5 @@ void QIMPenProfile::loadData()
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 );
@@ -134,4 +137,24 @@ void QIMPenProfile::loadData()
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 );
diff --git a/inputmethods/handwriting/qimpenprofile.h b/inputmethods/handwriting/qimpenprofile.h
index 4ce4367..adfa866 100644
--- a/inputmethods/handwriting/qimpenprofile.h
+++ b/inputmethods/handwriting/qimpenprofile.h
@@ -34,4 +34,5 @@ public:
enum Style { ToggleCases, BothCases };
Style style() const { return pstyle; }
+ bool mono() const { return pmono; }
void setStyle( Style s );
@@ -66,4 +67,5 @@ private:
int msTimeout;
bool wordMatch;
+ bool pmono;
};
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index 2441102..d0f9ffd 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -402,5 +402,6 @@ void QIMPenEdit::setProfile( QIMPenProfile *p )
QIMPenCharSetIterator it( profile->charSets() );
for ( ; it.current(); ++it ) {
- charSetCombo->insertItem( it.current()->description() );
+ if ( ! it.current()->hidden() )
+ charSetCombo->insertItem( it.current()->description() );
}
selectCharSet( 0 );