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