summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp46
1 files changed, 44 insertions, 2 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index b782bb1..3ee9a22 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -256,64 +256,71 @@ void KOPrefsDialog::setupMainTab()
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;
KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
&(KOPrefs::instance()->mShowFullMenu),topFrame);
topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
&(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
topLayout->addMultiCellWidget( widbool->checkBox(), 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);
int iii = 5;
widbool = addWidBool(i18n("Block popup until mouse button release"),
&(KOPrefs::instance()->mBlockPopupMenu),topFrame);
topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1);
++iii;
+ if ( QApplication::desktop()->height() <= 240 ) {
+ topFrame = addPage(i18n("General") +" 2",0,0);
+ topLayout = new QGridLayout(topFrame,4,2);
+ topLayout->setSpacing(2);
+ topLayout->setMargin(3);
+ iii = 0;
+ }
QHBox *dummy = new QHBox(topFrame);
new QLabel(i18n("Days in Next-X-Days:"),dummy);
mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
topLayout->addMultiCellWidget(dummy,iii,iii,0,1);
++iii;
// 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);
//topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
// addWidBool(i18n("Enable automatic saving of calendar"),
// &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
QHBox *intervalBox = new QHBox(topFrame);
// intervalBox->setSpacing(mSpacingHint);
topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
++iii;
QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
/*
QHBox * agendasize = new QHBox ( topFrame );
new QLabel (i18n("AllDayAgenda Height:"), agendasize );
@@ -402,70 +409,77 @@ void KOPrefsDialog::setupTimeTab()
topLayout->setSpacing(mSpacingHint);
topLayout->setMargin(mMarginHint);
QHBox *dummy = new QHBox(topFrame);
KPrefsDialogWidTime *dayBegins =
addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
dummy);
//topLayout->addWidget(dayBegins->label(),2,0);
//topLayout->addWidget(dayBegins->spinBox(),2,1);
topLayout->addMultiCellWidget(dummy,0,0,0,1);
topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
topFrame),1,0);
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);
-
+ int iii = 4;
+ if ( QApplication::desktop()->height() <= 240 ) {
+ topFrame = addPage(i18n("Time") +" 2",0,0);
+ topLayout = new QGridLayout(topFrame,1,2);
+ topLayout->setSpacing(2);
+ topLayout->setMargin(3);
+ iii = 0;
+ }
QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
i18n("Working Hours"),
topFrame);
- topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
+ topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,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);
@@ -673,64 +687,76 @@ void KOPrefsDialog::setupViewsTab()
weeklyRecur =
addWidBool(i18n("icons"),
&(KOPrefs::instance()->mMonthShowIcons),habo);
weeklyRecur =
addWidBool(i18n("times"),
&(KOPrefs::instance()->mMonthShowTimes),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("Category colors are applied to text"),
&(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
+
+
+
+ if ( QApplication::desktop()->height() <= 240 ) {
+ topFrame = addPage(i18n("Month View") +" 2",0,0);
+ topLayout = new QGridLayout(topFrame,4,1);
+ topLayout->setSpacing(2);
+ topLayout->setMargin(1);
+ 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(mSpacingHint);
topLayout->setMargin(mMarginHint);
ii = 0;
@@ -872,67 +898,71 @@ dummy =
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(mSpacingHint);
topLayout->setMargin(mMarginHint);
int iii = 0;
dummy =
addWidBool(i18n("Use internal alarm notification"),
&(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
topLayout->addWidget(dummy->checkBox(),iii++,0);
+
+ if ( QApplication::desktop()->height() > 240 ) {
+
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);
@@ -1135,64 +1165,76 @@ void KOPrefsDialog::setupColorsTab()
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);
+ if ( QApplication::desktop()->height() <= 240 ) {
+ topFrame = addPage(i18n("Colors") +" 2",0,0);
+ // DesktopIcon("colorize",KIcon::SizeMedium));
+
+ topLayout = new QGridLayout(topFrame,5,2);
+ // topLayout->setSpacing(mSpacingHint);
+ // topLayout->setMargin(mMarginHint);
+
+ topLayout->setSpacing(2);
+ topLayout->setMargin(3);
+ }
+
// 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);