author | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
commit | 023e0e82dd8bf6421d12492a2dd25534fc43ad31 (patch) (unidiff) | |
tree | cf0533e3ccc642cb57a41953f184f457fa5365ba /kmicromail/koprefsdialog.cpp | |
parent | f8841c92d5251f713eb7a025af8fdee52de45b3d (diff) | |
download | kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.zip kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.gz kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.bz2 |
many ompi fixes
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index c878fc9..4abf859 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,972 +1,977 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #include <kdialog.h> | 23 | #include <kdialog.h> |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | 56 | ||
57 | #include <klineedit.h> | 57 | #include <klineedit.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "koprefs.h" | 60 | #include "koprefs.h" |
61 | 61 | ||
62 | #include "koprefsdialog.h" | 62 | #include "koprefsdialog.h" |
63 | //#include <kprefswidget.h> | 63 | //#include <kprefswidget.h> |
64 | 64 | ||
65 | 65 | ||
66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
68 | { | 68 | { |
69 | 69 | ||
70 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | 71 | setupGlobalTab(); |
72 | setupMainTab(); | 72 | setupMainTab(); |
73 | setupMailTab();; | 73 | setupMailTab();; |
74 | setupFontsTab(); | 74 | setupFontsTab(); |
75 | readConfig(); | 75 | readConfig(); |
76 | 76 | ||
77 | #if 0 | 77 | #if 0 |
78 | 78 | ||
79 | setupMainTab(); | 79 | setupMainTab(); |
80 | setupLocaleTab(); | 80 | setupLocaleTab(); |
81 | setupTimeZoneTab(); | 81 | setupTimeZoneTab(); |
82 | setupTimeTab(); | 82 | setupTimeTab(); |
83 | setupLocaleDateTab(); | 83 | setupLocaleDateTab(); |
84 | setupFontsTab(); | 84 | setupFontsTab(); |
85 | setupColorsTab(); | 85 | setupColorsTab(); |
86 | setupViewsTab(); | 86 | setupViewsTab(); |
87 | //setupSyncTab(); | 87 | //setupSyncTab(); |
88 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
89 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
90 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
91 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
95 | #include "kpimglobalprefs.h" | 95 | #include "kpimglobalprefs.h" |
96 | 96 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | void KOPrefsDialog::setupGlobalTab() | 100 | void KOPrefsDialog::setupGlobalTab() |
101 | { | 101 | { |
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 102 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
105 | topLayout->addWidget( kdelibcfg ); | 105 | topLayout->addWidget( kdelibcfg ); |
106 | 106 | ||
107 | 107 | ||
108 | } | 108 | } |
109 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
110 | { | 110 | { |
111 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
112 | 112 | ||
113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
114 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
115 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
116 | 116 | ||
117 | 117 | ||
118 | mNameEdit = new QLineEdit(topFrame); | 118 | mNameEdit = new QLineEdit(topFrame); |
119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
120 | topLayout->addWidget(mNameLabel,0,0); | 120 | topLayout->addWidget(mNameLabel,0,0); |
121 | topLayout->addWidget(mNameEdit,0,1); | 121 | topLayout->addWidget(mNameEdit,0,1); |
122 | 122 | ||
123 | mEmailEdit = new QLineEdit(topFrame); | 123 | mEmailEdit = new QLineEdit(topFrame); |
124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
125 | topLayout->addWidget(mEmailLabel,1,0); | 125 | topLayout->addWidget(mEmailLabel,1,0); |
126 | topLayout->addWidget(mEmailEdit,1,1); | 126 | topLayout->addWidget(mEmailEdit,1,1); |
127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
128 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 128 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
130 | &(KOPrefs::instance()->mUseKapi),topFrame); | 130 | &(KOPrefs::instance()->mUseKapi),topFrame); |
131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
132 | } | 132 | } |
133 | 133 | ||
134 | void KOPrefsDialog::setupMailTab() | 134 | void KOPrefsDialog::setupMailTab() |
135 | { | 135 | { |
136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
137 | 137 | ||
138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
139 | topLayout->setSpacing(spacingHint()); | 139 | topLayout->setSpacing(spacingHint()); |
140 | topLayout->setMargin(marginHint()); | 140 | topLayout->setMargin(marginHint()); |
141 | 141 | ||
142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
145 | 145 | ||
146 | 146 | ||
147 | ttt = addWidBool(i18n("Send mails later"), | 147 | ttt = addWidBool(i18n("Send mails later"), |
148 | &(KOPrefs::instance()->mSendLater),topFrame); | 148 | &(KOPrefs::instance()->mSendLater),topFrame); |
149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
150 | 150 | mCodecEdit = new QLineEdit(topFrame); | |
151 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); | ||
152 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); | ||
153 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); | ||
151 | 154 | ||
152 | } | 155 | } |
153 | void KOPrefsDialog::setupFontsTab() | 156 | void KOPrefsDialog::setupFontsTab() |
154 | { | 157 | { |
155 | 158 | ||
156 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 159 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
157 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 160 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
158 | 161 | ||
159 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 162 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
160 | topLayout->setSpacing(1); | 163 | topLayout->setSpacing(1); |
161 | topLayout->setMargin(3); | 164 | topLayout->setMargin(3); |
162 | KPrefsDialogWidFont * tVFont; | 165 | KPrefsDialogWidFont * tVFont; |
163 | int i = 0; | 166 | int i = 0; |
164 | KPrefsDialogWidFont *timeLabelsFont = | 167 | KPrefsDialogWidFont *timeLabelsFont = |
165 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 168 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
166 | &(KOPrefs::instance()->mAppFont),topFrame); | 169 | &(KOPrefs::instance()->mAppFont),topFrame); |
167 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 170 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
168 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 171 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
169 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 172 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
170 | ++i; | 173 | ++i; |
171 | 174 | ||
172 | 175 | ||
173 | timeLabelsFont = | 176 | timeLabelsFont = |
174 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 177 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
175 | &(KOPrefs::instance()->mComposeFont),topFrame); | 178 | &(KOPrefs::instance()->mComposeFont),topFrame); |
176 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 179 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
177 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 180 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
178 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 181 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
179 | ++i; | 182 | ++i; |
180 | 183 | ||
181 | KPrefsDialogWidFont *timeBarFont = | 184 | KPrefsDialogWidFont *timeBarFont = |
182 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 185 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
183 | &(KOPrefs::instance()->mReadFont),topFrame); | 186 | &(KOPrefs::instance()->mReadFont),topFrame); |
184 | topLayout->addWidget(timeBarFont->label(),i,0); | 187 | topLayout->addWidget(timeBarFont->label(),i,0); |
185 | topLayout->addWidget(timeBarFont->preview(),i,1); | 188 | topLayout->addWidget(timeBarFont->preview(),i,1); |
186 | topLayout->addWidget(timeBarFont->button(),i,2); | 189 | topLayout->addWidget(timeBarFont->button(),i,2); |
187 | ++i; | 190 | ++i; |
188 | 191 | ||
189 | topLayout->setColStretch(1,1); | 192 | topLayout->setColStretch(1,1); |
190 | topLayout->setRowStretch(4,1); | 193 | topLayout->setRowStretch(4,1); |
191 | 194 | ||
192 | } | 195 | } |
193 | void KOPrefsDialog::usrReadConfig() | 196 | void KOPrefsDialog::usrReadConfig() |
194 | { | 197 | { |
195 | 198 | ||
196 | mNameEdit->setText(KOPrefs::instance()->mName); | 199 | mNameEdit->setText(KOPrefs::instance()->mName); |
197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 200 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
201 | mCodecEdit->setText(KOPrefs::instance()->mSendCodec); | ||
198 | kdelibcfg->readConfig(); | 202 | kdelibcfg->readConfig(); |
199 | } | 203 | } |
200 | void KOPrefsDialog::usrWriteConfig() | 204 | void KOPrefsDialog::usrWriteConfig() |
201 | { | 205 | { |
202 | KOPrefs::instance()->mName = mNameEdit->text(); | 206 | KOPrefs::instance()->mName = mNameEdit->text(); |
203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 207 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
204 | kdelibcfg->writeConfig(); | 208 | KOPrefs::instance()->mSendCodec = mCodecEdit->text(); |
209 | kdelibcfg->writeConfig(); | ||
205 | 210 | ||
206 | 211 | ||
207 | } | 212 | } |
208 | 213 | ||
209 | #if 0 | 214 | #if 0 |
210 | void KOPrefsDialog::setupLocaleDateTab() | 215 | void KOPrefsDialog::setupLocaleDateTab() |
211 | { | 216 | { |
212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 217 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
213 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 218 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
214 | topLayout->setSpacing(spacingHint()); | 219 | topLayout->setSpacing(spacingHint()); |
215 | topLayout->setMargin(marginHint()); | 220 | topLayout->setMargin(marginHint()); |
216 | int iii = 0; | 221 | int iii = 0; |
217 | 222 | ||
218 | 223 | ||
219 | KPrefsWidRadios *syncPrefsGroup = | 224 | KPrefsWidRadios *syncPrefsGroup = |
220 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 225 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
221 | QString format; | 226 | QString format; |
222 | if ( QApplication::desktop()->width() < 480 ) | 227 | if ( QApplication::desktop()->width() < 480 ) |
223 | format = "(%d.%m.%Y)"; | 228 | format = "(%d.%m.%Y)"; |
224 | else | 229 | else |
225 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 230 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
226 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 231 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
227 | if ( QApplication::desktop()->width() < 480 ) | 232 | if ( QApplication::desktop()->width() < 480 ) |
228 | format = "(%m.%d.%Y)"; | 233 | format = "(%m.%d.%Y)"; |
229 | else | 234 | else |
230 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 235 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
231 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 236 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
232 | if ( QApplication::desktop()->width() < 480 ) | 237 | if ( QApplication::desktop()->width() < 480 ) |
233 | format = "(%Y-%m-%d)"; | 238 | format = "(%Y-%m-%d)"; |
234 | else | 239 | else |
235 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 240 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
236 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 241 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
237 | syncPrefsGroup->addRadio(i18n("User defined")); | 242 | syncPrefsGroup->addRadio(i18n("User defined")); |
238 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 243 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
239 | ++iii; | 244 | ++iii; |
240 | ++iii; | 245 | ++iii; |
241 | QLabel * lab; | 246 | QLabel * lab; |
242 | mUserDateFormatLong = new QLineEdit(topFrame); | 247 | mUserDateFormatLong = new QLineEdit(topFrame); |
243 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 248 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
244 | topLayout->addWidget(lab ,iii,0); | 249 | topLayout->addWidget(lab ,iii,0); |
245 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 250 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
246 | ++iii; | 251 | ++iii; |
247 | mUserDateFormatShort = new QLineEdit(topFrame); | 252 | mUserDateFormatShort = new QLineEdit(topFrame); |
248 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 253 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
249 | topLayout->addWidget(lab ,iii,0); | 254 | topLayout->addWidget(lab ,iii,0); |
250 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 255 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
251 | ++iii; | 256 | ++iii; |
252 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 257 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
253 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 258 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
254 | ++iii; | 259 | ++iii; |
255 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 260 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
256 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 261 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
257 | ++iii; | 262 | ++iii; |
258 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 263 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
259 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 264 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
260 | ++iii; | 265 | ++iii; |
261 | 266 | ||
262 | } | 267 | } |
263 | 268 | ||
264 | void KOPrefsDialog::setupLocaleTab() | 269 | void KOPrefsDialog::setupLocaleTab() |
265 | { | 270 | { |
266 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 271 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
267 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 272 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
268 | topLayout->setSpacing(spacingHint()); | 273 | topLayout->setSpacing(spacingHint()); |
269 | topLayout->setMargin(marginHint()); | 274 | topLayout->setMargin(marginHint()); |
270 | int iii = 0; | 275 | int iii = 0; |
271 | KPrefsWidRadios *syncPrefsGroup = | 276 | KPrefsWidRadios *syncPrefsGroup = |
272 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 277 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
273 | syncPrefsGroup->addRadio(i18n("English")); | 278 | syncPrefsGroup->addRadio(i18n("English")); |
274 | syncPrefsGroup->addRadio(i18n("German")); | 279 | syncPrefsGroup->addRadio(i18n("German")); |
275 | syncPrefsGroup->addRadio(i18n("French")); | 280 | syncPrefsGroup->addRadio(i18n("French")); |
276 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 281 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
277 | if ( QApplication::desktop()->width() < 300 ) | 282 | if ( QApplication::desktop()->width() < 300 ) |
278 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 283 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
279 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 284 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
280 | ++iii; | 285 | ++iii; |
281 | 286 | ||
282 | syncPrefsGroup = | 287 | syncPrefsGroup = |
283 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 288 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
284 | if ( QApplication::desktop()->width() > 300 ) | 289 | if ( QApplication::desktop()->width() > 300 ) |
285 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 290 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
286 | syncPrefsGroup->addRadio(i18n("24:00")); | 291 | syncPrefsGroup->addRadio(i18n("24:00")); |
287 | syncPrefsGroup->addRadio(i18n("12:00am")); | 292 | syncPrefsGroup->addRadio(i18n("12:00am")); |
288 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 293 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
289 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 294 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
290 | ++iii; | 295 | ++iii; |
291 | KPrefsDialogWidBool *sb; | 296 | KPrefsDialogWidBool *sb; |
292 | if ( QApplication::desktop()->width() < 300 ) { | 297 | if ( QApplication::desktop()->width() < 300 ) { |
293 | sb = | 298 | sb = |
294 | addWidBool(i18n("Week starts on Sunday"), | 299 | addWidBool(i18n("Week starts on Sunday"), |
295 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 300 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
296 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 301 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
297 | ++iii; | 302 | ++iii; |
298 | sb = | 303 | sb = |
299 | addWidBool(i18n("Use short date in (WN/E) view"), | 304 | addWidBool(i18n("Use short date in (WN/E) view"), |
300 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 305 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
301 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 306 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
302 | } | 307 | } |
303 | else { | 308 | else { |
304 | QWidget * hb = new QWidget( topFrame ); | 309 | QWidget * hb = new QWidget( topFrame ); |
305 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 310 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
306 | sb = | 311 | sb = |
307 | addWidBool(i18n("Week starts on Sunday"), | 312 | addWidBool(i18n("Week starts on Sunday"), |
308 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 313 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
309 | hbLayout->addWidget(sb->checkBox() ); | 314 | hbLayout->addWidget(sb->checkBox() ); |
310 | sb = | 315 | sb = |
311 | addWidBool(i18n("Use short date in (WN/E) view"), | 316 | addWidBool(i18n("Use short date in (WN/E) view"), |
312 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 317 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
313 | hbLayout->addWidget(sb->checkBox() ); | 318 | hbLayout->addWidget(sb->checkBox() ); |
314 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 319 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
315 | 320 | ||
316 | } | 321 | } |
317 | //#ifndef DESKTOP_VERSION | 322 | //#ifndef DESKTOP_VERSION |
318 | #if 0 | 323 | #if 0 |
319 | ++iii; | 324 | ++iii; |
320 | sb = | 325 | sb = |
321 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 326 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
322 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 327 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
323 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 328 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
324 | #endif | 329 | #endif |
325 | } | 330 | } |
326 | void KOPrefsDialog::showSyncPage() | 331 | void KOPrefsDialog::showSyncPage() |
327 | { | 332 | { |
328 | showPage ( 2 ) ; | 333 | showPage ( 2 ) ; |
329 | 334 | ||
330 | } | 335 | } |
331 | void KOPrefsDialog::setupSyncAlgTab() | 336 | void KOPrefsDialog::setupSyncAlgTab() |
332 | { | 337 | { |
333 | #if 0 | 338 | #if 0 |
334 | QLabel * lab; | 339 | QLabel * lab; |
335 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 340 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
336 | mSetupSyncAlgTab = topFrame; | 341 | mSetupSyncAlgTab = topFrame; |
337 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 342 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
338 | topLayout->setSpacing(spacingHint()); | 343 | topLayout->setSpacing(spacingHint()); |
339 | topLayout->setMargin(marginHint()); | 344 | topLayout->setMargin(marginHint()); |
340 | int iii = 0; | 345 | int iii = 0; |
341 | 346 | ||
342 | KPrefsDialogWidBool *sb = | 347 | KPrefsDialogWidBool *sb = |
343 | addWidBool(i18n("Ask for preferences before syncing"), | 348 | addWidBool(i18n("Ask for preferences before syncing"), |
344 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 349 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
345 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 350 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
346 | 351 | ||
347 | ++iii; | 352 | ++iii; |
348 | 353 | ||
349 | KPrefsWidRadios *syncPrefsGroup = | 354 | KPrefsWidRadios *syncPrefsGroup = |
350 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 355 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
351 | topFrame); | 356 | topFrame); |
352 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 357 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
353 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 358 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
354 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 359 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
355 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 360 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
356 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 361 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
357 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 362 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
358 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 363 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
359 | ++iii; | 364 | ++iii; |
360 | sb = | 365 | sb = |
361 | addWidBool(i18n("Show summary after syncing"), | 366 | addWidBool(i18n("Show summary after syncing"), |
362 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 367 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
363 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 368 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
364 | 369 | ||
365 | ++iii; | 370 | ++iii; |
366 | #endif | 371 | #endif |
367 | 372 | ||
368 | 373 | ||
369 | 374 | ||
370 | } | 375 | } |
371 | 376 | ||
372 | 377 | ||
373 | void KOPrefsDialog::setupSyncTab() | 378 | void KOPrefsDialog::setupSyncTab() |
374 | { | 379 | { |
375 | #if 0 | 380 | #if 0 |
376 | QLabel * lab; | 381 | QLabel * lab; |
377 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 382 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
378 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 383 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
379 | topLayout->setSpacing(spacingHint()); | 384 | topLayout->setSpacing(spacingHint()); |
380 | topLayout->setMargin(marginHint()); | 385 | topLayout->setMargin(marginHint()); |
381 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 386 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
382 | int iii = 0; | 387 | int iii = 0; |
383 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 388 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
384 | ++iii; | 389 | ++iii; |
385 | 390 | ||
386 | mRemoteIPEdit = new QLineEdit(topFrame); | 391 | mRemoteIPEdit = new QLineEdit(topFrame); |
387 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 392 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
388 | topLayout->addWidget(lab ,iii,0); | 393 | topLayout->addWidget(lab ,iii,0); |
389 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 394 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
390 | ++iii; | 395 | ++iii; |
391 | mRemoteUser = new QLineEdit(topFrame); | 396 | mRemoteUser = new QLineEdit(topFrame); |
392 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 397 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
393 | topLayout->addWidget(lab ,iii,0); | 398 | topLayout->addWidget(lab ,iii,0); |
394 | topLayout->addWidget(mRemoteUser, iii,1); | 399 | topLayout->addWidget(mRemoteUser, iii,1); |
395 | ++iii; | 400 | ++iii; |
396 | 401 | ||
397 | mRemoteFile = new QLineEdit(topFrame); | 402 | mRemoteFile = new QLineEdit(topFrame); |
398 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 403 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
399 | topLayout->addWidget(lab ,iii,0); | 404 | topLayout->addWidget(lab ,iii,0); |
400 | topLayout->addWidget(mRemoteFile,iii,1); | 405 | topLayout->addWidget(mRemoteFile,iii,1); |
401 | ++iii; | 406 | ++iii; |
402 | 407 | ||
403 | mLocalTempFile = new QLineEdit(topFrame); | 408 | mLocalTempFile = new QLineEdit(topFrame); |
404 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 409 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
405 | topLayout->addWidget(lab ,iii,0); | 410 | topLayout->addWidget(lab ,iii,0); |
406 | topLayout->addWidget(mLocalTempFile,iii,1); | 411 | topLayout->addWidget(mLocalTempFile,iii,1); |
407 | ++iii; | 412 | ++iii; |
408 | 413 | ||
409 | KPrefsDialogWidBool *wb = | 414 | KPrefsDialogWidBool *wb = |
410 | addWidBool(i18n("Write back synced file"), | 415 | addWidBool(i18n("Write back synced file"), |
411 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 416 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
412 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 417 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
413 | ++iii; | 418 | ++iii; |
414 | wb = | 419 | wb = |
415 | addWidBool(i18n("Write back existing entries only"), | 420 | addWidBool(i18n("Write back existing entries only"), |
416 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 421 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
417 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 422 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
418 | ++iii; | 423 | ++iii; |
419 | 424 | ||
420 | #endif | 425 | #endif |
421 | } | 426 | } |
422 | 427 | ||
423 | void KOPrefsDialog::setupMainTab() | 428 | void KOPrefsDialog::setupMainTab() |
424 | { | 429 | { |
425 | QFrame *topFrame = addPage(i18n("General"),0,0); | 430 | QFrame *topFrame = addPage(i18n("General"),0,0); |
426 | // DesktopIcon("identity",KIcon::SizeMedium)); | 431 | // DesktopIcon("identity",KIcon::SizeMedium)); |
427 | 432 | ||
428 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 433 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
429 | topLayout->setSpacing(spacingHint()); | 434 | topLayout->setSpacing(spacingHint()); |
430 | topLayout->setMargin(marginHint()); | 435 | topLayout->setMargin(marginHint()); |
431 | 436 | ||
432 | // KPrefsDialogWidBool *emailControlCenter = | 437 | // KPrefsDialogWidBool *emailControlCenter = |
433 | // addWidBool(i18n("&Use email settings from Control Center"), | 438 | // addWidBool(i18n("&Use email settings from Control Center"), |
434 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 439 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
435 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 440 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
436 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 441 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
437 | // SLOT(toggleEmailSettings(bool))); | 442 | // SLOT(toggleEmailSettings(bool))); |
438 | 443 | ||
439 | mNameEdit = new QLineEdit(topFrame); | 444 | mNameEdit = new QLineEdit(topFrame); |
440 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 445 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
441 | topLayout->addWidget(mNameLabel,0,0); | 446 | topLayout->addWidget(mNameLabel,0,0); |
442 | topLayout->addWidget(mNameEdit,0,1); | 447 | topLayout->addWidget(mNameEdit,0,1); |
443 | 448 | ||
444 | mEmailEdit = new QLineEdit(topFrame); | 449 | mEmailEdit = new QLineEdit(topFrame); |
445 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 450 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
446 | topLayout->addWidget(mEmailLabel,1,0); | 451 | topLayout->addWidget(mEmailLabel,1,0); |
447 | topLayout->addWidget(mEmailEdit,1,1); | 452 | topLayout->addWidget(mEmailEdit,1,1); |
448 | KPrefsDialogWidBool *wb; | 453 | KPrefsDialogWidBool *wb; |
449 | QHBox *dummy; | 454 | QHBox *dummy; |
450 | if ( QApplication::desktop()->width() > 480 ) { | 455 | if ( QApplication::desktop()->width() > 480 ) { |
451 | dummy = new QHBox(topFrame); | 456 | dummy = new QHBox(topFrame); |
452 | } else { | 457 | } else { |
453 | dummy = new QVBox(topFrame); | 458 | dummy = new QVBox(topFrame); |
454 | } | 459 | } |
455 | 460 | ||
456 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 461 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
457 | addWidBool(i18n("Full menu bar(nr)"), | 462 | addWidBool(i18n("Full menu bar(nr)"), |
458 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 463 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
459 | 464 | ||
460 | 465 | ||
461 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 466 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
462 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 467 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
463 | 468 | ||
464 | 469 | ||
465 | dummy = new QHBox(topFrame); | 470 | dummy = new QHBox(topFrame); |
466 | new QLabel(i18n("Days in What's Next:"),dummy); | 471 | new QLabel(i18n("Days in What's Next:"),dummy); |
467 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 472 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
468 | 473 | ||
469 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 474 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
470 | 475 | ||
471 | 476 | ||
472 | 477 | ||
473 | dummy = new QHBox(topFrame); | 478 | dummy = new QHBox(topFrame); |
474 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 479 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
475 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 480 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
476 | 481 | ||
477 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 482 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
478 | 483 | ||
479 | QHBox *prioBox = new QHBox(topFrame); | 484 | QHBox *prioBox = new QHBox(topFrame); |
480 | // intervalBox->setSpacing(spacingHint()); | 485 | // intervalBox->setSpacing(spacingHint()); |
481 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 486 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
482 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 487 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
483 | 488 | ||
484 | if ( QApplication::desktop()->width() < 300 ) | 489 | if ( QApplication::desktop()->width() < 300 ) |
485 | messa = i18n("Show topmost todo prios in What's N.:"); | 490 | messa = i18n("Show topmost todo prios in What's N.:"); |
486 | QLabel *prioLabel = new QLabel(messa, prioBox); | 491 | QLabel *prioLabel = new QLabel(messa, prioBox); |
487 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 492 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
488 | if ( QApplication::desktop()->width() < 300 ) | 493 | if ( QApplication::desktop()->width() < 300 ) |
489 | mPrioSpin->setFixedWidth( 40 ); | 494 | mPrioSpin->setFixedWidth( 40 ); |
490 | 495 | ||
491 | // KPrefsDialogWidBool *bcc = | 496 | // KPrefsDialogWidBool *bcc = |
492 | // addWidBool(i18n("Send copy to owner when mailing events"), | 497 | // addWidBool(i18n("Send copy to owner when mailing events"), |
493 | // &(KOPrefs::instance()->mBcc),topFrame); | 498 | // &(KOPrefs::instance()->mBcc),topFrame); |
494 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 499 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
495 | 500 | ||
496 | 501 | ||
497 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 502 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
498 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 503 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
499 | 504 | ||
500 | // addWidBool(i18n("Enable automatic saving of calendar"), | 505 | // addWidBool(i18n("Enable automatic saving of calendar"), |
501 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 506 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
502 | 507 | ||
503 | QHBox *intervalBox = new QHBox(topFrame); | 508 | QHBox *intervalBox = new QHBox(topFrame); |
504 | // intervalBox->setSpacing(spacingHint()); | 509 | // intervalBox->setSpacing(spacingHint()); |
505 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 510 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
506 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 511 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
507 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 512 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
508 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 513 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
509 | /* | 514 | /* |
510 | QHBox * agendasize = new QHBox ( topFrame ); | 515 | QHBox * agendasize = new QHBox ( topFrame ); |
511 | 516 | ||
512 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 517 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
513 | 518 | ||
514 | 519 | ||
515 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 520 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
516 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 521 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
517 | */ | 522 | */ |
518 | KPrefsDialogWidBool *verticalScreen = | 523 | KPrefsDialogWidBool *verticalScreen = |
519 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 524 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
520 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 525 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
521 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 526 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
522 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); | 527 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); |
523 | 528 | ||
524 | KPrefsDialogWidBool *ask = | 529 | KPrefsDialogWidBool *ask = |
525 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 530 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
526 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 531 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
527 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); | 532 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); |
528 | 533 | ||
529 | 534 | ||
530 | /* | 535 | /* |
531 | KPrefsDialogWidBool *confirmCheck = | 536 | KPrefsDialogWidBool *confirmCheck = |
532 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 537 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
533 | topFrame); | 538 | topFrame); |
534 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 539 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
535 | 540 | ||
536 | 541 | ||
537 | mEnableGroupScheduling = | 542 | mEnableGroupScheduling = |
538 | addWidBool(i18n("Enable group scheduling"), | 543 | addWidBool(i18n("Enable group scheduling"), |
539 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 544 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
540 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 545 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
541 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 546 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
542 | SLOT(warningGroupScheduling())); | 547 | SLOT(warningGroupScheduling())); |
543 | 548 | ||
544 | mEnableProjectView = | 549 | mEnableProjectView = |
545 | addWidBool(i18n("Enable project view"), | 550 | addWidBool(i18n("Enable project view"), |
546 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 551 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
547 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 552 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
548 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 553 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
549 | SLOT(warningProjectView())); | 554 | SLOT(warningProjectView())); |
550 | 555 | ||
551 | // Can't be disabled anymore | 556 | // Can't be disabled anymore |
552 | mEnableGroupScheduling->checkBox()->hide(); | 557 | mEnableGroupScheduling->checkBox()->hide(); |
553 | 558 | ||
554 | // Disable setting, because this feature now becomes stable | 559 | // Disable setting, because this feature now becomes stable |
555 | mEnableProjectView->checkBox()->hide(); | 560 | mEnableProjectView->checkBox()->hide(); |
556 | 561 | ||
557 | KPrefsWidRadios *defaultFormatGroup = | 562 | KPrefsWidRadios *defaultFormatGroup = |
558 | addWidRadios(i18n("Default Calendar Format"), | 563 | addWidRadios(i18n("Default Calendar Format"), |
559 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 564 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
560 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 565 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
561 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 566 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
562 | 567 | ||
563 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 568 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
564 | 569 | ||
565 | // Default format unconditionally is iCalendar | 570 | // Default format unconditionally is iCalendar |
566 | defaultFormatGroup->groupBox()->hide(); | 571 | defaultFormatGroup->groupBox()->hide(); |
567 | 572 | ||
568 | KPrefsWidRadios *mailClientGroup = | 573 | KPrefsWidRadios *mailClientGroup = |
569 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 574 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
570 | topFrame); | 575 | topFrame); |
571 | mailClientGroup->addRadio(i18n("KMail")); | 576 | mailClientGroup->addRadio(i18n("KMail")); |
572 | mailClientGroup->addRadio(i18n("Sendmail")); | 577 | mailClientGroup->addRadio(i18n("Sendmail")); |
573 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 578 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
574 | 579 | ||
575 | KPrefsDialogWidBool *htmlsave = | 580 | KPrefsDialogWidBool *htmlsave = |
576 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 581 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
577 | topFrame); | 582 | topFrame); |
578 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 583 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
579 | 584 | ||
580 | KPrefsWidRadios *destinationGroup = | 585 | KPrefsWidRadios *destinationGroup = |
581 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 586 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
582 | topFrame); | 587 | topFrame); |
583 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 588 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
584 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 589 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
585 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 590 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
586 | 591 | ||
587 | topLayout->setRowStretch(14,1); | 592 | topLayout->setRowStretch(14,1); |
588 | */ | 593 | */ |
589 | } | 594 | } |
590 | 595 | ||
591 | 596 | ||
592 | void KOPrefsDialog::setupTimeTab() | 597 | void KOPrefsDialog::setupTimeTab() |
593 | { | 598 | { |
594 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 599 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
595 | // DesktopIcon("clock",KIcon::SizeMedium)); | 600 | // DesktopIcon("clock",KIcon::SizeMedium)); |
596 | 601 | ||
597 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 602 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
598 | topLayout->setSpacing(spacingHint()); | 603 | topLayout->setSpacing(spacingHint()); |
599 | topLayout->setMargin(marginHint()); | 604 | topLayout->setMargin(marginHint()); |
600 | 605 | ||
601 | QHBox *dummy = new QHBox(topFrame); | 606 | QHBox *dummy = new QHBox(topFrame); |
602 | KPrefsWidTime *dayBegins = | 607 | KPrefsWidTime *dayBegins = |
603 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 608 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
604 | dummy); | 609 | dummy); |
605 | //topLayout->addWidget(dayBegins->label(),2,0); | 610 | //topLayout->addWidget(dayBegins->label(),2,0); |
606 | 611 | ||
607 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 612 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
608 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 613 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
609 | 614 | ||
610 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 615 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
611 | topFrame),1,0); | 616 | topFrame),1,0); |
612 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 617 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
613 | mStartTimeSpin->setSuffix(":00"); | 618 | mStartTimeSpin->setSuffix(":00"); |
614 | topLayout->addWidget(mStartTimeSpin,1,1); | 619 | topLayout->addWidget(mStartTimeSpin,1,1); |
615 | 620 | ||
616 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 621 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
617 | topFrame),2,0); | 622 | topFrame),2,0); |
618 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 623 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
619 | mDefaultDurationSpin->setSuffix(":00"); | 624 | mDefaultDurationSpin->setSuffix(":00"); |
620 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 625 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
621 | 626 | ||
622 | QStringList alarmList; | 627 | QStringList alarmList; |
623 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 628 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
624 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 629 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
625 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 630 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
626 | 3,0); | 631 | 3,0); |
627 | mAlarmTimeCombo = new QComboBox(topFrame); | 632 | mAlarmTimeCombo = new QComboBox(topFrame); |
628 | mAlarmTimeCombo->insertStringList(alarmList); | 633 | mAlarmTimeCombo->insertStringList(alarmList); |
629 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 634 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
630 | 635 | ||
631 | 636 | ||
632 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 637 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
633 | i18n("Working Hours"), | 638 | i18n("Working Hours"), |
634 | topFrame); | 639 | topFrame); |
635 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 640 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
636 | workingHoursGroup->layout()->setSpacing( 0 ); | 641 | workingHoursGroup->layout()->setSpacing( 0 ); |
637 | workingHoursGroup->layout()->setMargin( 4 ); | 642 | workingHoursGroup->layout()->setMargin( 4 ); |
638 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 643 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
639 | // workStartBox->setMargin( 0 ); | 644 | // workStartBox->setMargin( 0 ); |
640 | addWidTime(i18n("Daily starting hour:"), | 645 | addWidTime(i18n("Daily starting hour:"), |
641 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 646 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
642 | 647 | ||
643 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 648 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
644 | //workEndBox->setMargin( 0 ); | 649 | //workEndBox->setMargin( 0 ); |
645 | addWidTime(i18n("Daily ending hour:"), | 650 | addWidTime(i18n("Daily ending hour:"), |
646 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 651 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
647 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 652 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
648 | //excludeBox->setMargin( 0 ); | 653 | //excludeBox->setMargin( 0 ); |
649 | addWidBool(i18n("Exclude holidays"), | 654 | addWidBool(i18n("Exclude holidays"), |
650 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 655 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
651 | 656 | ||
652 | addWidBool(i18n("Exclude Saturdays"), | 657 | addWidBool(i18n("Exclude Saturdays"), |
653 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 658 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
654 | 659 | ||
655 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 660 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
656 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 661 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
657 | // topFrame); | 662 | // topFrame); |
658 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 663 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
659 | 664 | ||
660 | // topLayout->setRowStretch(6,1); | 665 | // topLayout->setRowStretch(6,1); |
661 | } | 666 | } |
662 | 667 | ||
663 | 668 | ||
664 | void KOPrefsDialog::setupViewsTab() | 669 | void KOPrefsDialog::setupViewsTab() |
665 | { | 670 | { |
666 | 671 | ||
667 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 672 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
668 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 673 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
669 | 674 | ||
670 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 675 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
671 | topLayout->setSpacing(spacingHint()); | 676 | topLayout->setSpacing(spacingHint()); |
672 | topLayout->setMargin(marginHint()); | 677 | topLayout->setMargin(marginHint()); |
673 | 678 | ||
674 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 679 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
675 | // topLayout->addLayout(dayBeginsLayout,0,0); | 680 | // topLayout->addLayout(dayBeginsLayout,0,0); |
676 | 681 | ||
677 | // KPrefsWidTime *dayBegins = | 682 | // KPrefsWidTime *dayBegins = |
678 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 683 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
679 | // topFrame); | 684 | // topFrame); |
680 | // dayBeginsLayout->addWidget(dayBegins->label()); | 685 | // dayBeginsLayout->addWidget(dayBegins->label()); |
681 | // dayBeginsLayout->addStretch(1); | 686 | // dayBeginsLayout->addStretch(1); |
682 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 687 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
683 | 688 | ||
684 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 689 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
685 | // topLayout->addLayout(nextDaysLayout,1,0); | 690 | // topLayout->addLayout(nextDaysLayout,1,0); |
686 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 691 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
687 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 692 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
688 | // nextDaysLayout->addStretch(1); | 693 | // nextDaysLayout->addStretch(1); |
689 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 694 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
690 | 695 | ||
691 | 696 | ||
692 | int ii = 0; | 697 | int ii = 0; |
693 | KPrefsDialogWidBool *dummy = | 698 | KPrefsDialogWidBool *dummy = |
694 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 699 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
695 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 700 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
696 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 701 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
697 | 702 | ||
698 | dummy = | 703 | dummy = |
699 | addWidBool(i18n("Highlight current day in agenda"), | 704 | addWidBool(i18n("Highlight current day in agenda"), |
700 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 705 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
701 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 706 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
702 | 707 | ||
703 | dummy = | 708 | dummy = |
704 | addWidBool(i18n("Use light color for highlight current day"), | 709 | addWidBool(i18n("Use light color for highlight current day"), |
705 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 710 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
706 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 711 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
707 | 712 | ||
708 | KPrefsDialogWidBool *dailyRecur = | 713 | KPrefsDialogWidBool *dailyRecur = |
709 | addWidBool(i18n("Show events that recur daily in date nav."), | 714 | addWidBool(i18n("Show events that recur daily in date nav."), |
710 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 715 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
711 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 716 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
712 | 717 | ||
713 | KPrefsDialogWidBool *weeklyRecur = | 718 | KPrefsDialogWidBool *weeklyRecur = |
714 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 719 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
715 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 720 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
716 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 721 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
717 | if ( QApplication::desktop()->width() > 640 ) { | 722 | if ( QApplication::desktop()->width() > 640 ) { |
718 | 723 | ||
719 | KPrefsDialogWidBool *enableToolTips = | 724 | KPrefsDialogWidBool *enableToolTips = |
720 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 725 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
721 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 726 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
722 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 727 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
723 | 728 | ||
724 | } | 729 | } |
725 | KPrefsDialogWidBool *passwdk = | 730 | KPrefsDialogWidBool *passwdk = |
726 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 731 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
727 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 732 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
728 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 733 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
729 | 734 | ||
730 | passwdk = | 735 | passwdk = |
731 | addWidBool(i18n("Show location in What's Next view"), | 736 | addWidBool(i18n("Show location in What's Next view"), |
732 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 737 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
733 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 738 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
734 | 739 | ||
735 | passwdk = | 740 | passwdk = |
736 | addWidBool(i18n("Show Sync Events in WN/Agenda view"), | 741 | addWidBool(i18n("Show Sync Events in WN/Agenda view"), |
737 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 742 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
738 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 743 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
739 | 744 | ||
740 | 745 | ||
741 | KPrefsDialogWidBool *marcusBainsEnabled = | 746 | KPrefsDialogWidBool *marcusBainsEnabled = |
742 | addWidBool(i18n("Show Marcus Bains line"), | 747 | addWidBool(i18n("Show Marcus Bains line"), |
743 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 748 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
744 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 749 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
745 | 750 | ||
746 | 751 | ||
747 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 752 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
748 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 753 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
749 | //topLayout->setRowStretch(11,1); | 754 | //topLayout->setRowStretch(11,1); |
750 | 755 | ||
751 | 756 | ||
752 | 757 | ||
753 | 758 | ||
754 | 759 | ||
755 | 760 | ||
756 | topFrame = addPage(i18n("ViewChange"),0,0); | 761 | topFrame = addPage(i18n("ViewChange"),0,0); |
757 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 762 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
758 | 763 | ||
759 | topLayout = new QGridLayout(topFrame,6,1); | 764 | topLayout = new QGridLayout(topFrame,6,1); |
760 | topLayout->setSpacing(spacingHint()); | 765 | topLayout->setSpacing(spacingHint()); |
761 | topLayout->setMargin(marginHint()); | 766 | topLayout->setMargin(marginHint()); |
762 | ii = 0; | 767 | ii = 0; |
763 | 768 | ||
764 | 769 | ||
765 | dummy = | 770 | dummy = |
766 | addWidBool(i18n("Hold fullscreen on view change"), | 771 | addWidBool(i18n("Hold fullscreen on view change"), |
767 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 772 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
768 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 773 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
769 | 774 | ||
770 | dummy = | 775 | dummy = |
771 | addWidBool(i18n("Hold non-fullscreen on view change"), | 776 | addWidBool(i18n("Hold non-fullscreen on view change"), |
772 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 777 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
773 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 778 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
774 | 779 | ||
775 | 780 | ||
776 | KPrefsDialogWidBool *fullViewTodo = | 781 | KPrefsDialogWidBool *fullViewTodo = |
777 | addWidBool(i18n("Event list view uses full window"), | 782 | addWidBool(i18n("Event list view uses full window"), |
778 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 783 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
779 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 784 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
780 | 785 | ||
781 | KPrefsDialogWidBool *fullViewMonth = | 786 | KPrefsDialogWidBool *fullViewMonth = |
782 | addWidBool(i18n("Next days view uses full window"), | 787 | addWidBool(i18n("Next days view uses full window"), |
783 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 788 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
784 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 789 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
785 | 790 | ||
786 | dummy = | 791 | dummy = |
787 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 792 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
788 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 793 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
789 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 794 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
790 | 795 | ||
791 | dummy = | 796 | dummy = |
792 | addWidBool(i18n("Set agenda to current time on change"), | 797 | addWidBool(i18n("Set agenda to current time on change"), |
793 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 798 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
794 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 799 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
795 | 800 | ||
796 | dummy = | 801 | dummy = |
797 | addWidBool(i18n("Listview uses monthly timespan"), | 802 | addWidBool(i18n("Listview uses monthly timespan"), |
798 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 803 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
799 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 804 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
800 | dummy = | 805 | dummy = |
801 | addWidBool(i18n("Highlight selection in Time Edit"), | 806 | addWidBool(i18n("Highlight selection in Time Edit"), |
802 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 807 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
803 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 808 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
804 | 809 | ||
805 | 810 | ||
806 | 811 | ||
807 | 812 | ||
808 | 813 | ||
809 | topFrame = addPage(i18n("Month View"),0,0); | 814 | topFrame = addPage(i18n("Month View"),0,0); |
810 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 815 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
811 | 816 | ||
812 | topLayout = new QGridLayout(topFrame,5,1); | 817 | topLayout = new QGridLayout(topFrame,5,1); |
813 | topLayout->setSpacing(spacingHint()); | 818 | topLayout->setSpacing(spacingHint()); |
814 | topLayout->setMargin(marginHint()); | 819 | topLayout->setMargin(marginHint()); |
815 | ii = 0; | 820 | ii = 0; |
816 | QLabel *lab; | 821 | QLabel *lab; |
817 | QHBox *habo = new QHBox( topFrame ); | 822 | QHBox *habo = new QHBox( topFrame ); |
818 | if ( QApplication::desktop()->width() < 320 ) { | 823 | if ( QApplication::desktop()->width() < 320 ) { |
819 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 824 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
820 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 825 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
821 | ii++; | 826 | ii++; |
822 | 827 | ||
823 | } else { | 828 | } else { |
824 | new QLabel ( i18n("Show events that recur "), habo ); | 829 | new QLabel ( i18n("Show events that recur "), habo ); |
825 | 830 | ||
826 | } | 831 | } |
827 | dailyRecur = | 832 | dailyRecur = |
828 | addWidBool(i18n("daily"), | 833 | addWidBool(i18n("daily"), |
829 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 834 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
830 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 835 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
831 | 836 | ||
832 | weeklyRecur = | 837 | weeklyRecur = |
833 | addWidBool(i18n("weekly"), | 838 | addWidBool(i18n("weekly"), |
834 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 839 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
835 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 840 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
836 | ii++; | 841 | ii++; |
837 | 842 | ||
838 | 843 | ||
839 | habo = new QHBox( topFrame ); | 844 | habo = new QHBox( topFrame ); |
840 | if ( QApplication::desktop()->width() < 320 ) { | 845 | if ( QApplication::desktop()->width() < 320 ) { |
841 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 846 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
842 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 847 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
843 | ii++; | 848 | ii++; |
844 | 849 | ||
845 | } else { | 850 | } else { |
846 | new QLabel ( i18n("Show in every cell "), habo ); | 851 | new QLabel ( i18n("Show in every cell "), habo ); |
847 | } | 852 | } |
848 | weeklyRecur = | 853 | weeklyRecur = |
849 | addWidBool(i18n("short month"), | 854 | addWidBool(i18n("short month"), |
850 | &(KOPrefs::instance()->mMonthShowShort),habo); | 855 | &(KOPrefs::instance()->mMonthShowShort),habo); |
851 | weeklyRecur = | 856 | weeklyRecur = |
852 | addWidBool(i18n("icons"), | 857 | addWidBool(i18n("icons"), |
853 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 858 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
854 | 859 | ||
855 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 860 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
856 | ii++; | 861 | ii++; |
857 | #ifdef DESKTOP_VERSION | 862 | #ifdef DESKTOP_VERSION |
858 | KPrefsDialogWidBool *enableMonthScroll = | 863 | KPrefsDialogWidBool *enableMonthScroll = |
859 | addWidBool(i18n("Enable scrollbars in month view cells"), | 864 | addWidBool(i18n("Enable scrollbars in month view cells"), |
860 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 865 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
861 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 866 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
862 | #endif | 867 | #endif |
863 | 868 | ||
864 | dummy = | 869 | dummy = |
865 | addWidBool(i18n("Show Sat/Sun together"), | 870 | addWidBool(i18n("Show Sat/Sun together"), |
866 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 871 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
867 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 872 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
868 | 873 | ||
869 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 874 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
870 | addWidBool(i18n("Month view uses category colors"), | 875 | addWidBool(i18n("Month view uses category colors"), |
871 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 876 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
872 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 877 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
873 | 878 | ||
874 | dummy = | 879 | dummy = |
875 | addWidBool(i18n("Categorie colors are applied to text"), | 880 | addWidBool(i18n("Categorie colors are applied to text"), |
876 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 881 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
877 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 882 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
878 | coloredCategoriesInMonthView = | 883 | coloredCategoriesInMonthView = |
879 | addWidBool(i18n("Month view uses day colors"), | 884 | addWidBool(i18n("Month view uses day colors"), |
880 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 885 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
881 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 886 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
882 | 887 | ||
883 | KPrefsWidColor *holidayColor = | 888 | KPrefsWidColor *holidayColor = |
884 | addWidColor(i18n("Day color odd months"), | 889 | addWidColor(i18n("Day color odd months"), |
885 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 890 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
886 | topLayout->addWidget(holidayColor->label(),ii,0); | 891 | topLayout->addWidget(holidayColor->label(),ii,0); |
887 | topLayout->addWidget(holidayColor->button(),ii++,1); | 892 | topLayout->addWidget(holidayColor->button(),ii++,1); |
888 | 893 | ||
889 | holidayColor = | 894 | holidayColor = |
890 | addWidColor(i18n("Day color even months"), | 895 | addWidColor(i18n("Day color even months"), |
891 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 896 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
892 | topLayout->addWidget(holidayColor->label(),ii,0); | 897 | topLayout->addWidget(holidayColor->label(),ii,0); |
893 | topLayout->addWidget(holidayColor->button(),ii++,1); | 898 | topLayout->addWidget(holidayColor->button(),ii++,1); |
894 | 899 | ||
895 | 900 | ||
896 | holidayColor = | 901 | holidayColor = |
897 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 902 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
898 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 903 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
899 | topLayout->addWidget(holidayColor->label(),ii,0); | 904 | topLayout->addWidget(holidayColor->label(),ii,0); |
900 | topLayout->addWidget(holidayColor->button(),ii++,1); | 905 | topLayout->addWidget(holidayColor->button(),ii++,1); |
901 | 906 | ||
902 | // *********************** Todo View | 907 | // *********************** Todo View |
903 | 908 | ||
904 | topFrame = addPage(i18n("Todo View"),0,0); | 909 | topFrame = addPage(i18n("Todo View"),0,0); |
905 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 910 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
906 | 911 | ||
907 | topLayout = new QGridLayout(topFrame,4,1); | 912 | topLayout = new QGridLayout(topFrame,4,1); |
908 | topLayout->setSpacing(spacingHint()); | 913 | topLayout->setSpacing(spacingHint()); |
909 | topLayout->setMargin(marginHint()); | 914 | topLayout->setMargin(marginHint()); |
910 | ii = 0; | 915 | ii = 0; |
911 | 916 | ||
912 | KPrefsDialogWidBool *showCompletedTodo = | 917 | KPrefsDialogWidBool *showCompletedTodo = |
913 | addWidBool(i18n("To-do view shows completed Todos"), | 918 | addWidBool(i18n("To-do view shows completed Todos"), |
914 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 919 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
915 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 920 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
916 | dummy = | 921 | dummy = |
917 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 922 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
918 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 923 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
919 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 924 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
920 | 925 | ||
921 | dummy = | 926 | dummy = |
922 | addWidBool(i18n("Small To-do view uses smaller font"), | 927 | addWidBool(i18n("Small To-do view uses smaller font"), |
923 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 928 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
924 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 929 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
925 | 930 | ||
926 | 931 | ||
927 | 932 | ||
928 | dummy = | 933 | dummy = |
929 | addWidBool(i18n("Todo view uses category colors"), | 934 | addWidBool(i18n("Todo view uses category colors"), |
930 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 935 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
931 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 936 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
932 | 937 | ||
933 | 938 | ||
934 | QWidget* wid = new QWidget( topFrame ); | 939 | QWidget* wid = new QWidget( topFrame ); |
935 | // Todo due today color | 940 | // Todo due today color |
936 | KPrefsWidColor *todoDueTodayColor = | 941 | KPrefsWidColor *todoDueTodayColor = |
937 | addWidColor(i18n("Todo due today color:"), | 942 | addWidColor(i18n("Todo due today color:"), |
938 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 943 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
939 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 944 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
940 | widLayout->addWidget( todoDueTodayColor->label() ); | 945 | widLayout->addWidget( todoDueTodayColor->label() ); |
941 | widLayout->addWidget( todoDueTodayColor->button() ); | 946 | widLayout->addWidget( todoDueTodayColor->button() ); |
942 | topLayout->addWidget(wid,ii++,0); | 947 | topLayout->addWidget(wid,ii++,0); |
943 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 948 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
944 | 949 | ||
945 | // Todo overdue color | 950 | // Todo overdue color |
946 | wid = new QWidget( topFrame ); | 951 | wid = new QWidget( topFrame ); |
947 | widLayout = new QHBoxLayout(wid); | 952 | widLayout = new QHBoxLayout(wid); |
948 | KPrefsWidColor *todoOverdueColor = | 953 | KPrefsWidColor *todoOverdueColor = |
949 | addWidColor(i18n("Todo overdue color:"), | 954 | addWidColor(i18n("Todo overdue color:"), |
950 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 955 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
951 | widLayout->addWidget(todoOverdueColor->label()); | 956 | widLayout->addWidget(todoOverdueColor->label()); |
952 | widLayout->addWidget(todoOverdueColor->button()); | 957 | widLayout->addWidget(todoOverdueColor->button()); |
953 | topLayout->addWidget(wid,ii++,0); | 958 | topLayout->addWidget(wid,ii++,0); |
954 | 959 | ||
955 | dummy = | 960 | dummy = |
956 | addWidBool(i18n("Colors are applied to text"), | 961 | addWidBool(i18n("Colors are applied to text"), |
957 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 962 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
958 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 963 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
959 | 964 | ||
960 | dummy = | 965 | dummy = |
961 | addWidBool(i18n("Allday Agenda view shows todos"), | 966 | addWidBool(i18n("Allday Agenda view shows todos"), |
962 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 967 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
963 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 968 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
964 | 969 | ||
965 | 970 | ||
966 | 971 | ||
967 | 972 | ||
968 | topFrame = addPage(i18n("Alarm"),0,0); | 973 | topFrame = addPage(i18n("Alarm"),0,0); |
969 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 974 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
970 | 975 | ||
971 | topLayout = new QGridLayout(topFrame,2,1); | 976 | topLayout = new QGridLayout(topFrame,2,1); |
972 | topLayout->setSpacing(spacingHint()); | 977 | topLayout->setSpacing(spacingHint()); |