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,1176 +1,1195 @@ | |||
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); |