summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpensetup.cpp
Unidiff
Diffstat (limited to 'inputmethods/handwriting/qimpensetup.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index a6ae3a8..2c06fbc 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -48,97 +48,97 @@ static const char * const left_xpm[] = {
48" ", 48" ",
49" . ", 49" . ",
50" .. ", 50" .. ",
51" ... ", 51" ... ",
52" .... ", 52" .... ",
53" ..... ", 53" ..... ",
54" ...... ", 54" ...... ",
55" ..... ", 55" ..... ",
56" .... ", 56" .... ",
57" ... ", 57" ... ",
58" .. ", 58" .. ",
59" . ", 59" . ",
60" ", 60" ",
61" "}; 61" "};
62 62
63 63
64/* XPM */ 64/* XPM */
65static const char * const right_xpm[] = { 65static const char * const right_xpm[] = {
66"16 16 2 1", 66"16 16 2 1",
67 " c None", 67 " c None",
68 ".c #000000", 68 ".c #000000",
69" ", 69" ",
70" ", 70" ",
71" ", 71" ",
72" . ", 72" . ",
73" .. ", 73" .. ",
74" ... ", 74" ... ",
75" .... ", 75" .... ",
76" ..... ", 76" ..... ",
77" ...... ", 77" ...... ",
78" ..... ", 78" ..... ",
79" .... ", 79" .... ",
80" ... ", 80" ... ",
81" .. ", 81" .. ",
82" . ", 82" . ",
83" ", 83" ",
84" "}; 84" "};
85 85
86 86
87 87
88QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent, 88QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent,
89 const char *name, bool modal, int WFlags ) 89 const char *name, bool modal, int WFlags )
90 : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p) 90 : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p)
91{ 91{
92 setCaption( tr("Setup Handwriting Input") ); 92 setCaption( tr("Setup Handwriting Input") );
93 93
94 QVBoxLayout *vb = new QVBoxLayout( this ); 94 QVBoxLayout *vb = new QVBoxLayout( this );
95 95
96#if 0 96#if 1
97 profileList.setAutoDelete( true ); 97 profileList.setAutoDelete( true );
98 QHBoxLayout *hb = new QHBoxLayout( vb ); 98 QHBoxLayout *hb = new QHBoxLayout( vb );
99 hb->setMargin( 6 ); 99 hb->setMargin( 6 );
100 QLabel *l = new QLabel( tr("Character Profile:"), this ); 100 QLabel *l = new QLabel( tr("Character Profile:"), this );
101 hb->addWidget( l ); 101 hb->addWidget( l );
102 profileCombo = new QComboBox( this ); 102 profileCombo = new QComboBox( this );
103 connect( profileCombo, SIGNAL(activated(const QString &)), 103 connect( profileCombo, SIGNAL(activated(const QString &)),
104 this, SLOT(selectProfile(const QString &)) ); 104 this, SLOT(selectProfile(const QString &)) );
105 hb->addWidget( profileCombo ); 105 hb->addWidget( profileCombo );
106 loadProfiles(); 106 loadProfiles();
107#else 107#else
108 profileList.append( profile ); 108 profileList.append( profile );
109#endif 109#endif
110 110
111 QTabWidget *tw = new QTabWidget( this ); 111 QTabWidget *tw = new QTabWidget( this );
112 vb->addWidget( tw ); 112 vb->addWidget( tw );
113 113
114 pref = new QIMPenPrefBase( this ); 114 pref = new QIMPenPrefBase( this );
115 tw->addTab( pref, tr("Preferences") ); 115 tw->addTab( pref, tr("Preferences") );
116 116
117 pref->inputStyle->setExclusive( TRUE ); 117 pref->inputStyle->setExclusive( TRUE );
118 118
119 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; 119 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0;
120 pref->inputStyle->setButton( style ); 120 pref->inputStyle->setButton( style );
121 connect( pref->inputStyle, SIGNAL(clicked(int)), 121 connect( pref->inputStyle, SIGNAL(clicked(int)),
122 this, SLOT(styleClicked(int)) ); 122 this, SLOT(styleClicked(int)) );
123 pref->inputStyle->setEnabled( profile->canSelectStyle() ); 123 pref->inputStyle->setEnabled( profile->canSelectStyle() );
124 124
125 multiTimeout = profile->multiStrokeTimeout(); 125 multiTimeout = profile->multiStrokeTimeout();
126 pref->multiStrokeSlider->setValue( multiTimeout ); 126 pref->multiStrokeSlider->setValue( multiTimeout );
127 multiTimeoutChanged( multiTimeout ); 127 multiTimeoutChanged( multiTimeout );
128 connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)), 128 connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)),
129 this, SLOT(multiTimeoutChanged(int)) ); 129 this, SLOT(multiTimeoutChanged(int)) );
130 130
131 edit = new QIMPenEdit( p, tw ); 131 edit = new QIMPenEdit( p, tw );
132 tw->addTab( edit, tr("Customize") ); 132 tw->addTab( edit, tr("Customize") );
133} 133}
134 134
135void QIMPenSetup::loadProfiles() 135void QIMPenSetup::loadProfiles()
136{ 136{
137 QString path = QPEApplication::qpeDir() + "etc/qimpen"; 137 QString path = QPEApplication::qpeDir() + "etc/qimpen";
138 QDir dir( path, "*.conf" ); 138 QDir dir( path, "*.conf" );
139 QStringList list = dir.entryList(); 139 QStringList list = dir.entryList();
140 QStringList::Iterator it; 140 QStringList::Iterator it;
141 for ( it = list.begin(); it != list.end(); ++it ) { 141 for ( it = list.begin(); it != list.end(); ++it ) {
142 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it ); 142 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it );
143 profileList.append( p ); 143 profileList.append( p );
144 profileCombo->insertItem( p->name() ); 144 profileCombo->insertItem( p->name() );