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