summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp179
1 files changed, 100 insertions, 79 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 443508d..40e8a99 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1,1322 +1,1343 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56 56
57#include <kurlrequester.h> 57#include <kurlrequester.h>
58#include <klineedit.h> 58#include <klineedit.h>
59 59
60#if defined(USE_SOLARIS) 60#if defined(USE_SOLARIS)
61#include <sys/param.h> 61#include <sys/param.h>
62 62
63#define ZONEINFODIR "/usr/share/lib/zoneinfo" 63#define ZONEINFODIR "/usr/share/lib/zoneinfo"
64#define INITFILE "/etc/default/init" 64#define INITFILE "/etc/default/init"
65#endif 65#endif
66 66
67#include "koprefs.h" 67#include "koprefs.h"
68 68
69#include "koprefsdialog.h" 69#include "koprefsdialog.h"
70#include "kpimglobalprefs.h" 70#include "kpimglobalprefs.h"
71 71
72 72
73KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 73KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
74 KPrefsDialog(KOPrefs::instance(),parent,name,true) 74 KPrefsDialog(KOPrefs::instance(),parent,name,true)
75{ 75{
76 76
77 setCaption( i18n("Preferences - some settings need a restart (nr)")); 77 setCaption( i18n("Preferences - some settings need a restart (nr)"));
78 mCategoryDict.setAutoDelete(true); 78 mCategoryDict.setAutoDelete(true);
79 79
80 KGlobal::locale()->insertCatalogue("timezones"); 80 KGlobal::locale()->insertCatalogue("timezones");
81 81
82 setupGlobalTab(); 82 setupGlobalTab();
83 setupMainTab(); 83 setupMainTab();
84 // setupLocaleTab(); 84 // setupLocaleTab();
85 //setupTimeZoneTab(); 85 //setupTimeZoneTab();
86 setupTimeTab(); 86 setupTimeTab();
87 //setupLocaleDateTab(); 87 //setupLocaleDateTab();
88 setupFontsTab(); 88 setupFontsTab();
89 setupColorsTab(); 89 setupColorsTab();
90 setupViewsTab(); 90 setupViewsTab();
91 //setupSyncTab(); 91 //setupSyncTab();
92 //setupSyncAlgTab(); 92 //setupSyncAlgTab();
93 //setupPrinterTab(); 93 //setupPrinterTab();
94 //setupGroupSchedulingTab(); 94 //setupGroupSchedulingTab();
95 //setupGroupAutomationTab(); 95 //setupGroupAutomationTab();
96 96
97#ifndef DESKTOP_VERSION 97#ifndef DESKTOP_VERSION
98 if ( QApplication::desktop()->height() == 480 ) 98 if ( QApplication::desktop()->height() == 480 )
99 hideButtons(); 99 hideButtons();
100#endif 100#endif
101} 101}
102 102
103 103
104KOPrefsDialog::~KOPrefsDialog() 104KOPrefsDialog::~KOPrefsDialog()
105{ 105{
106} 106}
107void KOPrefsDialog::setupGlobalTab() 107void KOPrefsDialog::setupGlobalTab()
108{ 108{
109 QFrame *topFrame = addPage(i18n("Global"),0,0); 109 QFrame *topFrame = addPage(i18n("Global"),0,0);
110 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 110 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
111 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 111 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
112 topLayout->addWidget( kdelibcfg ); 112 topLayout->addWidget( kdelibcfg );
113 113
114 114
115} 115}
116void KOPrefsDialog::setupLocaleDateTab() 116void KOPrefsDialog::setupLocaleDateTab()
117{ 117{
118#if 0 118#if 0
119QFrame *topFrame = addPage(i18n("Date Format"),0,0); 119QFrame *topFrame = addPage(i18n("Date Format"),0,0);
120 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 120 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
121 topLayout->setSpacing(spacingHint()); 121 topLayout->setSpacing(spacingHint());
122 topLayout->setMargin(marginHint()); 122 topLayout->setMargin(marginHint());
123 int iii = 0; 123 int iii = 0;
124 124
125 125
126 KPrefsDialogWidRadios *syncPrefsGroup = 126 KPrefsDialogWidRadios *syncPrefsGroup =
127 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 127 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
128 QString format; 128 QString format;
129 if ( QApplication::desktop()->width() < 480 ) 129 if ( QApplication::desktop()->width() < 480 )
130 format = "(%d.%m.%Y)"; 130 format = "(%d.%m.%Y)";
131 else 131 else
132 format = "(%d.%m.%Y|%A %d %B %Y)"; 132 format = "(%d.%m.%Y|%A %d %B %Y)";
133 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 133 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
134 if ( QApplication::desktop()->width() < 480 ) 134 if ( QApplication::desktop()->width() < 480 )
135 format = "(%m.%d.%Y)"; 135 format = "(%m.%d.%Y)";
136 else 136 else
137 format = "(%m.%d.%Y|%A %B %d %Y)"; 137 format = "(%m.%d.%Y|%A %B %d %Y)";
138 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 138 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
139 if ( QApplication::desktop()->width() < 480 ) 139 if ( QApplication::desktop()->width() < 480 )
140 format = "(%Y-%m-%d)"; 140 format = "(%Y-%m-%d)";
141 else 141 else
142 format = "(%Y-%m-%d|%A %Y %B %d)"; 142 format = "(%Y-%m-%d|%A %Y %B %d)";
143 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 143 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
144 syncPrefsGroup->addRadio(i18n("User defined")); 144 syncPrefsGroup->addRadio(i18n("User defined"));
145 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 145 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
146 ++iii; 146 ++iii;
147 ++iii; 147 ++iii;
148 QLabel * lab; 148 QLabel * lab;
149 mUserDateFormatLong = new QLineEdit(topFrame); 149 mUserDateFormatLong = new QLineEdit(topFrame);
150 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 150 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
151 topLayout->addWidget(lab ,iii,0); 151 topLayout->addWidget(lab ,iii,0);
152 topLayout->addWidget(mUserDateFormatLong,iii,1); 152 topLayout->addWidget(mUserDateFormatLong,iii,1);
153 ++iii; 153 ++iii;
154 mUserDateFormatShort = new QLineEdit(topFrame); 154 mUserDateFormatShort = new QLineEdit(topFrame);
155 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 155 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
156 topLayout->addWidget(lab ,iii,0); 156 topLayout->addWidget(lab ,iii,0);
157 topLayout->addWidget(mUserDateFormatShort,iii,1); 157 topLayout->addWidget(mUserDateFormatShort,iii,1);
158 ++iii; 158 ++iii;
159 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 159 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
160 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 160 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
161 ++iii; 161 ++iii;
162 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 162 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
163 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 163 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
164 ++iii; 164 ++iii;
165 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 165 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
166 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 166 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
167 ++iii; 167 ++iii;
168#endif 168#endif
169 169
170} 170}
171 171
172void KOPrefsDialog::setupLocaleTab() 172void KOPrefsDialog::setupLocaleTab()
173{ 173{
174#if 0 174#if 0
175 QFrame *topFrame = addPage(i18n("Locale"),0,0); 175 QFrame *topFrame = addPage(i18n("Locale"),0,0);
176 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 176 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
177 topLayout->setSpacing(spacingHint()); 177 topLayout->setSpacing(spacingHint());
178 topLayout->setMargin(marginHint()); 178 topLayout->setMargin(marginHint());
179 int iii = 0; 179 int iii = 0;
180 KPrefsDialogWidRadios *syncPrefsGroup = 180 KPrefsDialogWidRadios *syncPrefsGroup =
181 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 181 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
182 syncPrefsGroup->addRadio(i18n("English")); 182 syncPrefsGroup->addRadio(i18n("English"));
183 syncPrefsGroup->addRadio(i18n("German")); 183 syncPrefsGroup->addRadio(i18n("German"));
184 syncPrefsGroup->addRadio(i18n("French")); 184 syncPrefsGroup->addRadio(i18n("French"));
185 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 185 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
186 if ( QApplication::desktop()->width() < 300 ) 186 if ( QApplication::desktop()->width() < 300 )
187 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 187 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
188 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 188 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
189 ++iii; 189 ++iii;
190 190
191 syncPrefsGroup = 191 syncPrefsGroup =
192 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 192 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
193 if ( QApplication::desktop()->width() > 300 ) 193 if ( QApplication::desktop()->width() > 300 )
194 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 194 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
195 syncPrefsGroup->addRadio(i18n("24:00")); 195 syncPrefsGroup->addRadio(i18n("24:00"));
196 syncPrefsGroup->addRadio(i18n("12:00am")); 196 syncPrefsGroup->addRadio(i18n("12:00am"));
197 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 197 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
198 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 198 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
199 ++iii; 199 ++iii;
200 KPrefsDialogWidBool *sb; 200 KPrefsDialogWidBool *sb;
201 if ( QApplication::desktop()->width() < 300 ) { 201 if ( QApplication::desktop()->width() < 300 ) {
202 sb = 202 sb =
203 addWidBool(i18n("Week starts on Sunday"), 203 addWidBool(i18n("Week starts on Sunday"),
204 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 204 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
205 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 205 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
206 ++iii; 206 ++iii;
207 sb = 207 sb =
208 addWidBool(i18n("Use short date in (WN/E) view"), 208 addWidBool(i18n("Use short date in (WN/E) view"),
209 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 209 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
211 } 211 }
212 else { 212 else {
213 QWidget * hb = new QWidget( topFrame ); 213 QWidget * hb = new QWidget( topFrame );
214 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 214 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
215 sb = 215 sb =
216 addWidBool(i18n("Week starts on Sunday"), 216 addWidBool(i18n("Week starts on Sunday"),
217 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 217 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
218 hbLayout->addWidget(sb->checkBox() ); 218 hbLayout->addWidget(sb->checkBox() );
219 sb = 219 sb =
220 addWidBool(i18n("Use short date in (WN/E) view"), 220 addWidBool(i18n("Use short date in (WN/E) view"),
221 &(KOPrefs::instance()->mShortDateInViewer),hb); 221 &(KOPrefs::instance()->mShortDateInViewer),hb);
222 hbLayout->addWidget(sb->checkBox() ); 222 hbLayout->addWidget(sb->checkBox() );
223 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 223 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
224 224
225 } 225 }
226 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 226 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
227#if 0 227#if 0
228 ++iii; 228 ++iii;
229 sb = 229 sb =
230 addWidBool(i18n("Quick load/save (w/o Unicode)"), 230 addWidBool(i18n("Quick load/save (w/o Unicode)"),
231 &(KOPrefs::instance()->mUseQuicksave),topFrame); 231 &(KOPrefs::instance()->mUseQuicksave),topFrame);
232 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 232 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
233#endif 233#endif
234#endif 234#endif
235} 235}
236void KOPrefsDialog::showSyncPage() 236void KOPrefsDialog::showSyncPage()
237{ 237{
238 showPage ( 0 ) ; 238 showPage ( 0 ) ;
239 kdelibcfg->showTimeZoneTab() ; 239 kdelibcfg->showTimeZoneTab() ;
240 240
241} 241}
242void KOPrefsDialog::setupSyncAlgTab() 242void KOPrefsDialog::setupSyncAlgTab()
243{ 243{
244#if 0 244#if 0
245 QLabel * lab; 245 QLabel * lab;
246 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 246 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
247 mSetupSyncAlgTab = topFrame; 247 mSetupSyncAlgTab = topFrame;
248 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 248 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
249 topLayout->setSpacing(spacingHint()); 249 topLayout->setSpacing(spacingHint());
250 topLayout->setMargin(marginHint()); 250 topLayout->setMargin(marginHint());
251 int iii = 0; 251 int iii = 0;
252 252
253 KPrefsDialogWidBool *sb = 253 KPrefsDialogWidBool *sb =
254 addWidBool(i18n("Ask for preferences before syncing"), 254 addWidBool(i18n("Ask for preferences before syncing"),
255 &(KOPrefs::instance()->mAskForPreferences),topFrame); 255 &(KOPrefs::instance()->mAskForPreferences),topFrame);
256 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 256 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
257 257
258 ++iii; 258 ++iii;
259 259
260 KPrefsDialogWidRadios *syncPrefsGroup = 260 KPrefsDialogWidRadios *syncPrefsGroup =
261 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 261 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
262 topFrame); 262 topFrame);
263 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 263 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
264 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 264 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
265 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 265 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
266 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 266 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
267 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 267 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
268 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 268 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
269 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 269 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
270 ++iii; 270 ++iii;
271 sb = 271 sb =
272 addWidBool(i18n("Show summary after syncing"), 272 addWidBool(i18n("Show summary after syncing"),
273 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 273 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
274 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 274 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
275 275
276 ++iii; 276 ++iii;
277#endif 277#endif
278 278
279 279
280 280
281} 281}
282 282
283 283
284void KOPrefsDialog::setupSyncTab() 284void KOPrefsDialog::setupSyncTab()
285{ 285{
286#if 0 286#if 0
287 QLabel * lab; 287 QLabel * lab;
288 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 288 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
289 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 289 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
290 topLayout->setSpacing(spacingHint()); 290 topLayout->setSpacing(spacingHint());
291 topLayout->setMargin(marginHint()); 291 topLayout->setMargin(marginHint());
292 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 292 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
293 int iii = 0; 293 int iii = 0;
294 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 294 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
295 ++iii; 295 ++iii;
296 296
297 mRemoteIPEdit = new QLineEdit(topFrame); 297 mRemoteIPEdit = new QLineEdit(topFrame);
298 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 298 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
299 topLayout->addWidget(lab ,iii,0); 299 topLayout->addWidget(lab ,iii,0);
300 topLayout->addWidget(mRemoteIPEdit,iii,1); 300 topLayout->addWidget(mRemoteIPEdit,iii,1);
301 ++iii; 301 ++iii;
302 mRemoteUser = new QLineEdit(topFrame); 302 mRemoteUser = new QLineEdit(topFrame);
303 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 303 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
304 topLayout->addWidget(lab ,iii,0); 304 topLayout->addWidget(lab ,iii,0);
305 topLayout->addWidget(mRemoteUser, iii,1); 305 topLayout->addWidget(mRemoteUser, iii,1);
306 ++iii; 306 ++iii;
307 307
308 mRemoteFile = new QLineEdit(topFrame); 308 mRemoteFile = new QLineEdit(topFrame);
309 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 309 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
310 topLayout->addWidget(lab ,iii,0); 310 topLayout->addWidget(lab ,iii,0);
311 topLayout->addWidget(mRemoteFile,iii,1); 311 topLayout->addWidget(mRemoteFile,iii,1);
312 ++iii; 312 ++iii;
313 313
314 mLocalTempFile = new QLineEdit(topFrame); 314 mLocalTempFile = new QLineEdit(topFrame);
315 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 315 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
316 topLayout->addWidget(lab ,iii,0); 316 topLayout->addWidget(lab ,iii,0);
317 topLayout->addWidget(mLocalTempFile,iii,1); 317 topLayout->addWidget(mLocalTempFile,iii,1);
318 ++iii; 318 ++iii;
319 319
320 KPrefsDialogWidBool *wb = 320 KPrefsDialogWidBool *wb =
321 addWidBool(i18n("Write back synced file"), 321 addWidBool(i18n("Write back synced file"),
322 &(KOPrefs::instance()->mWriteBackFile),topFrame); 322 &(KOPrefs::instance()->mWriteBackFile),topFrame);
323 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 323 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
324 ++iii; 324 ++iii;
325 wb = 325 wb =
326 addWidBool(i18n("Write back existing entries only"), 326 addWidBool(i18n("Write back existing entries only"),
327 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 327 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
329 ++iii; 329 ++iii;
330 330
331#endif 331#endif
332} 332}
333 333
334void KOPrefsDialog::setupMainTab() 334void KOPrefsDialog::setupMainTab()
335{ 335{
336 QFrame *topFrame = addPage(i18n("General"),0,0); 336 QFrame *topFrame = addPage(i18n("General"),0,0);
337 // DesktopIcon("identity",KIcon::SizeMedium)); 337 // DesktopIcon("identity",KIcon::SizeMedium));
338 338
339 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 339 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
340 topLayout->setSpacing(spacingHint()); 340 topLayout->setSpacing(spacingHint());
341 topLayout->setMargin(marginHint()); 341 topLayout->setMargin(marginHint());
342 342
343 // KPrefsDialogWidBool *emailControlCenter = 343 // KPrefsDialogWidBool *emailControlCenter =
344// addWidBool(i18n("&Use email settings from Control Center"), 344// addWidBool(i18n("&Use email settings from Control Center"),
345// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 345// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
346// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 346// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
347 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 347 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
348 // SLOT(toggleEmailSettings(bool))); 348 // SLOT(toggleEmailSettings(bool)));
349 349
350 mNameEdit = new QLineEdit(topFrame); 350 mNameEdit = new QLineEdit(topFrame);
351 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 351 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
352 topLayout->addWidget(mNameLabel,0,0); 352 topLayout->addWidget(mNameLabel,0,0);
353 topLayout->addWidget(mNameEdit,0,1); 353 topLayout->addWidget(mNameEdit,0,1);
354 354
355 mEmailEdit = new QLineEdit(topFrame); 355 mEmailEdit = new QLineEdit(topFrame);
356 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 356 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
357 topLayout->addWidget(mEmailLabel,1,0); 357 topLayout->addWidget(mEmailLabel,1,0);
358 topLayout->addWidget(mEmailEdit,1,1); 358 topLayout->addWidget(mEmailEdit,1,1);
359 KPrefsDialogWidBool *wb; 359 KPrefsDialogWidBool *wb;
360 QHBox *dummy; 360
361 if ( QApplication::desktop()->width() > 480 ) {
362 dummy = new QHBox(topFrame);
363 } else {
364 dummy = new QVBox(topFrame);
365 }
366 361
367 topLayout->addMultiCellWidget(dummy, 2,2,0,1);
368 addWidBool(i18n("Full menu bar(nr)"),
369 &(KOPrefs::instance()->mShowFullMenu),dummy);
370 362
363 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
364 &(KOPrefs::instance()->mShowFullMenu),topFrame);
365 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
371 366
372 addWidBool(i18n("Mini icons in toolbar(nr)"), 367
373 &(KOPrefs::instance()->mToolBarMiniIcons),dummy); 368 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
374 369 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
370 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1);
375 371
376 dummy = new QHBox(topFrame);
377 new QLabel(i18n("Days in What's Next:"),dummy);
378 mWhatsNextSpin = new QSpinBox(1,14,1,dummy);
379
380 topLayout->addMultiCellWidget(dummy,3,3,0,1);
381 372
373 KPrefsDialogWidBool *verticalScreen =
374 addWidBool(i18n("Show vertical screen (Needs restart)"),
375 &(KOPrefs::instance()->mVerticalScreen),topFrame);
376 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
377 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
382 378
383 379
384 dummy = new QHBox(topFrame); 380 QHBox *dummy = new QHBox(topFrame);
385 new QLabel(i18n("Days in Next-X-Days:"),dummy); 381 new QLabel(i18n("Days in Next-X-Days:"),dummy);
386 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 382 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
387 383
388 topLayout->addMultiCellWidget(dummy,4,4,0,1); 384 topLayout->addMultiCellWidget(dummy,5,5,0,1);
389 385
390 QHBox *prioBox = new QHBox(topFrame); 386
391 // intervalBox->setSpacing(spacingHint());
392 topLayout->addMultiCellWidget(prioBox,5,5,0,1);
393 QString messa = i18n("Show topmost todo prios in What's Next:");
394
395 if ( QApplication::desktop()->width() < 300 )
396 messa = i18n("Show topmost todo prios in What's N.:");
397 QLabel *prioLabel = new QLabel(messa, prioBox);
398 mPrioSpin = new QSpinBox(0,5,1,prioBox);
399 if ( QApplication::desktop()->width() < 300 )
400 mPrioSpin->setFixedWidth( 40 );
401 387
402 // KPrefsDialogWidBool *bcc = 388 // KPrefsDialogWidBool *bcc =
403// addWidBool(i18n("Send copy to owner when mailing events"), 389// addWidBool(i18n("Send copy to owner when mailing events"),
404// &(KOPrefs::instance()->mBcc),topFrame); 390// &(KOPrefs::instance()->mBcc),topFrame);
405// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 391// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
406 392
407 393
408 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 394 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
409 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 395 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
410 396
411 // addWidBool(i18n("Enable automatic saving of calendar"), 397 // addWidBool(i18n("Enable automatic saving of calendar"),
412 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 398 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
413 399
414 QHBox *intervalBox = new QHBox(topFrame); 400 QHBox *intervalBox = new QHBox(topFrame);
415 // intervalBox->setSpacing(spacingHint()); 401 // intervalBox->setSpacing(spacingHint());
416 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 402 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
417 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 403 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
418 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 404 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
419 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 405 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
420 /* 406 /*
421 QHBox * agendasize = new QHBox ( topFrame ); 407 QHBox * agendasize = new QHBox ( topFrame );
422 408
423 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 409 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
424 410
425 411
426 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 412 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
427 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 413 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
428 */ 414 */
429 KPrefsDialogWidBool *verticalScreen = 415
430 addWidBool(i18n("Show vertical screen (Needs restart)"),
431 &(KOPrefs::instance()->mVerticalScreen),topFrame);
432 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
433 topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1);
434 416
435 KPrefsDialogWidBool *ask = 417 KPrefsDialogWidBool *ask =
436 addWidBool(i18n("Ask for quit when closing KO/Pi"), 418 addWidBool(i18n("Ask for quit when closing KO/Pi"),
437 &(KOPrefs::instance()->mAskForQuit),topFrame); 419 &(KOPrefs::instance()->mAskForQuit),topFrame);
438 topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); 420 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1);
439 421
440 422
441 /* 423 /*
442 KPrefsDialogWidBool *confirmCheck = 424 KPrefsDialogWidBool *confirmCheck =
443 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 425 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
444 topFrame); 426 topFrame);
445 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); 427 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1);
446 428
447 429
448 mEnableGroupScheduling = 430 mEnableGroupScheduling =
449 addWidBool(i18n("Enable group scheduling"), 431 addWidBool(i18n("Enable group scheduling"),
450 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); 432 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame);
451 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); 433 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0);
452 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), 434 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()),
453 SLOT(warningGroupScheduling())); 435 SLOT(warningGroupScheduling()));
454 436
455 mEnableProjectView = 437 mEnableProjectView =
456 addWidBool(i18n("Enable project view"), 438 addWidBool(i18n("Enable project view"),
457 &(KOPrefs::instance()->mEnableProjectView),topFrame); 439 &(KOPrefs::instance()->mEnableProjectView),topFrame);
458 topLayout->addWidget(mEnableProjectView->checkBox(),9,0); 440 topLayout->addWidget(mEnableProjectView->checkBox(),9,0);
459 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), 441 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()),
460 SLOT(warningProjectView())); 442 SLOT(warningProjectView()));
461 443
462 // Can't be disabled anymore 444 // Can't be disabled anymore
463 mEnableGroupScheduling->checkBox()->hide(); 445 mEnableGroupScheduling->checkBox()->hide();
464 446
465 // Disable setting, because this feature now becomes stable 447 // Disable setting, because this feature now becomes stable
466 mEnableProjectView->checkBox()->hide(); 448 mEnableProjectView->checkBox()->hide();
467 449
468 KPrefsDialogWidRadios *defaultFormatGroup = 450 KPrefsDialogWidRadios *defaultFormatGroup =
469 addWidRadios(i18n("Default Calendar Format"), 451 addWidRadios(i18n("Default Calendar Format"),
470 &(KOPrefs::instance()->mDefaultFormat),topFrame); 452 &(KOPrefs::instance()->mDefaultFormat),topFrame);
471 defaultFormatGroup->addRadio(i18n("vCalendar")); 453 defaultFormatGroup->addRadio(i18n("vCalendar"));
472 defaultFormatGroup->addRadio(i18n("iCalendar")); 454 defaultFormatGroup->addRadio(i18n("iCalendar"));
473 455
474 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); 456 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1);
475 457
476 // Default format unconditionally is iCalendar 458 // Default format unconditionally is iCalendar
477 defaultFormatGroup->groupBox()->hide(); 459 defaultFormatGroup->groupBox()->hide();
478 460
479 KPrefsDialogWidRadios *mailClientGroup = 461 KPrefsDialogWidRadios *mailClientGroup =
480 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), 462 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient),
481 topFrame); 463 topFrame);
482 mailClientGroup->addRadio(i18n("KMail")); 464 mailClientGroup->addRadio(i18n("KMail"));
483 mailClientGroup->addRadio(i18n("Sendmail")); 465 mailClientGroup->addRadio(i18n("Sendmail"));
484 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); 466 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1);
485 467
486 KPrefsDialogWidBool *htmlsave = 468 KPrefsDialogWidBool *htmlsave =
487 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 469 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
488 topFrame); 470 topFrame);
489 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 471 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
490 472
491 KPrefsDialogWidRadios *destinationGroup = 473 KPrefsDialogWidRadios *destinationGroup =
492 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 474 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
493 topFrame); 475 topFrame);
494 destinationGroup->addRadio(i18n("be added to the standard resource")); 476 destinationGroup->addRadio(i18n("be added to the standard resource"));
495 destinationGroup->addRadio(i18n("be asked which resource to use")); 477 destinationGroup->addRadio(i18n("be asked which resource to use"));
496 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 478 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
497 479
498 topLayout->setRowStretch(14,1); 480 topLayout->setRowStretch(14,1);
499 */ 481 */
500} 482}
501 483
502 484
503void KOPrefsDialog::setupTimeTab() 485void KOPrefsDialog::setupTimeTab()
504{ 486{
505 QFrame *topFrame = addPage(i18n("Time"),0,0); 487 QFrame *topFrame = addPage(i18n("Time"),0,0);
506 // DesktopIcon("clock",KIcon::SizeMedium)); 488 // DesktopIcon("clock",KIcon::SizeMedium));
507 489
508 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 490 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
509 topLayout->setSpacing(spacingHint()); 491 topLayout->setSpacing(spacingHint());
510 topLayout->setMargin(marginHint()); 492 topLayout->setMargin(marginHint());
511 493
512 QHBox *dummy = new QHBox(topFrame); 494 QHBox *dummy = new QHBox(topFrame);
513 KPrefsDialogWidTime *dayBegins = 495 KPrefsDialogWidTime *dayBegins =
514 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 496 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
515 dummy); 497 dummy);
516 //topLayout->addWidget(dayBegins->label(),2,0); 498 //topLayout->addWidget(dayBegins->label(),2,0);
517 499
518 //topLayout->addWidget(dayBegins->spinBox(),2,1); 500 //topLayout->addWidget(dayBegins->spinBox(),2,1);
519 topLayout->addMultiCellWidget(dummy,0,0,0,1); 501 topLayout->addMultiCellWidget(dummy,0,0,0,1);
520 502
521 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 503 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
522 topFrame),1,0); 504 topFrame),1,0);
523 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 505 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
524 mStartTimeSpin->setSuffix(":00"); 506 mStartTimeSpin->setSuffix(":00");
525 topLayout->addWidget(mStartTimeSpin,1,1); 507 topLayout->addWidget(mStartTimeSpin,1,1);
526 508
527 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 509 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
528 topFrame),2,0); 510 topFrame),2,0);
529 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 511 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
530 mDefaultDurationSpin->setSuffix(":00"); 512 mDefaultDurationSpin->setSuffix(":00");
531 topLayout->addWidget(mDefaultDurationSpin,2,1); 513 topLayout->addWidget(mDefaultDurationSpin,2,1);
532 514
533 QStringList alarmList; 515 QStringList alarmList;
534 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 516 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
535 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 517 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
536 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 518 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
537 3,0); 519 3,0);
538 mAlarmTimeCombo = new QComboBox(topFrame); 520 mAlarmTimeCombo = new QComboBox(topFrame);
539 mAlarmTimeCombo->insertStringList(alarmList); 521 mAlarmTimeCombo->insertStringList(alarmList);
540 topLayout->addWidget(mAlarmTimeCombo,3,1); 522 topLayout->addWidget(mAlarmTimeCombo,3,1);
541 523
542 524
543 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 525 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
544 i18n("Working Hours"), 526 i18n("Working Hours"),
545 topFrame); 527 topFrame);
546 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 528 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
547 workingHoursGroup->layout()->setSpacing( 0 ); 529 workingHoursGroup->layout()->setSpacing( 0 );
548 workingHoursGroup->layout()->setMargin( 4 ); 530 workingHoursGroup->layout()->setMargin( 4 );
549 QHBox *workStartBox = new QHBox(workingHoursGroup); 531 QHBox *workStartBox = new QHBox(workingHoursGroup);
550 // workStartBox->setMargin( 0 ); 532 // workStartBox->setMargin( 0 );
551 addWidTime(i18n("Daily starting hour:"), 533 addWidTime(i18n("Daily starting hour:"),
552 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 534 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
553 535
554 QHBox *workEndBox = new QHBox(workingHoursGroup); 536 QHBox *workEndBox = new QHBox(workingHoursGroup);
555 //workEndBox->setMargin( 0 ); 537 //workEndBox->setMargin( 0 );
556 addWidTime(i18n("Daily ending hour:"), 538 addWidTime(i18n("Daily ending hour:"),
557 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 539 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
558 QVBox *excludeBox = new QVBox(workingHoursGroup); 540 QVBox *excludeBox = new QVBox(workingHoursGroup);
559 //excludeBox->setMargin( 0 ); 541 //excludeBox->setMargin( 0 );
560 addWidBool(i18n("Exclude holidays"), 542 addWidBool(i18n("Exclude holidays"),
561 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 543 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
562 544
563 addWidBool(i18n("Exclude Saturdays"), 545 addWidBool(i18n("Exclude Saturdays"),
564 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 546 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
565 547
566// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 548// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
567 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 549 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
568 // topFrame); 550 // topFrame);
569// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 551// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
570 552
571 // topLayout->setRowStretch(6,1); 553 // topLayout->setRowStretch(6,1);
572} 554}
573 555
574 556
575void KOPrefsDialog::setupViewsTab() 557void KOPrefsDialog::setupViewsTab()
576{ 558{
577 559
578 QFrame *topFrame = addPage(i18n("Views"),0,0); 560 QFrame *topFrame = addPage(i18n("Views"),0,0);
579 // DesktopIcon("viewmag",KIcon::SizeMedium)); 561 // DesktopIcon("viewmag",KIcon::SizeMedium));
580 562
581 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 563 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
582 topLayout->setSpacing(spacingHint()); 564 topLayout->setSpacing(spacingHint());
583 topLayout->setMargin(marginHint()); 565 topLayout->setMargin(marginHint());
584 566
585// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 567// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
586// topLayout->addLayout(dayBeginsLayout,0,0); 568// topLayout->addLayout(dayBeginsLayout,0,0);
587 569
588// KPrefsDialogWidTime *dayBegins = 570// KPrefsDialogWidTime *dayBegins =
589// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 571// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
590// topFrame); 572// topFrame);
591// dayBeginsLayout->addWidget(dayBegins->label()); 573// dayBeginsLayout->addWidget(dayBegins->label());
592// dayBeginsLayout->addStretch(1); 574// dayBeginsLayout->addStretch(1);
593// dayBeginsLayout->addWidget(dayBegins->spinBox()); 575// dayBeginsLayout->addWidget(dayBegins->spinBox());
594 576
595// QBoxLayout *nextDaysLayout = new QHBoxLayout; 577// QBoxLayout *nextDaysLayout = new QHBoxLayout;
596// topLayout->addLayout(nextDaysLayout,1,0); 578// topLayout->addLayout(nextDaysLayout,1,0);
597// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 579// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
598// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 580// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
599// nextDaysLayout->addStretch(1); 581// nextDaysLayout->addStretch(1);
600// nextDaysLayout->addWidget(mNextXDaysSpin); 582// nextDaysLayout->addWidget(mNextXDaysSpin);
601 583
602 584
603 int ii = 0; 585 int ii = 0;
604 KPrefsDialogWidBool *dummy = 586 KPrefsDialogWidBool *dummy =
605 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 587 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
606 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 588 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
607 topLayout->addWidget(dummy->checkBox(),ii++,0); 589 topLayout->addWidget(dummy->checkBox(),ii++,0);
608 590
609 dummy = 591
610 addWidBool(i18n("Show time in agenda items"),
611 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame);
612 topLayout->addWidget(dummy->checkBox(),ii++,0);
613
614 dummy =
615 addWidBool(i18n("Highlight current day in agenda"),
616 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
617 topLayout->addWidget(dummy->checkBox(),ii++,0);
618
619 dummy =
620 addWidBool(i18n("Use light color for highlight current day"),
621 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
622 topLayout->addWidget(dummy->checkBox(),ii++,0);
623
624 KPrefsDialogWidBool *dailyRecur =
625 addWidBool(i18n("Show events that recur daily in date nav."),
626 &(KOPrefs::instance()->mDailyRecur),topFrame);
627 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
628 592
629 KPrefsDialogWidBool *weeklyRecur =
630 addWidBool(i18n("Show ev. that recur weekly in date nav."),
631 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
632 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
633 if ( QApplication::desktop()->width() > 640 ) { 593 if ( QApplication::desktop()->width() > 640 ) {
634 594
635 KPrefsDialogWidBool *enableToolTips = 595 KPrefsDialogWidBool *enableToolTips =
636 addWidBool(i18n("Enable tooltips displaying summary of ev."), 596 addWidBool(i18n("Enable tooltips displaying summary of ev."),
637 &(KOPrefs::instance()->mEnableToolTips),topFrame); 597 &(KOPrefs::instance()->mEnableToolTips),topFrame);
638 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 598 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
639 599
640 } 600 }
641 601
642 KPrefsDialogWidBool *marcusBainsEnabled = 602
643 addWidBool(i18n("Show Marcus Bains line"),
644 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
645 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
646
647 603
648 // topLayout->addWidget(hourSizeGroup,ii++,0); 604 // topLayout->addWidget(hourSizeGroup,ii++,0);
649 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 605 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
650 //topLayout->setRowStretch(11,1); 606 //topLayout->setRowStretch(11,1);
651 607
652 608
653 609
654 610
655 611#if 0
656 612
657 topFrame = addPage(i18n("ViewChange"),0,0); 613 topFrame = addPage(i18n("ViewChange"),0,0);
658 // DesktopIcon("viewmag",KIcon::SizeMedium)); 614 // DesktopIcon("viewmag",KIcon::SizeMedium));
659 615
660 topLayout = new QGridLayout(topFrame,6,1); 616 topLayout = new QGridLayout(topFrame,6,1);
661 topLayout->setSpacing(spacingHint()); 617 topLayout->setSpacing(spacingHint());
662 topLayout->setMargin(marginHint()); 618 topLayout->setMargin(marginHint());
663 ii = 0; 619 ii = 0;
664 620
621#endif
665 622
666 dummy = 623 dummy =
667 addWidBool(i18n("Hold fullscreen on view change"), 624 addWidBool(i18n("Hold fullscreen on view change"),
668 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 625 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
669 topLayout->addWidget(dummy->checkBox(),ii++,0); 626 topLayout->addWidget(dummy->checkBox(),ii++,0);
670 627
671 dummy = 628 dummy =
672 addWidBool(i18n("Hold non-fullscreen on view change"), 629 addWidBool(i18n("Hold non-fullscreen on view change"),
673 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 630 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
674 topLayout->addWidget(dummy->checkBox(),ii++,0); 631 topLayout->addWidget(dummy->checkBox(),ii++,0);
675 632
676 633
677 KPrefsDialogWidBool *fullViewTodo =
678 addWidBool(i18n("Event list view uses full window"),
679 &(KOPrefs::instance()->mFullViewTodo),topFrame);
680 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
681 634
682 KPrefsDialogWidBool *fullViewMonth = 635 KPrefsDialogWidBool *fullViewMonth =
683 addWidBool(i18n("Next days view uses full window"), 636 addWidBool(i18n("Next days view uses full window"),
684 &(KOPrefs::instance()->mFullViewMonth),topFrame); 637 &(KOPrefs::instance()->mFullViewMonth),topFrame);
685 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 638 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
686 639
640
641 KPrefsDialogWidBool *fullViewTodo =
642 addWidBool(i18n("Event list view uses full window"),
643 &(KOPrefs::instance()->mFullViewTodo),topFrame);
644 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
645 dummy =
646 addWidBool(i18n("Listview uses monthly timespan"),
647 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
648 topLayout->addWidget(dummy->checkBox(),ii++,0);
649 dummy =
650 addWidBool(i18n("Highlight selection in Time Edit"),
651 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
652 topLayout->addWidget( dummy->checkBox(), ii++,0);
653
654 KPrefsDialogWidBool *dailyRecur =
655 addWidBool(i18n("Show events that recur daily in date nav."),
656 &(KOPrefs::instance()->mDailyRecur),topFrame);
657 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
658
659 KPrefsDialogWidBool *weeklyRecur =
660 addWidBool(i18n("Show ev. that recur weekly in date nav."),
661 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
662 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
663
664 topFrame = addPage(i18n("Agenda View"),0,0);
665 // DesktopIcon("viewmag",KIcon::SizeMedium));
666
667 topLayout = new QGridLayout(topFrame,5,1);
668 topLayout->setSpacing(spacingHint());
669 topLayout->setMargin(marginHint());
670 ii = 0;
671
672
673 dummy =
674 addWidBool(i18n("Show time in agenda items"),
675 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame);
676 topLayout->addWidget(dummy->checkBox(),ii++,0);
677
678 dummy =
679 addWidBool(i18n("Highlight current day in agenda"),
680 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
681 topLayout->addWidget(dummy->checkBox(),ii++,0);
682
683 dummy =
684 addWidBool(i18n("Use light color for highlight current day"),
685 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
686 topLayout->addWidget(dummy->checkBox(),ii++,0);
687
688
689 KPrefsDialogWidBool *marcusBainsEnabled =
690 addWidBool(i18n("Show current time"),
691 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
692 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
693
694
687 dummy = 695 dummy =
688 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 696 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
689 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 697 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
690 topLayout->addWidget(dummy->checkBox(),ii++,0); 698 topLayout->addWidget(dummy->checkBox(),ii++,0);
691 699
692 dummy = 700 dummy =
693 addWidBool(i18n("Set agenda to current time on change"), 701 addWidBool(i18n("Set agenda to current time on change"),
694 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 702 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
695 topLayout->addWidget(dummy->checkBox(),ii++,0); 703 topLayout->addWidget(dummy->checkBox(),ii++,0);
696 704
697 dummy = 705
698 addWidBool(i18n("Listview uses monthly timespan"),
699 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
700 topLayout->addWidget(dummy->checkBox(),ii++,0);
701 dummy =
702 addWidBool(i18n("Highlight selection in Time Edit"),
703 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
704 topLayout->addWidget( dummy->checkBox(), ii++,0);
705 706
706 707
707 708
708 709
709 710
710 topFrame = addPage(i18n("Month View"),0,0); 711 topFrame = addPage(i18n("Month View"),0,0);
711 // DesktopIcon("viewmag",KIcon::SizeMedium)); 712 // DesktopIcon("viewmag",KIcon::SizeMedium));
712 713
713 topLayout = new QGridLayout(topFrame,5,1); 714 topLayout = new QGridLayout(topFrame,5,1);
714 topLayout->setSpacing(spacingHint()); 715 topLayout->setSpacing(spacingHint());
715 topLayout->setMargin(marginHint()); 716 topLayout->setMargin(marginHint());
716 ii = 0; 717 ii = 0;
717 QLabel *lab; 718 QLabel *lab;
718 QHBox *habo = new QHBox( topFrame ); 719 QHBox *habo = new QHBox( topFrame );
719 if ( QApplication::desktop()->width() <= 480 ) { 720 if ( QApplication::desktop()->width() <= 480 ) {
720 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 721 lab = new QLabel ( i18n("Show events that recur "), topFrame );
721 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 722 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
722 ii++; 723 ii++;
723 } else { 724 } else {
724 new QLabel ( i18n("Show events that recur "), habo ); 725 new QLabel ( i18n("Show events that recur "), habo );
725 } 726 }
726 dailyRecur = 727 dailyRecur =
727 addWidBool(i18n("daily"), 728 addWidBool(i18n("daily"),
728 &(KOPrefs::instance()->mMonthDailyRecur),habo); 729 &(KOPrefs::instance()->mMonthDailyRecur),habo);
729 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 730 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
730 731
731 weeklyRecur = 732 weeklyRecur =
732 addWidBool(i18n("weekly"), 733 addWidBool(i18n("weekly"),
733 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 734 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
734 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 735 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
735 ii++; 736 ii++;
736 737
737 738
738 habo = new QHBox( topFrame ); 739 habo = new QHBox( topFrame );
739 if ( QApplication::desktop()->width() <= 480 ) { 740 if ( QApplication::desktop()->width() <= 480 ) {
740 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 741 lab = new QLabel (i18n("Show in every cell ") , topFrame );
741 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 742 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
742 ii++; 743 ii++;
743 744
744 } else { 745 } else {
745 new QLabel ( i18n("Show in every cell "), habo ); 746 new QLabel ( i18n("Show in every cell "), habo );
746 } 747 }
747 weeklyRecur = 748 weeklyRecur =
748 addWidBool(i18n("short month"), 749 addWidBool(i18n("short month"),
749 &(KOPrefs::instance()->mMonthShowShort),habo); 750 &(KOPrefs::instance()->mMonthShowShort),habo);
750 weeklyRecur = 751 weeklyRecur =
751 addWidBool(i18n("icons"), 752 addWidBool(i18n("icons"),
752 &(KOPrefs::instance()->mMonthShowIcons),habo); 753 &(KOPrefs::instance()->mMonthShowIcons),habo);
753 754
754 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 755 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
755 ii++; 756 ii++;
756#ifdef DESKTOP_VERSION 757#ifdef DESKTOP_VERSION
757 KPrefsDialogWidBool *enableMonthScroll = 758 KPrefsDialogWidBool *enableMonthScroll =
758 addWidBool(i18n("Enable scrollbars in month view cells"), 759 addWidBool(i18n("Enable scrollbars in month view cells"),
759 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 760 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
760 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 761 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
761#endif 762#endif
762 dummy = 763 dummy =
763 addWidBool(i18n("Week view mode uses bigger font"), 764 addWidBool(i18n("Week view mode uses bigger font"),
764 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); 765 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame);
765 topLayout->addWidget(dummy->checkBox(),ii++,0); 766 topLayout->addWidget(dummy->checkBox(),ii++,0);
766 dummy = 767 dummy =
767 addWidBool(i18n("Show Sat/Sun together"), 768 addWidBool(i18n("Show Sat/Sun together"),
768 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 769 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
769 topLayout->addWidget(dummy->checkBox(),ii++,0); 770 topLayout->addWidget(dummy->checkBox(),ii++,0);
770 771
771 KPrefsDialogWidBool *coloredCategoriesInMonthView = 772 KPrefsDialogWidBool *coloredCategoriesInMonthView =
772 addWidBool(i18n("Month view uses category colors"), 773 addWidBool(i18n("Month view uses category colors"),
773 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 774 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
774 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 775 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
775 776
776 dummy = 777 dummy =
777 addWidBool(i18n("Categorie colors are applied to text"), 778 addWidBool(i18n("Categorie colors are applied to text"),
778 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 779 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
779 topLayout->addWidget(dummy->checkBox(),ii++,0); 780 topLayout->addWidget(dummy->checkBox(),ii++,0);
780 coloredCategoriesInMonthView = 781 coloredCategoriesInMonthView =
781 addWidBool(i18n("Month view uses day colors"), 782 addWidBool(i18n("Month view uses day colors"),
782 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 783 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
783 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 784 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
784 785
785 KPrefsDialogWidColor *holidayColor = 786 KPrefsDialogWidColor *holidayColor =
786 addWidColor(i18n("Day color odd months"), 787 addWidColor(i18n("Day color odd months"),
787 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 788 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
788 topLayout->addWidget(holidayColor->label(),ii,0); 789 topLayout->addWidget(holidayColor->label(),ii,0);
789 topLayout->addWidget(holidayColor->button(),ii++,1); 790 topLayout->addWidget(holidayColor->button(),ii++,1);
790 791
791 holidayColor = 792 holidayColor =
792 addWidColor(i18n("Day color even months"), 793 addWidColor(i18n("Day color even months"),
793 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 794 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
794 topLayout->addWidget(holidayColor->label(),ii,0); 795 topLayout->addWidget(holidayColor->label(),ii,0);
795 topLayout->addWidget(holidayColor->button(),ii++,1); 796 topLayout->addWidget(holidayColor->button(),ii++,1);
796 797
797 798
798 holidayColor = 799 holidayColor =
799 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 800 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
800 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 801 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
801 topLayout->addWidget(holidayColor->label(),ii,0); 802 topLayout->addWidget(holidayColor->label(),ii,0);
802 topLayout->addWidget(holidayColor->button(),ii++,1); 803 topLayout->addWidget(holidayColor->button(),ii++,1);
803 // *********************** What'sNext View 804 // *********************** What'sNext View
804 topFrame = addPage(i18n("What's Next View"),0,0); 805 topFrame = addPage(i18n("What's Next View"),0,0);
805 // DesktopIcon("viewmag",KIcon::SizeMedium)); 806 // DesktopIcon("viewmag",KIcon::SizeMedium));
806 807
807 topLayout = new QGridLayout(topFrame,4,1); 808 topLayout = new QGridLayout(topFrame,4,1);
808 topLayout->setSpacing(spacingHint()); 809 topLayout->setSpacing(spacingHint());
809 topLayout->setMargin(marginHint()); 810 topLayout->setMargin(marginHint());
810 ii = 0; 811 ii = 0;
812
813
814 QHBox* hdummy = new QHBox(topFrame);
815 new QLabel(i18n("Days in What's Next:"),hdummy);
816 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
817
818 topLayout->addWidget(hdummy,ii++,0);
819
820 QHBox *prioBox = new QHBox(topFrame);
821 // intervalBox->setSpacing(spacingHint());
822 topLayout->addWidget(prioBox,ii++,0);
823 QString messa = i18n("Show topmost todo prios in What's Next:");
824
825 if ( QApplication::desktop()->width() < 300 )
826 messa = i18n("Show topmost todo prios in What's N.:");
827 QLabel *prioLabel = new QLabel(messa, prioBox);
828 mPrioSpin = new QSpinBox(0,5,1,prioBox);
829 if ( QApplication::desktop()->width() < 300 )
830 mPrioSpin->setFixedWidth( 40 );
831
811 KPrefsDialogWidBool *passwdk = 832 KPrefsDialogWidBool *passwdk =
812 833
813 addWidBool(i18n("Show events, that are done in \nWhat's Next view"), 834 addWidBool(i18n("Show events, that are done in \nWhat's Next view"),
814 &(KOPrefs::instance()->mWNViewShowsPast),topFrame); 835 &(KOPrefs::instance()->mWNViewShowsPast),topFrame);
815 topLayout->addWidget(passwdk->checkBox(), ii++,0); 836 topLayout->addWidget(passwdk->checkBox(), ii++,0);
816 passwdk = 837 passwdk =
817 addWidBool(i18n("Show parent To-Do's in What's Next view"), 838 addWidBool(i18n("Show parent To-Do's in What's Next view"),
818 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 839 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
819 topLayout->addWidget(passwdk->checkBox(), ii++,0); 840 topLayout->addWidget(passwdk->checkBox(), ii++,0);
820 841
821 passwdk = 842 passwdk =
822 addWidBool(i18n("Show location in What's Next view"), 843 addWidBool(i18n("Show location in What's Next view"),
823 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 844 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
824 topLayout->addWidget(passwdk->checkBox(), ii++,0); 845 topLayout->addWidget(passwdk->checkBox(), ii++,0);
825 846
826 passwdk = 847 passwdk =
827 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), 848 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"),
828 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 849 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
829 topLayout->addWidget(passwdk->checkBox(), ii++,0); 850 topLayout->addWidget(passwdk->checkBox(), ii++,0);
830 passwdk = 851 passwdk =
831 addWidBool(i18n("Use short date in \nWhat's Next/Event view"), 852 addWidBool(i18n("Use short date in \nWhat's Next/Event view"),
832 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 853 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
833 topLayout->addWidget(passwdk->checkBox(), ii++,0); 854 topLayout->addWidget(passwdk->checkBox(), ii++,0);
834 855
835 856
836 857
837 858
838 // *********************** Todo View 859 // *********************** Todo View
839 860
840 topFrame = addPage(i18n("Todo View"),0,0); 861 topFrame = addPage(i18n("Todo View"),0,0);
841 // DesktopIcon("viewmag",KIcon::SizeMedium)); 862 // DesktopIcon("viewmag",KIcon::SizeMedium));
842 863
843 topLayout = new QGridLayout(topFrame,4,1); 864 topLayout = new QGridLayout(topFrame,4,1);
844 topLayout->setSpacing(spacingHint()); 865 topLayout->setSpacing(spacingHint());
845 topLayout->setMargin(marginHint()); 866 topLayout->setMargin(marginHint());
846 ii = 0; 867 ii = 0;
847dummy = 868dummy =
848 addWidBool(i18n("Hide not running Todos in To-do view"), 869 addWidBool(i18n("Hide not running Todos in To-do view"),
849 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); 870 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
850 topLayout->addWidget(dummy->checkBox(),ii++,0); 871 topLayout->addWidget(dummy->checkBox(),ii++,0);
851 872
852 873
853 KPrefsDialogWidBool *showCompletedTodo = 874 KPrefsDialogWidBool *showCompletedTodo =
854 addWidBool(i18n("To-do view shows completed Todos"), 875 addWidBool(i18n("To-do view shows completed Todos"),
855 &(KOPrefs::instance()->mShowCompletedTodo),topFrame); 876 &(KOPrefs::instance()->mShowCompletedTodo),topFrame);
856 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); 877 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
857 dummy = 878 dummy =
858 addWidBool(i18n("To-do view shows complete as 'xx %'"), 879 addWidBool(i18n("To-do view shows complete as 'xx %'"),
859 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); 880 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
860 topLayout->addWidget(dummy->checkBox(),ii++,0); 881 topLayout->addWidget(dummy->checkBox(),ii++,0);
861 882
862 dummy = 883 dummy =
863 addWidBool(i18n("Small To-do view uses smaller font"), 884 addWidBool(i18n("Small To-do view uses smaller font"),
864 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); 885 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
865 topLayout->addWidget(dummy->checkBox(),ii++,0); 886 topLayout->addWidget(dummy->checkBox(),ii++,0);
866 887
867 888
868 889
869 dummy = 890 dummy =
870 addWidBool(i18n("Todo view uses category colors"), 891 addWidBool(i18n("Todo view uses category colors"),
871 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); 892 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame);
872 topLayout->addWidget(dummy->checkBox(),ii++,0); 893 topLayout->addWidget(dummy->checkBox(),ii++,0);
873 894
874 895
875 QWidget* wid = new QWidget( topFrame ); 896 QWidget* wid = new QWidget( topFrame );
876 // Todo due today color 897 // Todo due today color
877 KPrefsDialogWidColor *todoDueTodayColor = 898 KPrefsDialogWidColor *todoDueTodayColor =
878 addWidColor(i18n("Todo due today color:"), 899 addWidColor(i18n("Todo due today color:"),
879 &(KOPrefs::instance()->mTodoDueTodayColor),wid); 900 &(KOPrefs::instance()->mTodoDueTodayColor),wid);
880 QHBoxLayout *widLayout = new QHBoxLayout(wid); 901 QHBoxLayout *widLayout = new QHBoxLayout(wid);
881 widLayout->addWidget( todoDueTodayColor->label() ); 902 widLayout->addWidget( todoDueTodayColor->label() );
882 widLayout->addWidget( todoDueTodayColor->button() ); 903 widLayout->addWidget( todoDueTodayColor->button() );
883 topLayout->addWidget(wid,ii++,0); 904 topLayout->addWidget(wid,ii++,0);
884 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); 905 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1);
885 906
886 // Todo overdue color 907 // Todo overdue color
887 wid = new QWidget( topFrame ); 908 wid = new QWidget( topFrame );
888 widLayout = new QHBoxLayout(wid); 909 widLayout = new QHBoxLayout(wid);
889 KPrefsDialogWidColor *todoOverdueColor = 910 KPrefsDialogWidColor *todoOverdueColor =
890 addWidColor(i18n("Todo overdue color:"), 911 addWidColor(i18n("Todo overdue color:"),
891 &(KOPrefs::instance()->mTodoOverdueColor),wid); 912 &(KOPrefs::instance()->mTodoOverdueColor),wid);
892 widLayout->addWidget(todoOverdueColor->label()); 913 widLayout->addWidget(todoOverdueColor->label());
893 widLayout->addWidget(todoOverdueColor->button()); 914 widLayout->addWidget(todoOverdueColor->button());
894 topLayout->addWidget(wid,ii++,0); 915 topLayout->addWidget(wid,ii++,0);
895 916
896 dummy = 917 dummy =
897 addWidBool(i18n("Colors are applied to text"), 918 addWidBool(i18n("Colors are applied to text"),
898 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); 919 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame);
899 topLayout->addWidget(dummy->checkBox(),ii++,0); 920 topLayout->addWidget(dummy->checkBox(),ii++,0);
900 921
901 dummy = 922 dummy =
902 addWidBool(i18n("Allday Agenda view shows todos"), 923 addWidBool(i18n("Allday Agenda view shows todos"),
903 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); 924 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame);
904 topLayout->addWidget(dummy->checkBox(),ii++,0); 925 topLayout->addWidget(dummy->checkBox(),ii++,0);
905 926
906 927
907 topFrame = addPage(i18n("View Options"),0,0); 928 topFrame = addPage(i18n("View Options"),0,0);
908 929
909 topLayout = new QGridLayout(topFrame,4,1); 930 topLayout = new QGridLayout(topFrame,4,1);
910 topLayout->setSpacing(spacingHint()); 931 topLayout->setSpacing(spacingHint());
911 topLayout->setMargin(marginHint()); 932 topLayout->setMargin(marginHint());
912 ii = 0; 933 ii = 0;
913 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); 934 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
914 topLayout->addWidget(lab ,ii++,0); 935 topLayout->addWidget(lab ,ii++,0);
915 936
916 dummy = addWidBool(i18n("Details"), 937 dummy = addWidBool(i18n("Details"),
917 &(KOPrefs::instance()->mEVshowDetails),topFrame); 938 &(KOPrefs::instance()->mEVshowDetails),topFrame);
918 topLayout->addWidget(dummy->checkBox(),ii++,0); 939 topLayout->addWidget(dummy->checkBox(),ii++,0);
919 dummy = addWidBool(i18n("Created time"), 940 dummy = addWidBool(i18n("Created time"),
920 &(KOPrefs::instance()->mEVshowCreated),topFrame); 941 &(KOPrefs::instance()->mEVshowCreated),topFrame);
921 topLayout->addWidget(dummy->checkBox(),ii++,0); 942 topLayout->addWidget(dummy->checkBox(),ii++,0);
922 dummy = addWidBool(i18n("Last modified time"), 943 dummy = addWidBool(i18n("Last modified time"),
923 &(KOPrefs::instance()->mEVshowChanged),topFrame); 944 &(KOPrefs::instance()->mEVshowChanged),topFrame);
924 topLayout->addWidget(dummy->checkBox(),ii++,0); 945 topLayout->addWidget(dummy->checkBox(),ii++,0);
925 946
926 947
927 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); 948 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
928 topLayout->addWidget(lab ,ii++,0); 949 topLayout->addWidget(lab ,ii++,0);
929 950
930 dummy = addWidBool(i18n("Details"), 951 dummy = addWidBool(i18n("Details"),
931 &(KOPrefs::instance()->mWTshowDetails),topFrame); 952 &(KOPrefs::instance()->mWTshowDetails),topFrame);
932 topLayout->addWidget(dummy->checkBox(),ii++,0); 953 topLayout->addWidget(dummy->checkBox(),ii++,0);
933 dummy = addWidBool(i18n("Created time"), 954 dummy = addWidBool(i18n("Created time"),
934 &(KOPrefs::instance()->mWTshowCreated),topFrame); 955 &(KOPrefs::instance()->mWTshowCreated),topFrame);
935 topLayout->addWidget(dummy->checkBox(),ii++,0); 956 topLayout->addWidget(dummy->checkBox(),ii++,0);
936 dummy = addWidBool(i18n("Last modified time"), 957 dummy = addWidBool(i18n("Last modified time"),
937 &(KOPrefs::instance()->mWTshowChanged),topFrame); 958 &(KOPrefs::instance()->mWTshowChanged),topFrame);
938 topLayout->addWidget(dummy->checkBox(),ii++,0); 959 topLayout->addWidget(dummy->checkBox(),ii++,0);
939 960
940 961
941 topFrame = addPage(i18n("Alarm"),0,0); 962 topFrame = addPage(i18n("Alarm"),0,0);
942 // DesktopIcon("viewmag",KIcon::SizeMedium)); 963 // DesktopIcon("viewmag",KIcon::SizeMedium));
943 964
944 topLayout = new QGridLayout(topFrame,2,1); 965 topLayout = new QGridLayout(topFrame,2,1);
945 topLayout->setSpacing(spacingHint()); 966 topLayout->setSpacing(spacingHint());
946 topLayout->setMargin(marginHint()); 967 topLayout->setMargin(marginHint());
947 int iii = 0; 968 int iii = 0;
948 969
949 dummy = 970 dummy =
950 addWidBool(i18n("Use internal alarm notification"), 971 addWidBool(i18n("Use internal alarm notification"),
951 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 972 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
952 topLayout->addWidget(dummy->checkBox(),iii++,0); 973 topLayout->addWidget(dummy->checkBox(),iii++,0);
953 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); 974 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);
954 975
955 topLayout->addWidget(lab ,iii++,0); 976 topLayout->addWidget(lab ,iii++,0);
956#ifndef DESKTOP_VERSION 977#ifndef DESKTOP_VERSION
957 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 978 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
958#else 979#else
959 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 980 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
960 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 981 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
961#endif 982#endif
962 983
963 QHBox* dummyBox = new QHBox(topFrame); 984 QHBox* dummyBox = new QHBox(topFrame);
964 new QLabel(i18n("Play beeps count:"),dummyBox); 985 new QLabel(i18n("Play beeps count:"),dummyBox);
965 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 986 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
966 topLayout->addWidget(dummyBox,iii++,0); 987 topLayout->addWidget(dummyBox,iii++,0);
967 988
968 dummyBox = new QHBox(topFrame); 989 dummyBox = new QHBox(topFrame);
969 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 990 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
970 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 991 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
971 topLayout->addWidget(dummyBox,iii++,0); 992 topLayout->addWidget(dummyBox,iii++,0);
972 993
973 dummyBox = new QHBox(topFrame); 994 dummyBox = new QHBox(topFrame);
974 new QLabel(i18n("Default suspend time in min:"),dummyBox); 995 new QLabel(i18n("Default suspend time in min:"),dummyBox);
975 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 996 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
976 topLayout->addWidget(dummyBox,iii++,0); 997 topLayout->addWidget(dummyBox,iii++,0);
977 998
978 dummyBox = new QHBox(topFrame); 999 dummyBox = new QHBox(topFrame);
979 new QLabel(i18n("Auto suspend count:"),dummyBox); 1000 new QLabel(i18n("Auto suspend count:"),dummyBox);
980 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1001 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
981 topLayout->addWidget(dummyBox,iii++,0); 1002 topLayout->addWidget(dummyBox,iii++,0);
982 1003
983 1004
984 1005
985 1006
986 1007
987 1008
988 1009
989 QHBox* hbo = new QHBox ( topFrame ); 1010 QHBox* hbo = new QHBox ( topFrame );
990 mDefaultAlarmFile = new QLineEdit(hbo); 1011 mDefaultAlarmFile = new QLineEdit(hbo);
991 QPushButton * loadTemplate = new QPushButton(hbo); 1012 QPushButton * loadTemplate = new QPushButton(hbo);
992 QPixmap icon; 1013 QPixmap icon;
993 if ( QApplication::desktop()->width() < 321 ) 1014 if ( QApplication::desktop()->width() < 321 )
994 icon = SmallIcon("fileimport16"); 1015 icon = SmallIcon("fileimport16");
995 else 1016 else
996 icon = SmallIcon("fileimport"); 1017 icon = SmallIcon("fileimport");
997 loadTemplate->setIconSet (icon ) ; 1018 loadTemplate->setIconSet (icon ) ;
998 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 1019 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
999 int size = loadTemplate->sizeHint().height(); 1020 int size = loadTemplate->sizeHint().height();
1000 loadTemplate->setFixedSize( size, size ); 1021 loadTemplate->setFixedSize( size, size );
1001 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); 1022 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
1002 // topLayout->addWidget(lab ,iii++,0); 1023 // topLayout->addWidget(lab ,iii++,0);
1003 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); 1024 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
1004 topLayout->addWidget(lab ,iii++,0); 1025 topLayout->addWidget(lab ,iii++,0);
1005 topLayout->addWidget(hbo,iii++,0); 1026 topLayout->addWidget(hbo,iii++,0);
1006 // 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); 1027 // 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);
1007 1028
1008// topLayout->addWidget(lab ,iii++,0); 1029// topLayout->addWidget(lab ,iii++,0);
1009// #ifndef DESKTOP_VERSION 1030// #ifndef DESKTOP_VERSION
1010// lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1031// lab->setAlignment( AlignLeft|WordBreak|AlignTop);
1011// #else 1032// #else
1012// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1033// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
1013// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1034// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1014// #endif 1035// #endif
1015 1036
1016 1037
1017} 1038}
1018 1039
1019void KOPrefsDialog::selectSoundFile() 1040void KOPrefsDialog::selectSoundFile()
1020{ 1041{
1021 QString fileName = mDefaultAlarmFile->text(); 1042 QString fileName = mDefaultAlarmFile->text();
1022 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); 1043 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this );
1023 if ( fileName.length() > 0 ) 1044 if ( fileName.length() > 0 )
1024 mDefaultAlarmFile->setText( fileName ); 1045 mDefaultAlarmFile->setText( fileName );
1025} 1046}
1026void KOPrefsDialog::setupFontsTab() 1047void KOPrefsDialog::setupFontsTab()
1027{ 1048{
1028 1049
1029 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1050 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
1030 // DesktopIcon("fonts",KIcon::SizeMedium)); 1051 // DesktopIcon("fonts",KIcon::SizeMedium));
1031 1052
1032 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1053 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
1033 topLayout->setSpacing(1); 1054 topLayout->setSpacing(1);
1034 topLayout->setMargin(3); 1055 topLayout->setMargin(3);
1035 KPrefsDialogWidFont * tVFont; 1056 KPrefsDialogWidFont * tVFont;
1036 int i = 0; 1057 int i = 0;
1037 KPrefsDialogWidFont *timeLabelsFont = 1058 KPrefsDialogWidFont *timeLabelsFont =
1038 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), 1059 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
1039 &(KOPrefs::instance()->mDateNavigatorFont),topFrame); 1060 &(KOPrefs::instance()->mDateNavigatorFont),topFrame);
1040 topLayout->addWidget(timeLabelsFont->label(),i,0); 1061 topLayout->addWidget(timeLabelsFont->label(),i,0);
1041 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1062 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1042 topLayout->addWidget(timeLabelsFont->button(),i,2); 1063 topLayout->addWidget(timeLabelsFont->button(),i,2);
1043 ++i; 1064 ++i;
1044 1065
1045 1066
1046 timeLabelsFont = 1067 timeLabelsFont =
1047 addWidFont(i18n("Mon 15"),i18n("Date Labels:"), 1068 addWidFont(i18n("Mon 15"),i18n("Date Labels:"),
1048 &(KOPrefs::instance()->mTimeLabelsFont),topFrame); 1069 &(KOPrefs::instance()->mTimeLabelsFont),topFrame);
1049 topLayout->addWidget(timeLabelsFont->label(),i,0); 1070 topLayout->addWidget(timeLabelsFont->label(),i,0);
1050 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1071 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1051 topLayout->addWidget(timeLabelsFont->button(),i,2); 1072 topLayout->addWidget(timeLabelsFont->button(),i,2);
1052 ++i; 1073 ++i;
1053 1074
1054 KPrefsDialogWidFont *timeBarFont = 1075 KPrefsDialogWidFont *timeBarFont =
1055 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), 1076 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"),
1056 &(KOPrefs::instance()->mTimeBarFont),topFrame); 1077 &(KOPrefs::instance()->mTimeBarFont),topFrame);
1057 topLayout->addWidget(timeBarFont->label(),i,0); 1078 topLayout->addWidget(timeBarFont->label(),i,0);
1058 topLayout->addWidget(timeBarFont->preview(),i,1); 1079 topLayout->addWidget(timeBarFont->preview(),i,1);
1059 topLayout->addWidget(timeBarFont->button(),i,2); 1080 topLayout->addWidget(timeBarFont->button(),i,2);
1060 ++i; 1081 ++i;
1061 1082
1062 1083
1063 KPrefsDialogWidFont *marcusBainsFont = 1084 KPrefsDialogWidFont *marcusBainsFont =
1064 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), 1085 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"),
1065 &(KOPrefs::instance()->mMarcusBainsFont),topFrame); 1086 &(KOPrefs::instance()->mMarcusBainsFont),topFrame);
1066 topLayout->addWidget(marcusBainsFont->label(),i,0); 1087 topLayout->addWidget(marcusBainsFont->label(),i,0);
1067 topLayout->addWidget(marcusBainsFont->preview(),i,1); 1088 topLayout->addWidget(marcusBainsFont->preview(),i,1);
1068 topLayout->addWidget(marcusBainsFont->button(),i,2); 1089 topLayout->addWidget(marcusBainsFont->button(),i,2);
1069 ++i; 1090 ++i;
1070 1091
1071 tVFont = 1092 tVFont =
1072 addWidFont(i18n("Summary"),i18n("Event Viewer:"), 1093 addWidFont(i18n("Summary"),i18n("Event Viewer:"),
1073 &(KOPrefs::instance()->mEventViewFont),topFrame); 1094 &(KOPrefs::instance()->mEventViewFont),topFrame);
1074 topLayout->addWidget(tVFont->label(),i,0); 1095 topLayout->addWidget(tVFont->label(),i,0);
1075 topLayout->addWidget(tVFont->preview(),i,1); 1096 topLayout->addWidget(tVFont->preview(),i,1);
1076 topLayout->addWidget(tVFont->button(),i,2); 1097 topLayout->addWidget(tVFont->button(),i,2);
1077 ++i; 1098 ++i;
1078 1099
1079 1100
1080 1101
1081 tVFont = 1102 tVFont =
1082 addWidFont(i18n("Details"),i18n("EditorBox:"), 1103 addWidFont(i18n("Details"),i18n("EditorBox:"),
1083 &(KOPrefs::instance()->mEditBoxFont),topFrame); 1104 &(KOPrefs::instance()->mEditBoxFont),topFrame);
1084 topLayout->addWidget(tVFont->label(),i,0); 1105 topLayout->addWidget(tVFont->label(),i,0);
1085 topLayout->addWidget(tVFont->preview(),i,1); 1106 topLayout->addWidget(tVFont->preview(),i,1);
1086 topLayout->addWidget(tVFont->button(),i,2); 1107 topLayout->addWidget(tVFont->button(),i,2);
1087 ++i; 1108 ++i;
1088 1109
1089 1110
1090 1111
1091 topLayout->setColStretch(1,1); 1112 topLayout->setColStretch(1,1);
1092 topLayout->setRowStretch(4,1); 1113 topLayout->setRowStretch(4,1);
1093 1114
1094 1115
1095 i = 0; 1116 i = 0;
1096 topFrame = addPage(i18n("View Fonts"),0, 1117 topFrame = addPage(i18n("View Fonts"),0,
1097 DesktopIcon("fonts",KIcon::SizeMedium)); 1118 DesktopIcon("fonts",KIcon::SizeMedium));
1098 1119
1099 topLayout = new QGridLayout(topFrame,7,3); 1120 topLayout = new QGridLayout(topFrame,7,3);
1100 topLayout->setSpacing(1); 1121 topLayout->setSpacing(1);
1101 topLayout->setMargin(3); 1122 topLayout->setMargin(3);
1102 1123
1103 tVFont = 1124 tVFont =
1104 addWidFont(i18n("Configure KO"),i18n("What's Next View:"), 1125 addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
1105 &(KOPrefs::instance()->mWhatsNextFont),topFrame); 1126 &(KOPrefs::instance()->mWhatsNextFont),topFrame);
1106 topLayout->addWidget(tVFont->label(),i,0); 1127 topLayout->addWidget(tVFont->label(),i,0);
1107 topLayout->addWidget(tVFont->preview(),i,1); 1128 topLayout->addWidget(tVFont->preview(),i,1);
1108 topLayout->addWidget(tVFont->button(),i,2); 1129 topLayout->addWidget(tVFont->button(),i,2);
1109 ++i; 1130 ++i;
1110 KPrefsDialogWidFont *agendaViewFont = 1131 KPrefsDialogWidFont *agendaViewFont =
1111 addWidFont(i18n("Event text"),i18n("Agenda view:"), 1132 addWidFont(i18n("Event text"),i18n("Agenda view:"),
1112 &(KOPrefs::instance()->mAgendaViewFont),topFrame); 1133 &(KOPrefs::instance()->mAgendaViewFont),topFrame);
1113 topLayout->addWidget(agendaViewFont->label(),i,0); 1134 topLayout->addWidget(agendaViewFont->label(),i,0);
1114 topLayout->addWidget(agendaViewFont->preview(),i,1); 1135 topLayout->addWidget(agendaViewFont->preview(),i,1);
1115 topLayout->addWidget(agendaViewFont->button(),i,2); 1136 topLayout->addWidget(agendaViewFont->button(),i,2);
1116 ++i; 1137 ++i;
1117 1138
1118 1139
1119 KPrefsDialogWidFont *monthViewFont = 1140 KPrefsDialogWidFont *monthViewFont =
1120 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), 1141 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"),
1121 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); 1142 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame);
1122 topLayout->addWidget(monthViewFont->label(),i,0); 1143 topLayout->addWidget(monthViewFont->label(),i,0);
1123 topLayout->addWidget(monthViewFont->preview(),i,1); 1144 topLayout->addWidget(monthViewFont->preview(),i,1);
1124 topLayout->addWidget(monthViewFont->button(),i,2); 1145 topLayout->addWidget(monthViewFont->button(),i,2);
1125 ++i; 1146 ++i;
1126 1147
1127 1148
1128 KPrefsDialogWidFont *lVFont = 1149 KPrefsDialogWidFont *lVFont =
1129 addWidFont(i18n("Event"),i18n("List View:"), 1150 addWidFont(i18n("Event"),i18n("List View:"),
1130 &(KOPrefs::instance()->mListViewFont),topFrame); 1151 &(KOPrefs::instance()->mListViewFont),topFrame);
1131 topLayout->addWidget(lVFont->label(),i,0); 1152 topLayout->addWidget(lVFont->label(),i,0);
1132 topLayout->addWidget(lVFont->preview(),i,1); 1153 topLayout->addWidget(lVFont->preview(),i,1);
1133 topLayout->addWidget(lVFont->button(),i,2); 1154 topLayout->addWidget(lVFont->button(),i,2);
1134 ++i; 1155 ++i;
1135 1156
1136 1157
1137 tVFont = 1158 tVFont =
1138 addWidFont(i18n("ToDo"),i18n("ToDoView:"), 1159 addWidFont(i18n("ToDo"),i18n("ToDoView:"),
1139 &(KOPrefs::instance()->mTodoViewFont),topFrame); 1160 &(KOPrefs::instance()->mTodoViewFont),topFrame);
1140 topLayout->addWidget(tVFont->label(),i,0); 1161 topLayout->addWidget(tVFont->label(),i,0);
1141 topLayout->addWidget(tVFont->preview(),i,1); 1162 topLayout->addWidget(tVFont->preview(),i,1);
1142 topLayout->addWidget(tVFont->button(),i,2); 1163 topLayout->addWidget(tVFont->button(),i,2);
1143 ++i; 1164 ++i;
1144 1165
1145 1166
1146 tVFont = 1167 tVFont =
1147 addWidFont(i18n("Today"),i18n("JournalView:"), 1168 addWidFont(i18n("Today"),i18n("JournalView:"),
1148 &(KOPrefs::instance()->mJornalViewFont),topFrame); 1169 &(KOPrefs::instance()->mJornalViewFont),topFrame);
1149 topLayout->addWidget(tVFont->label(),i,0); 1170 topLayout->addWidget(tVFont->label(),i,0);
1150 topLayout->addWidget(tVFont->preview(),i,1); 1171 topLayout->addWidget(tVFont->preview(),i,1);
1151 topLayout->addWidget(tVFont->button(),i,2); 1172 topLayout->addWidget(tVFont->button(),i,2);
1152 ++i; 1173 ++i;
1153 1174
1154 1175
1155 1176
1156 1177
1157 topLayout->setColStretch(1,1); 1178 topLayout->setColStretch(1,1);
1158 topLayout->setRowStretch(4,1); 1179 topLayout->setRowStretch(4,1);
1159 1180
1160 1181
1161 1182
1162 1183
1163} 1184}
1164 1185
1165void KOPrefsDialog::setupColorsTab() 1186void KOPrefsDialog::setupColorsTab()
1166{ 1187{
1167 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1188 QFrame *topFrame = addPage(i18n("Colors"),0,0);
1168 // DesktopIcon("colorize",KIcon::SizeMedium)); 1189 // DesktopIcon("colorize",KIcon::SizeMedium));
1169 1190
1170 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1191 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1171 // topLayout->setSpacing(spacingHint()); 1192 // topLayout->setSpacing(spacingHint());
1172 // topLayout->setMargin(marginHint()); 1193 // topLayout->setMargin(marginHint());
1173 1194
1174 topLayout->setSpacing(2); 1195 topLayout->setSpacing(2);
1175 topLayout->setMargin(3); 1196 topLayout->setMargin(3);
1176 1197
1177 int ii = 1; 1198 int ii = 1;
1178 QGroupBox *categoryGroup ; 1199 QGroupBox *categoryGroup ;
1179 1200
1180 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1201 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1181 topFrame); 1202 topFrame);
1182 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1203 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1183 1204
1184 mCategoryCombo = new QComboBox(categoryGroup); 1205 mCategoryCombo = new QComboBox(categoryGroup);
1185 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1206 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1186 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1207 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1187 1208
1188 mCategoryButton = new KColorButton(categoryGroup); 1209 mCategoryButton = new KColorButton(categoryGroup);
1189 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1210 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1190 updateCategoryColor(); 1211 updateCategoryColor();
1191 1212
1192 1213
1193 // Holiday Color 1214 // Holiday Color
1194 1215
1195 KPrefsDialogWidColor *holidayColor = 1216 KPrefsDialogWidColor *holidayColor =
1196 addWidColor(i18n("Holiday color:"), 1217 addWidColor(i18n("Holiday color:"),
1197 &(KOPrefs::instance()->mHolidayColor),topFrame); 1218 &(KOPrefs::instance()->mHolidayColor),topFrame);
1198 topLayout->addWidget(holidayColor->label(),ii,0); 1219 topLayout->addWidget(holidayColor->label(),ii,0);
1199 topLayout->addWidget(holidayColor->button(),ii++,1); 1220 topLayout->addWidget(holidayColor->button(),ii++,1);
1200 1221
1201 // Highlight Color 1222 // Highlight Color
1202 KPrefsDialogWidColor *highlightColor = 1223 KPrefsDialogWidColor *highlightColor =
1203 addWidColor(i18n("Highlight color:"), 1224 addWidColor(i18n("Highlight color:"),
1204 &(KOPrefs::instance()->mHighlightColor),topFrame); 1225 &(KOPrefs::instance()->mHighlightColor),topFrame);
1205 topLayout->addWidget(highlightColor->label(),ii,0); 1226 topLayout->addWidget(highlightColor->label(),ii,0);
1206 topLayout->addWidget(highlightColor->button(),ii++,1); 1227 topLayout->addWidget(highlightColor->button(),ii++,1);
1207 1228
1208 // Event color 1229 // Event color
1209 KPrefsDialogWidColor *eventColor = 1230 KPrefsDialogWidColor *eventColor =
1210 addWidColor(i18n("Default event color:"), 1231 addWidColor(i18n("Default event color:"),
1211 &(KOPrefs::instance()->mEventColor),topFrame); 1232 &(KOPrefs::instance()->mEventColor),topFrame);
1212 topLayout->addWidget(eventColor->label(),ii,0); 1233 topLayout->addWidget(eventColor->label(),ii,0);
1213 topLayout->addWidget(eventColor->button(),ii++,1); 1234 topLayout->addWidget(eventColor->button(),ii++,1);
1214 eventColor = 1235 eventColor =
1215 addWidColor(i18n("Default todo done color:"), 1236 addWidColor(i18n("Default todo done color:"),
1216 &(KOPrefs::instance()->mTodoDoneColor),topFrame); 1237 &(KOPrefs::instance()->mTodoDoneColor),topFrame);
1217 topLayout->addWidget(eventColor->label(),ii,0); 1238 topLayout->addWidget(eventColor->label(),ii,0);
1218 topLayout->addWidget(eventColor->button(),ii++,1); 1239 topLayout->addWidget(eventColor->button(),ii++,1);
1219 1240
1220 1241
1221 // agenda view background color 1242 // agenda view background color
1222 KPrefsDialogWidColor *agendaBgColor = 1243 KPrefsDialogWidColor *agendaBgColor =
1223 addWidColor(i18n("Agenda view background color:"), 1244 addWidColor(i18n("Agenda view background color:"),
1224 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1245 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1225 topLayout->addWidget(agendaBgColor->label(),ii,0); 1246 topLayout->addWidget(agendaBgColor->label(),ii,0);
1226 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1247 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1227 1248
1228 // working hours color 1249 // working hours color
1229 KPrefsDialogWidColor *workingHoursColor = 1250 KPrefsDialogWidColor *workingHoursColor =
1230 addWidColor(i18n("Working hours color:"), 1251 addWidColor(i18n("Working hours color:"),
1231 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1252 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1232 topLayout->addWidget(workingHoursColor->label(),ii,0); 1253 topLayout->addWidget(workingHoursColor->label(),ii,0);
1233 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1254 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1234 1255
1235 KPrefsDialogWidBool *sb = 1256 KPrefsDialogWidBool *sb =
1236 addWidBool(i18n("Use colors for application:"), 1257 addWidBool(i18n("Use colors for application:"),
1237 &(KOPrefs::instance()->mUseAppColors),topFrame); 1258 &(KOPrefs::instance()->mUseAppColors),topFrame);
1238 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1259 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1239 1260
1240 ii++; 1261 ii++;
1241 KPrefsDialogWidColor * workingHoursColor1 = 1262 KPrefsDialogWidColor * workingHoursColor1 =
1242 addWidColor(i18n("Buttons, menus, etc.:"), 1263 addWidColor(i18n("Buttons, menus, etc.:"),
1243 &(KOPrefs::instance()->mAppColor1),topFrame); 1264 &(KOPrefs::instance()->mAppColor1),topFrame);
1244 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1265 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1245 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1266 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1246 1267
1247 KPrefsDialogWidColor * workingHoursColor2 = 1268 KPrefsDialogWidColor * workingHoursColor2 =
1248 addWidColor(i18n("Frames, labels, etc.:"), 1269 addWidColor(i18n("Frames, labels, etc.:"),
1249 &(KOPrefs::instance()->mAppColor2),topFrame); 1270 &(KOPrefs::instance()->mAppColor2),topFrame);
1250 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1271 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1251 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1272 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1252 1273
1253 1274
1254 1275
1255} 1276}
1256 1277
1257void KOPrefsDialog::setCategoryColor() 1278void KOPrefsDialog::setCategoryColor()
1258{ 1279{
1259 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1280 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1260} 1281}
1261 1282
1262void KOPrefsDialog::updateCategoryColor() 1283void KOPrefsDialog::updateCategoryColor()
1263{ 1284{
1264 QString cat = mCategoryCombo->currentText(); 1285 QString cat = mCategoryCombo->currentText();
1265 QColor *color = mCategoryDict.find(cat); 1286 QColor *color = mCategoryDict.find(cat);
1266 if (!color) { 1287 if (!color) {
1267 color = KOPrefs::instance()->categoryColor(cat); 1288 color = KOPrefs::instance()->categoryColor(cat);
1268 } 1289 }
1269 if (color) { 1290 if (color) {
1270 mCategoryButton->setColor(*color); 1291 mCategoryButton->setColor(*color);
1271 } 1292 }
1272} 1293}
1273 1294
1274void KOPrefsDialog::setupPrinterTab() 1295void KOPrefsDialog::setupPrinterTab()
1275{ 1296{
1276 mPrinterTab = addPage(i18n("Printing"),0, 1297 mPrinterTab = addPage(i18n("Printing"),0,
1277 DesktopIcon("fileprint",KIcon::SizeMedium)); 1298 DesktopIcon("fileprint",KIcon::SizeMedium));
1278 1299
1279 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1300 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1280 topLayout->setSpacing(spacingHint()); 1301 topLayout->setSpacing(spacingHint());
1281 topLayout->setMargin(marginHint()); 1302 topLayout->setMargin(marginHint());
1282 1303
1283 topLayout->setRowStretch(4,1); 1304 topLayout->setRowStretch(4,1);
1284} 1305}
1285 1306
1286void KOPrefsDialog::setupGroupSchedulingTab() 1307void KOPrefsDialog::setupGroupSchedulingTab()
1287{ 1308{
1288#if 0 1309#if 0
1289 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1310 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1290 DesktopIcon("personal",KIcon::SizeMedium)); 1311 DesktopIcon("personal",KIcon::SizeMedium));
1291 1312
1292 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1313 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1293 topLayout->setSpacing(spacingHint()); 1314 topLayout->setSpacing(spacingHint());
1294 topLayout->setMargin(marginHint()); 1315 topLayout->setMargin(marginHint());
1295 1316
1296#if 0 1317#if 0
1297 KPrefsDialogWidRadios *schedulerGroup = 1318 KPrefsDialogWidRadios *schedulerGroup =
1298 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1319 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1299 topFrame); 1320 topFrame);
1300 schedulerGroup->addRadio("Dummy"); // Only for debugging 1321 schedulerGroup->addRadio("Dummy"); // Only for debugging
1301 schedulerGroup->addRadio(i18n("Mail client")); 1322 schedulerGroup->addRadio(i18n("Mail client"));
1302 1323
1303 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1324 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1304#endif 1325#endif
1305 1326
1306 KPrefsDialogWidRadios *sendGroup = 1327 KPrefsDialogWidRadios *sendGroup =
1307 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1328 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1308 topFrame); 1329 topFrame);
1309 sendGroup->addRadio(i18n("Send to outbox")); 1330 sendGroup->addRadio(i18n("Send to outbox"));
1310 sendGroup->addRadio(i18n("Send directly")); 1331 sendGroup->addRadio(i18n("Send directly"));
1311 1332
1312 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1333 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1313 1334
1314 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);
1315 mAMails = new QListView(topFrame); 1336 mAMails = new QListView(topFrame);
1316 mAMails->addColumn(i18n("Email"),300); 1337 mAMails->addColumn(i18n("Email"),300);
1317 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1338 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1318 1339
1319 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); 1340 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
1320 aEmailsEdit = new QLineEdit(topFrame); 1341 aEmailsEdit = new QLineEdit(topFrame);
1321 aEmailsEdit->setEnabled(false); 1342 aEmailsEdit->setEnabled(false);
1322 topLayout->addWidget(aEmailsEdit,4,1); 1343 topLayout->addWidget(aEmailsEdit,4,1);