-rw-r--r-- | korganizer/koprefsdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index b4b3b27..393e6e6 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,1637 +1,1638 @@ | |||
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 | 56 | ||
57 | #include <kurlrequester.h> | 57 | #include <kurlrequester.h> |
58 | #include <klineedit.h> | 58 | #include <klineedit.h> |
59 | 59 | ||
60 | #if defined(USE_SOLARIS) | 60 | #if defined(USE_SOLARIS) |
61 | #include <sys/param.h> | 61 | #include <sys/param.h> |
62 | 62 | ||
63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
64 | #define INITFILE "/etc/default/init" | 64 | #define INITFILE "/etc/default/init" |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #include "koprefs.h" | 67 | #include "koprefs.h" |
68 | 68 | ||
69 | #include "koprefsdialog.h" | 69 | #include "koprefsdialog.h" |
70 | #include "kpimglobalprefs.h" | 70 | #include "kpimglobalprefs.h" |
71 | 71 | ||
72 | 72 | ||
73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
75 | { | 75 | { |
76 | 76 | ||
77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
78 | mCategoryDict.setAutoDelete(true); | 78 | mCategoryDict.setAutoDelete(true); |
79 | 79 | ||
80 | KGlobal::locale()->insertCatalogue("timezones"); | 80 | KGlobal::locale()->insertCatalogue("timezones"); |
81 | 81 | ||
82 | setupGlobalTab(); | 82 | setupGlobalTab(); |
83 | setupMainTab(); | 83 | setupMainTab(); |
84 | // setupLocaleTab(); | 84 | // setupLocaleTab(); |
85 | //setupTimeZoneTab(); | 85 | //setupTimeZoneTab(); |
86 | setupTimeTab(); | 86 | setupTimeTab(); |
87 | //setupLocaleDateTab(); | 87 | //setupLocaleDateTab(); |
88 | setupFontsTab(); | 88 | setupFontsTab(); |
89 | setupColorsTab(); | 89 | setupColorsTab(); |
90 | setupViewsTab(); | 90 | setupViewsTab(); |
91 | //setupSyncTab(); | 91 | //setupSyncTab(); |
92 | //setupSyncAlgTab(); | 92 | //setupSyncAlgTab(); |
93 | //setupPrinterTab(); | 93 | //setupPrinterTab(); |
94 | //setupGroupSchedulingTab(); | 94 | //setupGroupSchedulingTab(); |
95 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | KOPrefsDialog::~KOPrefsDialog() | 99 | KOPrefsDialog::~KOPrefsDialog() |
100 | { | 100 | { |
101 | } | 101 | } |
102 | void KOPrefsDialog::setupGlobalTab() | 102 | void KOPrefsDialog::setupGlobalTab() |
103 | { | 103 | { |
104 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 104 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
107 | topLayout->addWidget( kdelibcfg ); | 107 | topLayout->addWidget( kdelibcfg ); |
108 | 108 | ||
109 | 109 | ||
110 | } | 110 | } |
111 | void KOPrefsDialog::setupLocaleDateTab() | 111 | void KOPrefsDialog::setupLocaleDateTab() |
112 | { | 112 | { |
113 | #if 0 | 113 | #if 0 |
114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
115 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 115 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
116 | topLayout->setSpacing(spacingHint()); | 116 | topLayout->setSpacing(spacingHint()); |
117 | topLayout->setMargin(marginHint()); | 117 | topLayout->setMargin(marginHint()); |
118 | int iii = 0; | 118 | int iii = 0; |
119 | 119 | ||
120 | 120 | ||
121 | KPrefsDialogWidRadios *syncPrefsGroup = | 121 | KPrefsDialogWidRadios *syncPrefsGroup = |
122 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 122 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
123 | QString format; | 123 | QString format; |
124 | if ( QApplication::desktop()->width() < 480 ) | 124 | if ( QApplication::desktop()->width() < 480 ) |
125 | format = "(%d.%m.%Y)"; | 125 | format = "(%d.%m.%Y)"; |
126 | else | 126 | else |
127 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 127 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
128 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 128 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
129 | if ( QApplication::desktop()->width() < 480 ) | 129 | if ( QApplication::desktop()->width() < 480 ) |
130 | format = "(%m.%d.%Y)"; | 130 | format = "(%m.%d.%Y)"; |
131 | else | 131 | else |
132 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 132 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
133 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 133 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
134 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%Y-%m-%d)"; | 135 | format = "(%Y-%m-%d)"; |
136 | else | 136 | else |
137 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 137 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
138 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
139 | syncPrefsGroup->addRadio(i18n("User defined")); | 139 | syncPrefsGroup->addRadio(i18n("User defined")); |
140 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 140 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
141 | ++iii; | 141 | ++iii; |
142 | ++iii; | 142 | ++iii; |
143 | QLabel * lab; | 143 | QLabel * lab; |
144 | mUserDateFormatLong = new QLineEdit(topFrame); | 144 | mUserDateFormatLong = new QLineEdit(topFrame); |
145 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 145 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
146 | topLayout->addWidget(lab ,iii,0); | 146 | topLayout->addWidget(lab ,iii,0); |
147 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 147 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
148 | ++iii; | 148 | ++iii; |
149 | mUserDateFormatShort = new QLineEdit(topFrame); | 149 | mUserDateFormatShort = new QLineEdit(topFrame); |
150 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 150 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
151 | topLayout->addWidget(lab ,iii,0); | 151 | topLayout->addWidget(lab ,iii,0); |
152 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 152 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
153 | ++iii; | 153 | ++iii; |
154 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 154 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
155 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 155 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
156 | ++iii; | 156 | ++iii; |
157 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 157 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
158 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 158 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
159 | ++iii; | 159 | ++iii; |
160 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 160 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
161 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 161 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
162 | ++iii; | 162 | ++iii; |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | } | 165 | } |
166 | 166 | ||
167 | void KOPrefsDialog::setupLocaleTab() | 167 | void KOPrefsDialog::setupLocaleTab() |
168 | { | 168 | { |
169 | #if 0 | 169 | #if 0 |
170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
171 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 171 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
172 | topLayout->setSpacing(spacingHint()); | 172 | topLayout->setSpacing(spacingHint()); |
173 | topLayout->setMargin(marginHint()); | 173 | topLayout->setMargin(marginHint()); |
174 | int iii = 0; | 174 | int iii = 0; |
175 | KPrefsDialogWidRadios *syncPrefsGroup = | 175 | KPrefsDialogWidRadios *syncPrefsGroup = |
176 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 176 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
177 | syncPrefsGroup->addRadio(i18n("English")); | 177 | syncPrefsGroup->addRadio(i18n("English")); |
178 | syncPrefsGroup->addRadio(i18n("German")); | 178 | syncPrefsGroup->addRadio(i18n("German")); |
179 | syncPrefsGroup->addRadio(i18n("French")); | 179 | syncPrefsGroup->addRadio(i18n("French")); |
180 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 180 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
181 | if ( QApplication::desktop()->width() < 300 ) | 181 | if ( QApplication::desktop()->width() < 300 ) |
182 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 182 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
183 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 183 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
184 | ++iii; | 184 | ++iii; |
185 | 185 | ||
186 | syncPrefsGroup = | 186 | syncPrefsGroup = |
187 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 187 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
188 | if ( QApplication::desktop()->width() > 300 ) | 188 | if ( QApplication::desktop()->width() > 300 ) |
189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
190 | syncPrefsGroup->addRadio(i18n("24:00")); | 190 | syncPrefsGroup->addRadio(i18n("24:00")); |
191 | syncPrefsGroup->addRadio(i18n("12:00am")); | 191 | syncPrefsGroup->addRadio(i18n("12:00am")); |
192 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 192 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
194 | ++iii; | 194 | ++iii; |
195 | KPrefsDialogWidBool *sb; | 195 | KPrefsDialogWidBool *sb; |
196 | if ( QApplication::desktop()->width() < 300 ) { | 196 | if ( QApplication::desktop()->width() < 300 ) { |
197 | sb = | 197 | sb = |
198 | addWidBool(i18n("Week starts on Sunday"), | 198 | addWidBool(i18n("Week starts on Sunday"), |
199 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 199 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
200 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 200 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
201 | ++iii; | 201 | ++iii; |
202 | sb = | 202 | sb = |
203 | addWidBool(i18n("Use short date in (WN/E) view"), | 203 | addWidBool(i18n("Use short date in (WN/E) view"), |
204 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 204 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
206 | } | 206 | } |
207 | else { | 207 | else { |
208 | QWidget * hb = new QWidget( topFrame ); | 208 | QWidget * hb = new QWidget( topFrame ); |
209 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 209 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
210 | sb = | 210 | sb = |
211 | addWidBool(i18n("Week starts on Sunday"), | 211 | addWidBool(i18n("Week starts on Sunday"), |
212 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 212 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
213 | hbLayout->addWidget(sb->checkBox() ); | 213 | hbLayout->addWidget(sb->checkBox() ); |
214 | sb = | 214 | sb = |
215 | addWidBool(i18n("Use short date in (WN/E) view"), | 215 | addWidBool(i18n("Use short date in (WN/E) view"), |
216 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 216 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
217 | hbLayout->addWidget(sb->checkBox() ); | 217 | hbLayout->addWidget(sb->checkBox() ); |
218 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 218 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
219 | 219 | ||
220 | } | 220 | } |
221 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 221 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
222 | #if 0 | 222 | #if 0 |
223 | ++iii; | 223 | ++iii; |
224 | sb = | 224 | sb = |
225 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 225 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
226 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 226 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
227 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 227 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
228 | #endif | 228 | #endif |
229 | #endif | 229 | #endif |
230 | } | 230 | } |
231 | void KOPrefsDialog::showSyncPage() | 231 | void KOPrefsDialog::showSyncPage() |
232 | { | 232 | { |
233 | showPage ( 2 ) ; | 233 | showPage ( 0 ) ; |
234 | kdelibcfg->showTimeZoneTab() ; | ||
234 | 235 | ||
235 | } | 236 | } |
236 | void KOPrefsDialog::setupSyncAlgTab() | 237 | void KOPrefsDialog::setupSyncAlgTab() |
237 | { | 238 | { |
238 | #if 0 | 239 | #if 0 |
239 | QLabel * lab; | 240 | QLabel * lab; |
240 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 241 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
241 | mSetupSyncAlgTab = topFrame; | 242 | mSetupSyncAlgTab = topFrame; |
242 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 243 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
243 | topLayout->setSpacing(spacingHint()); | 244 | topLayout->setSpacing(spacingHint()); |
244 | topLayout->setMargin(marginHint()); | 245 | topLayout->setMargin(marginHint()); |
245 | int iii = 0; | 246 | int iii = 0; |
246 | 247 | ||
247 | KPrefsDialogWidBool *sb = | 248 | KPrefsDialogWidBool *sb = |
248 | addWidBool(i18n("Ask for preferences before syncing"), | 249 | addWidBool(i18n("Ask for preferences before syncing"), |
249 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 250 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
250 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 251 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
251 | 252 | ||
252 | ++iii; | 253 | ++iii; |
253 | 254 | ||
254 | KPrefsDialogWidRadios *syncPrefsGroup = | 255 | KPrefsDialogWidRadios *syncPrefsGroup = |
255 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 256 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
256 | topFrame); | 257 | topFrame); |
257 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 258 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
258 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 259 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
259 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 260 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
260 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 261 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
261 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 262 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
262 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 263 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
263 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 264 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
264 | ++iii; | 265 | ++iii; |
265 | sb = | 266 | sb = |
266 | addWidBool(i18n("Show summary after syncing"), | 267 | addWidBool(i18n("Show summary after syncing"), |
267 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 268 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
268 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 269 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
269 | 270 | ||
270 | ++iii; | 271 | ++iii; |
271 | #endif | 272 | #endif |
272 | 273 | ||
273 | 274 | ||
274 | 275 | ||
275 | } | 276 | } |
276 | 277 | ||
277 | 278 | ||
278 | void KOPrefsDialog::setupSyncTab() | 279 | void KOPrefsDialog::setupSyncTab() |
279 | { | 280 | { |
280 | #if 0 | 281 | #if 0 |
281 | QLabel * lab; | 282 | QLabel * lab; |
282 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 283 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
283 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 284 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
284 | topLayout->setSpacing(spacingHint()); | 285 | topLayout->setSpacing(spacingHint()); |
285 | topLayout->setMargin(marginHint()); | 286 | topLayout->setMargin(marginHint()); |
286 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 287 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
287 | int iii = 0; | 288 | int iii = 0; |
288 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 289 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
289 | ++iii; | 290 | ++iii; |
290 | 291 | ||
291 | mRemoteIPEdit = new QLineEdit(topFrame); | 292 | mRemoteIPEdit = new QLineEdit(topFrame); |
292 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 293 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
293 | topLayout->addWidget(lab ,iii,0); | 294 | topLayout->addWidget(lab ,iii,0); |
294 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 295 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
295 | ++iii; | 296 | ++iii; |
296 | mRemoteUser = new QLineEdit(topFrame); | 297 | mRemoteUser = new QLineEdit(topFrame); |
297 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 298 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
298 | topLayout->addWidget(lab ,iii,0); | 299 | topLayout->addWidget(lab ,iii,0); |
299 | topLayout->addWidget(mRemoteUser, iii,1); | 300 | topLayout->addWidget(mRemoteUser, iii,1); |
300 | ++iii; | 301 | ++iii; |
301 | 302 | ||
302 | mRemoteFile = new QLineEdit(topFrame); | 303 | mRemoteFile = new QLineEdit(topFrame); |
303 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 304 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
304 | topLayout->addWidget(lab ,iii,0); | 305 | topLayout->addWidget(lab ,iii,0); |
305 | topLayout->addWidget(mRemoteFile,iii,1); | 306 | topLayout->addWidget(mRemoteFile,iii,1); |
306 | ++iii; | 307 | ++iii; |
307 | 308 | ||
308 | mLocalTempFile = new QLineEdit(topFrame); | 309 | mLocalTempFile = new QLineEdit(topFrame); |
309 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 310 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
310 | topLayout->addWidget(lab ,iii,0); | 311 | topLayout->addWidget(lab ,iii,0); |
311 | topLayout->addWidget(mLocalTempFile,iii,1); | 312 | topLayout->addWidget(mLocalTempFile,iii,1); |
312 | ++iii; | 313 | ++iii; |
313 | 314 | ||
314 | KPrefsDialogWidBool *wb = | 315 | KPrefsDialogWidBool *wb = |
315 | addWidBool(i18n("Write back synced file"), | 316 | addWidBool(i18n("Write back synced file"), |
316 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 317 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
317 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 318 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
318 | ++iii; | 319 | ++iii; |
319 | wb = | 320 | wb = |
320 | addWidBool(i18n("Write back existing entries only"), | 321 | addWidBool(i18n("Write back existing entries only"), |
321 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 322 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
322 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 323 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
323 | ++iii; | 324 | ++iii; |
324 | 325 | ||
325 | #endif | 326 | #endif |
326 | } | 327 | } |
327 | 328 | ||
328 | void KOPrefsDialog::setupMainTab() | 329 | void KOPrefsDialog::setupMainTab() |
329 | { | 330 | { |
330 | QFrame *topFrame = addPage(i18n("General"),0,0); | 331 | QFrame *topFrame = addPage(i18n("General"),0,0); |
331 | // DesktopIcon("identity",KIcon::SizeMedium)); | 332 | // DesktopIcon("identity",KIcon::SizeMedium)); |
332 | 333 | ||
333 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 334 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
334 | topLayout->setSpacing(spacingHint()); | 335 | topLayout->setSpacing(spacingHint()); |
335 | topLayout->setMargin(marginHint()); | 336 | topLayout->setMargin(marginHint()); |
336 | 337 | ||
337 | // KPrefsDialogWidBool *emailControlCenter = | 338 | // KPrefsDialogWidBool *emailControlCenter = |
338 | // addWidBool(i18n("&Use email settings from Control Center"), | 339 | // addWidBool(i18n("&Use email settings from Control Center"), |
339 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 340 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
340 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 341 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
341 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 342 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
342 | // SLOT(toggleEmailSettings(bool))); | 343 | // SLOT(toggleEmailSettings(bool))); |
343 | 344 | ||
344 | mNameEdit = new QLineEdit(topFrame); | 345 | mNameEdit = new QLineEdit(topFrame); |
345 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 346 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
346 | topLayout->addWidget(mNameLabel,0,0); | 347 | topLayout->addWidget(mNameLabel,0,0); |
347 | topLayout->addWidget(mNameEdit,0,1); | 348 | topLayout->addWidget(mNameEdit,0,1); |
348 | 349 | ||
349 | mEmailEdit = new QLineEdit(topFrame); | 350 | mEmailEdit = new QLineEdit(topFrame); |
350 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 351 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
351 | topLayout->addWidget(mEmailLabel,1,0); | 352 | topLayout->addWidget(mEmailLabel,1,0); |
352 | topLayout->addWidget(mEmailEdit,1,1); | 353 | topLayout->addWidget(mEmailEdit,1,1); |
353 | KPrefsDialogWidBool *wb; | 354 | KPrefsDialogWidBool *wb; |
354 | QHBox *dummy; | 355 | QHBox *dummy; |
355 | if ( QApplication::desktop()->width() > 480 ) { | 356 | if ( QApplication::desktop()->width() > 480 ) { |
356 | dummy = new QHBox(topFrame); | 357 | dummy = new QHBox(topFrame); |
357 | } else { | 358 | } else { |
358 | dummy = new QVBox(topFrame); | 359 | dummy = new QVBox(topFrame); |
359 | } | 360 | } |
360 | 361 | ||
361 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 362 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
362 | addWidBool(i18n("Full menu bar(nr)"), | 363 | addWidBool(i18n("Full menu bar(nr)"), |
363 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 364 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
364 | 365 | ||
365 | 366 | ||
366 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 367 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
367 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 368 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
368 | 369 | ||
369 | 370 | ||
370 | dummy = new QHBox(topFrame); | 371 | dummy = new QHBox(topFrame); |
371 | new QLabel(i18n("Days in What's Next:"),dummy); | 372 | new QLabel(i18n("Days in What's Next:"),dummy); |
372 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 373 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
373 | 374 | ||
374 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 375 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
375 | 376 | ||
376 | 377 | ||
377 | 378 | ||
378 | dummy = new QHBox(topFrame); | 379 | dummy = new QHBox(topFrame); |
379 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 380 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
380 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 381 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
381 | 382 | ||
382 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 383 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
383 | 384 | ||
384 | QHBox *prioBox = new QHBox(topFrame); | 385 | QHBox *prioBox = new QHBox(topFrame); |
385 | // intervalBox->setSpacing(spacingHint()); | 386 | // intervalBox->setSpacing(spacingHint()); |
386 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 387 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
387 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 388 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
388 | 389 | ||
389 | if ( QApplication::desktop()->width() < 300 ) | 390 | if ( QApplication::desktop()->width() < 300 ) |
390 | messa = i18n("Show topmost todo prios in What's N.:"); | 391 | messa = i18n("Show topmost todo prios in What's N.:"); |
391 | QLabel *prioLabel = new QLabel(messa, prioBox); | 392 | QLabel *prioLabel = new QLabel(messa, prioBox); |
392 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 393 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
393 | if ( QApplication::desktop()->width() < 300 ) | 394 | if ( QApplication::desktop()->width() < 300 ) |
394 | mPrioSpin->setFixedWidth( 40 ); | 395 | mPrioSpin->setFixedWidth( 40 ); |
395 | 396 | ||
396 | // KPrefsDialogWidBool *bcc = | 397 | // KPrefsDialogWidBool *bcc = |
397 | // addWidBool(i18n("Send copy to owner when mailing events"), | 398 | // addWidBool(i18n("Send copy to owner when mailing events"), |
398 | // &(KOPrefs::instance()->mBcc),topFrame); | 399 | // &(KOPrefs::instance()->mBcc),topFrame); |
399 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 400 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
400 | 401 | ||
401 | 402 | ||
402 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 403 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
403 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 404 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
404 | 405 | ||
405 | // addWidBool(i18n("Enable automatic saving of calendar"), | 406 | // addWidBool(i18n("Enable automatic saving of calendar"), |
406 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 407 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
407 | 408 | ||
408 | QHBox *intervalBox = new QHBox(topFrame); | 409 | QHBox *intervalBox = new QHBox(topFrame); |
409 | // intervalBox->setSpacing(spacingHint()); | 410 | // intervalBox->setSpacing(spacingHint()); |
410 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 411 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
411 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 412 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
412 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 413 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
413 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 414 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
414 | /* | 415 | /* |
415 | QHBox * agendasize = new QHBox ( topFrame ); | 416 | QHBox * agendasize = new QHBox ( topFrame ); |
416 | 417 | ||
417 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 418 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
418 | 419 | ||
419 | 420 | ||
420 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 421 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
421 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 422 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
422 | */ | 423 | */ |
423 | KPrefsDialogWidBool *verticalScreen = | 424 | KPrefsDialogWidBool *verticalScreen = |
424 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 425 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
425 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 426 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
426 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 427 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
427 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); | 428 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); |
428 | 429 | ||
429 | KPrefsDialogWidBool *ask = | 430 | KPrefsDialogWidBool *ask = |
430 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 431 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
431 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 432 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
432 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); | 433 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); |
433 | 434 | ||
434 | 435 | ||
435 | /* | 436 | /* |
436 | KPrefsDialogWidBool *confirmCheck = | 437 | KPrefsDialogWidBool *confirmCheck = |
437 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 438 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
438 | topFrame); | 439 | topFrame); |
439 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 440 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
440 | 441 | ||
441 | 442 | ||
442 | mEnableGroupScheduling = | 443 | mEnableGroupScheduling = |
443 | addWidBool(i18n("Enable group scheduling"), | 444 | addWidBool(i18n("Enable group scheduling"), |
444 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 445 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
445 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 446 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
446 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 447 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
447 | SLOT(warningGroupScheduling())); | 448 | SLOT(warningGroupScheduling())); |
448 | 449 | ||
449 | mEnableProjectView = | 450 | mEnableProjectView = |
450 | addWidBool(i18n("Enable project view"), | 451 | addWidBool(i18n("Enable project view"), |
451 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 452 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
452 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 453 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
453 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 454 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
454 | SLOT(warningProjectView())); | 455 | SLOT(warningProjectView())); |
455 | 456 | ||
456 | // Can't be disabled anymore | 457 | // Can't be disabled anymore |
457 | mEnableGroupScheduling->checkBox()->hide(); | 458 | mEnableGroupScheduling->checkBox()->hide(); |
458 | 459 | ||
459 | // Disable setting, because this feature now becomes stable | 460 | // Disable setting, because this feature now becomes stable |
460 | mEnableProjectView->checkBox()->hide(); | 461 | mEnableProjectView->checkBox()->hide(); |
461 | 462 | ||
462 | KPrefsDialogWidRadios *defaultFormatGroup = | 463 | KPrefsDialogWidRadios *defaultFormatGroup = |
463 | addWidRadios(i18n("Default Calendar Format"), | 464 | addWidRadios(i18n("Default Calendar Format"), |
464 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 465 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
465 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 466 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
466 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 467 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
467 | 468 | ||
468 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 469 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
469 | 470 | ||
470 | // Default format unconditionally is iCalendar | 471 | // Default format unconditionally is iCalendar |
471 | defaultFormatGroup->groupBox()->hide(); | 472 | defaultFormatGroup->groupBox()->hide(); |
472 | 473 | ||
473 | KPrefsDialogWidRadios *mailClientGroup = | 474 | KPrefsDialogWidRadios *mailClientGroup = |
474 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 475 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
475 | topFrame); | 476 | topFrame); |
476 | mailClientGroup->addRadio(i18n("KMail")); | 477 | mailClientGroup->addRadio(i18n("KMail")); |
477 | mailClientGroup->addRadio(i18n("Sendmail")); | 478 | mailClientGroup->addRadio(i18n("Sendmail")); |
478 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 479 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
479 | 480 | ||
480 | KPrefsDialogWidBool *htmlsave = | 481 | KPrefsDialogWidBool *htmlsave = |
481 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 482 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
482 | topFrame); | 483 | topFrame); |
483 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 484 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
484 | 485 | ||
485 | KPrefsDialogWidRadios *destinationGroup = | 486 | KPrefsDialogWidRadios *destinationGroup = |
486 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 487 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
487 | topFrame); | 488 | topFrame); |
488 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 489 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
489 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 490 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
490 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 491 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
491 | 492 | ||
492 | topLayout->setRowStretch(14,1); | 493 | topLayout->setRowStretch(14,1); |
493 | */ | 494 | */ |
494 | } | 495 | } |
495 | 496 | ||
496 | 497 | ||
497 | void KOPrefsDialog::setupTimeTab() | 498 | void KOPrefsDialog::setupTimeTab() |
498 | { | 499 | { |
499 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 500 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
500 | // DesktopIcon("clock",KIcon::SizeMedium)); | 501 | // DesktopIcon("clock",KIcon::SizeMedium)); |
501 | 502 | ||
502 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 503 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
503 | topLayout->setSpacing(spacingHint()); | 504 | topLayout->setSpacing(spacingHint()); |
504 | topLayout->setMargin(marginHint()); | 505 | topLayout->setMargin(marginHint()); |
505 | 506 | ||
506 | QHBox *dummy = new QHBox(topFrame); | 507 | QHBox *dummy = new QHBox(topFrame); |
507 | KPrefsDialogWidTime *dayBegins = | 508 | KPrefsDialogWidTime *dayBegins = |
508 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 509 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
509 | dummy); | 510 | dummy); |
510 | //topLayout->addWidget(dayBegins->label(),2,0); | 511 | //topLayout->addWidget(dayBegins->label(),2,0); |
511 | 512 | ||
512 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 513 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
513 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 514 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
514 | 515 | ||
515 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 516 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
516 | topFrame),1,0); | 517 | topFrame),1,0); |
517 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 518 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
518 | mStartTimeSpin->setSuffix(":00"); | 519 | mStartTimeSpin->setSuffix(":00"); |
519 | topLayout->addWidget(mStartTimeSpin,1,1); | 520 | topLayout->addWidget(mStartTimeSpin,1,1); |
520 | 521 | ||
521 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 522 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
522 | topFrame),2,0); | 523 | topFrame),2,0); |
523 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 524 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
524 | mDefaultDurationSpin->setSuffix(":00"); | 525 | mDefaultDurationSpin->setSuffix(":00"); |
525 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 526 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
526 | 527 | ||
527 | QStringList alarmList; | 528 | QStringList alarmList; |
528 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 529 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
529 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 530 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
530 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 531 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
531 | 3,0); | 532 | 3,0); |
532 | mAlarmTimeCombo = new QComboBox(topFrame); | 533 | mAlarmTimeCombo = new QComboBox(topFrame); |
533 | mAlarmTimeCombo->insertStringList(alarmList); | 534 | mAlarmTimeCombo->insertStringList(alarmList); |
534 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 535 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
535 | 536 | ||
536 | 537 | ||
537 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 538 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
538 | i18n("Working Hours"), | 539 | i18n("Working Hours"), |
539 | topFrame); | 540 | topFrame); |
540 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 541 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
541 | workingHoursGroup->layout()->setSpacing( 0 ); | 542 | workingHoursGroup->layout()->setSpacing( 0 ); |
542 | workingHoursGroup->layout()->setMargin( 4 ); | 543 | workingHoursGroup->layout()->setMargin( 4 ); |
543 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 544 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
544 | // workStartBox->setMargin( 0 ); | 545 | // workStartBox->setMargin( 0 ); |
545 | addWidTime(i18n("Daily starting hour:"), | 546 | addWidTime(i18n("Daily starting hour:"), |
546 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 547 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
547 | 548 | ||
548 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 549 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
549 | //workEndBox->setMargin( 0 ); | 550 | //workEndBox->setMargin( 0 ); |
550 | addWidTime(i18n("Daily ending hour:"), | 551 | addWidTime(i18n("Daily ending hour:"), |
551 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 552 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
552 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 553 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
553 | //excludeBox->setMargin( 0 ); | 554 | //excludeBox->setMargin( 0 ); |
554 | addWidBool(i18n("Exclude holidays"), | 555 | addWidBool(i18n("Exclude holidays"), |
555 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 556 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
556 | 557 | ||
557 | addWidBool(i18n("Exclude Saturdays"), | 558 | addWidBool(i18n("Exclude Saturdays"), |
558 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 559 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
559 | 560 | ||
560 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 561 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
561 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 562 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
562 | // topFrame); | 563 | // topFrame); |
563 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 564 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
564 | 565 | ||
565 | // topLayout->setRowStretch(6,1); | 566 | // topLayout->setRowStretch(6,1); |
566 | } | 567 | } |
567 | 568 | ||
568 | 569 | ||
569 | void KOPrefsDialog::setupViewsTab() | 570 | void KOPrefsDialog::setupViewsTab() |
570 | { | 571 | { |
571 | 572 | ||
572 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 573 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
573 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 574 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
574 | 575 | ||
575 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 576 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
576 | topLayout->setSpacing(spacingHint()); | 577 | topLayout->setSpacing(spacingHint()); |
577 | topLayout->setMargin(marginHint()); | 578 | topLayout->setMargin(marginHint()); |
578 | 579 | ||
579 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 580 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
580 | // topLayout->addLayout(dayBeginsLayout,0,0); | 581 | // topLayout->addLayout(dayBeginsLayout,0,0); |
581 | 582 | ||
582 | // KPrefsDialogWidTime *dayBegins = | 583 | // KPrefsDialogWidTime *dayBegins = |
583 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 584 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
584 | // topFrame); | 585 | // topFrame); |
585 | // dayBeginsLayout->addWidget(dayBegins->label()); | 586 | // dayBeginsLayout->addWidget(dayBegins->label()); |
586 | // dayBeginsLayout->addStretch(1); | 587 | // dayBeginsLayout->addStretch(1); |
587 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 588 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
588 | 589 | ||
589 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 590 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
590 | // topLayout->addLayout(nextDaysLayout,1,0); | 591 | // topLayout->addLayout(nextDaysLayout,1,0); |
591 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 592 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
592 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 593 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
593 | // nextDaysLayout->addStretch(1); | 594 | // nextDaysLayout->addStretch(1); |
594 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 595 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
595 | 596 | ||
596 | 597 | ||
597 | int ii = 0; | 598 | int ii = 0; |
598 | KPrefsDialogWidBool *dummy = | 599 | KPrefsDialogWidBool *dummy = |
599 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 600 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
600 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 601 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
601 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 602 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
602 | 603 | ||
603 | dummy = | 604 | dummy = |
604 | addWidBool(i18n("Highlight current day in agenda"), | 605 | addWidBool(i18n("Highlight current day in agenda"), |
605 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 606 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
606 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 607 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
607 | 608 | ||
608 | dummy = | 609 | dummy = |
609 | addWidBool(i18n("Use light color for highlight current day"), | 610 | addWidBool(i18n("Use light color for highlight current day"), |
610 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 611 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
611 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 612 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
612 | 613 | ||
613 | KPrefsDialogWidBool *dailyRecur = | 614 | KPrefsDialogWidBool *dailyRecur = |
614 | addWidBool(i18n("Show events that recur daily in date nav."), | 615 | addWidBool(i18n("Show events that recur daily in date nav."), |
615 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 616 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
616 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 617 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
617 | 618 | ||
618 | KPrefsDialogWidBool *weeklyRecur = | 619 | KPrefsDialogWidBool *weeklyRecur = |
619 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 620 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
620 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 621 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
621 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 622 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
622 | if ( QApplication::desktop()->width() > 640 ) { | 623 | if ( QApplication::desktop()->width() > 640 ) { |
623 | 624 | ||
624 | KPrefsDialogWidBool *enableToolTips = | 625 | KPrefsDialogWidBool *enableToolTips = |
625 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 626 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
626 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 627 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
627 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 628 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
628 | 629 | ||
629 | } | 630 | } |
630 | 631 | ||
631 | KPrefsDialogWidBool *marcusBainsEnabled = | 632 | KPrefsDialogWidBool *marcusBainsEnabled = |
632 | addWidBool(i18n("Show Marcus Bains line"), | 633 | addWidBool(i18n("Show Marcus Bains line"), |
633 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 634 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
634 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 635 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
635 | 636 | ||
636 | 637 | ||
637 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 638 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
638 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 639 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
639 | //topLayout->setRowStretch(11,1); | 640 | //topLayout->setRowStretch(11,1); |
640 | 641 | ||
641 | 642 | ||
642 | 643 | ||
643 | 644 | ||
644 | 645 | ||
645 | 646 | ||
646 | topFrame = addPage(i18n("ViewChange"),0,0); | 647 | topFrame = addPage(i18n("ViewChange"),0,0); |
647 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 648 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
648 | 649 | ||
649 | topLayout = new QGridLayout(topFrame,6,1); | 650 | topLayout = new QGridLayout(topFrame,6,1); |
650 | topLayout->setSpacing(spacingHint()); | 651 | topLayout->setSpacing(spacingHint()); |
651 | topLayout->setMargin(marginHint()); | 652 | topLayout->setMargin(marginHint()); |
652 | ii = 0; | 653 | ii = 0; |
653 | 654 | ||
654 | 655 | ||
655 | dummy = | 656 | dummy = |
656 | addWidBool(i18n("Hold fullscreen on view change"), | 657 | addWidBool(i18n("Hold fullscreen on view change"), |
657 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 658 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
658 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 659 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
659 | 660 | ||
660 | dummy = | 661 | dummy = |
661 | addWidBool(i18n("Hold non-fullscreen on view change"), | 662 | addWidBool(i18n("Hold non-fullscreen on view change"), |
662 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 663 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
663 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 664 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
664 | 665 | ||
665 | 666 | ||
666 | KPrefsDialogWidBool *fullViewTodo = | 667 | KPrefsDialogWidBool *fullViewTodo = |
667 | addWidBool(i18n("Event list view uses full window"), | 668 | addWidBool(i18n("Event list view uses full window"), |
668 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 669 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
669 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 670 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
670 | 671 | ||
671 | KPrefsDialogWidBool *fullViewMonth = | 672 | KPrefsDialogWidBool *fullViewMonth = |
672 | addWidBool(i18n("Next days view uses full window"), | 673 | addWidBool(i18n("Next days view uses full window"), |
673 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 674 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
674 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 675 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
675 | 676 | ||
676 | dummy = | 677 | dummy = |
677 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 678 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
678 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 679 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
679 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 680 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
680 | 681 | ||
681 | dummy = | 682 | dummy = |
682 | addWidBool(i18n("Set agenda to current time on change"), | 683 | addWidBool(i18n("Set agenda to current time on change"), |
683 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 684 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
684 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 685 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
685 | 686 | ||
686 | dummy = | 687 | dummy = |
687 | addWidBool(i18n("Listview uses monthly timespan"), | 688 | addWidBool(i18n("Listview uses monthly timespan"), |
688 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 689 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
689 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 690 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
690 | dummy = | 691 | dummy = |
691 | addWidBool(i18n("Highlight selection in Time Edit"), | 692 | addWidBool(i18n("Highlight selection in Time Edit"), |
692 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 693 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
693 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 694 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
694 | 695 | ||
695 | 696 | ||
696 | 697 | ||
697 | 698 | ||
698 | 699 | ||
699 | topFrame = addPage(i18n("Month View"),0,0); | 700 | topFrame = addPage(i18n("Month View"),0,0); |
700 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 701 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
701 | 702 | ||
702 | topLayout = new QGridLayout(topFrame,5,1); | 703 | topLayout = new QGridLayout(topFrame,5,1); |
703 | topLayout->setSpacing(spacingHint()); | 704 | topLayout->setSpacing(spacingHint()); |
704 | topLayout->setMargin(marginHint()); | 705 | topLayout->setMargin(marginHint()); |
705 | ii = 0; | 706 | ii = 0; |
706 | QLabel *lab; | 707 | QLabel *lab; |
707 | QHBox *habo = new QHBox( topFrame ); | 708 | QHBox *habo = new QHBox( topFrame ); |
708 | if ( QApplication::desktop()->width() < 320 ) { | 709 | if ( QApplication::desktop()->width() < 320 ) { |
709 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 710 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
710 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 711 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
711 | ii++; | 712 | ii++; |
712 | 713 | ||
713 | } else { | 714 | } else { |
714 | new QLabel ( i18n("Show events that recur "), habo ); | 715 | new QLabel ( i18n("Show events that recur "), habo ); |
715 | 716 | ||
716 | } | 717 | } |
717 | dailyRecur = | 718 | dailyRecur = |
718 | addWidBool(i18n("daily"), | 719 | addWidBool(i18n("daily"), |
719 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 720 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
720 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 721 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
721 | 722 | ||
722 | weeklyRecur = | 723 | weeklyRecur = |
723 | addWidBool(i18n("weekly"), | 724 | addWidBool(i18n("weekly"), |
724 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 725 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
725 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 726 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
726 | ii++; | 727 | ii++; |
727 | 728 | ||
728 | 729 | ||
729 | habo = new QHBox( topFrame ); | 730 | habo = new QHBox( topFrame ); |
730 | if ( QApplication::desktop()->width() < 320 ) { | 731 | if ( QApplication::desktop()->width() < 320 ) { |
731 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 732 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
732 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 733 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
733 | ii++; | 734 | ii++; |
734 | 735 | ||
735 | } else { | 736 | } else { |
736 | new QLabel ( i18n("Show in every cell "), habo ); | 737 | new QLabel ( i18n("Show in every cell "), habo ); |
737 | } | 738 | } |
738 | weeklyRecur = | 739 | weeklyRecur = |
739 | addWidBool(i18n("short month"), | 740 | addWidBool(i18n("short month"), |
740 | &(KOPrefs::instance()->mMonthShowShort),habo); | 741 | &(KOPrefs::instance()->mMonthShowShort),habo); |
741 | weeklyRecur = | 742 | weeklyRecur = |
742 | addWidBool(i18n("icons"), | 743 | addWidBool(i18n("icons"), |
743 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 744 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
744 | 745 | ||
745 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 746 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
746 | ii++; | 747 | ii++; |
747 | #ifdef DESKTOP_VERSION | 748 | #ifdef DESKTOP_VERSION |
748 | KPrefsDialogWidBool *enableMonthScroll = | 749 | KPrefsDialogWidBool *enableMonthScroll = |
749 | addWidBool(i18n("Enable scrollbars in month view cells"), | 750 | addWidBool(i18n("Enable scrollbars in month view cells"), |
750 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 751 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
751 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 752 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
752 | #endif | 753 | #endif |
753 | 754 | ||
754 | dummy = | 755 | dummy = |
755 | addWidBool(i18n("Show Sat/Sun together"), | 756 | addWidBool(i18n("Show Sat/Sun together"), |
756 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 757 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
757 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 758 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
758 | 759 | ||
759 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 760 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
760 | addWidBool(i18n("Month view uses category colors"), | 761 | addWidBool(i18n("Month view uses category colors"), |
761 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 762 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
762 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 763 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
763 | 764 | ||
764 | dummy = | 765 | dummy = |
765 | addWidBool(i18n("Categorie colors are applied to text"), | 766 | addWidBool(i18n("Categorie colors are applied to text"), |
766 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 767 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
767 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 768 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
768 | coloredCategoriesInMonthView = | 769 | coloredCategoriesInMonthView = |
769 | addWidBool(i18n("Month view uses day colors"), | 770 | addWidBool(i18n("Month view uses day colors"), |
770 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 771 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
771 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 772 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
772 | 773 | ||
773 | KPrefsDialogWidColor *holidayColor = | 774 | KPrefsDialogWidColor *holidayColor = |
774 | addWidColor(i18n("Day color odd months"), | 775 | addWidColor(i18n("Day color odd months"), |
775 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 776 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
776 | topLayout->addWidget(holidayColor->label(),ii,0); | 777 | topLayout->addWidget(holidayColor->label(),ii,0); |
777 | topLayout->addWidget(holidayColor->button(),ii++,1); | 778 | topLayout->addWidget(holidayColor->button(),ii++,1); |
778 | 779 | ||
779 | holidayColor = | 780 | holidayColor = |
780 | addWidColor(i18n("Day color even months"), | 781 | addWidColor(i18n("Day color even months"), |
781 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 782 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
782 | topLayout->addWidget(holidayColor->label(),ii,0); | 783 | topLayout->addWidget(holidayColor->label(),ii,0); |
783 | topLayout->addWidget(holidayColor->button(),ii++,1); | 784 | topLayout->addWidget(holidayColor->button(),ii++,1); |
784 | 785 | ||
785 | 786 | ||
786 | holidayColor = | 787 | holidayColor = |
787 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 788 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
788 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 789 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
789 | topLayout->addWidget(holidayColor->label(),ii,0); | 790 | topLayout->addWidget(holidayColor->label(),ii,0); |
790 | topLayout->addWidget(holidayColor->button(),ii++,1); | 791 | topLayout->addWidget(holidayColor->button(),ii++,1); |
791 | // *********************** What'sNext View | 792 | // *********************** What'sNext View |
792 | topFrame = addPage(i18n("What's Next View"),0,0); | 793 | topFrame = addPage(i18n("What's Next View"),0,0); |
793 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 794 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
794 | 795 | ||
795 | topLayout = new QGridLayout(topFrame,4,1); | 796 | topLayout = new QGridLayout(topFrame,4,1); |
796 | topLayout->setSpacing(spacingHint()); | 797 | topLayout->setSpacing(spacingHint()); |
797 | topLayout->setMargin(marginHint()); | 798 | topLayout->setMargin(marginHint()); |
798 | ii = 0; | 799 | ii = 0; |
799 | KPrefsDialogWidBool *passwdk = | 800 | KPrefsDialogWidBool *passwdk = |
800 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 801 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
801 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 802 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
802 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 803 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
803 | 804 | ||
804 | passwdk = | 805 | passwdk = |
805 | addWidBool(i18n("Show location in What's Next view"), | 806 | addWidBool(i18n("Show location in What's Next view"), |
806 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 807 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
807 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 808 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
808 | 809 | ||
809 | passwdk = | 810 | passwdk = |
810 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 811 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), |
811 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 812 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
812 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 813 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
813 | passwdk = | 814 | passwdk = |
814 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 815 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), |
815 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 816 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
816 | topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); | 817 | topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); |
817 | 818 | ||
818 | // *********************** Todo View | 819 | // *********************** Todo View |
819 | 820 | ||
820 | topFrame = addPage(i18n("Todo View"),0,0); | 821 | topFrame = addPage(i18n("Todo View"),0,0); |
821 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 822 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
822 | 823 | ||
823 | topLayout = new QGridLayout(topFrame,4,1); | 824 | topLayout = new QGridLayout(topFrame,4,1); |
824 | topLayout->setSpacing(spacingHint()); | 825 | topLayout->setSpacing(spacingHint()); |
825 | topLayout->setMargin(marginHint()); | 826 | topLayout->setMargin(marginHint()); |
826 | ii = 0; | 827 | ii = 0; |
827 | 828 | ||
828 | KPrefsDialogWidBool *showCompletedTodo = | 829 | KPrefsDialogWidBool *showCompletedTodo = |
829 | addWidBool(i18n("To-do view shows completed Todos"), | 830 | addWidBool(i18n("To-do view shows completed Todos"), |
830 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 831 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
831 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 832 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
832 | dummy = | 833 | dummy = |
833 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 834 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
834 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 835 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
835 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 836 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
836 | 837 | ||
837 | dummy = | 838 | dummy = |
838 | addWidBool(i18n("Small To-do view uses smaller font"), | 839 | addWidBool(i18n("Small To-do view uses smaller font"), |
839 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 840 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
840 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 841 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
841 | 842 | ||
842 | 843 | ||
843 | 844 | ||
844 | dummy = | 845 | dummy = |
845 | addWidBool(i18n("Todo view uses category colors"), | 846 | addWidBool(i18n("Todo view uses category colors"), |
846 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 847 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
847 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 848 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
848 | 849 | ||
849 | 850 | ||
850 | QWidget* wid = new QWidget( topFrame ); | 851 | QWidget* wid = new QWidget( topFrame ); |
851 | // Todo due today color | 852 | // Todo due today color |
852 | KPrefsDialogWidColor *todoDueTodayColor = | 853 | KPrefsDialogWidColor *todoDueTodayColor = |
853 | addWidColor(i18n("Todo due today color:"), | 854 | addWidColor(i18n("Todo due today color:"), |
854 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 855 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
855 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 856 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
856 | widLayout->addWidget( todoDueTodayColor->label() ); | 857 | widLayout->addWidget( todoDueTodayColor->label() ); |
857 | widLayout->addWidget( todoDueTodayColor->button() ); | 858 | widLayout->addWidget( todoDueTodayColor->button() ); |
858 | topLayout->addWidget(wid,ii++,0); | 859 | topLayout->addWidget(wid,ii++,0); |
859 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 860 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
860 | 861 | ||
861 | // Todo overdue color | 862 | // Todo overdue color |
862 | wid = new QWidget( topFrame ); | 863 | wid = new QWidget( topFrame ); |
863 | widLayout = new QHBoxLayout(wid); | 864 | widLayout = new QHBoxLayout(wid); |
864 | KPrefsDialogWidColor *todoOverdueColor = | 865 | KPrefsDialogWidColor *todoOverdueColor = |
865 | addWidColor(i18n("Todo overdue color:"), | 866 | addWidColor(i18n("Todo overdue color:"), |
866 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 867 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
867 | widLayout->addWidget(todoOverdueColor->label()); | 868 | widLayout->addWidget(todoOverdueColor->label()); |
868 | widLayout->addWidget(todoOverdueColor->button()); | 869 | widLayout->addWidget(todoOverdueColor->button()); |
869 | topLayout->addWidget(wid,ii++,0); | 870 | topLayout->addWidget(wid,ii++,0); |
870 | 871 | ||
871 | dummy = | 872 | dummy = |
872 | addWidBool(i18n("Colors are applied to text"), | 873 | addWidBool(i18n("Colors are applied to text"), |
873 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 874 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
874 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 875 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
875 | 876 | ||
876 | dummy = | 877 | dummy = |
877 | addWidBool(i18n("Allday Agenda view shows todos"), | 878 | addWidBool(i18n("Allday Agenda view shows todos"), |
878 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 879 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
879 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 880 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
880 | 881 | ||
881 | 882 | ||
882 | 883 | ||
883 | 884 | ||
884 | topFrame = addPage(i18n("Alarm"),0,0); | 885 | topFrame = addPage(i18n("Alarm"),0,0); |
885 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 886 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
886 | 887 | ||
887 | topLayout = new QGridLayout(topFrame,2,1); | 888 | topLayout = new QGridLayout(topFrame,2,1); |
888 | topLayout->setSpacing(spacingHint()); | 889 | topLayout->setSpacing(spacingHint()); |
889 | topLayout->setMargin(marginHint()); | 890 | topLayout->setMargin(marginHint()); |
890 | int iii = 0; | 891 | int iii = 0; |
891 | 892 | ||
892 | dummy = | 893 | dummy = |
893 | addWidBool(i18n("Use internal alarm notification"), | 894 | addWidBool(i18n("Use internal alarm notification"), |
894 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 895 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
895 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 896 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
896 | 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); | 897 | 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); |
897 | 898 | ||
898 | topLayout->addWidget(lab ,iii++,0); | 899 | topLayout->addWidget(lab ,iii++,0); |
899 | #ifndef DESKTOP_VERSION | 900 | #ifndef DESKTOP_VERSION |
900 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 901 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
901 | #else | 902 | #else |
902 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 903 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
903 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 904 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
904 | #endif | 905 | #endif |
905 | 906 | ||
906 | QHBox* dummyBox = new QHBox(topFrame); | 907 | QHBox* dummyBox = new QHBox(topFrame); |
907 | new QLabel(i18n("Play beeps count:"),dummyBox); | 908 | new QLabel(i18n("Play beeps count:"),dummyBox); |
908 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 909 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
909 | topLayout->addWidget(dummyBox,iii++,0); | 910 | topLayout->addWidget(dummyBox,iii++,0); |
910 | 911 | ||
911 | dummyBox = new QHBox(topFrame); | 912 | dummyBox = new QHBox(topFrame); |
912 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 913 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
913 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 914 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
914 | topLayout->addWidget(dummyBox,iii++,0); | 915 | topLayout->addWidget(dummyBox,iii++,0); |
915 | 916 | ||
916 | dummyBox = new QHBox(topFrame); | 917 | dummyBox = new QHBox(topFrame); |
917 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 918 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
918 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 919 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
919 | topLayout->addWidget(dummyBox,iii++,0); | 920 | topLayout->addWidget(dummyBox,iii++,0); |
920 | 921 | ||
921 | dummyBox = new QHBox(topFrame); | 922 | dummyBox = new QHBox(topFrame); |
922 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 923 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
923 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 924 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
924 | topLayout->addWidget(dummyBox,iii++,0); | 925 | topLayout->addWidget(dummyBox,iii++,0); |
925 | 926 | ||
926 | 927 | ||
927 | 928 | ||
928 | 929 | ||
929 | 930 | ||
930 | 931 | ||
931 | 932 | ||
932 | QHBox* hbo = new QHBox ( topFrame ); | 933 | QHBox* hbo = new QHBox ( topFrame ); |
933 | mDefaultAlarmFile = new QLineEdit(hbo); | 934 | mDefaultAlarmFile = new QLineEdit(hbo); |
934 | QPushButton * loadTemplate = new QPushButton(hbo); | 935 | QPushButton * loadTemplate = new QPushButton(hbo); |
935 | QPixmap icon; | 936 | QPixmap icon; |
936 | if ( QApplication::desktop()->width() < 321 ) | 937 | if ( QApplication::desktop()->width() < 321 ) |
937 | icon = SmallIcon("fileimport16"); | 938 | icon = SmallIcon("fileimport16"); |
938 | else | 939 | else |
939 | icon = SmallIcon("fileimport"); | 940 | icon = SmallIcon("fileimport"); |
940 | loadTemplate->setIconSet (icon ) ; | 941 | loadTemplate->setIconSet (icon ) ; |
941 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 942 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
942 | int size = loadTemplate->sizeHint().height(); | 943 | int size = loadTemplate->sizeHint().height(); |
943 | loadTemplate->setFixedSize( size, size ); | 944 | loadTemplate->setFixedSize( size, size ); |
944 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 945 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
945 | // topLayout->addWidget(lab ,iii++,0); | 946 | // topLayout->addWidget(lab ,iii++,0); |
946 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 947 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
947 | topLayout->addWidget(lab ,iii++,0); | 948 | topLayout->addWidget(lab ,iii++,0); |
948 | topLayout->addWidget(hbo,iii++,0); | 949 | topLayout->addWidget(hbo,iii++,0); |
949 | // 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); | 950 | // 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); |
950 | 951 | ||
951 | // topLayout->addWidget(lab ,iii++,0); | 952 | // topLayout->addWidget(lab ,iii++,0); |
952 | // #ifndef DESKTOP_VERSION | 953 | // #ifndef DESKTOP_VERSION |
953 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 954 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
954 | // #else | 955 | // #else |
955 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 956 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
956 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 957 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
957 | // #endif | 958 | // #endif |
958 | 959 | ||
959 | 960 | ||
960 | } | 961 | } |
961 | 962 | ||
962 | void KOPrefsDialog::selectSoundFile() | 963 | void KOPrefsDialog::selectSoundFile() |
963 | { | 964 | { |
964 | QString fileName = mDefaultAlarmFile->text(); | 965 | QString fileName = mDefaultAlarmFile->text(); |
965 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 966 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
966 | if ( fileName.length() > 0 ) | 967 | if ( fileName.length() > 0 ) |
967 | mDefaultAlarmFile->setText( fileName ); | 968 | mDefaultAlarmFile->setText( fileName ); |
968 | } | 969 | } |
969 | void KOPrefsDialog::setupFontsTab() | 970 | void KOPrefsDialog::setupFontsTab() |
970 | { | 971 | { |
971 | 972 | ||
972 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 973 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
973 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 974 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
974 | 975 | ||
975 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 976 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
976 | topLayout->setSpacing(1); | 977 | topLayout->setSpacing(1); |
977 | topLayout->setMargin(3); | 978 | topLayout->setMargin(3); |
978 | KPrefsDialogWidFont * tVFont; | 979 | KPrefsDialogWidFont * tVFont; |
979 | int i = 0; | 980 | int i = 0; |
980 | KPrefsDialogWidFont *timeLabelsFont = | 981 | KPrefsDialogWidFont *timeLabelsFont = |
981 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 982 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
982 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 983 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
983 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 984 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
984 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 985 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
985 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 986 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
986 | ++i; | 987 | ++i; |
987 | 988 | ||
988 | 989 | ||
989 | timeLabelsFont = | 990 | timeLabelsFont = |
990 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 991 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
991 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 992 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
992 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 993 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
993 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 994 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
994 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 995 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
995 | ++i; | 996 | ++i; |
996 | 997 | ||
997 | KPrefsDialogWidFont *timeBarFont = | 998 | KPrefsDialogWidFont *timeBarFont = |
998 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), | 999 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), |
999 | &(KOPrefs::instance()->mTimeBarFont),topFrame); | 1000 | &(KOPrefs::instance()->mTimeBarFont),topFrame); |
1000 | topLayout->addWidget(timeBarFont->label(),i,0); | 1001 | topLayout->addWidget(timeBarFont->label(),i,0); |
1001 | topLayout->addWidget(timeBarFont->preview(),i,1); | 1002 | topLayout->addWidget(timeBarFont->preview(),i,1); |
1002 | topLayout->addWidget(timeBarFont->button(),i,2); | 1003 | topLayout->addWidget(timeBarFont->button(),i,2); |
1003 | ++i; | 1004 | ++i; |
1004 | 1005 | ||
1005 | 1006 | ||
1006 | KPrefsDialogWidFont *marcusBainsFont = | 1007 | KPrefsDialogWidFont *marcusBainsFont = |
1007 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), | 1008 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), |
1008 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); | 1009 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); |
1009 | topLayout->addWidget(marcusBainsFont->label(),i,0); | 1010 | topLayout->addWidget(marcusBainsFont->label(),i,0); |
1010 | topLayout->addWidget(marcusBainsFont->preview(),i,1); | 1011 | topLayout->addWidget(marcusBainsFont->preview(),i,1); |
1011 | topLayout->addWidget(marcusBainsFont->button(),i,2); | 1012 | topLayout->addWidget(marcusBainsFont->button(),i,2); |
1012 | ++i; | 1013 | ++i; |
1013 | 1014 | ||
1014 | tVFont = | 1015 | tVFont = |
1015 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), | 1016 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), |
1016 | &(KOPrefs::instance()->mEventViewFont),topFrame); | 1017 | &(KOPrefs::instance()->mEventViewFont),topFrame); |
1017 | topLayout->addWidget(tVFont->label(),i,0); | 1018 | topLayout->addWidget(tVFont->label(),i,0); |
1018 | topLayout->addWidget(tVFont->preview(),i,1); | 1019 | topLayout->addWidget(tVFont->preview(),i,1); |
1019 | topLayout->addWidget(tVFont->button(),i,2); | 1020 | topLayout->addWidget(tVFont->button(),i,2); |
1020 | ++i; | 1021 | ++i; |
1021 | 1022 | ||
1022 | 1023 | ||
1023 | 1024 | ||
1024 | tVFont = | 1025 | tVFont = |
1025 | addWidFont(i18n("Details"),i18n("EditorBox:"), | 1026 | addWidFont(i18n("Details"),i18n("EditorBox:"), |
1026 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1027 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1027 | topLayout->addWidget(tVFont->label(),i,0); | 1028 | topLayout->addWidget(tVFont->label(),i,0); |
1028 | topLayout->addWidget(tVFont->preview(),i,1); | 1029 | topLayout->addWidget(tVFont->preview(),i,1); |
1029 | topLayout->addWidget(tVFont->button(),i,2); | 1030 | topLayout->addWidget(tVFont->button(),i,2); |
1030 | ++i; | 1031 | ++i; |
1031 | 1032 | ||
1032 | 1033 | ||
1033 | 1034 | ||
1034 | topLayout->setColStretch(1,1); | 1035 | topLayout->setColStretch(1,1); |
1035 | topLayout->setRowStretch(4,1); | 1036 | topLayout->setRowStretch(4,1); |
1036 | 1037 | ||
1037 | 1038 | ||
1038 | i = 0; | 1039 | i = 0; |
1039 | topFrame = addPage(i18n("View Fonts"),0, | 1040 | topFrame = addPage(i18n("View Fonts"),0, |
1040 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1041 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1041 | 1042 | ||
1042 | topLayout = new QGridLayout(topFrame,7,3); | 1043 | topLayout = new QGridLayout(topFrame,7,3); |
1043 | topLayout->setSpacing(1); | 1044 | topLayout->setSpacing(1); |
1044 | topLayout->setMargin(3); | 1045 | topLayout->setMargin(3); |
1045 | 1046 | ||
1046 | tVFont = | 1047 | tVFont = |
1047 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1048 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1048 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1049 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1049 | topLayout->addWidget(tVFont->label(),i,0); | 1050 | topLayout->addWidget(tVFont->label(),i,0); |
1050 | topLayout->addWidget(tVFont->preview(),i,1); | 1051 | topLayout->addWidget(tVFont->preview(),i,1); |
1051 | topLayout->addWidget(tVFont->button(),i,2); | 1052 | topLayout->addWidget(tVFont->button(),i,2); |
1052 | ++i; | 1053 | ++i; |
1053 | KPrefsDialogWidFont *agendaViewFont = | 1054 | KPrefsDialogWidFont *agendaViewFont = |
1054 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1055 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1055 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1056 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1056 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1057 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1057 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1058 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1058 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1059 | topLayout->addWidget(agendaViewFont->button(),i,2); |
1059 | ++i; | 1060 | ++i; |
1060 | 1061 | ||
1061 | 1062 | ||
1062 | KPrefsDialogWidFont *monthViewFont = | 1063 | KPrefsDialogWidFont *monthViewFont = |
1063 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), | 1064 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), |
1064 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); | 1065 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); |
1065 | topLayout->addWidget(monthViewFont->label(),i,0); | 1066 | topLayout->addWidget(monthViewFont->label(),i,0); |
1066 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1067 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1067 | topLayout->addWidget(monthViewFont->button(),i,2); | 1068 | topLayout->addWidget(monthViewFont->button(),i,2); |
1068 | ++i; | 1069 | ++i; |
1069 | 1070 | ||
1070 | 1071 | ||
1071 | KPrefsDialogWidFont *lVFont = | 1072 | KPrefsDialogWidFont *lVFont = |
1072 | addWidFont(i18n("Event"),i18n("List View:"), | 1073 | addWidFont(i18n("Event"),i18n("List View:"), |
1073 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1074 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1074 | topLayout->addWidget(lVFont->label(),i,0); | 1075 | topLayout->addWidget(lVFont->label(),i,0); |
1075 | topLayout->addWidget(lVFont->preview(),i,1); | 1076 | topLayout->addWidget(lVFont->preview(),i,1); |
1076 | topLayout->addWidget(lVFont->button(),i,2); | 1077 | topLayout->addWidget(lVFont->button(),i,2); |
1077 | ++i; | 1078 | ++i; |
1078 | 1079 | ||
1079 | 1080 | ||
1080 | tVFont = | 1081 | tVFont = |
1081 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1082 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1082 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1083 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1083 | topLayout->addWidget(tVFont->label(),i,0); | 1084 | topLayout->addWidget(tVFont->label(),i,0); |
1084 | topLayout->addWidget(tVFont->preview(),i,1); | 1085 | topLayout->addWidget(tVFont->preview(),i,1); |
1085 | topLayout->addWidget(tVFont->button(),i,2); | 1086 | topLayout->addWidget(tVFont->button(),i,2); |
1086 | ++i; | 1087 | ++i; |
1087 | 1088 | ||
1088 | 1089 | ||
1089 | tVFont = | 1090 | tVFont = |
1090 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1091 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1091 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1092 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1092 | topLayout->addWidget(tVFont->label(),i,0); | 1093 | topLayout->addWidget(tVFont->label(),i,0); |
1093 | topLayout->addWidget(tVFont->preview(),i,1); | 1094 | topLayout->addWidget(tVFont->preview(),i,1); |
1094 | topLayout->addWidget(tVFont->button(),i,2); | 1095 | topLayout->addWidget(tVFont->button(),i,2); |
1095 | ++i; | 1096 | ++i; |
1096 | 1097 | ||
1097 | 1098 | ||
1098 | 1099 | ||
1099 | 1100 | ||
1100 | topLayout->setColStretch(1,1); | 1101 | topLayout->setColStretch(1,1); |
1101 | topLayout->setRowStretch(4,1); | 1102 | topLayout->setRowStretch(4,1); |
1102 | 1103 | ||
1103 | 1104 | ||
1104 | 1105 | ||
1105 | 1106 | ||
1106 | } | 1107 | } |
1107 | 1108 | ||
1108 | void KOPrefsDialog::setupColorsTab() | 1109 | void KOPrefsDialog::setupColorsTab() |
1109 | { | 1110 | { |
1110 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1111 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1111 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1112 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1112 | 1113 | ||
1113 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1114 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1114 | // topLayout->setSpacing(spacingHint()); | 1115 | // topLayout->setSpacing(spacingHint()); |
1115 | // topLayout->setMargin(marginHint()); | 1116 | // topLayout->setMargin(marginHint()); |
1116 | 1117 | ||
1117 | topLayout->setSpacing(2); | 1118 | topLayout->setSpacing(2); |
1118 | topLayout->setMargin(3); | 1119 | topLayout->setMargin(3); |
1119 | 1120 | ||
1120 | int ii = 1; | 1121 | int ii = 1; |
1121 | QGroupBox *categoryGroup ; | 1122 | QGroupBox *categoryGroup ; |
1122 | 1123 | ||
1123 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1124 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1124 | topFrame); | 1125 | topFrame); |
1125 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1126 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1126 | 1127 | ||
1127 | mCategoryCombo = new QComboBox(categoryGroup); | 1128 | mCategoryCombo = new QComboBox(categoryGroup); |
1128 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1129 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1129 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1130 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1130 | 1131 | ||
1131 | mCategoryButton = new KColorButton(categoryGroup); | 1132 | mCategoryButton = new KColorButton(categoryGroup); |
1132 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1133 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1133 | updateCategoryColor(); | 1134 | updateCategoryColor(); |
1134 | 1135 | ||
1135 | 1136 | ||
1136 | // Holiday Color | 1137 | // Holiday Color |
1137 | 1138 | ||
1138 | KPrefsDialogWidColor *holidayColor = | 1139 | KPrefsDialogWidColor *holidayColor = |
1139 | addWidColor(i18n("Holiday color:"), | 1140 | addWidColor(i18n("Holiday color:"), |
1140 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1141 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1141 | topLayout->addWidget(holidayColor->label(),ii,0); | 1142 | topLayout->addWidget(holidayColor->label(),ii,0); |
1142 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1143 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1143 | 1144 | ||
1144 | // Highlight Color | 1145 | // Highlight Color |
1145 | KPrefsDialogWidColor *highlightColor = | 1146 | KPrefsDialogWidColor *highlightColor = |
1146 | addWidColor(i18n("Highlight color:"), | 1147 | addWidColor(i18n("Highlight color:"), |
1147 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1148 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1148 | topLayout->addWidget(highlightColor->label(),ii,0); | 1149 | topLayout->addWidget(highlightColor->label(),ii,0); |
1149 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1150 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1150 | 1151 | ||
1151 | // Event color | 1152 | // Event color |
1152 | KPrefsDialogWidColor *eventColor = | 1153 | KPrefsDialogWidColor *eventColor = |
1153 | addWidColor(i18n("Default event color:"), | 1154 | addWidColor(i18n("Default event color:"), |
1154 | &(KOPrefs::instance()->mEventColor),topFrame); | 1155 | &(KOPrefs::instance()->mEventColor),topFrame); |
1155 | topLayout->addWidget(eventColor->label(),ii,0); | 1156 | topLayout->addWidget(eventColor->label(),ii,0); |
1156 | topLayout->addWidget(eventColor->button(),ii++,1); | 1157 | topLayout->addWidget(eventColor->button(),ii++,1); |
1157 | 1158 | ||
1158 | // agenda view background color | 1159 | // agenda view background color |
1159 | KPrefsDialogWidColor *agendaBgColor = | 1160 | KPrefsDialogWidColor *agendaBgColor = |
1160 | addWidColor(i18n("Agenda view background color:"), | 1161 | addWidColor(i18n("Agenda view background color:"), |
1161 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1162 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1162 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1163 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1163 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1164 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1164 | 1165 | ||
1165 | // working hours color | 1166 | // working hours color |
1166 | KPrefsDialogWidColor *workingHoursColor = | 1167 | KPrefsDialogWidColor *workingHoursColor = |
1167 | addWidColor(i18n("Working hours color:"), | 1168 | addWidColor(i18n("Working hours color:"), |
1168 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1169 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1169 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1170 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1170 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1171 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1171 | 1172 | ||
1172 | KPrefsDialogWidBool *sb = | 1173 | KPrefsDialogWidBool *sb = |
1173 | addWidBool(i18n("Use colors for application:"), | 1174 | addWidBool(i18n("Use colors for application:"), |
1174 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1175 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1175 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1176 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1176 | 1177 | ||
1177 | ii++; | 1178 | ii++; |
1178 | KPrefsDialogWidColor * workingHoursColor1 = | 1179 | KPrefsDialogWidColor * workingHoursColor1 = |
1179 | addWidColor(i18n("Buttons, menus, etc.:"), | 1180 | addWidColor(i18n("Buttons, menus, etc.:"), |
1180 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1181 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1181 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1182 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1182 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1183 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1183 | 1184 | ||
1184 | KPrefsDialogWidColor * workingHoursColor2 = | 1185 | KPrefsDialogWidColor * workingHoursColor2 = |
1185 | addWidColor(i18n("Frames, labels, etc.:"), | 1186 | addWidColor(i18n("Frames, labels, etc.:"), |
1186 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1187 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1187 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1188 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1188 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1189 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1189 | 1190 | ||
1190 | 1191 | ||
1191 | 1192 | ||
1192 | } | 1193 | } |
1193 | 1194 | ||
1194 | void KOPrefsDialog::setCategoryColor() | 1195 | void KOPrefsDialog::setCategoryColor() |
1195 | { | 1196 | { |
1196 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1197 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1197 | } | 1198 | } |
1198 | 1199 | ||
1199 | void KOPrefsDialog::updateCategoryColor() | 1200 | void KOPrefsDialog::updateCategoryColor() |
1200 | { | 1201 | { |
1201 | QString cat = mCategoryCombo->currentText(); | 1202 | QString cat = mCategoryCombo->currentText(); |
1202 | QColor *color = mCategoryDict.find(cat); | 1203 | QColor *color = mCategoryDict.find(cat); |
1203 | if (!color) { | 1204 | if (!color) { |
1204 | color = KOPrefs::instance()->categoryColor(cat); | 1205 | color = KOPrefs::instance()->categoryColor(cat); |
1205 | } | 1206 | } |
1206 | if (color) { | 1207 | if (color) { |
1207 | mCategoryButton->setColor(*color); | 1208 | mCategoryButton->setColor(*color); |
1208 | } | 1209 | } |
1209 | } | 1210 | } |
1210 | 1211 | ||
1211 | void KOPrefsDialog::setupPrinterTab() | 1212 | void KOPrefsDialog::setupPrinterTab() |
1212 | { | 1213 | { |
1213 | mPrinterTab = addPage(i18n("Printing"),0, | 1214 | mPrinterTab = addPage(i18n("Printing"),0, |
1214 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1215 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1215 | 1216 | ||
1216 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1217 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1217 | topLayout->setSpacing(spacingHint()); | 1218 | topLayout->setSpacing(spacingHint()); |
1218 | topLayout->setMargin(marginHint()); | 1219 | topLayout->setMargin(marginHint()); |
1219 | 1220 | ||
1220 | topLayout->setRowStretch(4,1); | 1221 | topLayout->setRowStretch(4,1); |
1221 | } | 1222 | } |
1222 | 1223 | ||
1223 | void KOPrefsDialog::setupGroupSchedulingTab() | 1224 | void KOPrefsDialog::setupGroupSchedulingTab() |
1224 | { | 1225 | { |
1225 | #if 0 | 1226 | #if 0 |
1226 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1227 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1227 | DesktopIcon("personal",KIcon::SizeMedium)); | 1228 | DesktopIcon("personal",KIcon::SizeMedium)); |
1228 | 1229 | ||
1229 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1230 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1230 | topLayout->setSpacing(spacingHint()); | 1231 | topLayout->setSpacing(spacingHint()); |
1231 | topLayout->setMargin(marginHint()); | 1232 | topLayout->setMargin(marginHint()); |
1232 | 1233 | ||
1233 | #if 0 | 1234 | #if 0 |
1234 | KPrefsDialogWidRadios *schedulerGroup = | 1235 | KPrefsDialogWidRadios *schedulerGroup = |
1235 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1236 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1236 | topFrame); | 1237 | topFrame); |
1237 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1238 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1238 | schedulerGroup->addRadio(i18n("Mail client")); | 1239 | schedulerGroup->addRadio(i18n("Mail client")); |
1239 | 1240 | ||
1240 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1241 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1241 | #endif | 1242 | #endif |
1242 | 1243 | ||
1243 | KPrefsDialogWidRadios *sendGroup = | 1244 | KPrefsDialogWidRadios *sendGroup = |
1244 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1245 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1245 | topFrame); | 1246 | topFrame); |
1246 | sendGroup->addRadio(i18n("Send to outbox")); | 1247 | sendGroup->addRadio(i18n("Send to outbox")); |
1247 | sendGroup->addRadio(i18n("Send directly")); | 1248 | sendGroup->addRadio(i18n("Send directly")); |
1248 | 1249 | ||
1249 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1250 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1250 | 1251 | ||
1251 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1252 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1252 | mAMails = new QListView(topFrame); | 1253 | mAMails = new QListView(topFrame); |
1253 | mAMails->addColumn(i18n("Email"),300); | 1254 | mAMails->addColumn(i18n("Email"),300); |
1254 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1255 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1255 | 1256 | ||
1256 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1257 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1257 | aEmailsEdit = new QLineEdit(topFrame); | 1258 | aEmailsEdit = new QLineEdit(topFrame); |
1258 | aEmailsEdit->setEnabled(false); | 1259 | aEmailsEdit->setEnabled(false); |
1259 | topLayout->addWidget(aEmailsEdit,4,1); | 1260 | topLayout->addWidget(aEmailsEdit,4,1); |
1260 | 1261 | ||
1261 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1262 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1262 | topLayout->addWidget(add,5,0); | 1263 | topLayout->addWidget(add,5,0); |
1263 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1264 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1264 | topLayout->addWidget(del,5,1); | 1265 | topLayout->addWidget(del,5,1); |
1265 | 1266 | ||
1266 | //topLayout->setRowStretch(2,1); | 1267 | //topLayout->setRowStretch(2,1); |
1267 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1268 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1268 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1269 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1269 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1270 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1270 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1271 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1271 | #endif | 1272 | #endif |
1272 | } | 1273 | } |
1273 | 1274 | ||
1274 | void KOPrefsDialog::setupGroupAutomationTab() | 1275 | void KOPrefsDialog::setupGroupAutomationTab() |
1275 | { | 1276 | { |
1276 | return; | 1277 | return; |
1277 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1278 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1278 | DesktopIcon("personal",KIcon::SizeMedium)); | 1279 | DesktopIcon("personal",KIcon::SizeMedium)); |
1279 | 1280 | ||
1280 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1281 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1281 | topLayout->setSpacing(spacingHint()); | 1282 | topLayout->setSpacing(spacingHint()); |
1282 | topLayout->setMargin(marginHint()); | 1283 | topLayout->setMargin(marginHint()); |
1283 | 1284 | ||
1284 | KPrefsDialogWidRadios *autoRefreshGroup = | 1285 | KPrefsDialogWidRadios *autoRefreshGroup = |
1285 | addWidRadios(i18n("Auto Send Refresh"), | 1286 | addWidRadios(i18n("Auto Send Refresh"), |
1286 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1287 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1287 | autoRefreshGroup->addRadio(i18n("Never")); | 1288 | autoRefreshGroup->addRadio(i18n("Never")); |
1288 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1289 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1289 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1290 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1290 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1291 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1291 | 1292 | ||
1292 | KPrefsDialogWidRadios *autoInsertGroup = | 1293 | KPrefsDialogWidRadios *autoInsertGroup = |
1293 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1294 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1294 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1295 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1295 | autoInsertGroup->addRadio(i18n("Never")); | 1296 | autoInsertGroup->addRadio(i18n("Never")); |
1296 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1297 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1297 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1298 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1298 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1299 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1299 | 1300 | ||
1300 | KPrefsDialogWidRadios *autoRequestGroup = | 1301 | KPrefsDialogWidRadios *autoRequestGroup = |
1301 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1302 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1302 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1303 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1303 | autoRequestGroup->addRadio(i18n("Never")); | 1304 | autoRequestGroup->addRadio(i18n("Never")); |
1304 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1305 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1305 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1306 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1306 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1307 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1307 | 1308 | ||
1308 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1309 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1309 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1310 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1310 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1311 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1311 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1312 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1312 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1313 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1313 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1314 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1314 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1315 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1315 | 1316 | ||
1316 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1317 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1317 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1318 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1318 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1319 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1319 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1320 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1320 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1321 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1321 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1322 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1322 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1323 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1323 | } | 1324 | } |
1324 | 1325 | ||
1325 | void KOPrefsDialog::showPrinterTab() | 1326 | void KOPrefsDialog::showPrinterTab() |
1326 | { | 1327 | { |
1327 | showPage(pageIndex(mPrinterTab)); | 1328 | showPage(pageIndex(mPrinterTab)); |
1328 | } | 1329 | } |
1329 | 1330 | ||
1330 | 1331 | ||
1331 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1332 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1332 | const QStringList *tags) | 1333 | const QStringList *tags) |
1333 | { | 1334 | { |
1334 | if (tags) { | 1335 | if (tags) { |
1335 | int i = tags->findIndex(text); | 1336 | int i = tags->findIndex(text); |
1336 | if (i > 0) combo->setCurrentItem(i); | 1337 | if (i > 0) combo->setCurrentItem(i); |
1337 | } else { | 1338 | } else { |
1338 | for(int i=0;i<combo->count();++i) { | 1339 | for(int i=0;i<combo->count();++i) { |
1339 | if (combo->text(i) == text) { | 1340 | if (combo->text(i) == text) { |
1340 | combo->setCurrentItem(i); | 1341 | combo->setCurrentItem(i); |
1341 | break; | 1342 | break; |
1342 | } | 1343 | } |
1343 | } | 1344 | } |
1344 | } | 1345 | } |
1345 | } | 1346 | } |
1346 | 1347 | ||
1347 | void KOPrefsDialog::usrReadConfig() | 1348 | void KOPrefsDialog::usrReadConfig() |
1348 | { | 1349 | { |
1349 | kdelibcfg->readConfig(); | 1350 | kdelibcfg->readConfig(); |
1350 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1351 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1351 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1352 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1352 | 1353 | ||
1353 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1354 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1354 | // QDate current ( 2001, 1,1); | 1355 | // QDate current ( 2001, 1,1); |
1355 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1356 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1356 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1357 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1357 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1358 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
1358 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1359 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1359 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1360 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1360 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1361 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1361 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1362 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1362 | // if (KOPrefs::instance()->mAllDaySize > 47 ) | 1363 | // if (KOPrefs::instance()->mAllDaySize > 47 ) |
1363 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; | 1364 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; |
1364 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); | 1365 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); |
1365 | 1366 | ||
1366 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1367 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1367 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1368 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1368 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1369 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1369 | // mAMails->clear(); | 1370 | // mAMails->clear(); |
1370 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1371 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1371 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1372 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1372 | // QListViewItem *item = new QListViewItem(mAMails); | 1373 | // QListViewItem *item = new QListViewItem(mAMails); |
1373 | // item->setText(0,*it); | 1374 | // item->setText(0,*it); |
1374 | // mAMails->insertItem(item); | 1375 | // mAMails->insertItem(item); |
1375 | // } | 1376 | // } |
1376 | 1377 | ||
1377 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); | 1378 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); |
1378 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); | 1379 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); |
1379 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); | 1380 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); |
1380 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); | 1381 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); |
1381 | 1382 | ||
1382 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1383 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1383 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1384 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1384 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1385 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1385 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1386 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1386 | //dummy = KOPrefs::instance()->mUserDateFormatShort; | 1387 | //dummy = KOPrefs::instance()->mUserDateFormatShort; |
1387 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1388 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1388 | updateCategories(); | 1389 | updateCategories(); |
1389 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1390 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1390 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1391 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1391 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1392 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1392 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1393 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1393 | } | 1394 | } |
1394 | 1395 | ||
1395 | 1396 | ||
1396 | void KOPrefsDialog::usrWriteConfig() | 1397 | void KOPrefsDialog::usrWriteConfig() |
1397 | { | 1398 | { |
1398 | 1399 | ||
1399 | kdelibcfg->writeConfig(); | 1400 | kdelibcfg->writeConfig(); |
1400 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1401 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1401 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1402 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1402 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1403 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1403 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1404 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1404 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1405 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1405 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1406 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1406 | 1407 | ||
1407 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1408 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
1408 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 1409 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
1409 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1410 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1410 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1411 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1411 | 1412 | ||
1412 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1413 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1413 | 1414 | ||
1414 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); | 1415 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); |
1415 | //QDate date; | 1416 | //QDate date; |
1416 | //date = mStartDateSavingEdit->date(); | 1417 | //date = mStartDateSavingEdit->date(); |
1417 | //int sub = 0; | 1418 | //int sub = 0; |
1418 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1419 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1419 | // sub = 1; | 1420 | // sub = 1; |
1420 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1421 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1421 | // date = mEndDateSavingEdit->date(); | 1422 | // date = mEndDateSavingEdit->date(); |
1422 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1423 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1423 | // sub = 1; | 1424 | // sub = 1; |
1424 | // else | 1425 | // else |
1425 | // sub = 0; | 1426 | // sub = 0; |
1426 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1427 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1427 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1428 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1428 | 1429 | ||
1429 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1430 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1430 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1431 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1431 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1432 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1432 | 1433 | ||
1433 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1434 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1434 | 1435 | ||
1435 | QDictIterator<QColor> it(mCategoryDict); | 1436 | QDictIterator<QColor> it(mCategoryDict); |
1436 | while (it.current()) { | 1437 | while (it.current()) { |
1437 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1438 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1438 | ++it; | 1439 | ++it; |
1439 | } | 1440 | } |
1440 | 1441 | ||
1441 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1442 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1442 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1443 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1443 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1444 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1444 | 1445 | ||
1445 | KOPrefs::instance()->mAdditionalMails.clear(); | 1446 | KOPrefs::instance()->mAdditionalMails.clear(); |
1446 | // QListViewItem *item; | 1447 | // QListViewItem *item; |
1447 | // item = mAMails->firstChild(); | 1448 | // item = mAMails->firstChild(); |
1448 | // while (item) | 1449 | // while (item) |
1449 | // { | 1450 | // { |
1450 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1451 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1451 | // item = item->nextSibling(); | 1452 | // item = item->nextSibling(); |
1452 | // } | 1453 | // } |
1453 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1454 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1454 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1455 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1455 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1456 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1456 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1457 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1457 | 1458 | ||
1458 | } | 1459 | } |
1459 | 1460 | ||
1460 | void KOPrefsDialog::updateCategories() | 1461 | void KOPrefsDialog::updateCategories() |
1461 | { | 1462 | { |
1462 | mCategoryCombo->clear(); | 1463 | mCategoryCombo->clear(); |
1463 | mCategoryDict.clear(); | 1464 | mCategoryDict.clear(); |
1464 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1465 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1465 | updateCategoryColor(); | 1466 | updateCategoryColor(); |
1466 | } | 1467 | } |
1467 | 1468 | ||
1468 | void KOPrefsDialog::warningGroupScheduling() | 1469 | void KOPrefsDialog::warningGroupScheduling() |
1469 | { | 1470 | { |
1470 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); | 1471 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); |
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | void KOPrefsDialog::warningProjectView() | 1474 | void KOPrefsDialog::warningProjectView() |
1474 | { | 1475 | { |
1475 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); | 1476 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); |
1476 | } | 1477 | } |
1477 | 1478 | ||
1478 | void KOPrefsDialog::warningExperimental(bool on) | 1479 | void KOPrefsDialog::warningExperimental(bool on) |
1479 | { | 1480 | { |
1480 | if (on) { | 1481 | if (on) { |
1481 | KMessageBox::information(this,i18n("This is an experimental feature. " | 1482 | KMessageBox::information(this,i18n("This is an experimental feature. " |
1482 | "It may not work, it may do nothing useful and it may cause data loss. " | 1483 | "It may not work, it may do nothing useful and it may cause data loss. " |
1483 | "Use with care.\n" | 1484 | "Use with care.\n" |
1484 | "You have to restart KOrganizer for this setting to take effect.")); | 1485 | "You have to restart KOrganizer for this setting to take effect.")); |
1485 | } else { | 1486 | } else { |
1486 | KMessageBox::information(this, | 1487 | KMessageBox::information(this, |
1487 | i18n("You have to restart KOrganizer for this setting to take effect.")); | 1488 | i18n("You have to restart KOrganizer for this setting to take effect.")); |
1488 | } | 1489 | } |
1489 | } | 1490 | } |
1490 | 1491 | ||
1491 | void KOPrefsDialog::toggleEmailSettings(bool on) | 1492 | void KOPrefsDialog::toggleEmailSettings(bool on) |
1492 | { | 1493 | { |
1493 | if (on) { | 1494 | if (on) { |
1494 | mEmailEdit->setEnabled(false); | 1495 | mEmailEdit->setEnabled(false); |
1495 | mNameEdit->setEnabled(false); | 1496 | mNameEdit->setEnabled(false); |
1496 | mEmailLabel->setEnabled(false); | 1497 | mEmailLabel->setEnabled(false); |
1497 | mNameLabel->setEnabled(false); | 1498 | mNameLabel->setEnabled(false); |
1498 | 1499 | ||
1499 | KEMailSettings settings; | 1500 | KEMailSettings settings; |
1500 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); | 1501 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); |
1501 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); | 1502 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); |
1502 | } else { | 1503 | } else { |
1503 | mEmailEdit->setEnabled(true); | 1504 | mEmailEdit->setEnabled(true); |
1504 | mNameEdit->setEnabled(true); | 1505 | mNameEdit->setEnabled(true); |
1505 | mEmailLabel->setEnabled(true); | 1506 | mEmailLabel->setEnabled(true); |
1506 | mNameLabel->setEnabled(true); | 1507 | mNameLabel->setEnabled(true); |
1507 | } | 1508 | } |
1508 | } | 1509 | } |
1509 | 1510 | ||
1510 | void KOPrefsDialog::addItem() | 1511 | void KOPrefsDialog::addItem() |
1511 | { | 1512 | { |
1512 | // aEmailsEdit->setEnabled(true); | 1513 | // aEmailsEdit->setEnabled(true); |
1513 | // QListViewItem *item = new QListViewItem(mAMails); | 1514 | // QListViewItem *item = new QListViewItem(mAMails); |
1514 | // mAMails->insertItem(item); | 1515 | // mAMails->insertItem(item); |
1515 | // mAMails->setSelected(item,true); | 1516 | // mAMails->setSelected(item,true); |
1516 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); | 1517 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); |
1517 | } | 1518 | } |
1518 | 1519 | ||
1519 | void KOPrefsDialog::removeItem() | 1520 | void KOPrefsDialog::removeItem() |
1520 | { | 1521 | { |
1521 | // QListViewItem *item; | 1522 | // QListViewItem *item; |
1522 | // item = mAMails->selectedItem(); | 1523 | // item = mAMails->selectedItem(); |
1523 | // if (!item) return; | 1524 | // if (!item) return; |
1524 | // mAMails->takeItem(item); | 1525 | // mAMails->takeItem(item); |
1525 | // item = mAMails->selectedItem(); | 1526 | // item = mAMails->selectedItem(); |
1526 | // if (!item) { | 1527 | // if (!item) { |
1527 | // aEmailsEdit->setText(""); | 1528 | // aEmailsEdit->setText(""); |
1528 | // aEmailsEdit->setEnabled(false); | 1529 | // aEmailsEdit->setEnabled(false); |
1529 | // } | 1530 | // } |
1530 | // if (mAMails->childCount() == 0) { | 1531 | // if (mAMails->childCount() == 0) { |
1531 | // aEmailsEdit->setEnabled(false); | 1532 | // aEmailsEdit->setEnabled(false); |
1532 | // } | 1533 | // } |
1533 | } | 1534 | } |
1534 | 1535 | ||
1535 | void KOPrefsDialog::updateItem() | 1536 | void KOPrefsDialog::updateItem() |
1536 | { | 1537 | { |
1537 | // QListViewItem *item; | 1538 | // QListViewItem *item; |
1538 | // item = mAMails->selectedItem(); | 1539 | // item = mAMails->selectedItem(); |
1539 | // if (!item) return; | 1540 | // if (!item) return; |
1540 | // item->setText(0,aEmailsEdit->text()); | 1541 | // item->setText(0,aEmailsEdit->text()); |
1541 | } | 1542 | } |
1542 | 1543 | ||
1543 | void KOPrefsDialog::updateInput() | 1544 | void KOPrefsDialog::updateInput() |
1544 | { | 1545 | { |
1545 | // QListViewItem *item; | 1546 | // QListViewItem *item; |
1546 | // item = mAMails->selectedItem(); | 1547 | // item = mAMails->selectedItem(); |
1547 | // if (!item) return; | 1548 | // if (!item) return; |
1548 | // aEmailsEdit->setEnabled(true); | 1549 | // aEmailsEdit->setEnabled(true); |
1549 | // aEmailsEdit->setText(item->text(0)); | 1550 | // aEmailsEdit->setText(item->text(0)); |
1550 | } | 1551 | } |
1551 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1552 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1552 | { | 1553 | { |
1553 | /* | 1554 | /* |
1554 | qDebug("updateTimezoneOffset %d ", index); | 1555 | qDebug("updateTimezoneOffset %d ", index); |
1555 | if ( index < 24 ) { | 1556 | if ( index < 24 ) { |
1556 | mTimezoneOffsetSpin->setEnabled ( false ); | 1557 | mTimezoneOffsetSpin->setEnabled ( false ); |
1557 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1558 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1558 | 1559 | ||
1559 | 1560 | ||
1560 | } else { | 1561 | } else { |
1561 | if ( index == 24 ) { | 1562 | if ( index == 24 ) { |
1562 | mTimezoneOffsetSpin->setEnabled ( true ); | 1563 | mTimezoneOffsetSpin->setEnabled ( true ); |
1563 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1564 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1564 | 1565 | ||
1565 | } else { | 1566 | } else { |
1566 | mTimezoneOffsetSpin->setEnabled ( false ); | 1567 | mTimezoneOffsetSpin->setEnabled ( false ); |
1567 | mTimezoneOffsetSpin->setValue( 0 ); | 1568 | mTimezoneOffsetSpin->setValue( 0 ); |
1568 | } | 1569 | } |
1569 | } | 1570 | } |
1570 | */ | 1571 | */ |
1571 | } | 1572 | } |
1572 | 1573 | ||
1573 | void KOPrefsDialog::setupTimeZoneTab() | 1574 | void KOPrefsDialog::setupTimeZoneTab() |
1574 | { | 1575 | { |
1575 | #if 0 | 1576 | #if 0 |
1576 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1577 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1577 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1578 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1578 | 1579 | ||
1579 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1580 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1580 | topLayout->setSpacing(spacingHint()); | 1581 | topLayout->setSpacing(spacingHint()); |
1581 | topLayout->setMargin(marginHint()); | 1582 | topLayout->setMargin(marginHint()); |
1582 | 1583 | ||
1583 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1584 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1584 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1585 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1585 | 1586 | ||
1586 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1587 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1587 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1588 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1588 | if ( QApplication::desktop()->width() < 300 ) { | 1589 | if ( QApplication::desktop()->width() < 300 ) { |
1589 | mTimeZoneCombo->setMaximumWidth(150); | 1590 | mTimeZoneCombo->setMaximumWidth(150); |
1590 | } | 1591 | } |
1591 | 1592 | ||
1592 | QStringList list; | 1593 | QStringList list; |
1593 | list = KGlobal::locale()->timeZoneList(); | 1594 | list = KGlobal::locale()->timeZoneList(); |
1594 | mTimeZoneCombo->insertStringList(list); | 1595 | mTimeZoneCombo->insertStringList(list); |
1595 | 1596 | ||
1596 | // find the currently set time zone and select it | 1597 | // find the currently set time zone and select it |
1597 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1598 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1598 | int nCurrentlySet = 11; | 1599 | int nCurrentlySet = 11; |
1599 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1600 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1600 | { | 1601 | { |
1601 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1602 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1602 | { | 1603 | { |
1603 | nCurrentlySet = i; | 1604 | nCurrentlySet = i; |
1604 | break; | 1605 | break; |
1605 | } | 1606 | } |
1606 | } | 1607 | } |
1607 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1608 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1608 | int iii = 1; | 1609 | int iii = 1; |
1609 | KPrefsDialogWidBool *sb = | 1610 | KPrefsDialogWidBool *sb = |
1610 | addWidBool(i18n("Timezone has daylight saving"), | 1611 | addWidBool(i18n("Timezone has daylight saving"), |
1611 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1612 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1612 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1613 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1613 | ++iii; | 1614 | ++iii; |
1614 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1615 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1615 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1616 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1616 | ++iii; | 1617 | ++iii; |
1617 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1618 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1618 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1619 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1619 | ++iii; | 1620 | ++iii; |
1620 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1621 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1621 | topLayout->addWidget(lab, iii,0); | 1622 | topLayout->addWidget(lab, iii,0); |
1622 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1623 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1623 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1624 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1624 | ++iii; | 1625 | ++iii; |
1625 | 1626 | ||
1626 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1627 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1627 | topLayout->addWidget(lab, iii,0); | 1628 | topLayout->addWidget(lab, iii,0); |
1628 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1629 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1629 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1630 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
1630 | ++iii; | 1631 | ++iii; |
1631 | QDate current ( 2001, 1,1); | 1632 | QDate current ( 2001, 1,1); |
1632 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1633 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1633 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1634 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1634 | #endif | 1635 | #endif |
1635 | 1636 | ||
1636 | } | 1637 | } |
1637 | 1638 | ||