summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index 10c136d..2441102 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -92,9 +92,10 @@ QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent,
setCaption( tr("Setup Handwriting Input") );
QVBoxLayout *vb = new QVBoxLayout( this );
-#if 0
+#define MULTIPROFILE
+#ifdef MULTIPROFILE
profileList.setAutoDelete( true );
QHBoxLayout *hb = new QHBoxLayout( vb );
hb->setMargin( 6 );
QLabel *l = new QLabel( tr("Character Profile:"), this );
@@ -102,12 +103,13 @@ QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent,
profileCombo = new QComboBox( this );
connect( profileCombo, SIGNAL(activated(const QString &)),
this, SLOT(selectProfile(const QString &)) );
hb->addWidget( profileCombo );
- loadProfiles();
#else
profileList.append( profile );
#endif
+
+ qWarning("profiles: %d", profileList.count());
QTabWidget *tw = new QTabWidget( this );
vb->addWidget( tw );
@@ -129,8 +131,12 @@ QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent,
this, SLOT(multiTimeoutChanged(int)) );
edit = new QIMPenEdit( p, tw );
tw->addTab( edit, tr("Customize") );
+#ifdef MULTIPROFILE
+ loadProfiles();
+#endif
+
}
void QIMPenSetup::loadProfiles()
{
@@ -144,8 +150,9 @@ void QIMPenSetup::loadProfiles()
profileCombo->insertItem( p->name() );
if ( p->name() == profile->name() ) {
profileCombo->setCurrentItem( profileCombo->count()-1 );
profile = p;
+ edit->setProfile( profile );
}
}
}
@@ -562,8 +569,9 @@ void QIMPenEdit::addChar()
pc->setCharacter( currentCode );
// User characters override all matching system characters.
// Copy and mark deleted identical system characters.
+
QIMPenCharIterator it(currentSet->characters() );
QIMPenChar *sc = 0;
while ( (sc = it.current()) != 0 ) {
++it;