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