From d63eac7a612a9724705bc58ad98c65c6ac052d07 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 22 Sep 2004 03:08:05 +0000 Subject: connected global config --- (limited to 'korganizer/koprefsdialog.cpp') diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 7dafcd8..b4b3b27 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -81,10 +81,10 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : setupGlobalTab(); setupMainTab(); - setupLocaleTab(); - setupTimeZoneTab(); + // setupLocaleTab(); + //setupTimeZoneTab(); setupTimeTab(); - setupLocaleDateTab(); + //setupLocaleDateTab(); setupFontsTab(); setupColorsTab(); setupViewsTab(); @@ -110,6 +110,7 @@ void KOPrefsDialog::setupGlobalTab() } void KOPrefsDialog::setupLocaleDateTab() { +#if 0 QFrame *topFrame = addPage(i18n("Date Format"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,3,2); topLayout->setSpacing(spacingHint()); @@ -159,11 +160,13 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); topLayout->addMultiCellWidget(lab ,iii,iii,0,1); ++iii; +#endif } void KOPrefsDialog::setupLocaleTab() { +#if 0 QFrame *topFrame = addPage(i18n("Locale"),0,0); QGridLayout *topLayout = new QGridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); @@ -223,6 +226,7 @@ void KOPrefsDialog::setupLocaleTab() &(KOPrefs::instance()->mUseQuicksave),topFrame); topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); #endif +#endif } void KOPrefsDialog::showSyncPage() { @@ -623,22 +627,7 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(enableToolTips->checkBox(),ii++,0); } - KPrefsDialogWidBool *passwdk = - addWidBool(i18n("Show parent To-Do's in What's Next view"), - &(KOPrefs::instance()->mWNViewShowsParents),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - - passwdk = - addWidBool(i18n("Show location in What's Next view"), - &(KOPrefs::instance()->mWNViewShowLocation),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - - passwdk = - addWidBool(i18n("Show Sync Events in WN/Agenda view"), - &(KOPrefs::instance()->mShowSyncEvents),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - - + KPrefsDialogWidBool *marcusBainsEnabled = addWidBool(i18n("Show Marcus Bains line"), &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); @@ -799,7 +788,33 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); - + // *********************** What'sNext View + topFrame = addPage(i18n("What's Next View"),0,0); + // DesktopIcon("viewmag",KIcon::SizeMedium)); + + topLayout = new QGridLayout(topFrame,4,1); + topLayout->setSpacing(spacingHint()); + topLayout->setMargin(marginHint()); + ii = 0; + KPrefsDialogWidBool *passwdk = + addWidBool(i18n("Show parent To-Do's in What's Next view"), + &(KOPrefs::instance()->mWNViewShowsParents),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + + passwdk = + addWidBool(i18n("Show location in What's Next view"), + &(KOPrefs::instance()->mWNViewShowLocation),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + + passwdk = + addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), + &(KOPrefs::instance()->mShowSyncEvents),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + passwdk = + addWidBool(i18n("Use short date in \nWhat's Next/Event view"), + &(KOPrefs::instance()->mShortDateInViewer),topFrame); + topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); + // *********************** Todo View topFrame = addPage(i18n("Todo View"),0,0); @@ -1336,10 +1351,10 @@ void KOPrefsDialog::usrReadConfig() mEmailEdit->setText(KOPrefs::instance()->email()); mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); - QDate current ( 2001, 1,1); - mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); - mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); - setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); + // QDate current ( 2001, 1,1); + //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); + //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); + //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); @@ -1366,10 +1381,10 @@ void KOPrefsDialog::usrReadConfig() //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); - QString dummy = KOPrefs::instance()->mUserDateFormatLong; - mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); - dummy = KOPrefs::instance()->mUserDateFormatShort; - mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); + //QString dummy = KOPrefs::instance()->mUserDateFormatLong; + //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); + //dummy = KOPrefs::instance()->mUserDateFormatShort; + //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); updateCategories(); mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); @@ -1389,27 +1404,27 @@ void KOPrefsDialog::usrWriteConfig() //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); - KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); - KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); + //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); + //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); KOPrefs::instance()->setFullName(mNameEdit->text()); KOPrefs::instance()->setEmail(mEmailEdit->text()); KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); - KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); - QDate date; - date = mStartDateSavingEdit->date(); - int sub = 0; - if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) - sub = 1; - KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; - date = mEndDateSavingEdit->date(); - if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) - sub = 1; - else - sub = 0; - KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; - // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); + // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); + //QDate date; + //date = mStartDateSavingEdit->date(); + //int sub = 0; + //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) + // sub = 1; +// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; +// date = mEndDateSavingEdit->date(); +// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) +// sub = 1; +// else +// sub = 0; +// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; +// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); @@ -1557,6 +1572,7 @@ void KOPrefsDialog::updateTimezoneOffset( int index ) void KOPrefsDialog::setupTimeZoneTab() { +#if 0 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); @@ -1615,7 +1631,7 @@ void KOPrefsDialog::setupTimeZoneTab() QDate current ( 2001, 1,1); mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); - +#endif } -- cgit v0.9.0.2