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