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