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