summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs
authorzautrix <zautrix>2004-10-25 23:39:31 (UTC)
committer zautrix <zautrix>2004-10-25 23:39:31 (UTC)
commite7c948b76a46c923c21f2f35c677912b462fa1f4 (patch) (unidiff)
treea9f9a0c696ea3809f2e0bfc27e643d70c4e123e3 /libkdepim/kcmconfigs
parent86ad7f5fe2a20f9dfd37d6891b57b326f8ee507b (diff)
downloadkdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.zip
kdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.tar.gz
kdepimpi-e7c948b76a46c923c21f2f35c677912b462fa1f4.tar.bz2
kopiemail fixes
Diffstat (limited to 'libkdepim/kcmconfigs') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 1fae41f..4817a3f 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -141,385 +141,385 @@ void KDEPIMConfigWidget::setupExternalAppTab()
141 boxLayout->addWidget( lab, 1, 0 ); 141 boxLayout->addWidget( lab, 1, 0 );
142 mChannel = new QLineEdit(mExternalAppGroupBox); 142 mChannel = new QLineEdit(mExternalAppGroupBox);
143 mChannel->setReadOnly(true); 143 mChannel->setReadOnly(true);
144 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 144 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
145 145
146 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 146 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
147 boxLayout->addWidget( lab, 3, 0 ); 147 boxLayout->addWidget( lab, 3, 0 );
148 mMessage = new QLineEdit(mExternalAppGroupBox); 148 mMessage = new QLineEdit(mExternalAppGroupBox);
149 mMessage->setReadOnly(true); 149 mMessage->setReadOnly(true);
150 boxLayout->addWidget( mMessage , 4, 0); 150 boxLayout->addWidget( mMessage , 4, 0);
151 151
152 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 152 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
153 boxLayout->addWidget( lab, 3, 1 ); 153 boxLayout->addWidget( lab, 3, 1 );
154 mParameters = new QLineEdit(mExternalAppGroupBox); 154 mParameters = new QLineEdit(mExternalAppGroupBox);
155 mParameters->setReadOnly(true); 155 mParameters->setReadOnly(true);
156 boxLayout->addWidget( mParameters, 4, 1 ); 156 boxLayout->addWidget( mParameters, 4, 1 );
157 157
158 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); 158 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox);
159 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); 159 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 );
160 160
161 161
162 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); 162 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox);
163 boxLayout->addWidget( lab, 6, 0 ); 163 boxLayout->addWidget( lab, 6, 0 );
164 mMessage2 = new QLineEdit(mExternalAppGroupBox); 164 mMessage2 = new QLineEdit(mExternalAppGroupBox);
165 mMessage2->setReadOnly(true); 165 mMessage2->setReadOnly(true);
166 boxLayout->addWidget( mMessage2 , 7, 0); 166 boxLayout->addWidget( mMessage2 , 7, 0);
167 167
168 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); 168 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox);
169 boxLayout->addWidget( lab, 6, 1 ); 169 boxLayout->addWidget( lab, 6, 1 );
170 mParameters2 = new QLineEdit(mExternalAppGroupBox); 170 mParameters2 = new QLineEdit(mExternalAppGroupBox);
171 mParameters2->setReadOnly(true); 171 mParameters2->setReadOnly(true);
172 boxLayout->addWidget( mParameters2, 7, 1 ); 172 boxLayout->addWidget( mParameters2, 7, 1 );
173 173
174 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); 174 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox);
175 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); 175 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 );
176 176
177 177
178 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 178 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
179 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 179 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
180 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 180 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
181 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 181 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
182 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 182 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
183 183
184 184
185 layout->addWidget( mExternalAppGroupBox ); 185 layout->addWidget( mExternalAppGroupBox );
186 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); 186 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
187 187
188} 188}
189 189
190 190
191void KDEPIMConfigWidget::setupLocaleDateTab() 191void KDEPIMConfigWidget::setupLocaleDateTab()
192{ 192{
193 QWidget *topFrame = new QWidget( this ); 193 QWidget *topFrame = new QWidget( this );
194 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 194 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
195 195
196 topLayout->setSpacing(KDialog::spacingHintSmall()); 196 topLayout->setSpacing(KDialog::spacingHintSmall());
197 topLayout->setMargin(KDialog::marginHintSmall()); 197 topLayout->setMargin(KDialog::marginHintSmall());
198 int iii = 0; 198 int iii = 0;
199 199
200 200
201 KPrefsWidRadios *syncPrefsGroup = 201 KPrefsWidRadios *syncPrefsGroup =
202 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); 202 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
203 QString format; 203 QString format;
204 if ( QApplication::desktop()->width() < 480 ) 204 if ( QApplication::desktop()->width() < 480 )
205 format = "(%d.%m.%Y)"; 205 format = "(%d.%m.%Y)";
206 else 206 else
207 format = "(%d.%m.%Y|%A %d %B %Y)"; 207 format = "(%d.%m.%Y|%A %d %B %Y)";
208 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 208 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
209 if ( QApplication::desktop()->width() < 480 ) 209 if ( QApplication::desktop()->width() < 480 )
210 format = "(%m.%d.%Y)"; 210 format = "(%m.%d.%Y)";
211 else 211 else
212 format = "(%m.%d.%Y|%A %B %d %Y)"; 212 format = "(%m.%d.%Y|%A %B %d %Y)";
213 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 213 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
214 if ( QApplication::desktop()->width() < 480 ) 214 if ( QApplication::desktop()->width() < 480 )
215 format = "(%Y-%m-%d)"; 215 format = "(%Y-%m-%d)";
216 else 216 else
217 format = "(%Y-%m-%d|%A %Y %B %d)"; 217 format = "(%Y-%m-%d|%A %Y %B %d)";
218 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 218 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
219 syncPrefsGroup->addRadio(i18n("User defined")); 219 syncPrefsGroup->addRadio(i18n("User defined"));
220 if ( QApplication::desktop()->width() < 480 ) { 220 if ( QApplication::desktop()->width() < 480 ) {
221 syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); 221 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
222 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); 222 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
223 } 223 }
224 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 224 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
225 ++iii; 225 ++iii;
226 ++iii; 226 ++iii;
227 QLabel * lab; 227 QLabel * lab;
228 mUserDateFormatLong = new QLineEdit(topFrame); 228 mUserDateFormatLong = new QLineEdit(topFrame);
229 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 229 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
230 topLayout->addWidget(lab ,iii,0); 230 topLayout->addWidget(lab ,iii,0);
231 topLayout->addWidget(mUserDateFormatLong,iii,1); 231 topLayout->addWidget(mUserDateFormatLong,iii,1);
232 ++iii; 232 ++iii;
233 mUserDateFormatShort = new QLineEdit(topFrame); 233 mUserDateFormatShort = new QLineEdit(topFrame);
234 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 234 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
235 topLayout->addWidget(lab ,iii,0); 235 topLayout->addWidget(lab ,iii,0);
236 topLayout->addWidget(mUserDateFormatShort,iii,1); 236 topLayout->addWidget(mUserDateFormatShort,iii,1);
237 ++iii; 237 ++iii;
238 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 238 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
239 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 239 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
240 ++iii; 240 ++iii;
241 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 241 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
242 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 242 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
243 ++iii; 243 ++iii;
244 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 244 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
245 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 245 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
246 ++iii; 246 ++iii;
247 247
248 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 248 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
249 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 249 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
250 250
251 251
252 tabWidget->addTab( topFrame, i18n( "Date Format" ) ); 252 tabWidget->addTab( topFrame, i18n( "Date Format" ) );
253} 253}
254 254
255void KDEPIMConfigWidget::setupLocaleTab() 255void KDEPIMConfigWidget::setupLocaleTab()
256{ 256{
257 257
258 QWidget *topFrame = new QWidget( this ); 258 QWidget *topFrame = new QWidget( this );
259 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 259 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
260 260
261 topLayout->setSpacing(KDialog::spacingHint()); 261 topLayout->setSpacing(KDialog::spacingHint());
262 topLayout->setMargin(KDialog::marginHint()); 262 topLayout->setMargin(KDialog::marginHint());
263 int iii = 0; 263 int iii = 0;
264 KPrefsWidRadios *syncPrefsGroup = 264 KPrefsWidRadios *syncPrefsGroup =
265 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); 265 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame);
266 syncPrefsGroup->addRadio(i18n("English")); 266 syncPrefsGroup->addRadio(i18n("English"));
267 syncPrefsGroup->addRadio(i18n("German")); 267 syncPrefsGroup->addRadio(i18n("German"));
268 syncPrefsGroup->addRadio(i18n("French")); 268 syncPrefsGroup->addRadio(i18n("French"));
269 syncPrefsGroup->addRadio(i18n("Italian")); 269 syncPrefsGroup->addRadio(i18n("Italian"));
270 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 270 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
271 if ( QApplication::desktop()->width() < 300 ) { 271 if ( QApplication::desktop()->width() < 300 ) {
272 syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); 272 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
273 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); 273 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
274 } 274 }
275 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 275 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
276 ++iii; 276 ++iii;
277 277
278 syncPrefsGroup = 278 syncPrefsGroup =
279 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); 279 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
280 if ( QApplication::desktop()->width() > 300 ) 280 if ( QApplication::desktop()->width() > 300 )
281 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 281 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
282 syncPrefsGroup->addRadio(i18n("24:00")); 282 syncPrefsGroup->addRadio(i18n("24:00"));
283 syncPrefsGroup->addRadio(i18n("12:00am")); 283 syncPrefsGroup->addRadio(i18n("12:00am"));
284 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 284 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
285 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 285 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
286 ++iii; 286 ++iii;
287 287
288 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), 288 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"),
289 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); 289 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
290 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 290 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
291 ++iii; 291 ++iii;
292 292
293 293
294 tabWidget->addTab( topFrame, i18n( "Locale" ) ); 294 tabWidget->addTab( topFrame, i18n( "Locale" ) );
295 295
296} 296}
297 297
298 298
299void KDEPIMConfigWidget::setupTimeZoneTab() 299void KDEPIMConfigWidget::setupTimeZoneTab()
300{ 300{
301 QWidget *topFrame = new QWidget( this ); 301 QWidget *topFrame = new QWidget( this );
302 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); 302 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2);
303 topLayout->setSpacing(KDialog::spacingHintSmall()); 303 topLayout->setSpacing(KDialog::spacingHintSmall());
304 topLayout->setMargin(KDialog::marginHintSmall()); 304 topLayout->setMargin(KDialog::marginHintSmall());
305 305
306 QHBox *timeZoneBox = new QHBox( topFrame ); 306 QHBox *timeZoneBox = new QHBox( topFrame );
307 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 307 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
308 308
309 new QLabel( i18n("Timezone:"), timeZoneBox ); 309 new QLabel( i18n("Timezone:"), timeZoneBox );
310 mTimeZoneCombo = new QComboBox( timeZoneBox ); 310 mTimeZoneCombo = new QComboBox( timeZoneBox );
311 if ( QApplication::desktop()->width() < 300 ) { 311 if ( QApplication::desktop()->width() < 300 ) {
312 mTimeZoneCombo->setMaximumWidth(150); 312 mTimeZoneCombo->setMaximumWidth(150);
313 } 313 }
314 314
315 QStringList list; 315 QStringList list;
316 list = KGlobal::locale()->timeZoneList(); 316 list = KGlobal::locale()->timeZoneList();
317 mTimeZoneCombo->insertStringList(list); 317 mTimeZoneCombo->insertStringList(list);
318 318
319 // find the currently set time zone and select it 319 // find the currently set time zone and select it
320 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; 320 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId;
321 int nCurrentlySet = 11; 321 int nCurrentlySet = 11;
322 for (int i = 0; i < mTimeZoneCombo->count(); i++) 322 for (int i = 0; i < mTimeZoneCombo->count(); i++)
323 { 323 {
324 if (mTimeZoneCombo->text(i) == sCurrentlySet) 324 if (mTimeZoneCombo->text(i) == sCurrentlySet)
325 { 325 {
326 nCurrentlySet = i; 326 nCurrentlySet = i;
327 break; 327 break;
328 } 328 }
329 } 329 }
330 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 330 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
331 int iii = 1; 331 int iii = 1;
332 KPrefsWidBool *sb = 332 KPrefsWidBool *sb =
333 addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), 333 addWidBool(i18n("Add 30 min to selected Timezone"),
334 &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); 334 &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame);
335 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 335 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
336 ++iii; 336 ++iii;
337 sb = 337 sb =
338 addWidBool(i18n("Timezone has daylight saving"), 338 addWidBool(i18n("Timezone has daylight saving"),
339 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); 339 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame);
340 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 340 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
341 ++iii; 341 ++iii;
342 QLabel* lab; 342 QLabel* lab;
343 343
344 lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 344 lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
345 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 345 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
346 ++iii; 346 ++iii;
347 347
348 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 348 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
349 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 349 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
350 ++iii; 350 ++iii;
351 lab = new QLabel( i18n("Daylight start:"), topFrame ); 351 lab = new QLabel( i18n("Daylight start:"), topFrame );
352 topLayout->addWidget(lab, iii,0); 352 topLayout->addWidget(lab, iii,0);
353 mStartDateSavingEdit = new KDateEdit(topFrame); 353 mStartDateSavingEdit = new KDateEdit(topFrame);
354 topLayout->addWidget(mStartDateSavingEdit, iii,1); 354 topLayout->addWidget(mStartDateSavingEdit, iii,1);
355 ++iii; 355 ++iii;
356 356
357 lab = new QLabel( i18n("Daylight end:"), topFrame ); 357 lab = new QLabel( i18n("Daylight end:"), topFrame );
358 topLayout->addWidget(lab, iii,0); 358 topLayout->addWidget(lab, iii,0);
359 mEndDateSavingEdit = new KDateEdit(topFrame); 359 mEndDateSavingEdit = new KDateEdit(topFrame);
360 topLayout->addWidget(mEndDateSavingEdit, iii,1); 360 topLayout->addWidget(mEndDateSavingEdit, iii,1);
361 ++iii; 361 ++iii;
362 QDate current ( 2001, 1,1); 362 QDate current ( 2001, 1,1);
363 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); 363 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
364 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); 364 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
365 365
366 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 366 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
367 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 367 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
368 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); 368 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
369 369
370 370
371 371
372 tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); 372 tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
373 373
374} 374}
375 375
376void KDEPIMConfigWidget::externalapp_changed( int newApp ) 376void KDEPIMConfigWidget::externalapp_changed( int newApp )
377{ 377{
378 // first store the current data 378 // first store the current data
379 saveEditFieldSettings(); 379 saveEditFieldSettings();
380 380
381 // set mCurrentApp 381 // set mCurrentApp
382 mCurrentApp = (ExternalAppHandler::Types)newApp; 382 mCurrentApp = (ExternalAppHandler::Types)newApp;
383 383
384 // set mCurrentClient 384 // set mCurrentClient
385 switch(mCurrentApp) 385 switch(mCurrentApp)
386 { 386 {
387 case(ExternalAppHandler::EMAIL): 387 case(ExternalAppHandler::EMAIL):
388 mCurrentClient = mEmailClient; 388 mCurrentClient = mEmailClient;
389 break; 389 break;
390 case(ExternalAppHandler::PHONE): 390 case(ExternalAppHandler::PHONE):
391 mCurrentClient = mPhoneClient; 391 mCurrentClient = mPhoneClient;
392 break; 392 break;
393 case(ExternalAppHandler::SMS): 393 case(ExternalAppHandler::SMS):
394 mCurrentClient = mSMSClient; 394 mCurrentClient = mSMSClient;
395 break; 395 break;
396 case(ExternalAppHandler::FAX): 396 case(ExternalAppHandler::FAX):
397 mCurrentClient = mFaxClient; 397 mCurrentClient = mFaxClient;
398 break; 398 break;
399 case(ExternalAppHandler::PAGER): 399 case(ExternalAppHandler::PAGER):
400 mCurrentClient = mPagerClient; 400 mCurrentClient = mPagerClient;
401 break; 401 break;
402 case(ExternalAppHandler::SIP): 402 case(ExternalAppHandler::SIP):
403 mCurrentClient = mSipClient; 403 mCurrentClient = mSipClient;
404 break; 404 break;
405 default: 405 default:
406 return; 406 return;
407 } 407 }
408 408
409 // and at last update the widgets 409 // and at last update the widgets
410 updateClientWidgets(); 410 updateClientWidgets();
411} 411}
412 412
413 413
414 414
415void KDEPIMConfigWidget::client_changed( int newClient ) 415void KDEPIMConfigWidget::client_changed( int newClient )
416{ 416{
417 if (newClient == mCurrentClient) 417 if (newClient == mCurrentClient)
418 return; 418 return;
419 419
420 // first store the current data 420 // first store the current data
421 saveEditFieldSettings(); 421 saveEditFieldSettings();
422 422
423 423
424 //then reset the clientvariable 424 //then reset the clientvariable
425 mCurrentClient = newClient; 425 mCurrentClient = newClient;
426 426
427 // and at last update the widgets 427 // and at last update the widgets
428 updateClientWidgets(); 428 updateClientWidgets();
429 429
430 KPrefsWidget::modified(); 430 KPrefsWidget::modified();
431} 431}
432 432
433void KDEPIMConfigWidget::saveEditFieldSettings() 433void KDEPIMConfigWidget::saveEditFieldSettings()
434{ 434{
435 435
436 switch(mCurrentApp) 436 switch(mCurrentApp)
437 { 437 {
438 case(ExternalAppHandler::EMAIL): 438 case(ExternalAppHandler::EMAIL):
439 mEmailClient = mClient->currentItem(); 439 mEmailClient = mClient->currentItem();
440 break; 440 break;
441 case(ExternalAppHandler::PHONE): 441 case(ExternalAppHandler::PHONE):
442 mPhoneClient= mClient->currentItem(); 442 mPhoneClient= mClient->currentItem();
443 break; 443 break;
444 case(ExternalAppHandler::SMS): 444 case(ExternalAppHandler::SMS):
445 mSMSClient = mClient->currentItem(); 445 mSMSClient = mClient->currentItem();
446 break; 446 break;
447 case(ExternalAppHandler::FAX): 447 case(ExternalAppHandler::FAX):
448 mFaxClient = mClient->currentItem(); 448 mFaxClient = mClient->currentItem();
449 break; 449 break;
450 case(ExternalAppHandler::PAGER): 450 case(ExternalAppHandler::PAGER):
451 mPagerClient = mClient->currentItem(); 451 mPagerClient = mClient->currentItem();
452 break; 452 break;
453 case(ExternalAppHandler::SIP): 453 case(ExternalAppHandler::SIP):
454 mSipClient = mClient->currentItem(); 454 mSipClient = mClient->currentItem();
455 break; 455 break;
456 default: 456 default:
457 return; 457 return;
458 } 458 }
459 459
460 //store the current data back to the apropriate membervariables if we had set it to "other" 460 //store the current data back to the apropriate membervariables if we had set it to "other"
461 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 461 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
462 { 462 {
463 mEmailOtherChannel = mChannel->text(); 463 mEmailOtherChannel = mChannel->text();
464 mEmailOtherMessage = mMessage->text(); 464 mEmailOtherMessage = mMessage->text();
465 mEmailOtherMessageParameters = mParameters->text(); 465 mEmailOtherMessageParameters = mParameters->text();
466 mEmailOtherMessage2 = mMessage2->text(); 466 mEmailOtherMessage2 = mMessage2->text();
467 mEmailOtherMessageParameters2 = mParameters2->text(); 467 mEmailOtherMessageParameters2 = mParameters2->text();
468 } 468 }
469 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 469 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
470 { 470 {
471 mPhoneOtherChannel = mChannel->text(); 471 mPhoneOtherChannel = mChannel->text();
472 mPhoneOtherMessage = mMessage->text(); 472 mPhoneOtherMessage = mMessage->text();
473 mPhoneOtherMessageParameters = mParameters->text(); 473 mPhoneOtherMessageParameters = mParameters->text();
474 } 474 }
475 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 475 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
476 { 476 {
477 mSMSOtherChannel = mChannel->text(); 477 mSMSOtherChannel = mChannel->text();
478 mSMSOtherMessage = mMessage->text(); 478 mSMSOtherMessage = mMessage->text();
479 mSMSOtherMessageParameters = mParameters->text(); 479 mSMSOtherMessageParameters = mParameters->text();
480 } 480 }
481 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 481 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
482 { 482 {
483 mFaxOtherChannel = mChannel->text(); 483 mFaxOtherChannel = mChannel->text();
484 mFaxOtherMessage = mMessage->text(); 484 mFaxOtherMessage = mMessage->text();
485 mFaxOtherMessageParameters = mParameters->text(); 485 mFaxOtherMessageParameters = mParameters->text();
486 } 486 }
487 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 487 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
488 { 488 {
489 mPagerOtherChannel = mChannel->text(); 489 mPagerOtherChannel = mChannel->text();
490 mPagerOtherMessage = mMessage->text(); 490 mPagerOtherMessage = mMessage->text();
491 mPagerOtherMessageParameters = mParameters->text(); 491 mPagerOtherMessageParameters = mParameters->text();
492 } 492 }
493 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) 493 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
494 { 494 {
495 mSipOtherChannel = mChannel->text(); 495 mSipOtherChannel = mChannel->text();
496 mSipOtherMessage = mMessage->text(); 496 mSipOtherMessage = mMessage->text();
497 mSipOtherMessageParameters = mParameters->text(); 497 mSipOtherMessageParameters = mParameters->text();
498 } 498 }
499 499
500 500
501} 501}
502 502
503void KDEPIMConfigWidget::updateClientWidgets() 503void KDEPIMConfigWidget::updateClientWidgets()
504{ 504{
505 bool blocked = signalsBlocked(); 505 bool blocked = signalsBlocked();
506 blockSignals( true ); 506 blockSignals( true );
507 507
508 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display 508 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display
509 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); 509 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp );
510 if (it == mExternalAppsMap.end()) 510 if (it == mExternalAppsMap.end())
511 return; 511 return;
512 512
513 // update group box 513 // update group box
514 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); 514 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data()));
515 515
516 //update the entries in the client combobox 516 //update the entries in the client combobox
517 mClient->clear(); 517 mClient->clear();
518 518
519 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); 519 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
520 DefaultAppItem* dai; 520 DefaultAppItem* dai;
521 for ( dai=items.first(); dai != 0; dai=items.next() ) 521 for ( dai=items.first(); dai != 0; dai=items.next() )
522 { 522 {
523 mClient->insertItem( i18n(dai->_label), dai->_id ); 523 mClient->insertItem( i18n(dai->_label), dai->_id );
524 524
525 if (dai->_id == mCurrentClient) 525 if (dai->_id == mCurrentClient)