-rw-r--r-- | korganizer/koprefsdialog.cpp | 179 |
1 files changed, 100 insertions, 79 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 443508d..40e8a99 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -331,17 +331,17 @@ void KOPrefsDialog::setupSyncTab() #endif } void KOPrefsDialog::setupMainTab() { QFrame *topFrame = addPage(i18n("General"),0,0); // DesktopIcon("identity",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + QGridLayout *topLayout = new QGridLayout(topFrame,5,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); // KPrefsDialogWidBool *emailControlCenter = // addWidBool(i18n("&Use email settings from Control Center"), // &(KOPrefs::instance()->mEmailControlCenter),topFrame); // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), @@ -352,57 +352,43 @@ void KOPrefsDialog::setupMainTab() topLayout->addWidget(mNameLabel,0,0); topLayout->addWidget(mNameEdit,0,1); mEmailEdit = new QLineEdit(topFrame); mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); topLayout->addWidget(mEmailLabel,1,0); topLayout->addWidget(mEmailEdit,1,1); KPrefsDialogWidBool *wb; - QHBox *dummy; - if ( QApplication::desktop()->width() > 480 ) { - dummy = new QHBox(topFrame); - } else { - dummy = new QVBox(topFrame); - } + - topLayout->addMultiCellWidget(dummy, 2,2,0,1); - addWidBool(i18n("Full menu bar(nr)"), - &(KOPrefs::instance()->mShowFullMenu),dummy); + KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), + &(KOPrefs::instance()->mShowFullMenu),topFrame); + topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); - addWidBool(i18n("Mini icons in toolbar(nr)"), - &(KOPrefs::instance()->mToolBarMiniIcons),dummy); - + + widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), + &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); + topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); - dummy = new QHBox(topFrame); - new QLabel(i18n("Days in What's Next:"),dummy); - mWhatsNextSpin = new QSpinBox(1,14,1,dummy); - - topLayout->addMultiCellWidget(dummy,3,3,0,1); + KPrefsDialogWidBool *verticalScreen = + addWidBool(i18n("Show vertical screen (Needs restart)"), + &(KOPrefs::instance()->mVerticalScreen),topFrame); + //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); + topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); - dummy = new QHBox(topFrame); + QHBox *dummy = new QHBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); mNextXDaysSpin = new QSpinBox(2,14,1,dummy); - topLayout->addMultiCellWidget(dummy,4,4,0,1); + topLayout->addMultiCellWidget(dummy,5,5,0,1); - QHBox *prioBox = new QHBox(topFrame); - // intervalBox->setSpacing(spacingHint()); - topLayout->addMultiCellWidget(prioBox,5,5,0,1); - QString messa = i18n("Show topmost todo prios in What's Next:"); - - if ( QApplication::desktop()->width() < 300 ) - messa = i18n("Show topmost todo prios in What's N.:"); - QLabel *prioLabel = new QLabel(messa, prioBox); - mPrioSpin = new QSpinBox(0,5,1,prioBox); - if ( QApplication::desktop()->width() < 300 ) - mPrioSpin->setFixedWidth( 40 ); + // KPrefsDialogWidBool *bcc = // addWidBool(i18n("Send copy to owner when mailing events"), // &(KOPrefs::instance()->mBcc),topFrame); // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); @@ -421,26 +407,22 @@ void KOPrefsDialog::setupMainTab() QHBox * agendasize = new QHBox ( topFrame ); new QLabel (i18n("AllDayAgenda Height:"), agendasize ); mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); topLayout->addMultiCellWidget(agendasize,7,7,0,1); */ - KPrefsDialogWidBool *verticalScreen = - addWidBool(i18n("Show vertical screen (Needs restart)"), - &(KOPrefs::instance()->mVerticalScreen),topFrame); - //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); - topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); + KPrefsDialogWidBool *ask = addWidBool(i18n("Ask for quit when closing KO/Pi"), &(KOPrefs::instance()->mAskForQuit),topFrame); - topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); + topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); /* KPrefsDialogWidBool *confirmCheck = addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), topFrame); topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); @@ -601,112 +583,131 @@ void KOPrefsDialog::setupViewsTab() int ii = 0; KPrefsDialogWidBool *dummy = addWidBool(i18n("Edit item on doubleclick (if not, show)"), &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); - dummy = - addWidBool(i18n("Show time in agenda items"), - &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); - topLayout->addWidget(dummy->checkBox(),ii++,0); - - dummy = - addWidBool(i18n("Highlight current day in agenda"), - &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); - topLayout->addWidget(dummy->checkBox(),ii++,0); - - dummy = - addWidBool(i18n("Use light color for highlight current day"), - &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); - topLayout->addWidget(dummy->checkBox(),ii++,0); - - KPrefsDialogWidBool *dailyRecur = - addWidBool(i18n("Show events that recur daily in date nav."), - &(KOPrefs::instance()->mDailyRecur),topFrame); - topLayout->addWidget(dailyRecur->checkBox(),ii++,0); + - KPrefsDialogWidBool *weeklyRecur = - addWidBool(i18n("Show ev. that recur weekly in date nav."), - &(KOPrefs::instance()->mWeeklyRecur),topFrame); - topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); if ( QApplication::desktop()->width() > 640 ) { KPrefsDialogWidBool *enableToolTips = addWidBool(i18n("Enable tooltips displaying summary of ev."), &(KOPrefs::instance()->mEnableToolTips),topFrame); topLayout->addWidget(enableToolTips->checkBox(),ii++,0); } - KPrefsDialogWidBool *marcusBainsEnabled = - addWidBool(i18n("Show Marcus Bains line"), - &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); - topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); - + // topLayout->addWidget(hourSizeGroup,ii++,0); // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); //topLayout->setRowStretch(11,1); - +#if 0 topFrame = addPage(i18n("ViewChange"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; - + +#endif dummy = addWidBool(i18n("Hold fullscreen on view change"), &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Hold non-fullscreen on view change"), &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); - KPrefsDialogWidBool *fullViewTodo = - addWidBool(i18n("Event list view uses full window"), - &(KOPrefs::instance()->mFullViewTodo),topFrame); - topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); KPrefsDialogWidBool *fullViewMonth = addWidBool(i18n("Next days view uses full window"), &(KOPrefs::instance()->mFullViewMonth),topFrame); topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); + + KPrefsDialogWidBool *fullViewTodo = + addWidBool(i18n("Event list view uses full window"), + &(KOPrefs::instance()->mFullViewTodo),topFrame); + topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); + dummy = + addWidBool(i18n("Listview uses monthly timespan"), + &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = + addWidBool(i18n("Highlight selection in Time Edit"), + &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); + topLayout->addWidget( dummy->checkBox(), ii++,0); + + KPrefsDialogWidBool *dailyRecur = + addWidBool(i18n("Show events that recur daily in date nav."), + &(KOPrefs::instance()->mDailyRecur),topFrame); + topLayout->addWidget(dailyRecur->checkBox(),ii++,0); + + KPrefsDialogWidBool *weeklyRecur = + addWidBool(i18n("Show ev. that recur weekly in date nav."), + &(KOPrefs::instance()->mWeeklyRecur),topFrame); + topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + + topFrame = addPage(i18n("Agenda View"),0,0); + // DesktopIcon("viewmag",KIcon::SizeMedium)); + + topLayout = new QGridLayout(topFrame,5,1); + topLayout->setSpacing(spacingHint()); + topLayout->setMargin(marginHint()); + ii = 0; + + + dummy = + addWidBool(i18n("Show time in agenda items"), + &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + dummy = + addWidBool(i18n("Highlight current day in agenda"), + &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + dummy = + addWidBool(i18n("Use light color for highlight current day"), + &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + + KPrefsDialogWidBool *marcusBainsEnabled = + addWidBool(i18n("Show current time"), + &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); + topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); + + dummy = addWidBool(i18n("Set agenda to DayBeginsAt on change"), &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Set agenda to current time on change"), &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); - dummy = - addWidBool(i18n("Listview uses monthly timespan"), - &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); - topLayout->addWidget(dummy->checkBox(),ii++,0); - dummy = - addWidBool(i18n("Highlight selection in Time Edit"), - &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); - topLayout->addWidget( dummy->checkBox(), ii++,0); + topFrame = addPage(i18n("Month View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); @@ -803,16 +804,36 @@ void KOPrefsDialog::setupViewsTab() // *********************** 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; + + + QHBox* hdummy = new QHBox(topFrame); + new QLabel(i18n("Days in What's Next:"),hdummy); + mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); + + topLayout->addWidget(hdummy,ii++,0); + + QHBox *prioBox = new QHBox(topFrame); + // intervalBox->setSpacing(spacingHint()); + topLayout->addWidget(prioBox,ii++,0); + QString messa = i18n("Show topmost todo prios in What's Next:"); + + if ( QApplication::desktop()->width() < 300 ) + messa = i18n("Show topmost todo prios in What's N.:"); + QLabel *prioLabel = new QLabel(messa, prioBox); + mPrioSpin = new QSpinBox(0,5,1,prioBox); + if ( QApplication::desktop()->width() < 300 ) + mPrioSpin->setFixedWidth( 40 ); + KPrefsDialogWidBool *passwdk = addWidBool(i18n("Show events, that are done in \nWhat's Next view"), &(KOPrefs::instance()->mWNViewShowsPast),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = addWidBool(i18n("Show parent To-Do's in What's Next view"), &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |