-rw-r--r-- | inputmethods/handwriting/qimpenchar.h | 2 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpenprofile.cpp | 3 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpensetup.cpp | 17 | ||||
-rw-r--r-- | inputmethods/handwriting/qimpensetup.h | 1 |
4 files changed, 19 insertions, 4 deletions
diff --git a/inputmethods/handwriting/qimpenchar.h b/inputmethods/handwriting/qimpenchar.h index e4e7645..92ee2c1 100644 --- a/inputmethods/handwriting/qimpenchar.h +++ b/inputmethods/handwriting/qimpenchar.h @@ -118,5 +118,5 @@ public: void removeChar( QIMPenChar *ch ); QIMPenChar *at( int i ); - void setHidden ( const bool &b ) { phidden = &b; } + void setHidden ( const bool &b ) { phidden = b; } bool hidden() const { return phidden; } diff --git a/inputmethods/handwriting/qimpenprofile.cpp b/inputmethods/handwriting/qimpenprofile.cpp index b1a6592..67343c3 100644 --- a/inputmethods/handwriting/qimpenprofile.cpp +++ b/inputmethods/handwriting/qimpenprofile.cpp @@ -143,4 +143,5 @@ void QIMPenProfile::loadData() cs->setTitle( cs->title().upper() ); cs->setType( QIMPenCharSet::Upper ); + cs->setDescription( "Hidden uppercase" ); cs->setHidden ( true ); QIMPenCharIterator it( cs->characters() ); @@ -160,4 +161,6 @@ void QIMPenProfile::loadData() cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User ); if ( !cs->isEmpty() ) { + if ( mono () ) + cs->setDescription( "Latin Characters" ); if ( combining ) combining->addCombined( cs ); diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp index d1297a9..3f4841d 100644 --- a/inputmethods/handwriting/qimpensetup.cpp +++ b/inputmethods/handwriting/qimpensetup.cpp @@ -327,5 +327,5 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent, charSetCombo = new QComboBox( this ); gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); - connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); + connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSetVisible(int))); QIMPenCharSetIterator it( profile->charSets() ); for ( ; it.current(); ++it ) { @@ -389,5 +389,5 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent, hb->addWidget( pb ); #endif - selectCharSet( 0 ); + selectCharSetVisible( 0 ); charList->setFocus(); @@ -405,5 +405,5 @@ void QIMPenEdit::setProfile( QIMPenProfile *p ) charSetCombo->insertItem( it.current()->description() ); } - selectCharSet( 0 ); + selectCharSetVisible( 0 ); charList->setFocus(); enableButtons(); @@ -550,4 +550,15 @@ void QIMPenEdit::selectChar( int i ) } +void QIMPenEdit::selectCharSetVisible( int c ) +{ + int i = 0; + QIMPenCharSetIterator it( profile->charSets() ); + for ( ; it.current(); ++it, i++ ) { + if ( charSetCombo->text( c ) == it.current()->description() ) { + selectCharSet( i ); + } + } +} + void QIMPenEdit::selectCharSet( int i ) { diff --git a/inputmethods/handwriting/qimpensetup.h b/inputmethods/handwriting/qimpensetup.h index 5d3064b..93b981b 100644 --- a/inputmethods/handwriting/qimpensetup.h +++ b/inputmethods/handwriting/qimpensetup.h @@ -101,4 +101,5 @@ protected slots: void selectChar( int ); void selectCharSet( int ); + void selectCharSetVisible( int ); void addChar(); void addNewChar(); |