summaryrefslogtreecommitdiff
path: root/inputmethods
Unidiff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenhelp.cpp12
-rw-r--r--inputmethods/handwriting/qimpeninput.cpp24
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp12
-rw-r--r--inputmethods/multikey/keyboard.cpp4
4 files changed, 26 insertions, 26 deletions
diff --git a/inputmethods/handwriting/qimpenhelp.cpp b/inputmethods/handwriting/qimpenhelp.cpp
index a294301..0727931 100644
--- a/inputmethods/handwriting/qimpenhelp.cpp
+++ b/inputmethods/handwriting/qimpenhelp.cpp
@@ -142,77 +142,77 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const
142 charSetCombo = new QComboBox( this ); 142 charSetCombo = new QComboBox( this );
143 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); 143 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 );
144 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); 144 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int)));
145 QIMPenCharSetIterator it( profile->charSets() ); 145 QIMPenCharSetIterator it( profile->charSets() );
146 for ( ; it.current(); ++it ) { 146 for ( ; it.current(); ++it ) {
147 charSetCombo->insertItem( it.current()->description() ); 147 charSetCombo->insertItem( it.current()->description() );
148 } 148 }
149 149
150 charList = new QListBox( this ); 150 charList = new QListBox( this );
151 charList->setHScrollBarMode( QListBox::AlwaysOff ); 151 charList->setHScrollBarMode( QListBox::AlwaysOff );
152 charList->setFixedWidth(80); 152 charList->setFixedWidth(80);
153 connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); 153 connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) );
154 gl->addWidget(charList, 1, 0); 154 gl->addWidget(charList, 1, 0);
155 155
156 result = new QLabel( this ); 156 result = new QLabel( this );
157 result->setAlignment(AlignLeft | AlignVCenter | WordBreak); 157 result->setAlignment(AlignLeft | AlignVCenter | WordBreak);
158 result->setText( 158 result->setText(
159 tr( "Select a reference character from the list. Practice writing in " 159 tr( "Select a reference character from the list. Practice writing in "
160 "the area on the right.")); 160 "the area on the right."));
161 gl->addMultiCellWidget(result, 1, 2, 1, 1); 161 gl->addMultiCellWidget(result, 1, 2, 1, 1);
162 162
163 matcher = new QIMPenMatch( this ); 163 matcher = new QIMPenMatch( this );
164 matcher->setCharSet( currentSet ); 164 matcher->setCharSet( currentSet );
165 connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) ); 165 connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) );
166 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), 166 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)),
167 this, SLOT(matched(const QIMPenCharMatchList &)) ); 167 this, SLOT(matched(const QIMPenCharMatchList&)) );
168 168
169 QHBoxLayout *hb = new QHBoxLayout(); 169 QHBoxLayout *hb = new QHBoxLayout();
170 gl->addLayout( hb, 2, 0 ); 170 gl->addLayout( hb, 2, 0 );
171 prevBtn = new QPushButton( this ); 171 prevBtn = new QPushButton( this );
172 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); 172 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) );
173 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); 173 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar()));
174 hb->addWidget( prevBtn ); 174 hb->addWidget( prevBtn );
175 175
176 nextBtn = new QPushButton( this ); 176 nextBtn = new QPushButton( this );
177 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); 177 nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) );
178 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); 178 connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar()));
179 hb->addWidget( nextBtn ); 179 hb->addWidget( nextBtn );
180 180
181 refPw = new QIMPenWidget( this ); 181 refPw = new QIMPenWidget( this );
182 refPw->setReadOnly( TRUE ); 182 refPw->setReadOnly( TRUE );
183 gl->addWidget( refPw, 3, 0 ); 183 gl->addWidget( refPw, 3, 0 );
184 184
185 pracPw = new QIMPenWidget( this ); 185 pracPw = new QIMPenWidget( this );
186 connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); 186 connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) );
187 connect( pracPw, SIGNAL(beginStroke()), 187 connect( pracPw, SIGNAL(beginStroke()),
188 this, SLOT(beginStroke()) ); 188 this, SLOT(beginStroke()) );
189 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), 189 connect( pracPw, SIGNAL(stroke(QIMPenStroke*)),
190 this, SLOT(strokeEntered( QIMPenStroke * )) ); 190 this, SLOT(strokeEntered(QIMPenStroke*)) );
191 connect( pracPw, SIGNAL(beginStroke()), 191 connect( pracPw, SIGNAL(beginStroke()),
192 matcher, SLOT(beginStroke()) ); 192 matcher, SLOT(beginStroke()) );
193 connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), 193 connect( pracPw, SIGNAL(stroke(QIMPenStroke*)),
194 matcher, SLOT(strokeEntered( QIMPenStroke * )) ); 194 matcher, SLOT(strokeEntered(QIMPenStroke*)) );
195 gl->addWidget( pracPw, 3, 1 ); 195 gl->addWidget( pracPw, 3, 1 );
196 196
197 redrawTimer = new QTimer( this ); 197 redrawTimer = new QTimer( this );
198 connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) ); 198 connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) );
199 redrawTimer->start( 5000 ); 199 redrawTimer->start( 5000 );
200 200
201 currentSet = 0; 201 currentSet = 0;
202 charSetCombo->setCurrentItem( 1 ); 202 charSetCombo->setCurrentItem( 1 );
203 selectCharSet( 1 ); 203 selectCharSet( 1 );
204} 204}
205 205
206HandwritingTrainer::~HandwritingTrainer() 206HandwritingTrainer::~HandwritingTrainer()
207{ 207{
208} 208}
209 209
210void HandwritingTrainer::showEvent( QShowEvent * ) 210void HandwritingTrainer::showEvent( QShowEvent * )
211{ 211{
212 redrawChar(); 212 redrawChar();
213 redrawTimer->start( 5000 ); 213 redrawTimer->start( 5000 );
214} 214}
215 215
216void HandwritingTrainer::setCurrentChar( QIMPenChar *c ) 216void HandwritingTrainer::setCurrentChar( QIMPenChar *c )
217{ 217{
218 currentChar = c; 218 currentChar = c;
diff --git a/inputmethods/handwriting/qimpeninput.cpp b/inputmethods/handwriting/qimpeninput.cpp
index db33c9b..d073cdf 100644
--- a/inputmethods/handwriting/qimpeninput.cpp
+++ b/inputmethods/handwriting/qimpeninput.cpp
@@ -128,109 +128,109 @@ static char * help_xpm[] = {
128" .+. ", 128" .+. ",
129" #.# "}; 129" #.# "};
130 130
131 131
132/*! 132/*!
133 \class QIMPenInput qimpeninput.h 133 \class QIMPenInput qimpeninput.h
134 134
135 Pen input widget. 135 Pen input widget.
136*/ 136*/
137QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags wf ) 137QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags wf )
138 : QFrame( parent, name, wf ), helpDlg(0), profile(0) 138 : QFrame( parent, name, wf ), helpDlg(0), profile(0)
139{ 139{
140 setFrameStyle( Box | Plain ); 140 setFrameStyle( Box | Plain );
141 141
142 profileList.setAutoDelete( true ); 142 profileList.setAutoDelete( true );
143 143
144 matcher = new QIMPenMatch( this ); 144 matcher = new QIMPenMatch( this );
145 connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) ); 145 connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) );
146 connect( matcher, SIGNAL(erase()), this, SLOT(erase()) ); 146 connect( matcher, SIGNAL(erase()), this, SLOT(erase()) );
147 147
148 QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 ); 148 QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 );
149 gl->setColStretch( 0, 1 ); 149 gl->setColStretch( 0, 1 );
150 150
151 wordPicker = new QIMPenWordPick( this ); 151 wordPicker = new QIMPenWordPick( this );
152 connect( wordPicker, SIGNAL(wordClicked(const QString &)), 152 connect( wordPicker, SIGNAL(wordClicked(const QString&)),
153 this, SLOT(wordPicked(const QString &)) ); 153 this, SLOT(wordPicked(const QString&)) );
154 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), 154 connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)),
155 this, SLOT(matchedCharacters(const QIMPenCharMatchList &)) ); 155 this, SLOT(matchedCharacters(const QIMPenCharMatchList&)) );
156 connect( matcher, SIGNAL(matchedWords(const QIMPenMatch::MatchWordList&)), 156 connect( matcher, SIGNAL(matchedWords(const QIMPenMatch::MatchWordList&)),
157 wordPicker, SLOT(setWords(const QIMPenMatch::MatchWordList&)) ); 157 wordPicker, SLOT(setWords(const QIMPenMatch::MatchWordList&)) );
158 QFont f("smallsmooth",9); 158 QFont f("smallsmooth",9);
159 QFontInfo fi( f ); 159 QFontInfo fi( f );
160 wordPicker->setFont( f ); 160 wordPicker->setFont( f );
161 wordPicker->setBackgroundColor( white ); 161 wordPicker->setBackgroundColor( white );
162 gl->addMultiCellWidget( wordPicker, 0, 0, 0, 1 ); 162 gl->addMultiCellWidget( wordPicker, 0, 0, 0, 1 );
163 if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() ) 163 if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() )
164 wordPicker->hide(); 164 wordPicker->hide();
165 165
166 pw = new QIMPenWidget( this ); 166 pw = new QIMPenWidget( this );
167 gl->addMultiCellWidget( pw, 1, 4, 0, 0 ); 167 gl->addMultiCellWidget( pw, 1, 4, 0, 0 );
168 168
169 int bh = pw->sizeHint().height()/4; 169 int bh = pw->sizeHint().height()/4;
170 170
171 QPushButton *b = new QPushButton( this ); 171 QPushButton *b = new QPushButton( this );
172 b->setFocusPolicy( NoFocus ); 172 b->setFocusPolicy( NoFocus );
173 b->setPixmap( QPixmap( (const char **)bs_xpm ) ); 173 b->setPixmap( QPixmap( (const char **)bs_xpm ) );
174 b->setFixedHeight(pw->sizeHint().height()-3*bh); // left-over space goes here 174 b->setFixedHeight(pw->sizeHint().height()-3*bh); // left-over space goes here
175 b->setAutoRepeat( TRUE ); 175 b->setAutoRepeat( TRUE );
176 gl->addWidget( b, 1, 1 ); 176 gl->addWidget( b, 1, 1 );
177 connect( b, SIGNAL(clicked()), SLOT(backspace())); 177 connect( b, SIGNAL(clicked()), SLOT(backspace()));
178 178
179 b = new QPushButton( this ); 179 b = new QPushButton( this );
180 b->setFocusPolicy( NoFocus ); 180 b->setFocusPolicy( NoFocus );
181 b->setPixmap( QPixmap( (const char **)enter_xpm ) ); 181 b->setPixmap( QPixmap( (const char **)enter_xpm ) );
182 b->setFixedHeight(bh); 182 b->setFixedHeight(bh);
183 b->setAutoRepeat( TRUE ); 183 b->setAutoRepeat( TRUE );
184 gl->addWidget( b, 2, 1 ); 184 gl->addWidget( b, 2, 1 );
185 connect( b, SIGNAL(clicked()), SLOT(enter())); 185 connect( b, SIGNAL(clicked()), SLOT(enter()));
186 186
187 helpBtn = new QPushButton( this ); 187 helpBtn = new QPushButton( this );
188 helpBtn->setFocusPolicy( NoFocus ); 188 helpBtn->setFocusPolicy( NoFocus );
189 helpBtn->setPixmap( QPixmap( (const char **)help_xpm ) ); 189 helpBtn->setPixmap( QPixmap( (const char **)help_xpm ) );
190 helpBtn->setFixedHeight(bh); 190 helpBtn->setFixedHeight(bh);
191 gl->addWidget( helpBtn, 3, 1 ); 191 gl->addWidget( helpBtn, 3, 1 );
192 connect( helpBtn, SIGNAL(clicked()), SLOT(help())); 192 connect( helpBtn, SIGNAL(clicked()), SLOT(help()));
193 193
194 QPixmap pm( (const char **)pen_xpm ); 194 QPixmap pm( (const char **)pen_xpm );
195 setupBtn = new QPushButton( this ); 195 setupBtn = new QPushButton( this );
196 setupBtn->setFocusPolicy( NoFocus ); 196 setupBtn->setFocusPolicy( NoFocus );
197 setupBtn->setPixmap( pm ); 197 setupBtn->setPixmap( pm );
198 setupBtn->setFixedHeight(bh); 198 setupBtn->setFixedHeight(bh);
199 gl->addWidget( setupBtn, 4, 1 ); 199 gl->addWidget( setupBtn, 4, 1 );
200 connect( setupBtn, SIGNAL(clicked()), SLOT(setup())); 200 connect( setupBtn, SIGNAL(clicked()), SLOT(setup()));
201 201
202 connect( matcher, SIGNAL(removeStroke()), pw, SLOT(removeStroke()) ); 202 connect( matcher, SIGNAL(removeStroke()), pw, SLOT(removeStroke()) );
203 connect( pw, SIGNAL(changeCharSet( QIMPenCharSet * )), 203 connect( pw, SIGNAL(changeCharSet(QIMPenCharSet*)),
204 matcher, SLOT(setCharSet( QIMPenCharSet * )) ); 204 matcher, SLOT(setCharSet(QIMPenCharSet*)) );
205 connect( pw, SIGNAL(changeCharSet( int )), 205 connect( pw, SIGNAL(changeCharSet(int)),
206 this, SLOT(selectCharSet( int )) ); 206 this, SLOT(selectCharSet(int)) );
207 connect( pw, SIGNAL(beginStroke()), 207 connect( pw, SIGNAL(beginStroke()),
208 matcher, SLOT(beginStroke()) ); 208 matcher, SLOT(beginStroke()) );
209 connect( pw, SIGNAL(stroke( QIMPenStroke * )), 209 connect( pw, SIGNAL(stroke(QIMPenStroke*)),
210 this, SLOT(strokeEntered( QIMPenStroke * )) ); 210 this, SLOT(strokeEntered(QIMPenStroke*)) );
211 connect( pw, SIGNAL(stroke( QIMPenStroke * )), 211 connect( pw, SIGNAL(stroke(QIMPenStroke*)),
212 matcher, SLOT(strokeEntered( QIMPenStroke * )) ); 212 matcher, SLOT(strokeEntered(QIMPenStroke*)) );
213 213
214 shortcutCharSet = 0; 214 shortcutCharSet = 0;
215 currCharSet = 0; 215 currCharSet = 0;
216 setupDlg = 0; 216 setupDlg = 0;
217 profile = 0; 217 profile = 0;
218 mode = Normal; 218 mode = Normal;
219 219
220 loadProfiles(); 220 loadProfiles();
221} 221}
222 222
223QIMPenInput::~QIMPenInput() 223QIMPenInput::~QIMPenInput()
224{ 224{
225 delete (HandwritingHelp*) helpDlg; 225 delete (HandwritingHelp*) helpDlg;
226} 226}
227 227
228QSize QIMPenInput::sizeHint() const 228QSize QIMPenInput::sizeHint() const
229{ 229{
230 int fw = frameWidth(); 230 int fw = frameWidth();
231 int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height(); 231 int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height();
232 return pw->sizeHint() + QSize( fw*2, fw*2+ps ); 232 return pw->sizeHint() + QSize( fw*2, fw*2+ps );
233} 233}
234 234
235void QIMPenInput::loadProfiles() 235void QIMPenInput::loadProfiles()
236{ 236{
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index d0f9ffd..d1297a9 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -80,50 +80,50 @@ static const char * const right_xpm[] = {
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#define MULTIPROFILE 96#define MULTIPROFILE
97#ifdef MULTIPROFILE 97#ifdef MULTIPROFILE
98 profileList.setAutoDelete( true ); 98 profileList.setAutoDelete( true );
99 QHBoxLayout *hb = new QHBoxLayout( vb ); 99 QHBoxLayout *hb = new QHBoxLayout( vb );
100 hb->setMargin( 6 ); 100 hb->setMargin( 6 );
101 QLabel *l = new QLabel( tr("Character Profile:"), this ); 101 QLabel *l = new QLabel( tr("Character Profile:"), this );
102 hb->addWidget( l ); 102 hb->addWidget( l );
103 profileCombo = new QComboBox( this ); 103 profileCombo = new QComboBox( this );
104 connect( profileCombo, SIGNAL(activated(const QString &)), 104 connect( profileCombo, SIGNAL(activated(const QString&)),
105 this, SLOT(selectProfile(const QString &)) ); 105 this, SLOT(selectProfile(const QString&)) );
106 hb->addWidget( profileCombo ); 106 hb->addWidget( profileCombo );
107#else 107#else
108 profileList.append( profile ); 108 profileList.append( profile );
109#endif 109#endif
110 110
111 qWarning("profiles: %d", profileList.count()); 111 qWarning("profiles: %d", profileList.count());
112 112
113 QTabWidget *tw = new QTabWidget( this ); 113 QTabWidget *tw = new QTabWidget( this );
114 vb->addWidget( tw ); 114 vb->addWidget( tw );
115 115
116 pref = new QIMPenPrefBase( this ); 116 pref = new QIMPenPrefBase( this );
117 tw->addTab( pref, tr("Preferences") ); 117 tw->addTab( pref, tr("Preferences") );
118 118
119 pref->inputStyle->setExclusive( TRUE ); 119 pref->inputStyle->setExclusive( TRUE );
120 120
121 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; 121 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0;
122 pref->inputStyle->setButton( style ); 122 pref->inputStyle->setButton( style );
123 connect( pref->inputStyle, SIGNAL(clicked(int)), 123 connect( pref->inputStyle, SIGNAL(clicked(int)),
124 this, SLOT(styleClicked(int)) ); 124 this, SLOT(styleClicked(int)) );
125 pref->inputStyle->setEnabled( profile->canSelectStyle() ); 125 pref->inputStyle->setEnabled( profile->canSelectStyle() );
126 126
127 multiTimeout = profile->multiStrokeTimeout(); 127 multiTimeout = profile->multiStrokeTimeout();
128 pref->multiStrokeSlider->setValue( multiTimeout ); 128 pref->multiStrokeSlider->setValue( multiTimeout );
129 multiTimeoutChanged( multiTimeout ); 129 multiTimeoutChanged( multiTimeout );
@@ -226,50 +226,50 @@ void QIMPenSetup::accept()
226 } else { 226 } else {
227 QDialog::accept(); 227 QDialog::accept();
228 } 228 }
229} 229}
230 230
231//--------------------------------------------------------------------------- 231//---------------------------------------------------------------------------
232 232
233QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name, 233QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name,
234 bool modal, int WFlags) 234 bool modal, int WFlags)
235 : QDialog( parent, name, modal, WFlags ) 235 : QDialog( parent, name, modal, WFlags )
236{ 236{
237 setCaption( tr("Enter new character") ); 237 setCaption( tr("Enter new character") );
238 uni = 0; 238 uni = 0;
239 239
240 QVBoxLayout *vb = new QVBoxLayout( this, 10 ); 240 QVBoxLayout *vb = new QVBoxLayout( this, 10 );
241 241
242 QHBoxLayout *hb = new QHBoxLayout(); 242 QHBoxLayout *hb = new QHBoxLayout();
243 vb->addLayout( hb ); 243 vb->addLayout( hb );
244 244
245 QLabel *label = new QLabel( tr("Character:"), this ); 245 QLabel *label = new QLabel( tr("Character:"), this );
246 hb->addWidget( label ); 246 hb->addWidget( label );
247 247
248 QComboBox *cb = new QComboBox( TRUE, this ); 248 QComboBox *cb = new QComboBox( TRUE, this );
249 connect( cb, SIGNAL(activated(int)), SLOT(setSpecial(int)) ); 249 connect( cb, SIGNAL(activated(int)), SLOT(setSpecial(int)) );
250 connect( cb, SIGNAL(textChanged(const QString &)), 250 connect( cb, SIGNAL(textChanged(const QString&)),
251 SLOT(setCharacter(const QString &)) ); 251 SLOT(setCharacter(const QString&)) );
252 addSpecial( cb ); 252 addSpecial( cb );
253 cb->setEditText( "" ); 253 cb->setEditText( "" );
254 hb->addWidget( cb ); 254 hb->addWidget( cb );
255 255
256 hb = new QHBoxLayout(); 256 hb = new QHBoxLayout();
257 vb->addLayout( hb ); 257 vb->addLayout( hb );
258 258
259 QPushButton *pb = new QPushButton( "OK", this ); 259 QPushButton *pb = new QPushButton( "OK", this );
260 connect( pb, SIGNAL(clicked()), SLOT(accept())); 260 connect( pb, SIGNAL(clicked()), SLOT(accept()));
261 hb->addWidget( pb ); 261 hb->addWidget( pb );
262 pb = new QPushButton( "Cancel", this ); 262 pb = new QPushButton( "Cancel", this );
263 connect( pb, SIGNAL(clicked()), SLOT(reject())); 263 connect( pb, SIGNAL(clicked()), SLOT(reject()));
264 hb->addWidget( pb ); 264 hb->addWidget( pb );
265 265
266 cb->setFocus(); 266 cb->setFocus();
267} 267}
268 268
269void QIMPenInputCharDlg::addSpecial( QComboBox *cb ) 269void QIMPenInputCharDlg::addSpecial( QComboBox *cb )
270{ 270{
271 int i = 0; 271 int i = 0;
272 while ( qimpen_specialKeys[i].code != Key_unknown ) { 272 while ( qimpen_specialKeys[i].code != Key_unknown ) {
273 cb->insertItem( qimpen_specialKeys[i].name ); 273 cb->insertItem( qimpen_specialKeys[i].name );
274 i++; 274 i++;
275 } 275 }
@@ -319,50 +319,50 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent,
319 319
320 QVBoxLayout *tvb = new QVBoxLayout( this, 5 ); 320 QVBoxLayout *tvb = new QVBoxLayout( this, 5 );
321 321
322 QGridLayout *gl = new QGridLayout( tvb, 4, 2 ); 322 QGridLayout *gl = new QGridLayout( tvb, 4, 2 );
323 gl->setRowStretch( 1, 1 ); 323 gl->setRowStretch( 1, 1 );
324 gl->addRowSpacing( 2, 35 ); 324 gl->addRowSpacing( 2, 35 );
325 gl->addRowSpacing( 3, 35 ); 325 gl->addRowSpacing( 3, 35 );
326 326
327 charSetCombo = new QComboBox( this ); 327 charSetCombo = new QComboBox( this );
328 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); 328 gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 );
329 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); 329 connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int)));
330 QIMPenCharSetIterator it( profile->charSets() ); 330 QIMPenCharSetIterator it( profile->charSets() );
331 for ( ; it.current(); ++it ) { 331 for ( ; it.current(); ++it ) {
332 charSetCombo->insertItem( it.current()->description() ); 332 charSetCombo->insertItem( it.current()->description() );
333 } 333 }
334 334
335 charList = new QListBox( this ); 335 charList = new QListBox( this );
336 charList->setMinimumHeight( charList->sizeHint().height() ); 336 charList->setMinimumHeight( charList->sizeHint().height() );
337 connect( charList, SIGNAL(highlighted(int)), SLOT(selectChar(int)) ); 337 connect( charList, SIGNAL(highlighted(int)), SLOT(selectChar(int)) );
338 gl->addWidget( charList, 1, 0 ); 338 gl->addWidget( charList, 1, 0 );
339 339
340 pw = new QIMPenWidget( this ); 340 pw = new QIMPenWidget( this );
341 pw->setFixedHeight( 75 ); 341 pw->setFixedHeight( 75 );
342 gl->addMultiCellWidget( pw, 2, 3, 0, 0 ); 342 gl->addMultiCellWidget( pw, 2, 3, 0, 0 );
343 connect( pw, SIGNAL(stroke(QIMPenStroke *)), 343 connect( pw, SIGNAL(stroke(QIMPenStroke*)),
344 SLOT(newStroke(QIMPenStroke *)) ); 344 SLOT(newStroke(QIMPenStroke*)) );
345 345
346 QVBoxLayout *vb = new QVBoxLayout(); 346 QVBoxLayout *vb = new QVBoxLayout();
347 gl->addLayout( vb, 1, 1 ); 347 gl->addLayout( vb, 1, 1 );
348 newBtn = new QPushButton( tr("New..."), this ); 348 newBtn = new QPushButton( tr("New..."), this );
349 connect( newBtn, SIGNAL(clicked()), SLOT(addNewChar()) ); 349 connect( newBtn, SIGNAL(clicked()), SLOT(addNewChar()) );
350 vb->addWidget( newBtn ); 350 vb->addWidget( newBtn );
351 351
352 addBtn = new QPushButton( tr("Add"), this ); 352 addBtn = new QPushButton( tr("Add"), this );
353 connect( addBtn, SIGNAL(clicked()), SLOT(addChar()) ); 353 connect( addBtn, SIGNAL(clicked()), SLOT(addChar()) );
354 vb->addWidget( addBtn ); 354 vb->addWidget( addBtn );
355 355
356 removeBtn = new QPushButton( tr("Remove"), this ); 356 removeBtn = new QPushButton( tr("Remove"), this );
357 connect( removeBtn, SIGNAL(clicked()), SLOT(removeChar()) ); 357 connect( removeBtn, SIGNAL(clicked()), SLOT(removeChar()) );
358 vb->addWidget( removeBtn ); 358 vb->addWidget( removeBtn );
359 359
360 QPushButton *pb = new QPushButton( tr("Default"), this ); 360 QPushButton *pb = new QPushButton( tr("Default"), this );
361 connect( pb, SIGNAL(clicked()), SLOT(defaultChars()) ); 361 connect( pb, SIGNAL(clicked()), SLOT(defaultChars()) );
362 vb->addWidget( pb ); 362 vb->addWidget( pb );
363 363
364 QHBoxLayout *hb = new QHBoxLayout(); 364 QHBoxLayout *hb = new QHBoxLayout();
365 gl->addLayout( hb, 2, 1 ); 365 gl->addLayout( hb, 2, 1 );
366 prevBtn = new QPushButton( this ); 366 prevBtn = new QPushButton( this );
367 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); 367 prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) );
368 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); 368 connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar()));
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index aec0ad3..4f4f25f 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -74,50 +74,50 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
74 useRepeat = config->readBoolEntry ("useRepeat", 1); 74 useRepeat = config->readBoolEntry ("useRepeat", 1);
75 delete config; 75 delete config;
76 76
77 77
78 setFont( QFont( familyStr, 10 ) ); 78 setFont( QFont( familyStr, 10 ) );
79 79
80 picks = new KeyboardPicks( this ); 80 picks = new KeyboardPicks( this );
81 picks->setFont( QFont( familyStr, 10 ) ); 81 picks->setFont( QFont( familyStr, 10 ) );
82 picks->initialise(); 82 picks->initialise();
83 if (usePicks) { 83 if (usePicks) {
84 84
85 QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), 85 QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ),
86 this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); 86 this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) );
87 87
88 } else picks->hide(); 88 } else picks->hide();
89 89
90 loadKeyboardColors(); 90 loadKeyboardColors();
91 91
92 keys = new Keys(); 92 keys = new Keys();
93 93
94 repeatTimer = new QTimer( this ); 94 repeatTimer = new QTimer( this );
95 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); 95 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
96 96
97 QCopChannel* kbdChannel = new QCopChannel("MultiKey/Keyboard", this); 97 QCopChannel* kbdChannel = new QCopChannel("MultiKey/Keyboard", this);
98 connect(kbdChannel, SIGNAL(received(const QCString &, const QByteArray &)), 98 connect(kbdChannel, SIGNAL(received(const QCString&,const QByteArray&)),
99 this, SLOT(receive(const QCString &, const QByteArray &))); 99 this, SLOT(receive(const QCString&,const QByteArray&)));
100} 100}
101 101
102Keyboard::~Keyboard() { 102Keyboard::~Keyboard() {
103 103
104 if ( configdlg ) { 104 if ( configdlg ) {
105 delete configdlg; 105 delete configdlg;
106 configdlg = 0; 106 configdlg = 0;
107 } 107 }
108 108
109} 109}
110 110
111/* Keyboard::resizeEvent {{{1 */ 111/* Keyboard::resizeEvent {{{1 */
112void Keyboard::resizeEvent(QResizeEvent*) 112void Keyboard::resizeEvent(QResizeEvent*)
113{ 113{
114 int ph = picks->sizeHint().height(); 114 int ph = picks->sizeHint().height();
115 picks->setGeometry( 0, 0, width(), ph ); 115 picks->setGeometry( 0, 0, width(), ph );
116 keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1); 116 keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1);
117 117
118 int nk; // number of keys? 118 int nk; // number of keys?
119 if ( useLargeKeys ) { 119 if ( useLargeKeys ) {
120 nk = 15; 120 nk = 15;
121 } else { 121 } else {
122 nk = 19; 122 nk = 19;
123 } 123 }