Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 7de7064..017f1f7 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,750 +1,745 @@ | |||
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 | #include <kglobalsettings.h> | 56 | #include <kglobalsettings.h> |
57 | 57 | ||
58 | #include <klineedit.h> | 58 | #include <klineedit.h> |
59 | 59 | ||
60 | 60 | ||
61 | #include "koprefs.h" | 61 | #include "koprefs.h" |
62 | 62 | ||
63 | #include "koprefsdialog.h" | 63 | #include "koprefsdialog.h" |
64 | //#include <kprefswidget.h> | 64 | //#include <kprefswidget.h> |
65 | 65 | ||
66 | 66 | ||
67 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 67 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
68 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 68 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
69 | { | 69 | { |
70 | 70 | ||
71 | setFont( KGlobalSettings::generalMaxFont() ); | 71 | setFont( KGlobalSettings::generalMaxFont() ); |
72 | setCaption( i18n("Settings - some need a restart (nr)")); | 72 | setCaption( i18n("Settings - some need a restart (nr)")); |
73 | setupGlobalTab(); | 73 | setupGlobalTab(); |
74 | setupMainTab(); | 74 | setupMainTab(); |
75 | setupMailTab();; | 75 | setupMailTab();; |
76 | setupFontsTab(); | 76 | setupFontsTab(); |
77 | readConfig(); | 77 | readConfig(); |
78 | #ifndef DESKTOP_VERSION | 78 | #ifndef DESKTOP_VERSION |
79 | if ( QApplication::desktop()->height() == 480 ) | 79 | if ( QApplication::desktop()->height() == 480 ) |
80 | hideButtons(); | 80 | hideButtons(); |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #if 0 | 83 | #if 0 |
84 | 84 | ||
85 | setupMainTab(); | 85 | setupMainTab(); |
86 | setupLocaleTab(); | 86 | setupLocaleTab(); |
87 | setupTimeZoneTab(); | 87 | setupTimeZoneTab(); |
88 | setupTimeTab(); | 88 | setupTimeTab(); |
89 | setupLocaleDateTab(); | 89 | setupLocaleDateTab(); |
90 | setupFontsTab(); | 90 | setupFontsTab(); |
91 | setupColorsTab(); | 91 | setupColorsTab(); |
92 | setupViewsTab(); | 92 | setupViewsTab(); |
93 | //setupSyncTab(); | 93 | //setupSyncTab(); |
94 | //setupSyncAlgTab(); | 94 | //setupSyncAlgTab(); |
95 | //setupPrinterTab(); | 95 | //setupPrinterTab(); |
96 | //setupGroupSchedulingTab(); | 96 | //setupGroupSchedulingTab(); |
97 | //setupGroupAutomationTab(); | 97 | //setupGroupAutomationTab(); |
98 | #endif | 98 | #endif |
99 | } | 99 | } |
100 | 100 | ||
101 | #include "kpimglobalprefs.h" | 101 | #include "kpimglobalprefs.h" |
102 | 102 | ||
103 | KOPrefsDialog::~KOPrefsDialog() | 103 | KOPrefsDialog::~KOPrefsDialog() |
104 | { | 104 | { |
105 | } | 105 | } |
106 | void KOPrefsDialog::setupGlobalTab() | 106 | void KOPrefsDialog::setupGlobalTab() |
107 | { | 107 | { |
108 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 108 | |
109 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | ||
110 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | ||
111 | topLayout->addWidget( kdelibcfg ); | ||
112 | 109 | ||
113 | 110 | ||
114 | } | 111 | } |
115 | void KOPrefsDialog::setupMainTab() | 112 | void KOPrefsDialog::setupMainTab() |
116 | { | 113 | { |
117 | QFrame *topFrame = addPage(i18n("General"),0,0); | 114 | QFrame *topFrame = addPage(i18n("General"),0,0); |
118 | 115 | ||
119 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 116 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
120 | topLayout->setSpacing(spacingHint()); | 117 | topLayout->setSpacing(spacingHint()); |
121 | topLayout->setMargin(marginHint()); | 118 | topLayout->setMargin(marginHint()); |
122 | 119 | ||
123 | 120 | ||
124 | mNameEdit = new QLineEdit(topFrame); | 121 | mNameEdit = new QLineEdit(topFrame); |
125 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 122 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
126 | topLayout->addWidget(mNameLabel,0,0); | 123 | topLayout->addWidget(mNameLabel,0,0); |
127 | topLayout->addWidget(mNameEdit,0,1); | 124 | topLayout->addWidget(mNameEdit,0,1); |
128 | 125 | ||
129 | mEmailEdit = new QLineEdit(topFrame); | 126 | mEmailEdit = new QLineEdit(topFrame); |
130 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 127 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
131 | topLayout->addWidget(mEmailLabel,1,0); | 128 | topLayout->addWidget(mEmailLabel,1,0); |
132 | topLayout->addWidget(mEmailEdit,1,1); | 129 | topLayout->addWidget(mEmailEdit,1,1); |
133 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 130 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
134 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 131 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
135 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 132 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
136 | &(KOPrefs::instance()->mUseKapi),topFrame); | 133 | &(KOPrefs::instance()->mUseKapi),topFrame); |
137 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 134 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
138 | } | 135 | } |
139 | 136 | ||
140 | void KOPrefsDialog::setupMailTab() | 137 | void KOPrefsDialog::setupMailTab() |
141 | { | 138 | { |
142 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 139 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
143 | 140 | ||
144 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 141 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
145 | topLayout->setSpacing(spacingHint()); | 142 | topLayout->setSpacing(spacingHint()); |
146 | topLayout->setMargin(marginHint()); | 143 | topLayout->setMargin(marginHint()); |
147 | 144 | ||
148 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 145 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
149 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 146 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
150 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 147 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
151 | 148 | ||
152 | 149 | ||
153 | ttt = addWidBool(i18n("Send mails later"), | 150 | ttt = addWidBool(i18n("Send mails later"), |
154 | &(KOPrefs::instance()->mSendLater),topFrame); | 151 | &(KOPrefs::instance()->mSendLater),topFrame); |
155 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 152 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
156 | ttt = addWidBool(i18n("Show \"To\" field in list view"), | 153 | ttt = addWidBool(i18n("Show \"To\" field in list view"), |
157 | &(KOPrefs::instance()->mShowToField),topFrame); | 154 | &(KOPrefs::instance()->mShowToField),topFrame); |
158 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); | 155 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); |
159 | 156 | ||
160 | int iii =3; | 157 | int iii =3; |
161 | ttt = addWidBool(i18n("Show info fields at startup"), | 158 | ttt = addWidBool(i18n("Show info fields at startup"), |
162 | &(KOPrefs::instance()->mShowInfoStart),topFrame); | 159 | &(KOPrefs::instance()->mShowInfoStart),topFrame); |
163 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 160 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
164 | ++iii; | 161 | ++iii; |
165 | ttt = addWidBool(i18n("Show \"Subject\" info field"), | 162 | ttt = addWidBool(i18n("Show \"Subject\" info field"), |
166 | &(KOPrefs::instance()->mShowInfoSub),topFrame); | 163 | &(KOPrefs::instance()->mShowInfoSub),topFrame); |
167 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 164 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
168 | ++iii; | 165 | ++iii; |
169 | ttt = addWidBool(i18n("Show \"From\" info field"), | 166 | ttt = addWidBool(i18n("Show \"From\" info field"), |
170 | &(KOPrefs::instance()->mShowInfoFrom),topFrame); | 167 | &(KOPrefs::instance()->mShowInfoFrom),topFrame); |
171 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 168 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
172 | ++iii; | 169 | ++iii; |
173 | ttt = addWidBool(i18n("Show \"To\" info field"), | 170 | ttt = addWidBool(i18n("Show \"To\" info field"), |
174 | &(KOPrefs::instance()->mShowInfoTo),topFrame); | 171 | &(KOPrefs::instance()->mShowInfoTo),topFrame); |
175 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 172 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
176 | ++iii; | 173 | ++iii; |
177 | 174 | ||
178 | /* | 175 | /* |
179 | mCodecEdit = new QLineEdit(topFrame); | 176 | mCodecEdit = new QLineEdit(topFrame); |
180 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); | 177 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); |
181 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); | 178 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); |
182 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); | 179 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); |
183 | */ | 180 | */ |
184 | } | 181 | } |
185 | void KOPrefsDialog::setupFontsTab() | 182 | void KOPrefsDialog::setupFontsTab() |
186 | { | 183 | { |
187 | 184 | ||
188 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 185 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
189 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 186 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
190 | 187 | ||
191 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 188 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
192 | topLayout->setSpacing(1); | 189 | topLayout->setSpacing(1); |
193 | topLayout->setMargin(3); | 190 | topLayout->setMargin(3); |
194 | KPrefsDialogWidFont * tVFont; | 191 | KPrefsDialogWidFont * tVFont; |
195 | int i = 0; | 192 | int i = 0; |
196 | KPrefsDialogWidFont *timeLabelsFont = | 193 | KPrefsDialogWidFont *timeLabelsFont = |
197 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 194 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
198 | &(KOPrefs::instance()->mAppFont),topFrame); | 195 | &(KOPrefs::instance()->mAppFont),topFrame); |
199 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 196 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
200 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 197 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
201 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 198 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
202 | ++i; | 199 | ++i; |
203 | 200 | ||
204 | 201 | ||
205 | timeLabelsFont = | 202 | timeLabelsFont = |
206 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 203 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
207 | &(KOPrefs::instance()->mComposeFont),topFrame); | 204 | &(KOPrefs::instance()->mComposeFont),topFrame); |
208 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 205 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
209 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 206 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
210 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 207 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
211 | ++i; | 208 | ++i; |
212 | 209 | ||
213 | KPrefsDialogWidFont *timeBarFont = | 210 | KPrefsDialogWidFont *timeBarFont = |
214 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 211 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
215 | &(KOPrefs::instance()->mReadFont),topFrame); | 212 | &(KOPrefs::instance()->mReadFont),topFrame); |
216 | topLayout->addWidget(timeBarFont->label(),i,0); | 213 | topLayout->addWidget(timeBarFont->label(),i,0); |
217 | topLayout->addWidget(timeBarFont->preview(),i,1); | 214 | topLayout->addWidget(timeBarFont->preview(),i,1); |
218 | topLayout->addWidget(timeBarFont->button(),i,2); | 215 | topLayout->addWidget(timeBarFont->button(),i,2); |
219 | ++i; | 216 | ++i; |
220 | 217 | ||
221 | topLayout->setColStretch(1,1); | 218 | topLayout->setColStretch(1,1); |
222 | topLayout->setRowStretch(4,1); | 219 | topLayout->setRowStretch(4,1); |
223 | 220 | ||
224 | } | 221 | } |
225 | void KOPrefsDialog::usrReadConfig() | 222 | void KOPrefsDialog::usrReadConfig() |
226 | { | 223 | { |
227 | 224 | ||
228 | mNameEdit->setText(KOPrefs::instance()->mName); | 225 | mNameEdit->setText(KOPrefs::instance()->mName); |
229 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 226 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
230 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); | 227 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); |
231 | kdelibcfg->readConfig(); | ||
232 | } | 228 | } |
233 | void KOPrefsDialog::usrWriteConfig() | 229 | void KOPrefsDialog::usrWriteConfig() |
234 | { | 230 | { |
235 | KOPrefs::instance()->mName = mNameEdit->text(); | 231 | KOPrefs::instance()->mName = mNameEdit->text(); |
236 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 232 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
237 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); | 233 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); |
238 | kdelibcfg->writeConfig(); | ||
239 | 234 | ||
240 | 235 | ||
241 | } | 236 | } |
242 | 237 | ||
243 | #if 0 | 238 | #if 0 |
244 | void KOPrefsDialog::setupLocaleDateTab() | 239 | void KOPrefsDialog::setupLocaleDateTab() |
245 | { | 240 | { |
246 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 241 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
247 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 242 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
248 | topLayout->setSpacing(spacingHint()); | 243 | topLayout->setSpacing(spacingHint()); |
249 | topLayout->setMargin(marginHint()); | 244 | topLayout->setMargin(marginHint()); |
250 | int iii = 0; | 245 | int iii = 0; |
251 | 246 | ||
252 | 247 | ||
253 | KPrefsWidRadios *syncPrefsGroup = | 248 | KPrefsWidRadios *syncPrefsGroup = |
254 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 249 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
255 | QString format; | 250 | QString format; |
256 | if ( QApplication::desktop()->width() < 480 ) | 251 | if ( QApplication::desktop()->width() < 480 ) |
257 | format = "(%d.%m.%Y)"; | 252 | format = "(%d.%m.%Y)"; |
258 | else | 253 | else |
259 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 254 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
260 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 255 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
261 | if ( QApplication::desktop()->width() < 480 ) | 256 | if ( QApplication::desktop()->width() < 480 ) |
262 | format = "(%m.%d.%Y)"; | 257 | format = "(%m.%d.%Y)"; |
263 | else | 258 | else |
264 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 259 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
265 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 260 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
266 | if ( QApplication::desktop()->width() < 480 ) | 261 | if ( QApplication::desktop()->width() < 480 ) |
267 | format = "(%Y-%m-%d)"; | 262 | format = "(%Y-%m-%d)"; |
268 | else | 263 | else |
269 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 264 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
270 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 265 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
271 | syncPrefsGroup->addRadio(i18n("User defined")); | 266 | syncPrefsGroup->addRadio(i18n("User defined")); |
272 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 267 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
273 | ++iii; | 268 | ++iii; |
274 | ++iii; | 269 | ++iii; |
275 | QLabel * lab; | 270 | QLabel * lab; |
276 | mUserDateFormatLong = new QLineEdit(topFrame); | 271 | mUserDateFormatLong = new QLineEdit(topFrame); |
277 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 272 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
278 | topLayout->addWidget(lab ,iii,0); | 273 | topLayout->addWidget(lab ,iii,0); |
279 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 274 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
280 | ++iii; | 275 | ++iii; |
281 | mUserDateFormatShort = new QLineEdit(topFrame); | 276 | mUserDateFormatShort = new QLineEdit(topFrame); |
282 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 277 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
283 | topLayout->addWidget(lab ,iii,0); | 278 | topLayout->addWidget(lab ,iii,0); |
284 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 279 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
285 | ++iii; | 280 | ++iii; |
286 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 281 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
287 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 282 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
288 | ++iii; | 283 | ++iii; |
289 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 284 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
290 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 285 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
291 | ++iii; | 286 | ++iii; |
292 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 287 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
293 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 288 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
294 | ++iii; | 289 | ++iii; |
295 | 290 | ||
296 | } | 291 | } |
297 | 292 | ||
298 | void KOPrefsDialog::setupLocaleTab() | 293 | void KOPrefsDialog::setupLocaleTab() |
299 | { | 294 | { |
300 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 295 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
301 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 296 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
302 | topLayout->setSpacing(spacingHint()); | 297 | topLayout->setSpacing(spacingHint()); |
303 | topLayout->setMargin(marginHint()); | 298 | topLayout->setMargin(marginHint()); |
304 | int iii = 0; | 299 | int iii = 0; |
305 | KPrefsWidRadios *syncPrefsGroup = | 300 | KPrefsWidRadios *syncPrefsGroup = |
306 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 301 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
307 | syncPrefsGroup->addRadio(i18n("English")); | 302 | syncPrefsGroup->addRadio(i18n("English")); |
308 | syncPrefsGroup->addRadio(i18n("German")); | 303 | syncPrefsGroup->addRadio(i18n("German")); |
309 | syncPrefsGroup->addRadio(i18n("French")); | 304 | syncPrefsGroup->addRadio(i18n("French")); |
310 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 305 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
311 | if ( QApplication::desktop()->width() < 300 ) | 306 | if ( QApplication::desktop()->width() < 300 ) |
312 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 307 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
313 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 308 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
314 | ++iii; | 309 | ++iii; |
315 | 310 | ||
316 | syncPrefsGroup = | 311 | syncPrefsGroup = |
317 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 312 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
318 | if ( QApplication::desktop()->width() > 300 ) | 313 | if ( QApplication::desktop()->width() > 300 ) |
319 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 314 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
320 | syncPrefsGroup->addRadio(i18n("24:00")); | 315 | syncPrefsGroup->addRadio(i18n("24:00")); |
321 | syncPrefsGroup->addRadio(i18n("12:00am")); | 316 | syncPrefsGroup->addRadio(i18n("12:00am")); |
322 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 317 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
323 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 318 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
324 | ++iii; | 319 | ++iii; |
325 | KPrefsDialogWidBool *sb; | 320 | KPrefsDialogWidBool *sb; |
326 | if ( QApplication::desktop()->width() < 300 ) { | 321 | if ( QApplication::desktop()->width() < 300 ) { |
327 | sb = | 322 | sb = |
328 | addWidBool(i18n("Week starts on Sunday"), | 323 | addWidBool(i18n("Week starts on Sunday"), |
329 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 324 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
330 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 325 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
331 | ++iii; | 326 | ++iii; |
332 | sb = | 327 | sb = |
333 | addWidBool(i18n("Use short date in (WN/E) view"), | 328 | addWidBool(i18n("Use short date in (WN/E) view"), |
334 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 329 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
335 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 330 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
336 | } | 331 | } |
337 | else { | 332 | else { |
338 | QWidget * hb = new QWidget( topFrame ); | 333 | QWidget * hb = new QWidget( topFrame ); |
339 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 334 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
340 | sb = | 335 | sb = |
341 | addWidBool(i18n("Week starts on Sunday"), | 336 | addWidBool(i18n("Week starts on Sunday"), |
342 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 337 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
343 | hbLayout->addWidget(sb->checkBox() ); | 338 | hbLayout->addWidget(sb->checkBox() ); |
344 | sb = | 339 | sb = |
345 | addWidBool(i18n("Use short date in (WN/E) view"), | 340 | addWidBool(i18n("Use short date in (WN/E) view"), |
346 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 341 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
347 | hbLayout->addWidget(sb->checkBox() ); | 342 | hbLayout->addWidget(sb->checkBox() ); |
348 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 343 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
349 | 344 | ||
350 | } | 345 | } |
351 | //#ifndef DESKTOP_VERSION | 346 | //#ifndef DESKTOP_VERSION |
352 | #if 0 | 347 | #if 0 |
353 | ++iii; | 348 | ++iii; |
354 | sb = | 349 | sb = |
355 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 350 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
356 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 351 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
357 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 352 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
358 | #endif | 353 | #endif |
359 | } | 354 | } |
360 | void KOPrefsDialog::showSyncPage() | 355 | void KOPrefsDialog::showSyncPage() |
361 | { | 356 | { |
362 | showPage ( 2 ) ; | 357 | showPage ( 2 ) ; |
363 | 358 | ||
364 | } | 359 | } |
365 | void KOPrefsDialog::setupSyncAlgTab() | 360 | void KOPrefsDialog::setupSyncAlgTab() |
366 | { | 361 | { |
367 | #if 0 | 362 | #if 0 |
368 | QLabel * lab; | 363 | QLabel * lab; |
369 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 364 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
370 | mSetupSyncAlgTab = topFrame; | 365 | mSetupSyncAlgTab = topFrame; |
371 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 366 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
372 | topLayout->setSpacing(spacingHint()); | 367 | topLayout->setSpacing(spacingHint()); |
373 | topLayout->setMargin(marginHint()); | 368 | topLayout->setMargin(marginHint()); |
374 | int iii = 0; | 369 | int iii = 0; |
375 | 370 | ||
376 | KPrefsDialogWidBool *sb = | 371 | KPrefsDialogWidBool *sb = |
377 | addWidBool(i18n("Ask for preferences before syncing"), | 372 | addWidBool(i18n("Ask for preferences before syncing"), |
378 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 373 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
379 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 374 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
380 | 375 | ||
381 | ++iii; | 376 | ++iii; |
382 | 377 | ||
383 | KPrefsWidRadios *syncPrefsGroup = | 378 | KPrefsWidRadios *syncPrefsGroup = |
384 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 379 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
385 | topFrame); | 380 | topFrame); |
386 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 381 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
387 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 382 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
388 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 383 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
389 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 384 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
390 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 385 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
391 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 386 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
392 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 387 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
393 | ++iii; | 388 | ++iii; |
394 | sb = | 389 | sb = |
395 | addWidBool(i18n("Show summary after syncing"), | 390 | addWidBool(i18n("Show summary after syncing"), |
396 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 391 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
397 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 392 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
398 | 393 | ||
399 | ++iii; | 394 | ++iii; |
400 | #endif | 395 | #endif |
401 | 396 | ||
402 | 397 | ||
403 | 398 | ||
404 | } | 399 | } |
405 | 400 | ||
406 | 401 | ||
407 | void KOPrefsDialog::setupSyncTab() | 402 | void KOPrefsDialog::setupSyncTab() |
408 | { | 403 | { |
409 | #if 0 | 404 | #if 0 |
410 | QLabel * lab; | 405 | QLabel * lab; |
411 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 406 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
412 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 407 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
413 | topLayout->setSpacing(spacingHint()); | 408 | topLayout->setSpacing(spacingHint()); |
414 | topLayout->setMargin(marginHint()); | 409 | topLayout->setMargin(marginHint()); |
415 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 410 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
416 | int iii = 0; | 411 | int iii = 0; |
417 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 412 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
418 | ++iii; | 413 | ++iii; |
419 | 414 | ||
420 | mRemoteIPEdit = new QLineEdit(topFrame); | 415 | mRemoteIPEdit = new QLineEdit(topFrame); |
421 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 416 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
422 | topLayout->addWidget(lab ,iii,0); | 417 | topLayout->addWidget(lab ,iii,0); |
423 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 418 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
424 | ++iii; | 419 | ++iii; |
425 | mRemoteUser = new QLineEdit(topFrame); | 420 | mRemoteUser = new QLineEdit(topFrame); |
426 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 421 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
427 | topLayout->addWidget(lab ,iii,0); | 422 | topLayout->addWidget(lab ,iii,0); |
428 | topLayout->addWidget(mRemoteUser, iii,1); | 423 | topLayout->addWidget(mRemoteUser, iii,1); |
429 | ++iii; | 424 | ++iii; |
430 | 425 | ||
431 | mRemoteFile = new QLineEdit(topFrame); | 426 | mRemoteFile = new QLineEdit(topFrame); |
432 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 427 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
433 | topLayout->addWidget(lab ,iii,0); | 428 | topLayout->addWidget(lab ,iii,0); |
434 | topLayout->addWidget(mRemoteFile,iii,1); | 429 | topLayout->addWidget(mRemoteFile,iii,1); |
435 | ++iii; | 430 | ++iii; |
436 | 431 | ||
437 | mLocalTempFile = new QLineEdit(topFrame); | 432 | mLocalTempFile = new QLineEdit(topFrame); |
438 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 433 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
439 | topLayout->addWidget(lab ,iii,0); | 434 | topLayout->addWidget(lab ,iii,0); |
440 | topLayout->addWidget(mLocalTempFile,iii,1); | 435 | topLayout->addWidget(mLocalTempFile,iii,1); |
441 | ++iii; | 436 | ++iii; |
442 | 437 | ||
443 | KPrefsDialogWidBool *wb = | 438 | KPrefsDialogWidBool *wb = |
444 | addWidBool(i18n("Write back synced file"), | 439 | addWidBool(i18n("Write back synced file"), |
445 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 440 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
446 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 441 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
447 | ++iii; | 442 | ++iii; |
448 | wb = | 443 | wb = |
449 | addWidBool(i18n("Write back existing entries only"), | 444 | addWidBool(i18n("Write back existing entries only"), |
450 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 445 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
451 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 446 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
452 | ++iii; | 447 | ++iii; |
453 | 448 | ||
454 | #endif | 449 | #endif |
455 | } | 450 | } |
456 | 451 | ||
457 | void KOPrefsDialog::setupMainTab() | 452 | void KOPrefsDialog::setupMainTab() |
458 | { | 453 | { |
459 | QFrame *topFrame = addPage(i18n("General"),0,0); | 454 | QFrame *topFrame = addPage(i18n("General"),0,0); |
460 | // DesktopIcon("identity",KIcon::SizeMedium)); | 455 | // DesktopIcon("identity",KIcon::SizeMedium)); |
461 | 456 | ||
462 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 457 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
463 | topLayout->setSpacing(spacingHint()); | 458 | topLayout->setSpacing(spacingHint()); |
464 | topLayout->setMargin(marginHint()); | 459 | topLayout->setMargin(marginHint()); |
465 | 460 | ||
466 | // KPrefsDialogWidBool *emailControlCenter = | 461 | // KPrefsDialogWidBool *emailControlCenter = |
467 | // addWidBool(i18n("&Use email settings from Control Center"), | 462 | // addWidBool(i18n("&Use email settings from Control Center"), |
468 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 463 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
469 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 464 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
470 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 465 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
471 | // SLOT(toggleEmailSettings(bool))); | 466 | // SLOT(toggleEmailSettings(bool))); |
472 | 467 | ||
473 | mNameEdit = new QLineEdit(topFrame); | 468 | mNameEdit = new QLineEdit(topFrame); |
474 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 469 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
475 | topLayout->addWidget(mNameLabel,0,0); | 470 | topLayout->addWidget(mNameLabel,0,0); |
476 | topLayout->addWidget(mNameEdit,0,1); | 471 | topLayout->addWidget(mNameEdit,0,1); |
477 | 472 | ||
478 | mEmailEdit = new QLineEdit(topFrame); | 473 | mEmailEdit = new QLineEdit(topFrame); |
479 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 474 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
480 | topLayout->addWidget(mEmailLabel,1,0); | 475 | topLayout->addWidget(mEmailLabel,1,0); |
481 | topLayout->addWidget(mEmailEdit,1,1); | 476 | topLayout->addWidget(mEmailEdit,1,1); |
482 | KPrefsDialogWidBool *wb; | 477 | KPrefsDialogWidBool *wb; |
483 | QHBox *dummy; | 478 | QHBox *dummy; |
484 | if ( QApplication::desktop()->width() > 480 ) { | 479 | if ( QApplication::desktop()->width() > 480 ) { |
485 | dummy = new QHBox(topFrame); | 480 | dummy = new QHBox(topFrame); |
486 | } else { | 481 | } else { |
487 | dummy = new QVBox(topFrame); | 482 | dummy = new QVBox(topFrame); |
488 | } | 483 | } |
489 | 484 | ||
490 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 485 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
491 | addWidBool(i18n("Full menu bar(nr)"), | 486 | addWidBool(i18n("Full menu bar(nr)"), |
492 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 487 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
493 | 488 | ||
494 | 489 | ||
495 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 490 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
496 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 491 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
497 | 492 | ||
498 | 493 | ||
499 | dummy = new QHBox(topFrame); | 494 | dummy = new QHBox(topFrame); |
500 | new QLabel(i18n("Days in What's Next:"),dummy); | 495 | new QLabel(i18n("Days in What's Next:"),dummy); |
501 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 496 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
502 | 497 | ||
503 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 498 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
504 | 499 | ||
505 | 500 | ||
506 | 501 | ||
507 | dummy = new QHBox(topFrame); | 502 | dummy = new QHBox(topFrame); |
508 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 503 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
509 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 504 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
510 | 505 | ||
511 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 506 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
512 | 507 | ||
513 | QHBox *prioBox = new QHBox(topFrame); | 508 | QHBox *prioBox = new QHBox(topFrame); |
514 | // intervalBox->setSpacing(spacingHint()); | 509 | // intervalBox->setSpacing(spacingHint()); |
515 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 510 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
516 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 511 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
517 | 512 | ||
518 | if ( QApplication::desktop()->width() < 300 ) | 513 | if ( QApplication::desktop()->width() < 300 ) |
519 | messa = i18n("Show topmost todo prios in What's N.:"); | 514 | messa = i18n("Show topmost todo prios in What's N.:"); |
520 | QLabel *prioLabel = new QLabel(messa, prioBox); | 515 | QLabel *prioLabel = new QLabel(messa, prioBox); |
521 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 516 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
522 | if ( QApplication::desktop()->width() < 300 ) | 517 | if ( QApplication::desktop()->width() < 300 ) |
523 | mPrioSpin->setFixedWidth( 40 ); | 518 | mPrioSpin->setFixedWidth( 40 ); |
524 | 519 | ||
525 | // KPrefsDialogWidBool *bcc = | 520 | // KPrefsDialogWidBool *bcc = |
526 | // addWidBool(i18n("Send copy to owner when mailing events"), | 521 | // addWidBool(i18n("Send copy to owner when mailing events"), |
527 | // &(KOPrefs::instance()->mBcc),topFrame); | 522 | // &(KOPrefs::instance()->mBcc),topFrame); |
528 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 523 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
529 | 524 | ||
530 | 525 | ||
531 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 526 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
532 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 527 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
533 | 528 | ||
534 | // addWidBool(i18n("Enable automatic saving of calendar"), | 529 | // addWidBool(i18n("Enable automatic saving of calendar"), |
535 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 530 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
536 | 531 | ||
537 | QHBox *intervalBox = new QHBox(topFrame); | 532 | QHBox *intervalBox = new QHBox(topFrame); |
538 | // intervalBox->setSpacing(spacingHint()); | 533 | // intervalBox->setSpacing(spacingHint()); |
539 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 534 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
540 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 535 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
541 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 536 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
542 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 537 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
543 | /* | 538 | /* |
544 | QHBox * agendasize = new QHBox ( topFrame ); | 539 | QHBox * agendasize = new QHBox ( topFrame ); |
545 | 540 | ||
546 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 541 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
547 | 542 | ||
548 | 543 | ||
549 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 544 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
550 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 545 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
551 | */ | 546 | */ |
552 | KPrefsDialogWidBool *verticalScreen = | 547 | KPrefsDialogWidBool *verticalScreen = |
553 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 548 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
554 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 549 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
555 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 550 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
556 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); | 551 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); |
557 | 552 | ||
558 | KPrefsDialogWidBool *ask = | 553 | KPrefsDialogWidBool *ask = |
559 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 554 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
560 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 555 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
561 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); | 556 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); |
562 | 557 | ||
563 | 558 | ||
564 | /* | 559 | /* |
565 | KPrefsDialogWidBool *confirmCheck = | 560 | KPrefsDialogWidBool *confirmCheck = |
566 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 561 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
567 | topFrame); | 562 | topFrame); |
568 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 563 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
569 | 564 | ||
570 | 565 | ||
571 | mEnableGroupScheduling = | 566 | mEnableGroupScheduling = |
572 | addWidBool(i18n("Enable group scheduling"), | 567 | addWidBool(i18n("Enable group scheduling"), |
573 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 568 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
574 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 569 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
575 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 570 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
576 | SLOT(warningGroupScheduling())); | 571 | SLOT(warningGroupScheduling())); |
577 | 572 | ||
578 | mEnableProjectView = | 573 | mEnableProjectView = |
579 | addWidBool(i18n("Enable project view"), | 574 | addWidBool(i18n("Enable project view"), |
580 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 575 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
581 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 576 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
582 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 577 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
583 | SLOT(warningProjectView())); | 578 | SLOT(warningProjectView())); |
584 | 579 | ||
585 | // Can't be disabled anymore | 580 | // Can't be disabled anymore |
586 | mEnableGroupScheduling->checkBox()->hide(); | 581 | mEnableGroupScheduling->checkBox()->hide(); |
587 | 582 | ||
588 | // Disable setting, because this feature now becomes stable | 583 | // Disable setting, because this feature now becomes stable |
589 | mEnableProjectView->checkBox()->hide(); | 584 | mEnableProjectView->checkBox()->hide(); |
590 | 585 | ||
591 | KPrefsWidRadios *defaultFormatGroup = | 586 | KPrefsWidRadios *defaultFormatGroup = |
592 | addWidRadios(i18n("Default Calendar Format"), | 587 | addWidRadios(i18n("Default Calendar Format"), |
593 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 588 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
594 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 589 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
595 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 590 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
596 | 591 | ||
597 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 592 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
598 | 593 | ||
599 | // Default format unconditionally is iCalendar | 594 | // Default format unconditionally is iCalendar |
600 | defaultFormatGroup->groupBox()->hide(); | 595 | defaultFormatGroup->groupBox()->hide(); |
601 | 596 | ||
602 | KPrefsWidRadios *mailClientGroup = | 597 | KPrefsWidRadios *mailClientGroup = |
603 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 598 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
604 | topFrame); | 599 | topFrame); |
605 | mailClientGroup->addRadio(i18n("KMail")); | 600 | mailClientGroup->addRadio(i18n("KMail")); |
606 | mailClientGroup->addRadio(i18n("Sendmail")); | 601 | mailClientGroup->addRadio(i18n("Sendmail")); |
607 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 602 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
608 | 603 | ||
609 | KPrefsDialogWidBool *htmlsave = | 604 | KPrefsDialogWidBool *htmlsave = |
610 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 605 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
611 | topFrame); | 606 | topFrame); |
612 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 607 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
613 | 608 | ||
614 | KPrefsWidRadios *destinationGroup = | 609 | KPrefsWidRadios *destinationGroup = |
615 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 610 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
616 | topFrame); | 611 | topFrame); |
617 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 612 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
618 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 613 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
619 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 614 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
620 | 615 | ||
621 | topLayout->setRowStretch(14,1); | 616 | topLayout->setRowStretch(14,1); |
622 | */ | 617 | */ |
623 | } | 618 | } |
624 | 619 | ||
625 | 620 | ||
626 | void KOPrefsDialog::setupTimeTab() | 621 | void KOPrefsDialog::setupTimeTab() |
627 | { | 622 | { |
628 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 623 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
629 | // DesktopIcon("clock",KIcon::SizeMedium)); | 624 | // DesktopIcon("clock",KIcon::SizeMedium)); |
630 | 625 | ||
631 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 626 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
632 | topLayout->setSpacing(spacingHint()); | 627 | topLayout->setSpacing(spacingHint()); |
633 | topLayout->setMargin(marginHint()); | 628 | topLayout->setMargin(marginHint()); |
634 | 629 | ||
635 | QHBox *dummy = new QHBox(topFrame); | 630 | QHBox *dummy = new QHBox(topFrame); |
636 | KPrefsWidTime *dayBegins = | 631 | KPrefsWidTime *dayBegins = |
637 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 632 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
638 | dummy); | 633 | dummy); |
639 | //topLayout->addWidget(dayBegins->label(),2,0); | 634 | //topLayout->addWidget(dayBegins->label(),2,0); |
640 | 635 | ||
641 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 636 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
642 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 637 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
643 | 638 | ||
644 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 639 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
645 | topFrame),1,0); | 640 | topFrame),1,0); |
646 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 641 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
647 | mStartTimeSpin->setSuffix(":00"); | 642 | mStartTimeSpin->setSuffix(":00"); |
648 | topLayout->addWidget(mStartTimeSpin,1,1); | 643 | topLayout->addWidget(mStartTimeSpin,1,1); |
649 | 644 | ||
650 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 645 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
651 | topFrame),2,0); | 646 | topFrame),2,0); |
652 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 647 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
653 | mDefaultDurationSpin->setSuffix(":00"); | 648 | mDefaultDurationSpin->setSuffix(":00"); |
654 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 649 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
655 | 650 | ||
656 | QStringList alarmList; | 651 | QStringList alarmList; |
657 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 652 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
658 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 653 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
659 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 654 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
660 | 3,0); | 655 | 3,0); |
661 | mAlarmTimeCombo = new QComboBox(topFrame); | 656 | mAlarmTimeCombo = new QComboBox(topFrame); |
662 | mAlarmTimeCombo->insertStringList(alarmList); | 657 | mAlarmTimeCombo->insertStringList(alarmList); |
663 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 658 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
664 | 659 | ||
665 | 660 | ||
666 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 661 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
667 | i18n("Working Hours"), | 662 | i18n("Working Hours"), |
668 | topFrame); | 663 | topFrame); |
669 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 664 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
670 | workingHoursGroup->layout()->setSpacing( 0 ); | 665 | workingHoursGroup->layout()->setSpacing( 0 ); |
671 | workingHoursGroup->layout()->setMargin( 4 ); | 666 | workingHoursGroup->layout()->setMargin( 4 ); |
672 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 667 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
673 | // workStartBox->setMargin( 0 ); | 668 | // workStartBox->setMargin( 0 ); |
674 | addWidTime(i18n("Daily starting hour:"), | 669 | addWidTime(i18n("Daily starting hour:"), |
675 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 670 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
676 | 671 | ||
677 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 672 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
678 | //workEndBox->setMargin( 0 ); | 673 | //workEndBox->setMargin( 0 ); |
679 | addWidTime(i18n("Daily ending hour:"), | 674 | addWidTime(i18n("Daily ending hour:"), |
680 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 675 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
681 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 676 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
682 | //excludeBox->setMargin( 0 ); | 677 | //excludeBox->setMargin( 0 ); |
683 | addWidBool(i18n("Exclude holidays"), | 678 | addWidBool(i18n("Exclude holidays"), |
684 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 679 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
685 | 680 | ||
686 | addWidBool(i18n("Exclude Saturdays"), | 681 | addWidBool(i18n("Exclude Saturdays"), |
687 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 682 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
688 | 683 | ||
689 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 684 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
690 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 685 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
691 | // topFrame); | 686 | // topFrame); |
692 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 687 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
693 | 688 | ||
694 | // topLayout->setRowStretch(6,1); | 689 | // topLayout->setRowStretch(6,1); |
695 | } | 690 | } |
696 | 691 | ||
697 | 692 | ||
698 | void KOPrefsDialog::setupViewsTab() | 693 | void KOPrefsDialog::setupViewsTab() |
699 | { | 694 | { |
700 | 695 | ||
701 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 696 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
702 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 697 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
703 | 698 | ||
704 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 699 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
705 | topLayout->setSpacing(spacingHint()); | 700 | topLayout->setSpacing(spacingHint()); |
706 | topLayout->setMargin(marginHint()); | 701 | topLayout->setMargin(marginHint()); |
707 | 702 | ||
708 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 703 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
709 | // topLayout->addLayout(dayBeginsLayout,0,0); | 704 | // topLayout->addLayout(dayBeginsLayout,0,0); |
710 | 705 | ||
711 | // KPrefsWidTime *dayBegins = | 706 | // KPrefsWidTime *dayBegins = |
712 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 707 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
713 | // topFrame); | 708 | // topFrame); |
714 | // dayBeginsLayout->addWidget(dayBegins->label()); | 709 | // dayBeginsLayout->addWidget(dayBegins->label()); |
715 | // dayBeginsLayout->addStretch(1); | 710 | // dayBeginsLayout->addStretch(1); |
716 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 711 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
717 | 712 | ||
718 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 713 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
719 | // topLayout->addLayout(nextDaysLayout,1,0); | 714 | // topLayout->addLayout(nextDaysLayout,1,0); |
720 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 715 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
721 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 716 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
722 | // nextDaysLayout->addStretch(1); | 717 | // nextDaysLayout->addStretch(1); |
723 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 718 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
724 | 719 | ||
725 | 720 | ||
726 | int ii = 0; | 721 | int ii = 0; |
727 | KPrefsDialogWidBool *dummy = | 722 | KPrefsDialogWidBool *dummy = |
728 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 723 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
729 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 724 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
730 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 725 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
731 | 726 | ||
732 | dummy = | 727 | dummy = |
733 | addWidBool(i18n("Highlight current day in agenda"), | 728 | addWidBool(i18n("Highlight current day in agenda"), |
734 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 729 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
735 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 730 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
736 | 731 | ||
737 | dummy = | 732 | dummy = |
738 | addWidBool(i18n("Use light color for highlight current day"), | 733 | addWidBool(i18n("Use light color for highlight current day"), |
739 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 734 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
740 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 735 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
741 | 736 | ||
742 | KPrefsDialogWidBool *dailyRecur = | 737 | KPrefsDialogWidBool *dailyRecur = |
743 | addWidBool(i18n("Show events that recur daily in date nav."), | 738 | addWidBool(i18n("Show events that recur daily in date nav."), |
744 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 739 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
745 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 740 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
746 | 741 | ||
747 | KPrefsDialogWidBool *weeklyRecur = | 742 | KPrefsDialogWidBool *weeklyRecur = |
748 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 743 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
749 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 744 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
750 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 745 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |