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