Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 452d019..443508d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -523,768 +523,800 @@ void KOPrefsDialog::setupTimeTab() mStartTimeSpin = new QSpinBox(0,23,1,topFrame); mStartTimeSpin->setSuffix(":00"); topLayout->addWidget(mStartTimeSpin,1,1); topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), topFrame),2,0); mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); mDefaultDurationSpin->setSuffix(":00"); topLayout->addWidget(mDefaultDurationSpin,2,1); QStringList alarmList; alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 3,0); mAlarmTimeCombo = new QComboBox(topFrame); mAlarmTimeCombo->insertStringList(alarmList); topLayout->addWidget(mAlarmTimeCombo,3,1); QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, i18n("Working Hours"), topFrame); topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); workingHoursGroup->layout()->setSpacing( 0 ); workingHoursGroup->layout()->setMargin( 4 ); QHBox *workStartBox = new QHBox(workingHoursGroup); // workStartBox->setMargin( 0 ); addWidTime(i18n("Daily starting hour:"), &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); QHBox *workEndBox = new QHBox(workingHoursGroup); //workEndBox->setMargin( 0 ); addWidTime(i18n("Daily ending hour:"), &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); QVBox *excludeBox = new QVBox(workingHoursGroup); //excludeBox->setMargin( 0 ); addWidBool(i18n("Exclude holidays"), &(KOPrefs::instance()->mExcludeHolidays),excludeBox); addWidBool(i18n("Exclude Saturdays"), &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), // &(KOPrefs::instance()->mMarcusBainsShowSeconds), // topFrame); // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); // topLayout->setRowStretch(6,1); } void KOPrefsDialog::setupViewsTab() { QFrame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); // QBoxLayout *dayBeginsLayout = new QHBoxLayout; // topLayout->addLayout(dayBeginsLayout,0,0); // KPrefsDialogWidTime *dayBegins = // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), // topFrame); // dayBeginsLayout->addWidget(dayBegins->label()); // dayBeginsLayout->addStretch(1); // dayBeginsLayout->addWidget(dayBegins->spinBox()); // QBoxLayout *nextDaysLayout = new QHBoxLayout; // topLayout->addLayout(nextDaysLayout,1,0); // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); // nextDaysLayout->addStretch(1); // nextDaysLayout->addWidget(mNextXDaysSpin); 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); topFrame = addPage(i18n("ViewChange"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; 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); 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)); topLayout = new QGridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; QLabel *lab; QHBox *habo = new QHBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); ii++; } else { new QLabel ( i18n("Show events that recur "), habo ); } dailyRecur = addWidBool(i18n("daily"), &(KOPrefs::instance()->mMonthDailyRecur),habo); // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); weeklyRecur = addWidBool(i18n("weekly"), &(KOPrefs::instance()->mMonthWeeklyRecur),habo); topLayout->addMultiCellWidget(habo,ii, ii,0,1); ii++; habo = new QHBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel (i18n("Show in every cell ") , topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); ii++; } else { new QLabel ( i18n("Show in every cell "), habo ); } weeklyRecur = addWidBool(i18n("short month"), &(KOPrefs::instance()->mMonthShowShort),habo); weeklyRecur = addWidBool(i18n("icons"), &(KOPrefs::instance()->mMonthShowIcons),habo); topLayout->addMultiCellWidget(habo,ii, ii,0,1); ii++; #ifdef DESKTOP_VERSION KPrefsDialogWidBool *enableMonthScroll = addWidBool(i18n("Enable scrollbars in month view cells"), &(KOPrefs::instance()->mEnableMonthScroll),topFrame); topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); #endif dummy = addWidBool(i18n("Week view mode uses bigger font"), &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Show Sat/Sun together"), &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); KPrefsDialogWidBool *coloredCategoriesInMonthView = addWidBool(i18n("Month view uses category colors"), &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); dummy = addWidBool(i18n("Categorie colors are applied to text"), &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); coloredCategoriesInMonthView = addWidBool(i18n("Month view uses day colors"), &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); KPrefsDialogWidColor *holidayColor = addWidColor(i18n("Day color odd months"), &(KOPrefs::instance()->mMonthViewOddColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); holidayColor = addWidColor(i18n("Day color even months"), &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); holidayColor = addWidColor(i18n("Color for Sundays + category \"Holiday\""), &(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 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); 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->addWidget(passwdk->checkBox(), ii++,0); // *********************** Todo View topFrame = addPage(i18n("Todo View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; dummy = addWidBool(i18n("Hide not running Todos in To-do view"), &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); KPrefsDialogWidBool *showCompletedTodo = addWidBool(i18n("To-do view shows completed Todos"), &(KOPrefs::instance()->mShowCompletedTodo),topFrame); topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); dummy = addWidBool(i18n("To-do view shows complete as 'xx %'"), &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Small To-do view uses smaller font"), &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Todo view uses category colors"), &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); QWidget* wid = new QWidget( topFrame ); // Todo due today color KPrefsDialogWidColor *todoDueTodayColor = addWidColor(i18n("Todo due today color:"), &(KOPrefs::instance()->mTodoDueTodayColor),wid); QHBoxLayout *widLayout = new QHBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); widLayout->addWidget( todoDueTodayColor->button() ); topLayout->addWidget(wid,ii++,0); //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); // Todo overdue color wid = new QWidget( topFrame ); widLayout = new QHBoxLayout(wid); KPrefsDialogWidColor *todoOverdueColor = addWidColor(i18n("Todo overdue color:"), &(KOPrefs::instance()->mTodoOverdueColor),wid); widLayout->addWidget(todoOverdueColor->label()); widLayout->addWidget(todoOverdueColor->button()); topLayout->addWidget(wid,ii++,0); dummy = addWidBool(i18n("Colors are applied to text"), &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Allday Agenda view shows todos"), &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); + topFrame = addPage(i18n("View Options"),0,0); + + topLayout = new QGridLayout(topFrame,4,1); + topLayout->setSpacing(spacingHint()); + topLayout->setMargin(marginHint()); + ii = 0; + lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); + topLayout->addWidget(lab ,ii++,0); + + dummy = addWidBool(i18n("Details"), + &(KOPrefs::instance()->mEVshowDetails),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Created time"), + &(KOPrefs::instance()->mEVshowCreated),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Last modified time"), + &(KOPrefs::instance()->mEVshowChanged),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + + lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); + topLayout->addWidget(lab ,ii++,0); + + dummy = addWidBool(i18n("Details"), + &(KOPrefs::instance()->mWTshowDetails),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Created time"), + &(KOPrefs::instance()->mWTshowCreated),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = addWidBool(i18n("Last modified time"), + &(KOPrefs::instance()->mWTshowChanged),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("Alarm"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,2,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; dummy = addWidBool(i18n("Use internal alarm notification"), &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); topLayout->addWidget(dummy->checkBox(),iii++,0); lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); topLayout->addWidget(lab ,iii++,0); #ifndef DESKTOP_VERSION lab->setAlignment( AlignLeft|WordBreak|AlignTop); #else lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); #endif QHBox* dummyBox = new QHBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); dummyBox = new QHBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); QHBox* hbo = new QHBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); QPixmap icon; if ( QApplication::desktop()->width() < 321 ) icon = SmallIcon("fileimport16"); else icon = SmallIcon("fileimport"); loadTemplate->setIconSet (icon ) ; connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); int size = loadTemplate->sizeHint().height(); loadTemplate->setFixedSize( size, size ); //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); // topLayout->addWidget(lab ,iii++,0); lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); topLayout->addWidget(lab ,iii++,0); topLayout->addWidget(hbo,iii++,0); // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); // topLayout->addWidget(lab ,iii++,0); // #ifndef DESKTOP_VERSION // lab->setAlignment( AlignLeft|WordBreak|AlignTop); // #else // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); // #endif } void KOPrefsDialog::selectSoundFile() { QString fileName = mDefaultAlarmFile->text(); fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); if ( fileName.length() > 0 ) mDefaultAlarmFile->setText( fileName ); } void KOPrefsDialog::setupFontsTab() { QFrame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); KPrefsDialogWidFont * tVFont; int i = 0; KPrefsDialogWidFont *timeLabelsFont = addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), &(KOPrefs::instance()->mDateNavigatorFont),topFrame); topLayout->addWidget(timeLabelsFont->label(),i,0); topLayout->addWidget(timeLabelsFont->preview(),i,1); topLayout->addWidget(timeLabelsFont->button(),i,2); ++i; timeLabelsFont = addWidFont(i18n("Mon 15"),i18n("Date Labels:"), &(KOPrefs::instance()->mTimeLabelsFont),topFrame); topLayout->addWidget(timeLabelsFont->label(),i,0); topLayout->addWidget(timeLabelsFont->preview(),i,1); topLayout->addWidget(timeLabelsFont->button(),i,2); ++i; KPrefsDialogWidFont *timeBarFont = addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), &(KOPrefs::instance()->mTimeBarFont),topFrame); topLayout->addWidget(timeBarFont->label(),i,0); topLayout->addWidget(timeBarFont->preview(),i,1); topLayout->addWidget(timeBarFont->button(),i,2); ++i; KPrefsDialogWidFont *marcusBainsFont = addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), &(KOPrefs::instance()->mMarcusBainsFont),topFrame); topLayout->addWidget(marcusBainsFont->label(),i,0); topLayout->addWidget(marcusBainsFont->preview(),i,1); topLayout->addWidget(marcusBainsFont->button(),i,2); ++i; tVFont = addWidFont(i18n("Summary"),i18n("Event Viewer:"), &(KOPrefs::instance()->mEventViewFont),topFrame); topLayout->addWidget(tVFont->label(),i,0); topLayout->addWidget(tVFont->preview(),i,1); topLayout->addWidget(tVFont->button(),i,2); ++i; tVFont = addWidFont(i18n("Details"),i18n("EditorBox:"), &(KOPrefs::instance()->mEditBoxFont),topFrame); topLayout->addWidget(tVFont->label(),i,0); topLayout->addWidget(tVFont->preview(),i,1); topLayout->addWidget(tVFont->button(),i,2); ++i; topLayout->setColStretch(1,1); topLayout->setRowStretch(4,1); i = 0; topFrame = addPage(i18n("View Fonts"),0, DesktopIcon("fonts",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); tVFont = addWidFont(i18n("Configure KO"),i18n("What's Next View:"), &(KOPrefs::instance()->mWhatsNextFont),topFrame); topLayout->addWidget(tVFont->label(),i,0); topLayout->addWidget(tVFont->preview(),i,1); topLayout->addWidget(tVFont->button(),i,2); ++i; KPrefsDialogWidFont *agendaViewFont = addWidFont(i18n("Event text"),i18n("Agenda view:"), &(KOPrefs::instance()->mAgendaViewFont),topFrame); topLayout->addWidget(agendaViewFont->label(),i,0); topLayout->addWidget(agendaViewFont->preview(),i,1); topLayout->addWidget(agendaViewFont->button(),i,2); ++i; KPrefsDialogWidFont *monthViewFont = addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); topLayout->addWidget(monthViewFont->label(),i,0); topLayout->addWidget(monthViewFont->preview(),i,1); topLayout->addWidget(monthViewFont->button(),i,2); ++i; KPrefsDialogWidFont *lVFont = addWidFont(i18n("Event"),i18n("List View:"), &(KOPrefs::instance()->mListViewFont),topFrame); topLayout->addWidget(lVFont->label(),i,0); topLayout->addWidget(lVFont->preview(),i,1); topLayout->addWidget(lVFont->button(),i,2); ++i; tVFont = addWidFont(i18n("ToDo"),i18n("ToDoView:"), &(KOPrefs::instance()->mTodoViewFont),topFrame); topLayout->addWidget(tVFont->label(),i,0); topLayout->addWidget(tVFont->preview(),i,1); topLayout->addWidget(tVFont->button(),i,2); ++i; tVFont = addWidFont(i18n("Today"),i18n("JournalView:"), &(KOPrefs::instance()->mJornalViewFont),topFrame); topLayout->addWidget(tVFont->label(),i,0); topLayout->addWidget(tVFont->preview(),i,1); topLayout->addWidget(tVFont->button(),i,2); ++i; topLayout->setColStretch(1,1); topLayout->setRowStretch(4,1); } void KOPrefsDialog::setupColorsTab() { QFrame *topFrame = addPage(i18n("Colors"),0,0); // DesktopIcon("colorize",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,5,2); // topLayout->setSpacing(spacingHint()); // topLayout->setMargin(marginHint()); topLayout->setSpacing(2); topLayout->setMargin(3); int ii = 1; QGroupBox *categoryGroup ; categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), topFrame); topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); mCategoryCombo = new QComboBox(categoryGroup); mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); mCategoryButton = new KColorButton(categoryGroup); connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); updateCategoryColor(); // Holiday Color KPrefsDialogWidColor *holidayColor = addWidColor(i18n("Holiday color:"), &(KOPrefs::instance()->mHolidayColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); // Highlight Color KPrefsDialogWidColor *highlightColor = addWidColor(i18n("Highlight color:"), &(KOPrefs::instance()->mHighlightColor),topFrame); topLayout->addWidget(highlightColor->label(),ii,0); topLayout->addWidget(highlightColor->button(),ii++,1); // Event color KPrefsDialogWidColor *eventColor = addWidColor(i18n("Default event color:"), &(KOPrefs::instance()->mEventColor),topFrame); topLayout->addWidget(eventColor->label(),ii,0); topLayout->addWidget(eventColor->button(),ii++,1); eventColor = addWidColor(i18n("Default todo done color:"), &(KOPrefs::instance()->mTodoDoneColor),topFrame); topLayout->addWidget(eventColor->label(),ii,0); topLayout->addWidget(eventColor->button(),ii++,1); // agenda view background color KPrefsDialogWidColor *agendaBgColor = addWidColor(i18n("Agenda view background color:"), &(KOPrefs::instance()->mAgendaBgColor),topFrame); topLayout->addWidget(agendaBgColor->label(),ii,0); topLayout->addWidget(agendaBgColor->button(),ii++,1); // working hours color KPrefsDialogWidColor *workingHoursColor = addWidColor(i18n("Working hours color:"), &(KOPrefs::instance()->mWorkingHoursColor),topFrame); topLayout->addWidget(workingHoursColor->label(),ii,0); topLayout->addWidget(workingHoursColor->button(),ii++,1); KPrefsDialogWidBool *sb = addWidBool(i18n("Use colors for application:"), &(KOPrefs::instance()->mUseAppColors),topFrame); topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); ii++; KPrefsDialogWidColor * workingHoursColor1 = addWidColor(i18n("Buttons, menus, etc.:"), &(KOPrefs::instance()->mAppColor1),topFrame); topLayout->addWidget(workingHoursColor1->label(),ii,0); topLayout->addWidget(workingHoursColor1->button(),ii++,1); KPrefsDialogWidColor * workingHoursColor2 = addWidColor(i18n("Frames, labels, etc.:"), &(KOPrefs::instance()->mAppColor2),topFrame); topLayout->addWidget(workingHoursColor2->label(),ii,0); topLayout->addWidget(workingHoursColor2->button(),ii++,1); } void KOPrefsDialog::setCategoryColor() { mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); } void KOPrefsDialog::updateCategoryColor() { QString cat = mCategoryCombo->currentText(); QColor *color = mCategoryDict.find(cat); if (!color) { color = KOPrefs::instance()->categoryColor(cat); } if (color) { mCategoryButton->setColor(*color); } } void KOPrefsDialog::setupPrinterTab() { mPrinterTab = addPage(i18n("Printing"),0, DesktopIcon("fileprint",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); topLayout->setRowStretch(4,1); } void KOPrefsDialog::setupGroupSchedulingTab() { #if 0 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, DesktopIcon("personal",KIcon::SizeMedium)); QGridLayout *topLayout = new QGridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); #if 0 KPrefsDialogWidRadios *schedulerGroup = addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), topFrame); schedulerGroup->addRadio("Dummy"); // Only for debugging schedulerGroup->addRadio(i18n("Mail client")); topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); #endif KPrefsDialogWidRadios *sendGroup = addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), topFrame); sendGroup->addRadio(i18n("Send to outbox")); sendGroup->addRadio(i18n("Send directly")); topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); mAMails = new QListView(topFrame); mAMails->addColumn(i18n("Email"),300); topLayout->addMultiCellWidget(mAMails,3,3,0,1); topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); aEmailsEdit = new QLineEdit(topFrame); aEmailsEdit->setEnabled(false); topLayout->addWidget(aEmailsEdit,4,1); |