summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/kmicromailE.pro4
-rw-r--r--kmicromail/koprefsdialog.cpp18
-rw-r--r--kmicromail/koprefsdialog.h3
3 files changed, 20 insertions, 5 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,1706 +1,1718 @@
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());
961 topLayout->setMargin(marginHint()); 973 topLayout->setMargin(marginHint());
962 int iii = 0; 974 int iii = 0;
963 975
964 dummy = 976 dummy =
965 addWidBool(i18n("Use internal alarm notification"), 977 addWidBool(i18n("Use internal alarm notification"),
966 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 978 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
967 topLayout->addWidget(dummy->checkBox(),iii++,0); 979 topLayout->addWidget(dummy->checkBox(),iii++,0);
968 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); 980 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);
969 981
970 topLayout->addWidget(lab ,iii++,0); 982 topLayout->addWidget(lab ,iii++,0);
971#ifndef DESKTOP_VERSION 983#ifndef DESKTOP_VERSION
972 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 984 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
973#else 985#else
974 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 986 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
975 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 987 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
976#endif 988#endif
977 989
978 QHBox* dummyBox = new QHBox(topFrame); 990 QHBox* dummyBox = new QHBox(topFrame);
979 new QLabel(i18n("Play beeps count:"),dummyBox); 991 new QLabel(i18n("Play beeps count:"),dummyBox);
980 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 992 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
981 topLayout->addWidget(dummyBox,iii++,0); 993 topLayout->addWidget(dummyBox,iii++,0);
982 994
983 dummyBox = new QHBox(topFrame); 995 dummyBox = new QHBox(topFrame);
984 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 996 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
985 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 997 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
986 topLayout->addWidget(dummyBox,iii++,0); 998 topLayout->addWidget(dummyBox,iii++,0);
987 999
988 dummyBox = new QHBox(topFrame); 1000 dummyBox = new QHBox(topFrame);
989 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1001 new QLabel(i18n("Default suspend time in min:"),dummyBox);
990 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1002 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
991 topLayout->addWidget(dummyBox,iii++,0); 1003 topLayout->addWidget(dummyBox,iii++,0);
992 1004
993 dummyBox = new QHBox(topFrame); 1005 dummyBox = new QHBox(topFrame);
994 new QLabel(i18n("Auto suspend count:"),dummyBox); 1006 new QLabel(i18n("Auto suspend count:"),dummyBox);
995 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1007 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
996 topLayout->addWidget(dummyBox,iii++,0); 1008 topLayout->addWidget(dummyBox,iii++,0);
997 1009
998 1010
999 1011
1000 1012
1001 1013
1002 1014
1003 1015
1004 QHBox* hbo = new QHBox ( topFrame ); 1016 QHBox* hbo = new QHBox ( topFrame );
1005 mDefaultAlarmFile = new QLineEdit(hbo); 1017 mDefaultAlarmFile = new QLineEdit(hbo);
1006 QPushButton * loadTemplate = new QPushButton(hbo); 1018 QPushButton * loadTemplate = new QPushButton(hbo);
1007 QPixmap icon; 1019 QPixmap icon;
1008 if ( QApplication::desktop()->width() < 321 ) 1020 if ( QApplication::desktop()->width() < 321 )
1009 icon = SmallIcon("fileimport16"); 1021 icon = SmallIcon("fileimport16");
1010 else 1022 else
1011 icon = SmallIcon("fileimport"); 1023 icon = SmallIcon("fileimport");
1012 loadTemplate->setIconSet (icon ) ; 1024 loadTemplate->setIconSet (icon ) ;
1013 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 1025 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
1014 int size = loadTemplate->sizeHint().height(); 1026 int size = loadTemplate->sizeHint().height();
1015 loadTemplate->setFixedSize( size, size ); 1027 loadTemplate->setFixedSize( size, size );
1016 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); 1028 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
1017 // topLayout->addWidget(lab ,iii++,0); 1029 // topLayout->addWidget(lab ,iii++,0);
1018 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); 1030 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
1019 topLayout->addWidget(lab ,iii++,0); 1031 topLayout->addWidget(lab ,iii++,0);
1020 topLayout->addWidget(hbo,iii++,0); 1032 topLayout->addWidget(hbo,iii++,0);
1021 // 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); 1033 // 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);
1022 1034
1023// topLayout->addWidget(lab ,iii++,0); 1035// topLayout->addWidget(lab ,iii++,0);
1024// #ifndef DESKTOP_VERSION 1036// #ifndef DESKTOP_VERSION
1025// lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1037// lab->setAlignment( AlignLeft|WordBreak|AlignTop);
1026// #else 1038// #else
1027// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1039// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
1028// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1040// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1029// #endif 1041// #endif
1030 1042
1031 1043
1032} 1044}
1033 1045
1034void KOPrefsDialog::selectSoundFile() 1046void KOPrefsDialog::selectSoundFile()
1035{ 1047{
1036 QString fileName = mDefaultAlarmFile->text(); 1048 QString fileName = mDefaultAlarmFile->text();
1037 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); 1049 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this );
1038 if ( fileName.length() > 0 ) 1050 if ( fileName.length() > 0 )
1039 mDefaultAlarmFile->setText( fileName ); 1051 mDefaultAlarmFile->setText( fileName );
1040} 1052}
1041void KOPrefsDialog::setupFontsTab() 1053void KOPrefsDialog::setupFontsTab()
1042{ 1054{
1043 1055
1044 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1056 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
1045 // DesktopIcon("fonts",KIcon::SizeMedium)); 1057 // DesktopIcon("fonts",KIcon::SizeMedium));
1046 1058
1047 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1059 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
1048 topLayout->setSpacing(1); 1060 topLayout->setSpacing(1);
1049 topLayout->setMargin(3); 1061 topLayout->setMargin(3);
1050 KPrefsDialogWidFont * tVFont; 1062 KPrefsDialogWidFont * tVFont;
1051 int i = 0; 1063 int i = 0;
1052 KPrefsDialogWidFont *timeLabelsFont = 1064 KPrefsDialogWidFont *timeLabelsFont =
1053 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), 1065 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
1054 &(KOPrefs::instance()->mDateNavigatorFont),topFrame); 1066 &(KOPrefs::instance()->mDateNavigatorFont),topFrame);
1055 topLayout->addWidget(timeLabelsFont->label(),i,0); 1067 topLayout->addWidget(timeLabelsFont->label(),i,0);
1056 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1068 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1057 topLayout->addWidget(timeLabelsFont->button(),i,2); 1069 topLayout->addWidget(timeLabelsFont->button(),i,2);
1058 ++i; 1070 ++i;
1059 1071
1060 1072
1061 timeLabelsFont = 1073 timeLabelsFont =
1062 addWidFont(i18n("Mon 15"),i18n("Date Labels:"), 1074 addWidFont(i18n("Mon 15"),i18n("Date Labels:"),
1063 &(KOPrefs::instance()->mTimeLabelsFont),topFrame); 1075 &(KOPrefs::instance()->mTimeLabelsFont),topFrame);
1064 topLayout->addWidget(timeLabelsFont->label(),i,0); 1076 topLayout->addWidget(timeLabelsFont->label(),i,0);
1065 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1077 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1066 topLayout->addWidget(timeLabelsFont->button(),i,2); 1078 topLayout->addWidget(timeLabelsFont->button(),i,2);
1067 ++i; 1079 ++i;
1068 1080
1069 KPrefsDialogWidFont *timeBarFont = 1081 KPrefsDialogWidFont *timeBarFont =
1070 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), 1082 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"),
1071 &(KOPrefs::instance()->mTimeBarFont),topFrame); 1083 &(KOPrefs::instance()->mTimeBarFont),topFrame);
1072 topLayout->addWidget(timeBarFont->label(),i,0); 1084 topLayout->addWidget(timeBarFont->label(),i,0);
1073 topLayout->addWidget(timeBarFont->preview(),i,1); 1085 topLayout->addWidget(timeBarFont->preview(),i,1);
1074 topLayout->addWidget(timeBarFont->button(),i,2); 1086 topLayout->addWidget(timeBarFont->button(),i,2);
1075 ++i; 1087 ++i;
1076 1088
1077 1089
1078 KPrefsDialogWidFont *marcusBainsFont = 1090 KPrefsDialogWidFont *marcusBainsFont =
1079 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), 1091 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"),
1080 &(KOPrefs::instance()->mMarcusBainsFont),topFrame); 1092 &(KOPrefs::instance()->mMarcusBainsFont),topFrame);
1081 topLayout->addWidget(marcusBainsFont->label(),i,0); 1093 topLayout->addWidget(marcusBainsFont->label(),i,0);
1082 topLayout->addWidget(marcusBainsFont->preview(),i,1); 1094 topLayout->addWidget(marcusBainsFont->preview(),i,1);
1083 topLayout->addWidget(marcusBainsFont->button(),i,2); 1095 topLayout->addWidget(marcusBainsFont->button(),i,2);
1084 ++i; 1096 ++i;
1085 1097
1086 tVFont = 1098 tVFont =
1087 addWidFont(i18n("Summary"),i18n("Event Viewer:"), 1099 addWidFont(i18n("Summary"),i18n("Event Viewer:"),
1088 &(KOPrefs::instance()->mEventViewFont),topFrame); 1100 &(KOPrefs::instance()->mEventViewFont),topFrame);
1089 topLayout->addWidget(tVFont->label(),i,0); 1101 topLayout->addWidget(tVFont->label(),i,0);
1090 topLayout->addWidget(tVFont->preview(),i,1); 1102 topLayout->addWidget(tVFont->preview(),i,1);
1091 topLayout->addWidget(tVFont->button(),i,2); 1103 topLayout->addWidget(tVFont->button(),i,2);
1092 ++i; 1104 ++i;
1093 1105
1094 1106
1095 1107
1096 tVFont = 1108 tVFont =
1097 addWidFont(i18n("Details"),i18n("EditorBox:"), 1109 addWidFont(i18n("Details"),i18n("EditorBox:"),
1098 &(KOPrefs::instance()->mEditBoxFont),topFrame); 1110 &(KOPrefs::instance()->mEditBoxFont),topFrame);
1099 topLayout->addWidget(tVFont->label(),i,0); 1111 topLayout->addWidget(tVFont->label(),i,0);
1100 topLayout->addWidget(tVFont->preview(),i,1); 1112 topLayout->addWidget(tVFont->preview(),i,1);
1101 topLayout->addWidget(tVFont->button(),i,2); 1113 topLayout->addWidget(tVFont->button(),i,2);
1102 ++i; 1114 ++i;
1103 1115
1104 1116
1105 1117
1106 topLayout->setColStretch(1,1); 1118 topLayout->setColStretch(1,1);
1107 topLayout->setRowStretch(4,1); 1119 topLayout->setRowStretch(4,1);
1108 1120
1109 1121
1110 i = 0; 1122 i = 0;
1111 topFrame = addPage(i18n("View Fonts"),0, 1123 topFrame = addPage(i18n("View Fonts"),0,
1112 DesktopIcon("fonts",KIcon::SizeMedium)); 1124 DesktopIcon("fonts",KIcon::SizeMedium));
1113 1125
1114 topLayout = new QGridLayout(topFrame,7,3); 1126 topLayout = new QGridLayout(topFrame,7,3);
1115 topLayout->setSpacing(1); 1127 topLayout->setSpacing(1);
1116 topLayout->setMargin(3); 1128 topLayout->setMargin(3);
1117 1129
1118 tVFont = 1130 tVFont =
1119 addWidFont(i18n("Configure KO"),i18n("What's Next View:"), 1131 addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
1120 &(KOPrefs::instance()->mWhatsNextFont),topFrame); 1132 &(KOPrefs::instance()->mWhatsNextFont),topFrame);
1121 topLayout->addWidget(tVFont->label(),i,0); 1133 topLayout->addWidget(tVFont->label(),i,0);
1122 topLayout->addWidget(tVFont->preview(),i,1); 1134 topLayout->addWidget(tVFont->preview(),i,1);
1123 topLayout->addWidget(tVFont->button(),i,2); 1135 topLayout->addWidget(tVFont->button(),i,2);
1124 ++i; 1136 ++i;
1125 KPrefsDialogWidFont *agendaViewFont = 1137 KPrefsDialogWidFont *agendaViewFont =
1126 addWidFont(i18n("Event text"),i18n("Agenda view:"), 1138 addWidFont(i18n("Event text"),i18n("Agenda view:"),
1127 &(KOPrefs::instance()->mAgendaViewFont),topFrame); 1139 &(KOPrefs::instance()->mAgendaViewFont),topFrame);
1128 topLayout->addWidget(agendaViewFont->label(),i,0); 1140 topLayout->addWidget(agendaViewFont->label(),i,0);
1129 topLayout->addWidget(agendaViewFont->preview(),i,1); 1141 topLayout->addWidget(agendaViewFont->preview(),i,1);
1130 topLayout->addWidget(agendaViewFont->button(),i,2); 1142 topLayout->addWidget(agendaViewFont->button(),i,2);
1131 ++i; 1143 ++i;
1132 1144
1133 1145
1134 KPrefsDialogWidFont *monthViewFont = 1146 KPrefsDialogWidFont *monthViewFont =
1135 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), 1147 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"),
1136 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); 1148 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame);
1137 topLayout->addWidget(monthViewFont->label(),i,0); 1149 topLayout->addWidget(monthViewFont->label(),i,0);
1138 topLayout->addWidget(monthViewFont->preview(),i,1); 1150 topLayout->addWidget(monthViewFont->preview(),i,1);
1139 topLayout->addWidget(monthViewFont->button(),i,2); 1151 topLayout->addWidget(monthViewFont->button(),i,2);
1140 ++i; 1152 ++i;
1141 1153
1142 1154
1143 KPrefsDialogWidFont *lVFont = 1155 KPrefsDialogWidFont *lVFont =
1144 addWidFont(i18n("Event"),i18n("List View:"), 1156 addWidFont(i18n("Event"),i18n("List View:"),
1145 &(KOPrefs::instance()->mListViewFont),topFrame); 1157 &(KOPrefs::instance()->mListViewFont),topFrame);
1146 topLayout->addWidget(lVFont->label(),i,0); 1158 topLayout->addWidget(lVFont->label(),i,0);
1147 topLayout->addWidget(lVFont->preview(),i,1); 1159 topLayout->addWidget(lVFont->preview(),i,1);
1148 topLayout->addWidget(lVFont->button(),i,2); 1160 topLayout->addWidget(lVFont->button(),i,2);
1149 ++i; 1161 ++i;
1150 1162
1151 1163
1152 tVFont = 1164 tVFont =
1153 addWidFont(i18n("ToDo"),i18n("ToDoView:"), 1165 addWidFont(i18n("ToDo"),i18n("ToDoView:"),
1154 &(KOPrefs::instance()->mTodoViewFont),topFrame); 1166 &(KOPrefs::instance()->mTodoViewFont),topFrame);
1155 topLayout->addWidget(tVFont->label(),i,0); 1167 topLayout->addWidget(tVFont->label(),i,0);
1156 topLayout->addWidget(tVFont->preview(),i,1); 1168 topLayout->addWidget(tVFont->preview(),i,1);
1157 topLayout->addWidget(tVFont->button(),i,2); 1169 topLayout->addWidget(tVFont->button(),i,2);
1158 ++i; 1170 ++i;
1159 1171
1160 1172
1161 tVFont = 1173 tVFont =
1162 addWidFont(i18n("Today"),i18n("JournalView:"), 1174 addWidFont(i18n("Today"),i18n("JournalView:"),
1163 &(KOPrefs::instance()->mJornalViewFont),topFrame); 1175 &(KOPrefs::instance()->mJornalViewFont),topFrame);
1164 topLayout->addWidget(tVFont->label(),i,0); 1176 topLayout->addWidget(tVFont->label(),i,0);
1165 topLayout->addWidget(tVFont->preview(),i,1); 1177 topLayout->addWidget(tVFont->preview(),i,1);
1166 topLayout->addWidget(tVFont->button(),i,2); 1178 topLayout->addWidget(tVFont->button(),i,2);
1167 ++i; 1179 ++i;
1168 1180
1169 1181
1170 1182
1171 1183
1172 topLayout->setColStretch(1,1); 1184 topLayout->setColStretch(1,1);
1173 topLayout->setRowStretch(4,1); 1185 topLayout->setRowStretch(4,1);
1174 1186
1175 1187
1176 1188
1177 1189
1178} 1190}
1179 1191
1180void KOPrefsDialog::setupColorsTab() 1192void KOPrefsDialog::setupColorsTab()
1181{ 1193{
1182 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1194 QFrame *topFrame = addPage(i18n("Colors"),0,0);
1183 // DesktopIcon("colorize",KIcon::SizeMedium)); 1195 // DesktopIcon("colorize",KIcon::SizeMedium));
1184 1196
1185 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1197 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1186 // topLayout->setSpacing(spacingHint()); 1198 // topLayout->setSpacing(spacingHint());
1187 // topLayout->setMargin(marginHint()); 1199 // topLayout->setMargin(marginHint());
1188 1200
1189 topLayout->setSpacing(2); 1201 topLayout->setSpacing(2);
1190 topLayout->setMargin(3); 1202 topLayout->setMargin(3);
1191 1203
1192 int ii = 1; 1204 int ii = 1;
1193 QGroupBox *categoryGroup ; 1205 QGroupBox *categoryGroup ;
1194 1206
1195 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1207 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1196 topFrame); 1208 topFrame);
1197 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1209 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1198 1210
1199 mCategoryCombo = new QComboBox(categoryGroup); 1211 mCategoryCombo = new QComboBox(categoryGroup);
1200 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1212 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1201 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1213 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1202 1214
1203 mCategoryButton = new KColorButton(categoryGroup); 1215 mCategoryButton = new KColorButton(categoryGroup);
1204 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1216 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1205 updateCategoryColor(); 1217 updateCategoryColor();
1206 1218
1207 1219
1208 // Holiday Color 1220 // Holiday Color
1209 1221
1210 KPrefsWidColor *holidayColor = 1222 KPrefsWidColor *holidayColor =
1211 addWidColor(i18n("Holiday color:"), 1223 addWidColor(i18n("Holiday color:"),
1212 &(KOPrefs::instance()->mHolidayColor),topFrame); 1224 &(KOPrefs::instance()->mHolidayColor),topFrame);
1213 topLayout->addWidget(holidayColor->label(),ii,0); 1225 topLayout->addWidget(holidayColor->label(),ii,0);
1214 topLayout->addWidget(holidayColor->button(),ii++,1); 1226 topLayout->addWidget(holidayColor->button(),ii++,1);
1215 1227
1216 // Highlight Color 1228 // Highlight Color
1217 KPrefsWidColor *highlightColor = 1229 KPrefsWidColor *highlightColor =
1218 addWidColor(i18n("Highlight color:"), 1230 addWidColor(i18n("Highlight color:"),
1219 &(KOPrefs::instance()->mHighlightColor),topFrame); 1231 &(KOPrefs::instance()->mHighlightColor),topFrame);
1220 topLayout->addWidget(highlightColor->label(),ii,0); 1232 topLayout->addWidget(highlightColor->label(),ii,0);
1221 topLayout->addWidget(highlightColor->button(),ii++,1); 1233 topLayout->addWidget(highlightColor->button(),ii++,1);
1222 1234
1223 // Event color 1235 // Event color
1224 KPrefsWidColor *eventColor = 1236 KPrefsWidColor *eventColor =
1225 addWidColor(i18n("Default event color:"), 1237 addWidColor(i18n("Default event color:"),
1226 &(KOPrefs::instance()->mEventColor),topFrame); 1238 &(KOPrefs::instance()->mEventColor),topFrame);
1227 topLayout->addWidget(eventColor->label(),ii,0); 1239 topLayout->addWidget(eventColor->label(),ii,0);
1228 topLayout->addWidget(eventColor->button(),ii++,1); 1240 topLayout->addWidget(eventColor->button(),ii++,1);
1229 1241
1230 // agenda view background color 1242 // agenda view background color
1231 KPrefsWidColor *agendaBgColor = 1243 KPrefsWidColor *agendaBgColor =
1232 addWidColor(i18n("Agenda view background color:"), 1244 addWidColor(i18n("Agenda view background color:"),
1233 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1245 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1234 topLayout->addWidget(agendaBgColor->label(),ii,0); 1246 topLayout->addWidget(agendaBgColor->label(),ii,0);
1235 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1247 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1236 1248
1237 // working hours color 1249 // working hours color
1238 KPrefsWidColor *workingHoursColor = 1250 KPrefsWidColor *workingHoursColor =
1239 addWidColor(i18n("Working hours color:"), 1251 addWidColor(i18n("Working hours color:"),
1240 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1252 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1241 topLayout->addWidget(workingHoursColor->label(),ii,0); 1253 topLayout->addWidget(workingHoursColor->label(),ii,0);
1242 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1254 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1243 1255
1244 KPrefsDialogWidBool *sb = 1256 KPrefsDialogWidBool *sb =
1245 addWidBool(i18n("Use colors for application:"), 1257 addWidBool(i18n("Use colors for application:"),
1246 &(KOPrefs::instance()->mUseAppColors),topFrame); 1258 &(KOPrefs::instance()->mUseAppColors),topFrame);
1247 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1259 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1248 1260
1249 ii++; 1261 ii++;
1250 KPrefsWidColor * workingHoursColor1 = 1262 KPrefsWidColor * workingHoursColor1 =
1251 addWidColor(i18n("Buttons, menus, etc.:"), 1263 addWidColor(i18n("Buttons, menus, etc.:"),
1252 &(KOPrefs::instance()->mAppColor1),topFrame); 1264 &(KOPrefs::instance()->mAppColor1),topFrame);
1253 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1265 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1254 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1266 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1255 1267
1256 KPrefsWidColor * workingHoursColor2 = 1268 KPrefsWidColor * workingHoursColor2 =
1257 addWidColor(i18n("Frames, labels, etc.:"), 1269 addWidColor(i18n("Frames, labels, etc.:"),
1258 &(KOPrefs::instance()->mAppColor2),topFrame); 1270 &(KOPrefs::instance()->mAppColor2),topFrame);
1259 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1271 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1260 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1272 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1261 1273
1262 1274
1263 1275
1264} 1276}
1265 1277
1266void KOPrefsDialog::setCategoryColor() 1278void KOPrefsDialog::setCategoryColor()
1267{ 1279{
1268 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1280 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1269} 1281}
1270 1282
1271void KOPrefsDialog::updateCategoryColor() 1283void KOPrefsDialog::updateCategoryColor()
1272{ 1284{
1273 QString cat = mCategoryCombo->currentText(); 1285 QString cat = mCategoryCombo->currentText();
1274 QColor *color = mCategoryDict.find(cat); 1286 QColor *color = mCategoryDict.find(cat);
1275 if (!color) { 1287 if (!color) {
1276 color = KOPrefs::instance()->categoryColor(cat); 1288 color = KOPrefs::instance()->categoryColor(cat);
1277 } 1289 }
1278 if (color) { 1290 if (color) {
1279 mCategoryButton->setColor(*color); 1291 mCategoryButton->setColor(*color);
1280 } 1292 }
1281} 1293}
1282 1294
1283void KOPrefsDialog::setupPrinterTab() 1295void KOPrefsDialog::setupPrinterTab()
1284{ 1296{
1285 mPrinterTab = addPage(i18n("Printing"),0, 1297 mPrinterTab = addPage(i18n("Printing"),0,
1286 DesktopIcon("fileprint",KIcon::SizeMedium)); 1298 DesktopIcon("fileprint",KIcon::SizeMedium));
1287 1299
1288 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1300 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1289 topLayout->setSpacing(spacingHint()); 1301 topLayout->setSpacing(spacingHint());
1290 topLayout->setMargin(marginHint()); 1302 topLayout->setMargin(marginHint());
1291 1303
1292 topLayout->setRowStretch(4,1); 1304 topLayout->setRowStretch(4,1);
1293} 1305}
1294 1306
1295void KOPrefsDialog::setupGroupSchedulingTab() 1307void KOPrefsDialog::setupGroupSchedulingTab()
1296{ 1308{
1297#if 0 1309#if 0
1298 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1310 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1299 DesktopIcon("personal",KIcon::SizeMedium)); 1311 DesktopIcon("personal",KIcon::SizeMedium));
1300 1312
1301 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1313 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1302 topLayout->setSpacing(spacingHint()); 1314 topLayout->setSpacing(spacingHint());
1303 topLayout->setMargin(marginHint()); 1315 topLayout->setMargin(marginHint());
1304 1316
1305#if 0 1317#if 0
1306 KPrefsWidRadios *schedulerGroup = 1318 KPrefsWidRadios *schedulerGroup =
1307 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1319 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1308 topFrame); 1320 topFrame);
1309 schedulerGroup->addRadio("Dummy"); // Only for debugging 1321 schedulerGroup->addRadio("Dummy"); // Only for debugging
1310 schedulerGroup->addRadio(i18n("Mail client")); 1322 schedulerGroup->addRadio(i18n("Mail client"));
1311 1323
1312 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1324 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1313#endif 1325#endif
1314 1326
1315 KPrefsWidRadios *sendGroup = 1327 KPrefsWidRadios *sendGroup =
1316 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1328 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1317 topFrame); 1329 topFrame);
1318 sendGroup->addRadio(i18n("Send to outbox")); 1330 sendGroup->addRadio(i18n("Send to outbox"));
1319 sendGroup->addRadio(i18n("Send directly")); 1331 sendGroup->addRadio(i18n("Send directly"));
1320 1332
1321 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1333 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1322 1334
1323 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1335 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1324 mAMails = new QListView(topFrame); 1336 mAMails = new QListView(topFrame);
1325 mAMails->addColumn(i18n("Email"),300); 1337 mAMails->addColumn(i18n("Email"),300);
1326 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1338 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1327 1339
1328 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); 1340 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
1329 aEmailsEdit = new QLineEdit(topFrame); 1341 aEmailsEdit = new QLineEdit(topFrame);
1330 aEmailsEdit->setEnabled(false); 1342 aEmailsEdit->setEnabled(false);
1331 topLayout->addWidget(aEmailsEdit,4,1); 1343 topLayout->addWidget(aEmailsEdit,4,1);
1332 1344
1333 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); 1345 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
1334 topLayout->addWidget(add,5,0); 1346 topLayout->addWidget(add,5,0);
1335 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); 1347 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
1336 topLayout->addWidget(del,5,1); 1348 topLayout->addWidget(del,5,1);
1337 1349
1338 //topLayout->setRowStretch(2,1); 1350 //topLayout->setRowStretch(2,1);
1339 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1351 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1340 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1352 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1341 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1353 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1342 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1354 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
1343#endif 1355#endif
1344} 1356}
1345 1357
1346void KOPrefsDialog::setupGroupAutomationTab() 1358void KOPrefsDialog::setupGroupAutomationTab()
1347{ 1359{
1348 return; 1360 return;
1349 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1361 QFrame *topFrame = addPage(i18n("Group Automation"),0,
1350 DesktopIcon("personal",KIcon::SizeMedium)); 1362 DesktopIcon("personal",KIcon::SizeMedium));
1351 1363
1352 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1364 QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
1353 topLayout->setSpacing(spacingHint()); 1365 topLayout->setSpacing(spacingHint());
1354 topLayout->setMargin(marginHint()); 1366 topLayout->setMargin(marginHint());
1355 1367
1356 KPrefsWidRadios *autoRefreshGroup = 1368 KPrefsWidRadios *autoRefreshGroup =
1357 addWidRadios(i18n("Auto Send Refresh"), 1369 addWidRadios(i18n("Auto Send Refresh"),
1358 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); 1370 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
1359 autoRefreshGroup->addRadio(i18n("Never")); 1371 autoRefreshGroup->addRadio(i18n("Never"));
1360 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); 1372 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
1361 //autoRefreshGroup->addRadio(i18n("selected emails")); 1373 //autoRefreshGroup->addRadio(i18n("selected emails"));
1362 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); 1374 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
1363 1375
1364 KPrefsWidRadios *autoInsertGroup = 1376 KPrefsWidRadios *autoInsertGroup =
1365 addWidRadios(i18n("Auto Insert IMIP Replies"), 1377 addWidRadios(i18n("Auto Insert IMIP Replies"),
1366 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); 1378 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
1367 autoInsertGroup->addRadio(i18n("Never")); 1379 autoInsertGroup->addRadio(i18n("Never"));
1368 autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); 1380 autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
1369 //autoInsertGroup->addRadio(i18n("selected emails")); 1381 //autoInsertGroup->addRadio(i18n("selected emails"));
1370 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); 1382 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0);
1371 1383
1372 KPrefsWidRadios *autoRequestGroup = 1384 KPrefsWidRadios *autoRequestGroup =
1373 addWidRadios(i18n("Auto Insert IMIP Requests"), 1385 addWidRadios(i18n("Auto Insert IMIP Requests"),
1374 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); 1386 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame);
1375 autoRequestGroup->addRadio(i18n("Never")); 1387 autoRequestGroup->addRadio(i18n("Never"));
1376 autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); 1388 autoRequestGroup->addRadio(i18n("If organizer is in addressbook"));
1377 //autoInsertGroup->addRadio(i18n("selected emails")); 1389 //autoInsertGroup->addRadio(i18n("selected emails"));
1378 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); 1390 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0);
1379 1391
1380 KPrefsWidRadios *autoFreeBusyGroup = 1392 KPrefsWidRadios *autoFreeBusyGroup =
1381 addWidRadios(i18n("Auto Send FreeBusy Information"), 1393 addWidRadios(i18n("Auto Send FreeBusy Information"),
1382 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); 1394 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame);
1383 autoFreeBusyGroup->addRadio(i18n("Never")); 1395 autoFreeBusyGroup->addRadio(i18n("Never"));
1384 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); 1396 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook"));
1385 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1397 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1386 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); 1398 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0);
1387 1399
1388 KPrefsWidRadios *autoFreeBusyReplyGroup = 1400 KPrefsWidRadios *autoFreeBusyReplyGroup =
1389 addWidRadios(i18n("Auto Save FreeBusy Replies"), 1401 addWidRadios(i18n("Auto Save FreeBusy Replies"),
1390 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); 1402 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame);
1391 autoFreeBusyReplyGroup->addRadio(i18n("Never")); 1403 autoFreeBusyReplyGroup->addRadio(i18n("Never"));
1392 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); 1404 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook"));
1393 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1405 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1394 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); 1406 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0);
1395} 1407}
1396 1408
1397void KOPrefsDialog::showPrinterTab() 1409void KOPrefsDialog::showPrinterTab()
1398{ 1410{
1399 showPage(pageIndex(mPrinterTab)); 1411 showPage(pageIndex(mPrinterTab));
1400} 1412}
1401 1413
1402 1414
1403void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, 1415void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1404 const QStringList *tags) 1416 const QStringList *tags)
1405{ 1417{
1406 if (tags) { 1418 if (tags) {
1407 int i = tags->findIndex(text); 1419 int i = tags->findIndex(text);
1408 if (i > 0) combo->setCurrentItem(i); 1420 if (i > 0) combo->setCurrentItem(i);
1409 } else { 1421 } else {
1410 for(int i=0;i<combo->count();++i) { 1422 for(int i=0;i<combo->count();++i) {
1411 if (combo->text(i) == text) { 1423 if (combo->text(i) == text) {
1412 combo->setCurrentItem(i); 1424 combo->setCurrentItem(i);
1413 break; 1425 break;
1414 } 1426 }
1415 } 1427 }
1416 } 1428 }
1417} 1429}
1418 1430
1419void KOPrefsDialog::usrReadConfig() 1431void KOPrefsDialog::usrReadConfig()
1420{ 1432{
1421 mNameEdit->setText(KOPrefs::instance()->fullName()); 1433 mNameEdit->setText(KOPrefs::instance()->fullName());
1422 mEmailEdit->setText(KOPrefs::instance()->email()); 1434 mEmailEdit->setText(KOPrefs::instance()->email());
1423 1435
1424 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1436 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1425 QDate current ( 2001, 1,1); 1437 QDate current ( 2001, 1,1);
1426 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1438 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1427 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1439 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1428 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1440 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1429 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1441 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1430 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1442 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1431 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1443 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1432 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1444 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1433 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1445 // if (KOPrefs::instance()->mAllDaySize > 47 )
1434 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1446 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1435 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); 1447 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1436 1448
1437 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); 1449 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
1438 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); 1450 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
1439 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); 1451 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
1440 // mAMails->clear(); 1452 // mAMails->clear();
1441 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); 1453 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
1442// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { 1454// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
1443// QListViewItem *item = new QListViewItem(mAMails); 1455// QListViewItem *item = new QListViewItem(mAMails);
1444// item->setText(0,*it); 1456// item->setText(0,*it);
1445// mAMails->insertItem(item); 1457// mAMails->insertItem(item);
1446// } 1458// }
1447 1459
1448 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); 1460 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1449 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1461 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1450 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1462 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1451 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1463 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1452 1464
1453 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1465 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1454 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1466 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1455 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1467 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1456 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1468 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1457 dummy = KOPrefs::instance()->mUserDateFormatShort; 1469 dummy = KOPrefs::instance()->mUserDateFormatShort;
1458 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1470 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1459 updateCategories(); 1471 updateCategories();
1460 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1472 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1461 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1473 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1462 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1474 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1463 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1475 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1464} 1476}
1465 1477
1466 1478
1467void KOPrefsDialog::usrWriteConfig() 1479void KOPrefsDialog::usrWriteConfig()
1468{ 1480{
1469 1481
1470 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); 1482 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1471 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1483 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1472 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1484 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1473 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1485 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1474 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1486 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1475 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1487 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1476 1488
1477 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1489 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1478 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1490 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1479 KOPrefs::instance()->setFullName(mNameEdit->text()); 1491 KOPrefs::instance()->setFullName(mNameEdit->text());
1480 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1492 KOPrefs::instance()->setEmail(mEmailEdit->text());
1481 1493
1482 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1494 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1483 1495
1484 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1496 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1485 QDate date; 1497 QDate date;
1486 date = mStartDateSavingEdit->date(); 1498 date = mStartDateSavingEdit->date();
1487 int sub = 0; 1499 int sub = 0;
1488 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1500 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1489 sub = 1; 1501 sub = 1;
1490 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1502 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1491 date = mEndDateSavingEdit->date(); 1503 date = mEndDateSavingEdit->date();
1492 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1504 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1493 sub = 1; 1505 sub = 1;
1494 else 1506 else
1495 sub = 0; 1507 sub = 0;
1496 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1508 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1497 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1509 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1498 1510
1499 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1511 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1500 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1512 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
1501 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1513 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1502 1514
1503 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1515 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1504 1516
1505 QDictIterator<QColor> it(mCategoryDict); 1517 QDictIterator<QColor> it(mCategoryDict);
1506 while (it.current()) { 1518 while (it.current()) {
1507 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1519 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1508 ++it; 1520 ++it;
1509 } 1521 }
1510 1522
1511 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1523 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1512 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1524 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1513 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1525 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1514 1526
1515 KOPrefs::instance()->mAdditionalMails.clear(); 1527 KOPrefs::instance()->mAdditionalMails.clear();
1516 // QListViewItem *item; 1528 // QListViewItem *item;
1517 // item = mAMails->firstChild(); 1529 // item = mAMails->firstChild();
1518 // while (item) 1530 // while (item)
1519 // { 1531 // {
1520 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1532 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1521 // item = item->nextSibling(); 1533 // item = item->nextSibling();
1522 // } 1534 // }
1523 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1535 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1524 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1536 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1525 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1537 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1526 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1538 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1527 1539
1528} 1540}
1529 1541
1530void KOPrefsDialog::updateCategories() 1542void KOPrefsDialog::updateCategories()
1531{ 1543{
1532 mCategoryCombo->clear(); 1544 mCategoryCombo->clear();
1533 mCategoryDict.clear(); 1545 mCategoryDict.clear();
1534 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1546 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1535 updateCategoryColor(); 1547 updateCategoryColor();
1536} 1548}
1537 1549
1538void KOPrefsDialog::warningGroupScheduling() 1550void KOPrefsDialog::warningGroupScheduling()
1539{ 1551{
1540 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); 1552 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1541} 1553}
1542 1554
1543void KOPrefsDialog::warningProjectView() 1555void KOPrefsDialog::warningProjectView()
1544{ 1556{
1545 warningExperimental(mEnableProjectView->checkBox()->isChecked()); 1557 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1546} 1558}
1547 1559
1548void KOPrefsDialog::warningExperimental(bool on) 1560void KOPrefsDialog::warningExperimental(bool on)
1549{ 1561{
1550 if (on) { 1562 if (on) {
1551 KMessageBox::information(this,i18n("This is an experimental feature. " 1563 KMessageBox::information(this,i18n("This is an experimental feature. "
1552 "It may not work, it may do nothing useful and it may cause data loss. " 1564 "It may not work, it may do nothing useful and it may cause data loss. "
1553 "Use with care.\n" 1565 "Use with care.\n"
1554 "You have to restart KOrganizer for this setting to take effect.")); 1566 "You have to restart KOrganizer for this setting to take effect."));
1555 } else { 1567 } else {
1556 KMessageBox::information(this, 1568 KMessageBox::information(this,
1557 i18n("You have to restart KOrganizer for this setting to take effect.")); 1569 i18n("You have to restart KOrganizer for this setting to take effect."));
1558 } 1570 }
1559} 1571}
1560 1572
1561void KOPrefsDialog::toggleEmailSettings(bool on) 1573void KOPrefsDialog::toggleEmailSettings(bool on)
1562{ 1574{
1563 if (on) { 1575 if (on) {
1564 mEmailEdit->setEnabled(false); 1576 mEmailEdit->setEnabled(false);
1565 mNameEdit->setEnabled(false); 1577 mNameEdit->setEnabled(false);
1566 mEmailLabel->setEnabled(false); 1578 mEmailLabel->setEnabled(false);
1567 mNameLabel->setEnabled(false); 1579 mNameLabel->setEnabled(false);
1568 1580
1569 KEMailSettings settings; 1581 KEMailSettings settings;
1570 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); 1582 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName));
1571 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); 1583 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress));
1572 } else { 1584 } else {
1573 mEmailEdit->setEnabled(true); 1585 mEmailEdit->setEnabled(true);
1574 mNameEdit->setEnabled(true); 1586 mNameEdit->setEnabled(true);
1575 mEmailLabel->setEnabled(true); 1587 mEmailLabel->setEnabled(true);
1576 mNameLabel->setEnabled(true); 1588 mNameLabel->setEnabled(true);
1577 } 1589 }
1578} 1590}
1579 1591
1580void KOPrefsDialog::addItem() 1592void KOPrefsDialog::addItem()
1581{ 1593{
1582 // aEmailsEdit->setEnabled(true); 1594 // aEmailsEdit->setEnabled(true);
1583// QListViewItem *item = new QListViewItem(mAMails); 1595// QListViewItem *item = new QListViewItem(mAMails);
1584// mAMails->insertItem(item); 1596// mAMails->insertItem(item);
1585// mAMails->setSelected(item,true); 1597// mAMails->setSelected(item,true);
1586// aEmailsEdit->setText(i18n("(EmptyEmail)")); 1598// aEmailsEdit->setText(i18n("(EmptyEmail)"));
1587} 1599}
1588 1600
1589void KOPrefsDialog::removeItem() 1601void KOPrefsDialog::removeItem()
1590{ 1602{
1591// QListViewItem *item; 1603// QListViewItem *item;
1592// item = mAMails->selectedItem(); 1604// item = mAMails->selectedItem();
1593// if (!item) return; 1605// if (!item) return;
1594// mAMails->takeItem(item); 1606// mAMails->takeItem(item);
1595// item = mAMails->selectedItem(); 1607// item = mAMails->selectedItem();
1596// if (!item) { 1608// if (!item) {
1597// aEmailsEdit->setText(""); 1609// aEmailsEdit->setText("");
1598// aEmailsEdit->setEnabled(false); 1610// aEmailsEdit->setEnabled(false);
1599// } 1611// }
1600// if (mAMails->childCount() == 0) { 1612// if (mAMails->childCount() == 0) {
1601// aEmailsEdit->setEnabled(false); 1613// aEmailsEdit->setEnabled(false);
1602// } 1614// }
1603} 1615}
1604 1616
1605void KOPrefsDialog::updateItem() 1617void KOPrefsDialog::updateItem()
1606{ 1618{
1607 // QListViewItem *item; 1619 // QListViewItem *item;
1608// item = mAMails->selectedItem(); 1620// item = mAMails->selectedItem();
1609// if (!item) return; 1621// if (!item) return;
1610// item->setText(0,aEmailsEdit->text()); 1622// item->setText(0,aEmailsEdit->text());
1611} 1623}
1612 1624
1613void KOPrefsDialog::updateInput() 1625void KOPrefsDialog::updateInput()
1614{ 1626{
1615// QListViewItem *item; 1627// QListViewItem *item;
1616// item = mAMails->selectedItem(); 1628// item = mAMails->selectedItem();
1617// if (!item) return; 1629// if (!item) return;
1618// aEmailsEdit->setEnabled(true); 1630// aEmailsEdit->setEnabled(true);
1619// aEmailsEdit->setText(item->text(0)); 1631// aEmailsEdit->setText(item->text(0));
1620} 1632}
1621void KOPrefsDialog::updateTimezoneOffset( int index ) 1633void KOPrefsDialog::updateTimezoneOffset( int index )
1622{ 1634{
1623 /* 1635 /*
1624 qDebug("updateTimezoneOffset %d ", index); 1636 qDebug("updateTimezoneOffset %d ", index);
1625 if ( index < 24 ) { 1637 if ( index < 24 ) {
1626 mTimezoneOffsetSpin->setEnabled ( false ); 1638 mTimezoneOffsetSpin->setEnabled ( false );
1627 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); 1639 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1628 1640
1629 1641
1630 } else { 1642 } else {
1631 if ( index == 24 ) { 1643 if ( index == 24 ) {
1632 mTimezoneOffsetSpin->setEnabled ( true ); 1644 mTimezoneOffsetSpin->setEnabled ( true );
1633 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1645 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1634 1646
1635 } else { 1647 } else {
1636 mTimezoneOffsetSpin->setEnabled ( false ); 1648 mTimezoneOffsetSpin->setEnabled ( false );
1637 mTimezoneOffsetSpin->setValue( 0 ); 1649 mTimezoneOffsetSpin->setValue( 0 );
1638 } 1650 }
1639 } 1651 }
1640 */ 1652 */
1641} 1653}
1642 1654
1643void KOPrefsDialog::setupTimeZoneTab() 1655void KOPrefsDialog::setupTimeZoneTab()
1644{ 1656{
1645 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1657 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1646 // DesktopIcon("clock",KIcon::SizeMedium)); 1658 // DesktopIcon("clock",KIcon::SizeMedium));
1647 1659
1648 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1660 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1649 topLayout->setSpacing(spacingHint()); 1661 topLayout->setSpacing(spacingHint());
1650 topLayout->setMargin(marginHint()); 1662 topLayout->setMargin(marginHint());
1651 1663
1652 QHBox *timeZoneBox = new QHBox( topFrame ); 1664 QHBox *timeZoneBox = new QHBox( topFrame );
1653 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1665 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1654 1666
1655 new QLabel( i18n("Timezone:"), timeZoneBox ); 1667 new QLabel( i18n("Timezone:"), timeZoneBox );
1656 mTimeZoneCombo = new QComboBox( timeZoneBox ); 1668 mTimeZoneCombo = new QComboBox( timeZoneBox );
1657 if ( QApplication::desktop()->width() < 300 ) { 1669 if ( QApplication::desktop()->width() < 300 ) {
1658 mTimeZoneCombo->setMaximumWidth(150); 1670 mTimeZoneCombo->setMaximumWidth(150);
1659 } 1671 }
1660 1672
1661 QStringList list; 1673 QStringList list;
1662 list = KGlobal::locale()->timeZoneList(); 1674 list = KGlobal::locale()->timeZoneList();
1663 mTimeZoneCombo->insertStringList(list); 1675 mTimeZoneCombo->insertStringList(list);
1664 1676
1665 // find the currently set time zone and select it 1677 // find the currently set time zone and select it
1666 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; 1678 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1667 int nCurrentlySet = 11; 1679 int nCurrentlySet = 11;
1668 for (int i = 0; i < mTimeZoneCombo->count(); i++) 1680 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1669 { 1681 {
1670 if (mTimeZoneCombo->text(i) == sCurrentlySet) 1682 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1671 { 1683 {
1672 nCurrentlySet = i; 1684 nCurrentlySet = i;
1673 break; 1685 break;
1674 } 1686 }
1675 } 1687 }
1676 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 1688 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
1677 int iii = 1; 1689 int iii = 1;
1678 KPrefsDialogWidBool *sb = 1690 KPrefsDialogWidBool *sb =
1679 addWidBool(i18n("Timezone has daylight saving"), 1691 addWidBool(i18n("Timezone has daylight saving"),
1680 &(KOPrefs::instance()->mUseDaylightsaving),topFrame); 1692 &(KOPrefs::instance()->mUseDaylightsaving),topFrame);
1681 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 1693 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
1682 ++iii; 1694 ++iii;
1683 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 1695 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
1684 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1696 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1685 ++iii; 1697 ++iii;
1686 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 1698 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
1687 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1699 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1688 ++iii; 1700 ++iii;
1689 lab = new QLabel( i18n("Daylight start:"), topFrame ); 1701 lab = new QLabel( i18n("Daylight start:"), topFrame );
1690 topLayout->addWidget(lab, iii,0); 1702 topLayout->addWidget(lab, iii,0);
1691 mStartDateSavingEdit = new KDateEdit(topFrame); 1703 mStartDateSavingEdit = new KDateEdit(topFrame);
1692 topLayout->addWidget(mStartDateSavingEdit, iii,1); 1704 topLayout->addWidget(mStartDateSavingEdit, iii,1);
1693 ++iii; 1705 ++iii;
1694 1706
1695 lab = new QLabel( i18n("Daylight end:"), topFrame ); 1707 lab = new QLabel( i18n("Daylight end:"), topFrame );
1696 topLayout->addWidget(lab, iii,0); 1708 topLayout->addWidget(lab, iii,0);
1697 mEndDateSavingEdit = new KDateEdit(topFrame); 1709 mEndDateSavingEdit = new KDateEdit(topFrame);
1698 topLayout->addWidget(mEndDateSavingEdit, iii,1); 1710 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1699 ++iii; 1711 ++iii;
1700 QDate current ( 2001, 1,1); 1712 QDate current ( 2001, 1,1);
1701 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1713 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1702 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1714 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1703 1715
1704 1716
1705} 1717}
1706#endif 1718#endif
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