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