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