summaryrefslogtreecommitdiff
path: root/inputmethods
Side-by-side diff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenchar.h2
-rw-r--r--inputmethods/handwriting/qimpenprofile.cpp3
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp17
-rw-r--r--inputmethods/handwriting/qimpensetup.h1
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
@@ -114,13 +114,13 @@ public:
QString title() const { return csTitle; }
QIMPenCharMatchList match( QIMPenChar *ch );
void addChar( QIMPenChar *ch );
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; }
unsigned maximumStrokes() const { return maxStrokes; }
void up( QIMPenChar *ch );
void down( QIMPenChar *ch );
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
@@ -139,12 +139,13 @@ void QIMPenProfile::loadData()
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->setDescription( "Hidden uppercase" );
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() );
@@ -156,12 +157,14 @@ void QIMPenProfile::loadData()
delete cs;
}
}
cs = new QIMPenCharSet( baseDir + "qimpen/" + s );
cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User );
if ( !cs->isEmpty() ) {
+ if ( mono () )
+ cs->setDescription( "Latin Characters" );
if ( combining )
combining->addCombined( cs );
sets.append( cs );
} else {
delete 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
@@ -323,13 +323,13 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
gl->setRowStretch( 1, 1 );
gl->addRowSpacing( 2, 35 );
gl->addRowSpacing( 3, 35 );
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 ) {
charSetCombo->insertItem( it.current()->description() );
}
charList = new QListBox( this );
@@ -385,13 +385,13 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
hb->addWidget( pb );
pb = new QPushButton( tr("Cancel"), this );
connect( pb, SIGNAL(clicked()), SLOT(reject()) );
hb->addWidget( pb );
#endif
- selectCharSet( 0 );
+ selectCharSetVisible( 0 );
charList->setFocus();
resize( minimumSize() );
enableButtons();
}
@@ -401,13 +401,13 @@ void QIMPenEdit::setProfile( QIMPenProfile *p )
charSetCombo->clear();
QIMPenCharSetIterator it( profile->charSets() );
for ( ; it.current(); ++it ) {
if ( ! it.current()->hidden() )
charSetCombo->insertItem( it.current()->description() );
}
- selectCharSet( 0 );
+ selectCharSetVisible( 0 );
charList->setFocus();
enableButtons();
}
void QIMPenEdit::selectCharSet( QIMPenCharSet *c )
{
@@ -546,12 +546,23 @@ void QIMPenEdit::selectChar( int i )
}
if ( !it.current() )
setCurrentChar( 0 );
inputChar->clear();
}
+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 )
{
if ( currentSet )
pw->removeCharSet( 0 );
currentSet = profile->charSets().at( i );
fillCharList();
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
@@ -97,12 +97,13 @@ protected:
protected slots:
void prevChar();
void nextChar();
void clearChar();
void selectChar( int );
void selectCharSet( int );
+ void selectCharSetVisible( int );
void addChar();
void addNewChar();
void removeChar();
void defaultChars();
void newStroke( QIMPenStroke * );