Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index e72f94b..0bbb3bf 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,174 +1,174 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | #include <kglobalsettings.h> | 56 | #include <kglobalsettings.h> |
57 | 57 | ||
58 | #include <kurlrequester.h> | 58 | #include <kurlrequester.h> |
59 | #include <klineedit.h> | 59 | #include <klineedit.h> |
60 | 60 | ||
61 | #if defined(USE_SOLARIS) | 61 | #if defined(USE_SOLARIS) |
62 | #include <sys/param.h> | 62 | #include <sys/param.h> |
63 | 63 | ||
64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
65 | #define INITFILE "/etc/default/init" | 65 | #define INITFILE "/etc/default/init" |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #include "koprefs.h" | 68 | #include "koprefs.h" |
69 | 69 | ||
70 | #include "koprefsdialog.h" | 70 | #include "koprefsdialog.h" |
71 | #include "kpimglobalprefs.h" | 71 | #include "kpimglobalprefs.h" |
72 | 72 | ||
73 | 73 | ||
74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
76 | { | 76 | { |
77 | 77 | ||
78 | setFont( KGlobalSettings::generalFont() ); | 78 | setFont( KGlobalSettings::generalMaxFont() ); |
79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
80 | mCategoryDict.setAutoDelete(true); | 80 | mCategoryDict.setAutoDelete(true); |
81 | 81 | ||
82 | KGlobal::locale()->insertCatalogue("timezones"); | 82 | KGlobal::locale()->insertCatalogue("timezones"); |
83 | mSpacingHint = spacingHintSmall(); | 83 | mSpacingHint = spacingHintSmall(); |
84 | mMarginHint = marginHintSmall(); | 84 | mMarginHint = marginHintSmall(); |
85 | #ifndef DESKTOP_VERSION | 85 | #ifndef DESKTOP_VERSION |
86 | if ( QApplication::desktop()->height() == 480 ) | 86 | if ( QApplication::desktop()->height() == 480 ) |
87 | hideButtons(); | 87 | hideButtons(); |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | setupGlobalTab(); | 90 | setupGlobalTab(); |
91 | setupMainTab(); | 91 | setupMainTab(); |
92 | // setupLocaleTab(); | 92 | // setupLocaleTab(); |
93 | //setupTimeZoneTab(); | 93 | //setupTimeZoneTab(); |
94 | setupTimeTab(); | 94 | setupTimeTab(); |
95 | //setupLocaleDateTab(); | 95 | //setupLocaleDateTab(); |
96 | setupFontsTab(); | 96 | setupFontsTab(); |
97 | setupColorsTab(); | 97 | setupColorsTab(); |
98 | setupViewsTab(); | 98 | setupViewsTab(); |
99 | //setupSyncTab(); | 99 | //setupSyncTab(); |
100 | //setupSyncAlgTab(); | 100 | //setupSyncAlgTab(); |
101 | //setupPrinterTab(); | 101 | //setupPrinterTab(); |
102 | //setupGroupSchedulingTab(); | 102 | //setupGroupSchedulingTab(); |
103 | //setupGroupAutomationTab(); | 103 | //setupGroupAutomationTab(); |
104 | 104 | ||
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | KOPrefsDialog::~KOPrefsDialog() | 109 | KOPrefsDialog::~KOPrefsDialog() |
110 | { | 110 | { |
111 | } | 111 | } |
112 | void KOPrefsDialog::setupGlobalTab() | 112 | void KOPrefsDialog::setupGlobalTab() |
113 | { | 113 | { |
114 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
117 | topLayout->addWidget( kdelibcfg ); | 117 | topLayout->addWidget( kdelibcfg ); |
118 | 118 | ||
119 | 119 | ||
120 | } | 120 | } |
121 | void KOPrefsDialog::setupLocaleDateTab() | 121 | void KOPrefsDialog::setupLocaleDateTab() |
122 | { | 122 | { |
123 | #if 0 | 123 | #if 0 |
124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
126 | topLayout->setSpacing(mSpacingHint); | 126 | topLayout->setSpacing(mSpacingHint); |
127 | topLayout->setMargin(mMarginHint); | 127 | topLayout->setMargin(mMarginHint); |
128 | int iii = 0; | 128 | int iii = 0; |
129 | 129 | ||
130 | 130 | ||
131 | KPrefsDialogWidRadios *syncPrefsGroup = | 131 | KPrefsDialogWidRadios *syncPrefsGroup = |
132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
133 | QString format; | 133 | QString format; |
134 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%d.%m.%Y)"; | 135 | format = "(%d.%m.%Y)"; |
136 | else | 136 | else |
137 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 137 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
139 | if ( QApplication::desktop()->width() < 480 ) | 139 | if ( QApplication::desktop()->width() < 480 ) |
140 | format = "(%m.%d.%Y)"; | 140 | format = "(%m.%d.%Y)"; |
141 | else | 141 | else |
142 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 142 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
144 | if ( QApplication::desktop()->width() < 480 ) | 144 | if ( QApplication::desktop()->width() < 480 ) |
145 | format = "(%Y-%m-%d)"; | 145 | format = "(%Y-%m-%d)"; |
146 | else | 146 | else |
147 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 147 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
149 | syncPrefsGroup->addRadio(i18n("User defined")); | 149 | syncPrefsGroup->addRadio(i18n("User defined")); |
150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
151 | ++iii; | 151 | ++iii; |
152 | ++iii; | 152 | ++iii; |
153 | QLabel * lab; | 153 | QLabel * lab; |
154 | mUserDateFormatLong = new QLineEdit(topFrame); | 154 | mUserDateFormatLong = new QLineEdit(topFrame); |
155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
156 | topLayout->addWidget(lab ,iii,0); | 156 | topLayout->addWidget(lab ,iii,0); |
157 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 157 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
158 | ++iii; | 158 | ++iii; |
159 | mUserDateFormatShort = new QLineEdit(topFrame); | 159 | mUserDateFormatShort = new QLineEdit(topFrame); |
160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
161 | topLayout->addWidget(lab ,iii,0); | 161 | topLayout->addWidget(lab ,iii,0); |
162 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 162 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
163 | ++iii; | 163 | ++iii; |
164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
166 | ++iii; | 166 | ++iii; |
167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
169 | ++iii; | 169 | ++iii; |
170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
172 | ++iii; | 172 | ++iii; |
173 | #endif | 173 | #endif |
174 | 174 | ||
@@ -626,193 +626,192 @@ void KOPrefsDialog::setupViewsTab() | |||
626 | addWidBool(i18n("Hold non-fullscreen on view change"), | 626 | addWidBool(i18n("Hold non-fullscreen on view change"), |
627 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 627 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
628 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 628 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
629 | 629 | ||
630 | 630 | ||
631 | 631 | ||
632 | KPrefsDialogWidBool *fullViewMonth = | 632 | KPrefsDialogWidBool *fullViewMonth = |
633 | addWidBool(i18n("Next days view uses full window"), | 633 | addWidBool(i18n("Next days view uses full window"), |
634 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 634 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
635 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 635 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
636 | 636 | ||
637 | 637 | ||
638 | KPrefsDialogWidBool *fullViewTodo = | 638 | KPrefsDialogWidBool *fullViewTodo = |
639 | addWidBool(i18n("Event list view uses full window"), | 639 | addWidBool(i18n("Event list view uses full window"), |
640 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 640 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
641 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 641 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
642 | dummy = | 642 | dummy = |
643 | addWidBool(i18n("Listview uses monthly timespan"), | 643 | addWidBool(i18n("Listview uses monthly timespan"), |
644 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 644 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
645 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 645 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
646 | dummy = | 646 | dummy = |
647 | addWidBool(i18n("Highlight selection in Time Edit"), | 647 | addWidBool(i18n("Highlight selection in Time Edit"), |
648 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 648 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
649 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 649 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
650 | 650 | ||
651 | KPrefsDialogWidBool *dailyRecur = | 651 | KPrefsDialogWidBool *dailyRecur = |
652 | addWidBool(i18n("Show events that recur daily in date nav."), | 652 | addWidBool(i18n("Show events that recur daily in date nav."), |
653 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 653 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
654 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 654 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
655 | 655 | ||
656 | KPrefsDialogWidBool *weeklyRecur = | 656 | KPrefsDialogWidBool *weeklyRecur = |
657 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 657 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
658 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 658 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
659 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 659 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
660 | 660 | ||
661 | #ifdef DESKTOP_VERSION | 661 | #ifdef DESKTOP_VERSION |
662 | KPrefsDialogWidBool *enableToolTips = | 662 | KPrefsDialogWidBool *enableToolTips = |
663 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 663 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
664 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 664 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
665 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 665 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
666 | #endif | 666 | #endif |
667 | // ********************************************************* | 667 | // ********************************************************* |
668 | 668 | ||
669 | topFrame = addPage(i18n("Agenda View"),0,0); | 669 | topFrame = addPage(i18n("Agenda View"),0,0); |
670 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 670 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
671 | 671 | ||
672 | topLayout = new QGridLayout(topFrame,5,1); | 672 | topLayout = new QGridLayout(topFrame,5,1); |
673 | topLayout->setSpacing(mSpacingHint); | 673 | topLayout->setSpacing(mSpacingHint); |
674 | topLayout->setMargin(mMarginHint); | 674 | topLayout->setMargin(mMarginHint); |
675 | ii = 0; | 675 | ii = 0; |
676 | 676 | ||
677 | 677 | ||
678 | dummy = | 678 | dummy = |
679 | addWidBool(i18n("Show time in agenda items"), | 679 | addWidBool(i18n("Show time in agenda items"), |
680 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 680 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
681 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 681 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
682 | 682 | ||
683 | dummy = | 683 | dummy = |
684 | addWidBool(i18n("Highlight current day in agenda"), | 684 | addWidBool(i18n("Highlight current day in agenda"), |
685 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 685 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
686 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 686 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
687 | 687 | ||
688 | dummy = | 688 | dummy = |
689 | addWidBool(i18n("Use light color for highlight current day"), | 689 | addWidBool(i18n("Use light color for highlight current day"), |
690 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 690 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
691 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 691 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
692 | 692 | ||
693 | 693 | ||
694 | KPrefsDialogWidBool *marcusBainsEnabled = | 694 | KPrefsDialogWidBool *marcusBainsEnabled = |
695 | addWidBool(i18n("Show current time"), | 695 | addWidBool(i18n("Show current time"), |
696 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 696 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
697 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 697 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
698 | 698 | ||
699 | 699 | ||
700 | dummy = | 700 | dummy = |
701 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 701 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
702 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 702 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
703 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 703 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
704 | 704 | ||
705 | dummy = | 705 | dummy = |
706 | addWidBool(i18n("Set agenda to current time on change"), | 706 | addWidBool(i18n("Set agenda to current time on change"), |
707 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 707 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
708 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 708 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
709 | 709 | ||
710 | 710 | ||
711 | 711 | ||
712 | 712 | ||
713 | 713 | ||
714 | 714 | ||
715 | 715 | ||
716 | topFrame = addPage(i18n("Month View"),0,0); | 716 | topFrame = addPage(i18n("Month View"),0,0); |
717 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 717 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
718 | 718 | ||
719 | topLayout = new QGridLayout(topFrame,5,1); | 719 | topLayout = new QGridLayout(topFrame,5,1); |
720 | topLayout->setSpacing(mSpacingHint); | 720 | topLayout->setSpacing(mSpacingHint); |
721 | topLayout->setMargin(mMarginHint); | 721 | topLayout->setMargin(mMarginHint); |
722 | qDebug("%d %d ",mSpacingHint, mMarginHint ); | ||
723 | ii = 0; | 722 | ii = 0; |
724 | QLabel *lab; | 723 | QLabel *lab; |
725 | QHBox *habo = new QHBox( topFrame ); | 724 | QHBox *habo = new QHBox( topFrame ); |
726 | if ( QApplication::desktop()->width() <= 480 ) { | 725 | if ( QApplication::desktop()->width() <= 480 ) { |
727 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 726 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
728 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 727 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
729 | ii++; | 728 | ii++; |
730 | } else { | 729 | } else { |
731 | new QLabel ( i18n("Show events that recur "), habo ); | 730 | new QLabel ( i18n("Show events that recur "), habo ); |
732 | } | 731 | } |
733 | dailyRecur = | 732 | dailyRecur = |
734 | addWidBool(i18n("daily"), | 733 | addWidBool(i18n("daily"), |
735 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 734 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
736 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 735 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
737 | 736 | ||
738 | weeklyRecur = | 737 | weeklyRecur = |
739 | addWidBool(i18n("weekly"), | 738 | addWidBool(i18n("weekly"), |
740 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 739 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
741 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 740 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
742 | ii++; | 741 | ii++; |
743 | 742 | ||
744 | 743 | ||
745 | habo = new QHBox( topFrame ); | 744 | habo = new QHBox( topFrame ); |
746 | if ( QApplication::desktop()->width() <= 480 ) { | 745 | if ( QApplication::desktop()->width() <= 480 ) { |
747 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 746 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
748 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 747 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
749 | ii++; | 748 | ii++; |
750 | 749 | ||
751 | } else { | 750 | } else { |
752 | new QLabel ( i18n("Show in every cell "), habo ); | 751 | new QLabel ( i18n("Show in every cell "), habo ); |
753 | } | 752 | } |
754 | weeklyRecur = | 753 | weeklyRecur = |
755 | addWidBool(i18n("short month"), | 754 | addWidBool(i18n("short month"), |
756 | &(KOPrefs::instance()->mMonthShowShort),habo); | 755 | &(KOPrefs::instance()->mMonthShowShort),habo); |
757 | weeklyRecur = | 756 | weeklyRecur = |
758 | addWidBool(i18n("icons"), | 757 | addWidBool(i18n("icons"), |
759 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 758 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
760 | 759 | ||
761 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 760 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
762 | ii++; | 761 | ii++; |
763 | #ifdef DESKTOP_VERSION | 762 | #ifdef DESKTOP_VERSION |
764 | KPrefsDialogWidBool *enableMonthScroll = | 763 | KPrefsDialogWidBool *enableMonthScroll = |
765 | addWidBool(i18n("Enable scrollbars in month view cells"), | 764 | addWidBool(i18n("Enable scrollbars in month view cells"), |
766 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 765 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
767 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 766 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
768 | #endif | 767 | #endif |
769 | dummy = | 768 | dummy = |
770 | addWidBool(i18n("Week view mode uses bigger font"), | 769 | addWidBool(i18n("Week view mode uses bigger font"), |
771 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | 770 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); |
772 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 771 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
773 | dummy = | 772 | dummy = |
774 | addWidBool(i18n("Show Sat/Sun together"), | 773 | addWidBool(i18n("Show Sat/Sun together"), |
775 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 774 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
776 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 775 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
777 | 776 | ||
778 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 777 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
779 | addWidBool(i18n("Month view uses category colors"), | 778 | addWidBool(i18n("Month view uses category colors"), |
780 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 779 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
781 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 780 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
782 | 781 | ||
783 | dummy = | 782 | dummy = |
784 | addWidBool(i18n("Categorie colors are applied to text"), | 783 | addWidBool(i18n("Categorie colors are applied to text"), |
785 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 784 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
786 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 785 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
787 | coloredCategoriesInMonthView = | 786 | coloredCategoriesInMonthView = |
788 | addWidBool(i18n("Month view uses day colors"), | 787 | addWidBool(i18n("Month view uses day colors"), |
789 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 788 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
790 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 789 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
791 | 790 | ||
792 | KPrefsDialogWidColor *holidayColor = | 791 | KPrefsDialogWidColor *holidayColor = |
793 | addWidColor(i18n("Day color odd months"), | 792 | addWidColor(i18n("Day color odd months"), |
794 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 793 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
795 | topLayout->addWidget(holidayColor->label(),ii,0); | 794 | topLayout->addWidget(holidayColor->label(),ii,0); |
796 | topLayout->addWidget(holidayColor->button(),ii++,1); | 795 | topLayout->addWidget(holidayColor->button(),ii++,1); |
797 | 796 | ||
798 | holidayColor = | 797 | holidayColor = |
799 | addWidColor(i18n("Day color even months"), | 798 | addWidColor(i18n("Day color even months"), |
800 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 799 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
801 | topLayout->addWidget(holidayColor->label(),ii,0); | 800 | topLayout->addWidget(holidayColor->label(),ii,0); |
802 | topLayout->addWidget(holidayColor->button(),ii++,1); | 801 | topLayout->addWidget(holidayColor->button(),ii++,1); |
803 | 802 | ||
804 | 803 | ||
805 | holidayColor = | 804 | holidayColor = |
806 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 805 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
807 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 806 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
808 | topLayout->addWidget(holidayColor->label(),ii,0); | 807 | topLayout->addWidget(holidayColor->label(),ii,0); |
809 | topLayout->addWidget(holidayColor->button(),ii++,1); | 808 | topLayout->addWidget(holidayColor->button(),ii++,1); |
810 | // *********************** What'sNext View | 809 | // *********************** What'sNext View |
811 | topFrame = addPage(i18n("What's Next View"),0,0); | 810 | topFrame = addPage(i18n("What's Next View"),0,0); |
812 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 811 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
813 | 812 | ||
814 | topLayout = new QGridLayout(topFrame,4,1); | 813 | topLayout = new QGridLayout(topFrame,4,1); |
815 | topLayout->setSpacing(mSpacingHint); | 814 | topLayout->setSpacing(mSpacingHint); |
816 | topLayout->setMargin(mMarginHint); | 815 | topLayout->setMargin(mMarginHint); |
817 | ii = 0; | 816 | ii = 0; |
818 | 817 | ||