author | zautrix <zautrix> | 2004-09-22 02:03:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 02:03:15 (UTC) |
commit | 633522024e48efc423155a04b71083a03696211d (patch) (unidiff) | |
tree | c383ee8fa3489351450b948eb83a42b504752131 /kmicromail/koprefsdialog.cpp | |
parent | ed2feaa9f7e2064e5b26ff678a25eb79ceae599b (diff) | |
download | kdepimpi-633522024e48efc423155a04b71083a03696211d.zip kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.gz kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.bz2 |
global prefs integrated in kopi amd ompi
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 7d7bd2a..598d12f 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,576 +1,588 @@ | |||
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 | 23 | ||
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 | 64 | ||
64 | 65 | ||
65 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
66 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
67 | { | 68 | { |
68 | 69 | ||
69 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | ||
70 | setupMainTab(); | 72 | setupMainTab(); |
71 | setupMailTab();; | 73 | setupMailTab();; |
72 | setupFontsTab(); | 74 | setupFontsTab(); |
73 | readConfig(); | 75 | readConfig(); |
74 | 76 | ||
75 | #if 0 | 77 | #if 0 |
76 | 78 | ||
77 | setupMainTab(); | 79 | setupMainTab(); |
78 | setupLocaleTab(); | 80 | setupLocaleTab(); |
79 | setupTimeZoneTab(); | 81 | setupTimeZoneTab(); |
80 | setupTimeTab(); | 82 | setupTimeTab(); |
81 | setupLocaleDateTab(); | 83 | setupLocaleDateTab(); |
82 | setupFontsTab(); | 84 | setupFontsTab(); |
83 | setupColorsTab(); | 85 | setupColorsTab(); |
84 | setupViewsTab(); | 86 | setupViewsTab(); |
85 | //setupSyncTab(); | 87 | //setupSyncTab(); |
86 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
87 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
88 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
89 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
90 | #endif | 92 | #endif |
91 | } | 93 | } |
92 | 94 | ||
95 | #include "kpimglobalprefs.h" | ||
93 | 96 | ||
94 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
95 | { | 98 | { |
96 | } | 99 | } |
97 | 100 | void KOPrefsDialog::setupGlobalTab() | |
101 | { | ||
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | ||
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | ||
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | ||
105 | topLayout->addWidget( kdelibcfg ); | ||
106 | |||
107 | |||
108 | } | ||
98 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
99 | { | 110 | { |
100 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
101 | 112 | ||
102 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
103 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
104 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
105 | 116 | ||
106 | 117 | ||
107 | mNameEdit = new QLineEdit(topFrame); | 118 | mNameEdit = new QLineEdit(topFrame); |
108 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
109 | topLayout->addWidget(mNameLabel,0,0); | 120 | topLayout->addWidget(mNameLabel,0,0); |
110 | topLayout->addWidget(mNameEdit,0,1); | 121 | topLayout->addWidget(mNameEdit,0,1); |
111 | 122 | ||
112 | mEmailEdit = new QLineEdit(topFrame); | 123 | mEmailEdit = new QLineEdit(topFrame); |
113 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
114 | topLayout->addWidget(mEmailLabel,1,0); | 125 | topLayout->addWidget(mEmailLabel,1,0); |
115 | topLayout->addWidget(mEmailEdit,1,1); | 126 | topLayout->addWidget(mEmailEdit,1,1); |
116 | 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); |
117 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 128 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
118 | 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!"), |
119 | &(KOPrefs::instance()->mUseKapi),topFrame); | 130 | &(KOPrefs::instance()->mUseKapi),topFrame); |
120 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
121 | } | 132 | } |
122 | 133 | ||
123 | void KOPrefsDialog::setupMailTab() | 134 | void KOPrefsDialog::setupMailTab() |
124 | { | 135 | { |
125 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
126 | 137 | ||
127 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
128 | topLayout->setSpacing(spacingHint()); | 139 | topLayout->setSpacing(spacingHint()); |
129 | topLayout->setMargin(marginHint()); | 140 | topLayout->setMargin(marginHint()); |
130 | 141 | ||
131 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
132 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
133 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
134 | 145 | ||
135 | 146 | ||
136 | ttt = addWidBool(i18n("Send mails later"), | 147 | ttt = addWidBool(i18n("Send mails later"), |
137 | &(KOPrefs::instance()->mSendLater),topFrame); | 148 | &(KOPrefs::instance()->mSendLater),topFrame); |
138 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
139 | 150 | ||
140 | 151 | ||
141 | } | 152 | } |
142 | void KOPrefsDialog::setupFontsTab() | 153 | void KOPrefsDialog::setupFontsTab() |
143 | { | 154 | { |
144 | 155 | ||
145 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 156 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
146 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 157 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
147 | 158 | ||
148 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 159 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
149 | topLayout->setSpacing(1); | 160 | topLayout->setSpacing(1); |
150 | topLayout->setMargin(3); | 161 | topLayout->setMargin(3); |
151 | KPrefsDialogWidFont * tVFont; | 162 | KPrefsDialogWidFont * tVFont; |
152 | int i = 0; | 163 | int i = 0; |
153 | KPrefsDialogWidFont *timeLabelsFont = | 164 | KPrefsDialogWidFont *timeLabelsFont = |
154 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 165 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
155 | &(KOPrefs::instance()->mAppFont),topFrame); | 166 | &(KOPrefs::instance()->mAppFont),topFrame); |
156 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 167 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
157 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 168 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
158 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 169 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
159 | ++i; | 170 | ++i; |
160 | 171 | ||
161 | 172 | ||
162 | timeLabelsFont = | 173 | timeLabelsFont = |
163 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 174 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
164 | &(KOPrefs::instance()->mComposeFont),topFrame); | 175 | &(KOPrefs::instance()->mComposeFont),topFrame); |
165 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 176 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
166 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 177 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
167 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 178 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
168 | ++i; | 179 | ++i; |
169 | 180 | ||
170 | KPrefsDialogWidFont *timeBarFont = | 181 | KPrefsDialogWidFont *timeBarFont = |
171 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 182 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
172 | &(KOPrefs::instance()->mReadFont),topFrame); | 183 | &(KOPrefs::instance()->mReadFont),topFrame); |
173 | topLayout->addWidget(timeBarFont->label(),i,0); | 184 | topLayout->addWidget(timeBarFont->label(),i,0); |
174 | topLayout->addWidget(timeBarFont->preview(),i,1); | 185 | topLayout->addWidget(timeBarFont->preview(),i,1); |
175 | topLayout->addWidget(timeBarFont->button(),i,2); | 186 | topLayout->addWidget(timeBarFont->button(),i,2); |
176 | ++i; | 187 | ++i; |
177 | 188 | ||
178 | topLayout->setColStretch(1,1); | 189 | topLayout->setColStretch(1,1); |
179 | topLayout->setRowStretch(4,1); | 190 | topLayout->setRowStretch(4,1); |
180 | 191 | ||
181 | } | 192 | } |
182 | void KOPrefsDialog::usrReadConfig() | 193 | void KOPrefsDialog::usrReadConfig() |
183 | { | 194 | { |
184 | qDebug("read "); | 195 | |
185 | mNameEdit->setText(KOPrefs::instance()->mName); | 196 | mNameEdit->setText(KOPrefs::instance()->mName); |
186 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
198 | kdelibcfg->readConfig(); | ||
187 | } | 199 | } |
188 | void KOPrefsDialog::usrWriteConfig() | 200 | void KOPrefsDialog::usrWriteConfig() |
189 | { | 201 | { |
190 | qDebug("write "); | ||
191 | KOPrefs::instance()->mName = mNameEdit->text(); | 202 | KOPrefs::instance()->mName = mNameEdit->text(); |
192 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
204 | kdelibcfg->writeConfig(); | ||
193 | 205 | ||
194 | 206 | ||
195 | } | 207 | } |
196 | 208 | ||
197 | #if 0 | 209 | #if 0 |
198 | void KOPrefsDialog::setupLocaleDateTab() | 210 | void KOPrefsDialog::setupLocaleDateTab() |
199 | { | 211 | { |
200 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
201 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 213 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
202 | topLayout->setSpacing(spacingHint()); | 214 | topLayout->setSpacing(spacingHint()); |
203 | topLayout->setMargin(marginHint()); | 215 | topLayout->setMargin(marginHint()); |
204 | int iii = 0; | 216 | int iii = 0; |
205 | 217 | ||
206 | 218 | ||
207 | KPrefsWidRadios *syncPrefsGroup = | 219 | KPrefsWidRadios *syncPrefsGroup = |
208 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 220 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
209 | QString format; | 221 | QString format; |
210 | if ( QApplication::desktop()->width() < 480 ) | 222 | if ( QApplication::desktop()->width() < 480 ) |
211 | format = "(%d.%m.%Y)"; | 223 | format = "(%d.%m.%Y)"; |
212 | else | 224 | else |
213 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 225 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
214 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 226 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
215 | if ( QApplication::desktop()->width() < 480 ) | 227 | if ( QApplication::desktop()->width() < 480 ) |
216 | format = "(%m.%d.%Y)"; | 228 | format = "(%m.%d.%Y)"; |
217 | else | 229 | else |
218 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 230 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
219 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 231 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
220 | if ( QApplication::desktop()->width() < 480 ) | 232 | if ( QApplication::desktop()->width() < 480 ) |
221 | format = "(%Y-%m-%d)"; | 233 | format = "(%Y-%m-%d)"; |
222 | else | 234 | else |
223 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 235 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
224 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 236 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
225 | syncPrefsGroup->addRadio(i18n("User defined")); | 237 | syncPrefsGroup->addRadio(i18n("User defined")); |
226 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 238 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
227 | ++iii; | 239 | ++iii; |
228 | ++iii; | 240 | ++iii; |
229 | QLabel * lab; | 241 | QLabel * lab; |
230 | mUserDateFormatLong = new QLineEdit(topFrame); | 242 | mUserDateFormatLong = new QLineEdit(topFrame); |
231 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 243 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
232 | topLayout->addWidget(lab ,iii,0); | 244 | topLayout->addWidget(lab ,iii,0); |
233 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 245 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
234 | ++iii; | 246 | ++iii; |
235 | mUserDateFormatShort = new QLineEdit(topFrame); | 247 | mUserDateFormatShort = new QLineEdit(topFrame); |
236 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 248 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
237 | topLayout->addWidget(lab ,iii,0); | 249 | topLayout->addWidget(lab ,iii,0); |
238 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 250 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
239 | ++iii; | 251 | ++iii; |
240 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 252 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
241 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 253 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
242 | ++iii; | 254 | ++iii; |
243 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 255 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
244 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 256 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
245 | ++iii; | 257 | ++iii; |
246 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 258 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
247 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 259 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
248 | ++iii; | 260 | ++iii; |
249 | 261 | ||
250 | } | 262 | } |
251 | 263 | ||
252 | void KOPrefsDialog::setupLocaleTab() | 264 | void KOPrefsDialog::setupLocaleTab() |
253 | { | 265 | { |
254 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 266 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
255 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 267 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
256 | topLayout->setSpacing(spacingHint()); | 268 | topLayout->setSpacing(spacingHint()); |
257 | topLayout->setMargin(marginHint()); | 269 | topLayout->setMargin(marginHint()); |
258 | int iii = 0; | 270 | int iii = 0; |
259 | KPrefsWidRadios *syncPrefsGroup = | 271 | KPrefsWidRadios *syncPrefsGroup = |
260 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 272 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
261 | syncPrefsGroup->addRadio(i18n("English")); | 273 | syncPrefsGroup->addRadio(i18n("English")); |
262 | syncPrefsGroup->addRadio(i18n("German")); | 274 | syncPrefsGroup->addRadio(i18n("German")); |
263 | syncPrefsGroup->addRadio(i18n("French")); | 275 | syncPrefsGroup->addRadio(i18n("French")); |
264 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 276 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
265 | if ( QApplication::desktop()->width() < 300 ) | 277 | if ( QApplication::desktop()->width() < 300 ) |
266 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 278 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
267 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 279 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
268 | ++iii; | 280 | ++iii; |
269 | 281 | ||
270 | syncPrefsGroup = | 282 | syncPrefsGroup = |
271 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 283 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
272 | if ( QApplication::desktop()->width() > 300 ) | 284 | if ( QApplication::desktop()->width() > 300 ) |
273 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 285 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
274 | syncPrefsGroup->addRadio(i18n("24:00")); | 286 | syncPrefsGroup->addRadio(i18n("24:00")); |
275 | syncPrefsGroup->addRadio(i18n("12:00am")); | 287 | syncPrefsGroup->addRadio(i18n("12:00am")); |
276 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 288 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
277 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 289 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
278 | ++iii; | 290 | ++iii; |
279 | KPrefsDialogWidBool *sb; | 291 | KPrefsDialogWidBool *sb; |
280 | if ( QApplication::desktop()->width() < 300 ) { | 292 | if ( QApplication::desktop()->width() < 300 ) { |
281 | sb = | 293 | sb = |
282 | addWidBool(i18n("Week starts on Sunday"), | 294 | addWidBool(i18n("Week starts on Sunday"), |
283 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 295 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
284 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 296 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
285 | ++iii; | 297 | ++iii; |
286 | sb = | 298 | sb = |
287 | addWidBool(i18n("Use short date in (WN/E) view"), | 299 | addWidBool(i18n("Use short date in (WN/E) view"), |
288 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 300 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
289 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 301 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
290 | } | 302 | } |
291 | else { | 303 | else { |
292 | QWidget * hb = new QWidget( topFrame ); | 304 | QWidget * hb = new QWidget( topFrame ); |
293 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 305 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
294 | sb = | 306 | sb = |
295 | addWidBool(i18n("Week starts on Sunday"), | 307 | addWidBool(i18n("Week starts on Sunday"), |
296 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 308 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
297 | hbLayout->addWidget(sb->checkBox() ); | 309 | hbLayout->addWidget(sb->checkBox() ); |
298 | sb = | 310 | sb = |
299 | addWidBool(i18n("Use short date in (WN/E) view"), | 311 | addWidBool(i18n("Use short date in (WN/E) view"), |
300 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 312 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
301 | hbLayout->addWidget(sb->checkBox() ); | 313 | hbLayout->addWidget(sb->checkBox() ); |
302 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 314 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
303 | 315 | ||
304 | } | 316 | } |
305 | //#ifndef DESKTOP_VERSION | 317 | //#ifndef DESKTOP_VERSION |
306 | #if 0 | 318 | #if 0 |
307 | ++iii; | 319 | ++iii; |
308 | sb = | 320 | sb = |
309 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 321 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
310 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 322 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
311 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 323 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
312 | #endif | 324 | #endif |
313 | } | 325 | } |
314 | void KOPrefsDialog::showSyncPage() | 326 | void KOPrefsDialog::showSyncPage() |
315 | { | 327 | { |
316 | showPage ( 2 ) ; | 328 | showPage ( 2 ) ; |
317 | 329 | ||
318 | } | 330 | } |
319 | void KOPrefsDialog::setupSyncAlgTab() | 331 | void KOPrefsDialog::setupSyncAlgTab() |
320 | { | 332 | { |
321 | #if 0 | 333 | #if 0 |
322 | QLabel * lab; | 334 | QLabel * lab; |
323 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 335 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
324 | mSetupSyncAlgTab = topFrame; | 336 | mSetupSyncAlgTab = topFrame; |
325 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 337 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
326 | topLayout->setSpacing(spacingHint()); | 338 | topLayout->setSpacing(spacingHint()); |
327 | topLayout->setMargin(marginHint()); | 339 | topLayout->setMargin(marginHint()); |
328 | int iii = 0; | 340 | int iii = 0; |
329 | 341 | ||
330 | KPrefsDialogWidBool *sb = | 342 | KPrefsDialogWidBool *sb = |
331 | addWidBool(i18n("Ask for preferences before syncing"), | 343 | addWidBool(i18n("Ask for preferences before syncing"), |
332 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 344 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
333 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 345 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
334 | 346 | ||
335 | ++iii; | 347 | ++iii; |
336 | 348 | ||
337 | KPrefsWidRadios *syncPrefsGroup = | 349 | KPrefsWidRadios *syncPrefsGroup = |
338 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 350 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
339 | topFrame); | 351 | topFrame); |
340 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 352 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
341 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 353 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
342 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 354 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
343 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 355 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
344 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 356 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
345 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 357 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
346 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 358 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
347 | ++iii; | 359 | ++iii; |
348 | sb = | 360 | sb = |
349 | addWidBool(i18n("Show summary after syncing"), | 361 | addWidBool(i18n("Show summary after syncing"), |
350 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 362 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
351 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 363 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
352 | 364 | ||
353 | ++iii; | 365 | ++iii; |
354 | #endif | 366 | #endif |
355 | 367 | ||
356 | 368 | ||
357 | 369 | ||
358 | } | 370 | } |
359 | 371 | ||
360 | 372 | ||
361 | void KOPrefsDialog::setupSyncTab() | 373 | void KOPrefsDialog::setupSyncTab() |
362 | { | 374 | { |
363 | #if 0 | 375 | #if 0 |
364 | QLabel * lab; | 376 | QLabel * lab; |
365 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 377 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
366 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 378 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
367 | topLayout->setSpacing(spacingHint()); | 379 | topLayout->setSpacing(spacingHint()); |
368 | topLayout->setMargin(marginHint()); | 380 | topLayout->setMargin(marginHint()); |
369 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 381 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
370 | int iii = 0; | 382 | int iii = 0; |
371 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 383 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
372 | ++iii; | 384 | ++iii; |
373 | 385 | ||
374 | mRemoteIPEdit = new QLineEdit(topFrame); | 386 | mRemoteIPEdit = new QLineEdit(topFrame); |
375 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 387 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
376 | topLayout->addWidget(lab ,iii,0); | 388 | topLayout->addWidget(lab ,iii,0); |
377 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 389 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
378 | ++iii; | 390 | ++iii; |
379 | mRemoteUser = new QLineEdit(topFrame); | 391 | mRemoteUser = new QLineEdit(topFrame); |
380 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 392 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
381 | topLayout->addWidget(lab ,iii,0); | 393 | topLayout->addWidget(lab ,iii,0); |
382 | topLayout->addWidget(mRemoteUser, iii,1); | 394 | topLayout->addWidget(mRemoteUser, iii,1); |
383 | ++iii; | 395 | ++iii; |
384 | 396 | ||
385 | mRemoteFile = new QLineEdit(topFrame); | 397 | mRemoteFile = new QLineEdit(topFrame); |
386 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 398 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
387 | topLayout->addWidget(lab ,iii,0); | 399 | topLayout->addWidget(lab ,iii,0); |
388 | topLayout->addWidget(mRemoteFile,iii,1); | 400 | topLayout->addWidget(mRemoteFile,iii,1); |
389 | ++iii; | 401 | ++iii; |
390 | 402 | ||
391 | mLocalTempFile = new QLineEdit(topFrame); | 403 | mLocalTempFile = new QLineEdit(topFrame); |
392 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 404 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
393 | topLayout->addWidget(lab ,iii,0); | 405 | topLayout->addWidget(lab ,iii,0); |
394 | topLayout->addWidget(mLocalTempFile,iii,1); | 406 | topLayout->addWidget(mLocalTempFile,iii,1); |
395 | ++iii; | 407 | ++iii; |
396 | 408 | ||
397 | KPrefsDialogWidBool *wb = | 409 | KPrefsDialogWidBool *wb = |
398 | addWidBool(i18n("Write back synced file"), | 410 | addWidBool(i18n("Write back synced file"), |
399 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 411 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
400 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 412 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
401 | ++iii; | 413 | ++iii; |
402 | wb = | 414 | wb = |
403 | addWidBool(i18n("Write back existing entries only"), | 415 | addWidBool(i18n("Write back existing entries only"), |
404 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 416 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
405 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 417 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
406 | ++iii; | 418 | ++iii; |
407 | 419 | ||
408 | #endif | 420 | #endif |
409 | } | 421 | } |
410 | 422 | ||
411 | void KOPrefsDialog::setupMainTab() | 423 | void KOPrefsDialog::setupMainTab() |
412 | { | 424 | { |
413 | QFrame *topFrame = addPage(i18n("General"),0,0); | 425 | QFrame *topFrame = addPage(i18n("General"),0,0); |
414 | // DesktopIcon("identity",KIcon::SizeMedium)); | 426 | // DesktopIcon("identity",KIcon::SizeMedium)); |
415 | 427 | ||
416 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 428 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
417 | topLayout->setSpacing(spacingHint()); | 429 | topLayout->setSpacing(spacingHint()); |
418 | topLayout->setMargin(marginHint()); | 430 | topLayout->setMargin(marginHint()); |
419 | 431 | ||
420 | // KPrefsDialogWidBool *emailControlCenter = | 432 | // KPrefsDialogWidBool *emailControlCenter = |
421 | // addWidBool(i18n("&Use email settings from Control Center"), | 433 | // addWidBool(i18n("&Use email settings from Control Center"), |
422 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 434 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
423 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 435 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
424 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 436 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
425 | // SLOT(toggleEmailSettings(bool))); | 437 | // SLOT(toggleEmailSettings(bool))); |
426 | 438 | ||
427 | mNameEdit = new QLineEdit(topFrame); | 439 | mNameEdit = new QLineEdit(topFrame); |
428 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 440 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
429 | topLayout->addWidget(mNameLabel,0,0); | 441 | topLayout->addWidget(mNameLabel,0,0); |
430 | topLayout->addWidget(mNameEdit,0,1); | 442 | topLayout->addWidget(mNameEdit,0,1); |
431 | 443 | ||
432 | mEmailEdit = new QLineEdit(topFrame); | 444 | mEmailEdit = new QLineEdit(topFrame); |
433 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 445 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
434 | topLayout->addWidget(mEmailLabel,1,0); | 446 | topLayout->addWidget(mEmailLabel,1,0); |
435 | topLayout->addWidget(mEmailEdit,1,1); | 447 | topLayout->addWidget(mEmailEdit,1,1); |
436 | KPrefsDialogWidBool *wb; | 448 | KPrefsDialogWidBool *wb; |
437 | QHBox *dummy; | 449 | QHBox *dummy; |
438 | if ( QApplication::desktop()->width() > 480 ) { | 450 | if ( QApplication::desktop()->width() > 480 ) { |
439 | dummy = new QHBox(topFrame); | 451 | dummy = new QHBox(topFrame); |
440 | } else { | 452 | } else { |
441 | dummy = new QVBox(topFrame); | 453 | dummy = new QVBox(topFrame); |
442 | } | 454 | } |
443 | 455 | ||
444 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 456 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
445 | addWidBool(i18n("Full menu bar(nr)"), | 457 | addWidBool(i18n("Full menu bar(nr)"), |
446 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 458 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
447 | 459 | ||
448 | 460 | ||
449 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 461 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
450 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 462 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
451 | 463 | ||
452 | 464 | ||
453 | dummy = new QHBox(topFrame); | 465 | dummy = new QHBox(topFrame); |
454 | new QLabel(i18n("Days in What's Next:"),dummy); | 466 | new QLabel(i18n("Days in What's Next:"),dummy); |
455 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 467 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
456 | 468 | ||
457 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 469 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
458 | 470 | ||
459 | 471 | ||
460 | 472 | ||
461 | dummy = new QHBox(topFrame); | 473 | dummy = new QHBox(topFrame); |
462 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 474 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
463 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 475 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
464 | 476 | ||
465 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 477 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
466 | 478 | ||
467 | QHBox *prioBox = new QHBox(topFrame); | 479 | QHBox *prioBox = new QHBox(topFrame); |
468 | // intervalBox->setSpacing(spacingHint()); | 480 | // intervalBox->setSpacing(spacingHint()); |
469 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 481 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
470 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 482 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
471 | 483 | ||
472 | if ( QApplication::desktop()->width() < 300 ) | 484 | if ( QApplication::desktop()->width() < 300 ) |
473 | messa = i18n("Show topmost todo prios in What's N.:"); | 485 | messa = i18n("Show topmost todo prios in What's N.:"); |
474 | QLabel *prioLabel = new QLabel(messa, prioBox); | 486 | QLabel *prioLabel = new QLabel(messa, prioBox); |
475 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 487 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
476 | if ( QApplication::desktop()->width() < 300 ) | 488 | if ( QApplication::desktop()->width() < 300 ) |
477 | mPrioSpin->setFixedWidth( 40 ); | 489 | mPrioSpin->setFixedWidth( 40 ); |
478 | 490 | ||
479 | // KPrefsDialogWidBool *bcc = | 491 | // KPrefsDialogWidBool *bcc = |
480 | // addWidBool(i18n("Send copy to owner when mailing events"), | 492 | // addWidBool(i18n("Send copy to owner when mailing events"), |
481 | // &(KOPrefs::instance()->mBcc),topFrame); | 493 | // &(KOPrefs::instance()->mBcc),topFrame); |
482 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 494 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
483 | 495 | ||
484 | 496 | ||
485 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 497 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
486 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 498 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
487 | 499 | ||
488 | // addWidBool(i18n("Enable automatic saving of calendar"), | 500 | // addWidBool(i18n("Enable automatic saving of calendar"), |
489 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 501 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
490 | 502 | ||
491 | QHBox *intervalBox = new QHBox(topFrame); | 503 | QHBox *intervalBox = new QHBox(topFrame); |
492 | // intervalBox->setSpacing(spacingHint()); | 504 | // intervalBox->setSpacing(spacingHint()); |
493 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 505 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
494 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 506 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
495 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 507 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
496 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 508 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
497 | /* | 509 | /* |
498 | QHBox * agendasize = new QHBox ( topFrame ); | 510 | QHBox * agendasize = new QHBox ( topFrame ); |
499 | 511 | ||
500 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 512 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
501 | 513 | ||
502 | 514 | ||
503 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 515 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
504 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 516 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
505 | */ | 517 | */ |
506 | KPrefsDialogWidBool *verticalScreen = | 518 | KPrefsDialogWidBool *verticalScreen = |
507 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 519 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
508 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 520 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
509 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 521 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
510 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); | 522 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); |
511 | 523 | ||
512 | KPrefsDialogWidBool *ask = | 524 | KPrefsDialogWidBool *ask = |
513 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 525 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
514 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 526 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
515 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); | 527 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); |
516 | 528 | ||
517 | 529 | ||
518 | /* | 530 | /* |
519 | KPrefsDialogWidBool *confirmCheck = | 531 | KPrefsDialogWidBool *confirmCheck = |
520 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 532 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
521 | topFrame); | 533 | topFrame); |
522 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 534 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
523 | 535 | ||
524 | 536 | ||
525 | mEnableGroupScheduling = | 537 | mEnableGroupScheduling = |
526 | addWidBool(i18n("Enable group scheduling"), | 538 | addWidBool(i18n("Enable group scheduling"), |
527 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 539 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
528 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 540 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
529 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 541 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
530 | SLOT(warningGroupScheduling())); | 542 | SLOT(warningGroupScheduling())); |
531 | 543 | ||
532 | mEnableProjectView = | 544 | mEnableProjectView = |
533 | addWidBool(i18n("Enable project view"), | 545 | addWidBool(i18n("Enable project view"), |
534 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 546 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
535 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 547 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
536 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 548 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
537 | SLOT(warningProjectView())); | 549 | SLOT(warningProjectView())); |
538 | 550 | ||
539 | // Can't be disabled anymore | 551 | // Can't be disabled anymore |
540 | mEnableGroupScheduling->checkBox()->hide(); | 552 | mEnableGroupScheduling->checkBox()->hide(); |
541 | 553 | ||
542 | // Disable setting, because this feature now becomes stable | 554 | // Disable setting, because this feature now becomes stable |
543 | mEnableProjectView->checkBox()->hide(); | 555 | mEnableProjectView->checkBox()->hide(); |
544 | 556 | ||
545 | KPrefsWidRadios *defaultFormatGroup = | 557 | KPrefsWidRadios *defaultFormatGroup = |
546 | addWidRadios(i18n("Default Calendar Format"), | 558 | addWidRadios(i18n("Default Calendar Format"), |
547 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 559 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
548 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 560 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
549 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 561 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
550 | 562 | ||
551 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 563 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
552 | 564 | ||
553 | // Default format unconditionally is iCalendar | 565 | // Default format unconditionally is iCalendar |
554 | defaultFormatGroup->groupBox()->hide(); | 566 | defaultFormatGroup->groupBox()->hide(); |
555 | 567 | ||
556 | KPrefsWidRadios *mailClientGroup = | 568 | KPrefsWidRadios *mailClientGroup = |
557 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 569 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
558 | topFrame); | 570 | topFrame); |
559 | mailClientGroup->addRadio(i18n("KMail")); | 571 | mailClientGroup->addRadio(i18n("KMail")); |
560 | mailClientGroup->addRadio(i18n("Sendmail")); | 572 | mailClientGroup->addRadio(i18n("Sendmail")); |
561 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 573 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
562 | 574 | ||
563 | KPrefsDialogWidBool *htmlsave = | 575 | KPrefsDialogWidBool *htmlsave = |
564 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 576 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
565 | topFrame); | 577 | topFrame); |
566 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 578 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
567 | 579 | ||
568 | KPrefsWidRadios *destinationGroup = | 580 | KPrefsWidRadios *destinationGroup = |
569 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 581 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
570 | topFrame); | 582 | topFrame); |
571 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 583 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
572 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 584 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
573 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 585 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
574 | 586 | ||
575 | topLayout->setRowStretch(14,1); | 587 | topLayout->setRowStretch(14,1); |
576 | */ | 588 | */ |