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