author | zautrix <zautrix> | 2004-10-18 22:08:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-18 22:08:36 (UTC) |
commit | 9fd09e806dfe3df5abdf70991b6ec170fed51078 (patch) (unidiff) | |
tree | dc708d0baa4ddb5773531750bcca6000fc7297f4 /libkdepim/kcmconfigs | |
parent | c051fdcc1e7abac87f74430a7fcf3e7099f3b062 (diff) | |
download | kdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.zip kdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.tar.gz kdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.tar.bz2 |
added 30min plus to timezone setting
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 1eef150..332f975 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -278,96 +278,101 @@ void KDEPIMConfigWidget::setupLocaleTab() | |||
278 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 278 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
279 | ++iii; | 279 | ++iii; |
280 | 280 | ||
281 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 281 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
282 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 282 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
283 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 283 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
284 | ++iii; | 284 | ++iii; |
285 | 285 | ||
286 | 286 | ||
287 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); | 287 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); |
288 | 288 | ||
289 | } | 289 | } |
290 | 290 | ||
291 | 291 | ||
292 | void KDEPIMConfigWidget::setupTimeZoneTab() | 292 | void KDEPIMConfigWidget::setupTimeZoneTab() |
293 | { | 293 | { |
294 | QWidget *topFrame = new QWidget( this ); | 294 | QWidget *topFrame = new QWidget( this ); |
295 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); | 295 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); |
296 | topLayout->setSpacing(KDialog::spacingHint()); | 296 | topLayout->setSpacing(KDialog::spacingHint()); |
297 | topLayout->setMargin(KDialog::marginHint()); | 297 | topLayout->setMargin(KDialog::marginHint()); |
298 | 298 | ||
299 | QHBox *timeZoneBox = new QHBox( topFrame ); | 299 | QHBox *timeZoneBox = new QHBox( topFrame ); |
300 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 300 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
301 | 301 | ||
302 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 302 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
303 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 303 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
304 | if ( QApplication::desktop()->width() < 300 ) { | 304 | if ( QApplication::desktop()->width() < 300 ) { |
305 | mTimeZoneCombo->setMaximumWidth(150); | 305 | mTimeZoneCombo->setMaximumWidth(150); |
306 | } | 306 | } |
307 | 307 | ||
308 | QStringList list; | 308 | QStringList list; |
309 | list = KGlobal::locale()->timeZoneList(); | 309 | list = KGlobal::locale()->timeZoneList(); |
310 | mTimeZoneCombo->insertStringList(list); | 310 | mTimeZoneCombo->insertStringList(list); |
311 | 311 | ||
312 | // find the currently set time zone and select it | 312 | // find the currently set time zone and select it |
313 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; | 313 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; |
314 | int nCurrentlySet = 11; | 314 | int nCurrentlySet = 11; |
315 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 315 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
316 | { | 316 | { |
317 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 317 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
318 | { | 318 | { |
319 | nCurrentlySet = i; | 319 | nCurrentlySet = i; |
320 | break; | 320 | break; |
321 | } | 321 | } |
322 | } | 322 | } |
323 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 323 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
324 | int iii = 1; | 324 | int iii = 1; |
325 | KPrefsWidBool *sb = | 325 | KPrefsWidBool *sb = |
326 | addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), | ||
327 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); | ||
328 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | ||
329 | ++iii; | ||
330 | sb = | ||
326 | addWidBool(i18n("Timezone has daylight saving"), | 331 | addWidBool(i18n("Timezone has daylight saving"), |
327 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 332 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
328 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 333 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 334 | ++iii; |
330 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 335 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
331 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 336 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
332 | ++iii; | 337 | ++iii; |
333 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 338 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
334 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 339 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
335 | ++iii; | 340 | ++iii; |
336 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 341 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
337 | topLayout->addWidget(lab, iii,0); | 342 | topLayout->addWidget(lab, iii,0); |
338 | mStartDateSavingEdit = new KDateEdit(topFrame); | 343 | mStartDateSavingEdit = new KDateEdit(topFrame); |
339 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 344 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
340 | ++iii; | 345 | ++iii; |
341 | 346 | ||
342 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 347 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
343 | topLayout->addWidget(lab, iii,0); | 348 | topLayout->addWidget(lab, iii,0); |
344 | mEndDateSavingEdit = new KDateEdit(topFrame); | 349 | mEndDateSavingEdit = new KDateEdit(topFrame); |
345 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 350 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
346 | ++iii; | 351 | ++iii; |
347 | QDate current ( 2001, 1,1); | 352 | QDate current ( 2001, 1,1); |
348 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); | 353 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); |
349 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); | 354 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); |
350 | 355 | ||
351 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 356 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
352 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 357 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
353 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); | 358 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); |
354 | 359 | ||
355 | 360 | ||
356 | 361 | ||
357 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); | 362 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); |
358 | 363 | ||
359 | } | 364 | } |
360 | 365 | ||
361 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) | 366 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) |
362 | { | 367 | { |
363 | // first store the current data | 368 | // first store the current data |
364 | saveEditFieldSettings(); | 369 | saveEditFieldSettings(); |
365 | 370 | ||
366 | // set mCurrentApp | 371 | // set mCurrentApp |
367 | mCurrentApp = (ExternalAppHandler::Types)newApp; | 372 | mCurrentApp = (ExternalAppHandler::Types)newApp; |
368 | 373 | ||
369 | // set mCurrentClient | 374 | // set mCurrentClient |
370 | switch(mCurrentApp) | 375 | switch(mCurrentApp) |
371 | { | 376 | { |
372 | case(ExternalAppHandler::EMAIL): | 377 | case(ExternalAppHandler::EMAIL): |
373 | mCurrentClient = mEmailClient; | 378 | mCurrentClient = mEmailClient; |