author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/koprefsdialog.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 149 |
1 files changed, 77 insertions, 72 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 017f1f7..e3102a4 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -10,50 +10,55 @@ | |||
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 <q3groupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <q3buttongroup.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 <q3textstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <q3vbox.h> |
35 | #include <qhbox.h> | 35 | #include <q3hbox.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 <q3strlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | //Added by qt3to4: | ||
45 | #include <Q3HBoxLayout> | ||
46 | #include <Q3GridLayout> | ||
47 | #include <QPixmap> | ||
48 | #include <Q3Frame> | ||
44 | 49 | ||
45 | #include <kcolorbutton.h> | 50 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 51 | #include <kdebug.h> |
47 | #include <klocale.h> | 52 | #include <klocale.h> |
48 | #include <kglobal.h> | 53 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 54 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 55 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 56 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 57 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 58 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 59 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 60 | #include <kstandarddirs.h> |
56 | #include <kglobalsettings.h> | 61 | #include <kglobalsettings.h> |
57 | 62 | ||
58 | #include <klineedit.h> | 63 | #include <klineedit.h> |
59 | 64 | ||
@@ -98,60 +103,60 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
98 | #endif | 103 | #endif |
99 | } | 104 | } |
100 | 105 | ||
101 | #include "kpimglobalprefs.h" | 106 | #include "kpimglobalprefs.h" |
102 | 107 | ||
103 | KOPrefsDialog::~KOPrefsDialog() | 108 | KOPrefsDialog::~KOPrefsDialog() |
104 | { | 109 | { |
105 | } | 110 | } |
106 | void KOPrefsDialog::setupGlobalTab() | 111 | void KOPrefsDialog::setupGlobalTab() |
107 | { | 112 | { |
108 | 113 | ||
109 | 114 | ||
110 | 115 | ||
111 | } | 116 | } |
112 | void KOPrefsDialog::setupMainTab() | 117 | void KOPrefsDialog::setupMainTab() |
113 | { | 118 | { |
114 | QFrame *topFrame = addPage(i18n("General"),0,0); | 119 | Q3Frame *topFrame = addPage(i18n("General"),0,0); |
115 | 120 | ||
116 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 121 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
117 | topLayout->setSpacing(spacingHint()); | 122 | topLayout->setSpacing(spacingHint()); |
118 | topLayout->setMargin(marginHint()); | 123 | topLayout->setMargin(marginHint()); |
119 | 124 | ||
120 | 125 | ||
121 | mNameEdit = new QLineEdit(topFrame); | 126 | mNameEdit = new QLineEdit(topFrame); |
122 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 127 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
123 | topLayout->addWidget(mNameLabel,0,0); | 128 | topLayout->addWidget(mNameLabel,0,0); |
124 | topLayout->addWidget(mNameEdit,0,1); | 129 | topLayout->addWidget(mNameEdit,0,1); |
125 | 130 | ||
126 | mEmailEdit = new QLineEdit(topFrame); | 131 | mEmailEdit = new QLineEdit(topFrame); |
127 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 132 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
128 | topLayout->addWidget(mEmailLabel,1,0); | 133 | topLayout->addWidget(mEmailLabel,1,0); |
129 | topLayout->addWidget(mEmailEdit,1,1); | 134 | topLayout->addWidget(mEmailEdit,1,1); |
130 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 135 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
131 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 136 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
132 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 137 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
133 | &(KOPrefs::instance()->mUseKapi),topFrame); | 138 | &(KOPrefs::instance()->mUseKapi),topFrame); |
134 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 139 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
135 | } | 140 | } |
136 | 141 | ||
137 | void KOPrefsDialog::setupMailTab() | 142 | void KOPrefsDialog::setupMailTab() |
138 | { | 143 | { |
139 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 144 | Q3Frame *topFrame = addPage(i18n("Mail"),0,0); |
140 | 145 | ||
141 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 146 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
142 | topLayout->setSpacing(spacingHint()); | 147 | topLayout->setSpacing(spacingHint()); |
143 | topLayout->setMargin(marginHint()); | 148 | topLayout->setMargin(marginHint()); |
144 | 149 | ||
145 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 150 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
146 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 151 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
147 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 152 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
148 | 153 | ||
149 | 154 | ||
150 | ttt = addWidBool(i18n("Send mails later"), | 155 | ttt = addWidBool(i18n("Send mails later"), |
151 | &(KOPrefs::instance()->mSendLater),topFrame); | 156 | &(KOPrefs::instance()->mSendLater),topFrame); |
152 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 157 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
153 | ttt = addWidBool(i18n("Show \"To\" field in list view"), | 158 | ttt = addWidBool(i18n("Show \"To\" field in list view"), |
154 | &(KOPrefs::instance()->mShowToField),topFrame); | 159 | &(KOPrefs::instance()->mShowToField),topFrame); |
155 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); | 160 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); |
156 | 161 | ||
157 | int iii =3; | 162 | int iii =3; |
@@ -169,36 +174,36 @@ void KOPrefsDialog::setupMailTab() | |||
169 | ++iii; | 174 | ++iii; |
170 | ttt = addWidBool(i18n("Show \"To\" info field"), | 175 | ttt = addWidBool(i18n("Show \"To\" info field"), |
171 | &(KOPrefs::instance()->mShowInfoTo),topFrame); | 176 | &(KOPrefs::instance()->mShowInfoTo),topFrame); |
172 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 177 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
173 | ++iii; | 178 | ++iii; |
174 | 179 | ||
175 | /* | 180 | /* |
176 | mCodecEdit = new QLineEdit(topFrame); | 181 | mCodecEdit = new QLineEdit(topFrame); |
177 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); | 182 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); |
178 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); | 183 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); |
179 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); | 184 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); |
180 | */ | 185 | */ |
181 | } | 186 | } |
182 | void KOPrefsDialog::setupFontsTab() | 187 | void KOPrefsDialog::setupFontsTab() |
183 | { | 188 | { |
184 | 189 | ||
185 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 190 | Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); |
186 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 191 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
187 | 192 | ||
188 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 193 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); |
189 | topLayout->setSpacing(1); | 194 | topLayout->setSpacing(1); |
190 | topLayout->setMargin(3); | 195 | topLayout->setMargin(3); |
191 | KPrefsDialogWidFont * tVFont; | 196 | KPrefsDialogWidFont * tVFont; |
192 | int i = 0; | 197 | int i = 0; |
193 | KPrefsDialogWidFont *timeLabelsFont = | 198 | KPrefsDialogWidFont *timeLabelsFont = |
194 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 199 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
195 | &(KOPrefs::instance()->mAppFont),topFrame); | 200 | &(KOPrefs::instance()->mAppFont),topFrame); |
196 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 201 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
197 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 202 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
198 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 203 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
199 | ++i; | 204 | ++i; |
200 | 205 | ||
201 | 206 | ||
202 | timeLabelsFont = | 207 | timeLabelsFont = |
203 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 208 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
204 | &(KOPrefs::instance()->mComposeFont),topFrame); | 209 | &(KOPrefs::instance()->mComposeFont),topFrame); |
@@ -225,34 +230,34 @@ void KOPrefsDialog::usrReadConfig() | |||
225 | mNameEdit->setText(KOPrefs::instance()->mName); | 230 | mNameEdit->setText(KOPrefs::instance()->mName); |
226 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 231 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
227 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); | 232 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); |
228 | } | 233 | } |
229 | void KOPrefsDialog::usrWriteConfig() | 234 | void KOPrefsDialog::usrWriteConfig() |
230 | { | 235 | { |
231 | KOPrefs::instance()->mName = mNameEdit->text(); | 236 | KOPrefs::instance()->mName = mNameEdit->text(); |
232 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 237 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
233 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); | 238 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); |
234 | 239 | ||
235 | 240 | ||
236 | } | 241 | } |
237 | 242 | ||
238 | #if 0 | 243 | #if 0 |
239 | void KOPrefsDialog::setupLocaleDateTab() | 244 | void KOPrefsDialog::setupLocaleDateTab() |
240 | { | 245 | { |
241 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 246 | Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); |
242 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 247 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); |
243 | topLayout->setSpacing(spacingHint()); | 248 | topLayout->setSpacing(spacingHint()); |
244 | topLayout->setMargin(marginHint()); | 249 | topLayout->setMargin(marginHint()); |
245 | int iii = 0; | 250 | int iii = 0; |
246 | 251 | ||
247 | 252 | ||
248 | KPrefsWidRadios *syncPrefsGroup = | 253 | KPrefsWidRadios *syncPrefsGroup = |
249 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 254 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
250 | QString format; | 255 | QString format; |
251 | if ( QApplication::desktop()->width() < 480 ) | 256 | if ( QApplication::desktop()->width() < 480 ) |
252 | format = "(%d.%m.%Y)"; | 257 | format = "(%d.%m.%Y)"; |
253 | else | 258 | else |
254 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 259 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
255 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 260 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
256 | if ( QApplication::desktop()->width() < 480 ) | 261 | if ( QApplication::desktop()->width() < 480 ) |
257 | format = "(%m.%d.%Y)"; | 262 | format = "(%m.%d.%Y)"; |
258 | else | 263 | else |
@@ -279,34 +284,34 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); | |||
279 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 284 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
280 | ++iii; | 285 | ++iii; |
281 | 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); |
282 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 287 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
283 | ++iii; | 288 | ++iii; |
284 | 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); |
285 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 290 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
286 | ++iii; | 291 | ++iii; |
287 | 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); |
288 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 293 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
289 | ++iii; | 294 | ++iii; |
290 | 295 | ||
291 | } | 296 | } |
292 | 297 | ||
293 | void KOPrefsDialog::setupLocaleTab() | 298 | void KOPrefsDialog::setupLocaleTab() |
294 | { | 299 | { |
295 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 300 | Q3Frame *topFrame = addPage(i18n("Locale"),0,0); |
296 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 301 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
297 | topLayout->setSpacing(spacingHint()); | 302 | topLayout->setSpacing(spacingHint()); |
298 | topLayout->setMargin(marginHint()); | 303 | topLayout->setMargin(marginHint()); |
299 | int iii = 0; | 304 | int iii = 0; |
300 | KPrefsWidRadios *syncPrefsGroup = | 305 | KPrefsWidRadios *syncPrefsGroup = |
301 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 306 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
302 | syncPrefsGroup->addRadio(i18n("English")); | 307 | syncPrefsGroup->addRadio(i18n("English")); |
303 | syncPrefsGroup->addRadio(i18n("German")); | 308 | syncPrefsGroup->addRadio(i18n("German")); |
304 | syncPrefsGroup->addRadio(i18n("French")); | 309 | syncPrefsGroup->addRadio(i18n("French")); |
305 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 310 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
306 | if ( QApplication::desktop()->width() < 300 ) | 311 | if ( QApplication::desktop()->width() < 300 ) |
307 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 312 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
308 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 313 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
309 | ++iii; | 314 | ++iii; |
310 | 315 | ||
311 | syncPrefsGroup = | 316 | syncPrefsGroup = |
312 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 317 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
@@ -318,65 +323,65 @@ void KOPrefsDialog::setupLocaleTab() | |||
318 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 323 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
319 | ++iii; | 324 | ++iii; |
320 | KPrefsDialogWidBool *sb; | 325 | KPrefsDialogWidBool *sb; |
321 | if ( QApplication::desktop()->width() < 300 ) { | 326 | if ( QApplication::desktop()->width() < 300 ) { |
322 | sb = | 327 | sb = |
323 | addWidBool(i18n("Week starts on Sunday"), | 328 | addWidBool(i18n("Week starts on Sunday"), |
324 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 329 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
325 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 330 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
326 | ++iii; | 331 | ++iii; |
327 | sb = | 332 | sb = |
328 | addWidBool(i18n("Use short date in (WN/E) view"), | 333 | addWidBool(i18n("Use short date in (WN/E) view"), |
329 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 334 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
330 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 335 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
331 | } | 336 | } |
332 | else { | 337 | else { |
333 | QWidget * hb = new QWidget( topFrame ); | 338 | QWidget * hb = new QWidget( topFrame ); |
334 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 339 | Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); |
335 | sb = | 340 | sb = |
336 | addWidBool(i18n("Week starts on Sunday"), | 341 | addWidBool(i18n("Week starts on Sunday"), |
337 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 342 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
338 | hbLayout->addWidget(sb->checkBox() ); | 343 | hbLayout->addWidget(sb->checkBox() ); |
339 | sb = | 344 | sb = |
340 | addWidBool(i18n("Use short date in (WN/E) view"), | 345 | addWidBool(i18n("Use short date in (WN/E) view"), |
341 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 346 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
342 | hbLayout->addWidget(sb->checkBox() ); | 347 | hbLayout->addWidget(sb->checkBox() ); |
343 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 348 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
344 | 349 | ||
345 | } | 350 | } |
346 | //#ifndef DESKTOP_VERSION | 351 | //#ifndef DESKTOP_VERSION |
347 | #if 0 | 352 | #if 0 |
348 | ++iii; | 353 | ++iii; |
349 | sb = | 354 | sb = |
350 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 355 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
351 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 356 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
352 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 357 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
353 | #endif | 358 | #endif |
354 | } | 359 | } |
355 | void KOPrefsDialog::showSyncPage() | 360 | void KOPrefsDialog::showSyncPage() |
356 | { | 361 | { |
357 | showPage ( 2 ) ; | 362 | showPage ( 2 ) ; |
358 | 363 | ||
359 | } | 364 | } |
360 | void KOPrefsDialog::setupSyncAlgTab() | 365 | void KOPrefsDialog::setupSyncAlgTab() |
361 | { | 366 | { |
362 | #if 0 | 367 | #if 0 |
363 | QLabel * lab; | 368 | QLabel * lab; |
364 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 369 | Q3Frame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
365 | mSetupSyncAlgTab = topFrame; | 370 | mSetupSyncAlgTab = topFrame; |
366 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 371 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
367 | topLayout->setSpacing(spacingHint()); | 372 | topLayout->setSpacing(spacingHint()); |
368 | topLayout->setMargin(marginHint()); | 373 | topLayout->setMargin(marginHint()); |
369 | int iii = 0; | 374 | int iii = 0; |
370 | 375 | ||
371 | KPrefsDialogWidBool *sb = | 376 | KPrefsDialogWidBool *sb = |
372 | addWidBool(i18n("Ask for preferences before syncing"), | 377 | addWidBool(i18n("Ask for preferences before syncing"), |
373 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 378 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
374 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 379 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
375 | 380 | ||
376 | ++iii; | 381 | ++iii; |
377 | 382 | ||
378 | KPrefsWidRadios *syncPrefsGroup = | 383 | KPrefsWidRadios *syncPrefsGroup = |
379 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 384 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
380 | topFrame); | 385 | topFrame); |
381 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 386 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
382 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 387 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
@@ -390,34 +395,34 @@ void KOPrefsDialog::setupSyncAlgTab() | |||
390 | addWidBool(i18n("Show summary after syncing"), | 395 | addWidBool(i18n("Show summary after syncing"), |
391 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 396 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
392 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 397 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
393 | 398 | ||
394 | ++iii; | 399 | ++iii; |
395 | #endif | 400 | #endif |
396 | 401 | ||
397 | 402 | ||
398 | 403 | ||
399 | } | 404 | } |
400 | 405 | ||
401 | 406 | ||
402 | void KOPrefsDialog::setupSyncTab() | 407 | void KOPrefsDialog::setupSyncTab() |
403 | { | 408 | { |
404 | #if 0 | 409 | #if 0 |
405 | QLabel * lab; | 410 | QLabel * lab; |
406 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 411 | Q3Frame *topFrame = addPage(i18n("Sync Network"),0,0); |
407 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 412 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
408 | topLayout->setSpacing(spacingHint()); | 413 | topLayout->setSpacing(spacingHint()); |
409 | topLayout->setMargin(marginHint()); | 414 | topLayout->setMargin(marginHint()); |
410 | 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); |
411 | int iii = 0; | 416 | int iii = 0; |
412 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 417 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
413 | ++iii; | 418 | ++iii; |
414 | 419 | ||
415 | mRemoteIPEdit = new QLineEdit(topFrame); | 420 | mRemoteIPEdit = new QLineEdit(topFrame); |
416 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 421 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
417 | topLayout->addWidget(lab ,iii,0); | 422 | topLayout->addWidget(lab ,iii,0); |
418 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 423 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
419 | ++iii; | 424 | ++iii; |
420 | mRemoteUser = new QLineEdit(topFrame); | 425 | mRemoteUser = new QLineEdit(topFrame); |
421 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 426 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
422 | topLayout->addWidget(lab ,iii,0); | 427 | topLayout->addWidget(lab ,iii,0); |
423 | topLayout->addWidget(mRemoteUser, iii,1); | 428 | topLayout->addWidget(mRemoteUser, iii,1); |
@@ -438,111 +443,111 @@ void KOPrefsDialog::setupSyncTab() | |||
438 | KPrefsDialogWidBool *wb = | 443 | KPrefsDialogWidBool *wb = |
439 | addWidBool(i18n("Write back synced file"), | 444 | addWidBool(i18n("Write back synced file"), |
440 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 445 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
441 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 446 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
442 | ++iii; | 447 | ++iii; |
443 | wb = | 448 | wb = |
444 | addWidBool(i18n("Write back existing entries only"), | 449 | addWidBool(i18n("Write back existing entries only"), |
445 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 450 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
446 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 451 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
447 | ++iii; | 452 | ++iii; |
448 | 453 | ||
449 | #endif | 454 | #endif |
450 | } | 455 | } |
451 | 456 | ||
452 | void KOPrefsDialog::setupMainTab() | 457 | void KOPrefsDialog::setupMainTab() |
453 | { | 458 | { |
454 | QFrame *topFrame = addPage(i18n("General"),0,0); | 459 | Q3Frame *topFrame = addPage(i18n("General"),0,0); |
455 | // DesktopIcon("identity",KIcon::SizeMedium)); | 460 | // DesktopIcon("identity",KIcon::SizeMedium)); |
456 | 461 | ||
457 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 462 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
458 | topLayout->setSpacing(spacingHint()); | 463 | topLayout->setSpacing(spacingHint()); |
459 | topLayout->setMargin(marginHint()); | 464 | topLayout->setMargin(marginHint()); |
460 | 465 | ||
461 | // KPrefsDialogWidBool *emailControlCenter = | 466 | // KPrefsDialogWidBool *emailControlCenter = |
462 | // addWidBool(i18n("&Use email settings from Control Center"), | 467 | // addWidBool(i18n("&Use email settings from Control Center"), |
463 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 468 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
464 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 469 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
465 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 470 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
466 | // SLOT(toggleEmailSettings(bool))); | 471 | // SLOT(toggleEmailSettings(bool))); |
467 | 472 | ||
468 | mNameEdit = new QLineEdit(topFrame); | 473 | mNameEdit = new QLineEdit(topFrame); |
469 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 474 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
470 | topLayout->addWidget(mNameLabel,0,0); | 475 | topLayout->addWidget(mNameLabel,0,0); |
471 | topLayout->addWidget(mNameEdit,0,1); | 476 | topLayout->addWidget(mNameEdit,0,1); |
472 | 477 | ||
473 | mEmailEdit = new QLineEdit(topFrame); | 478 | mEmailEdit = new QLineEdit(topFrame); |
474 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 479 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
475 | topLayout->addWidget(mEmailLabel,1,0); | 480 | topLayout->addWidget(mEmailLabel,1,0); |
476 | topLayout->addWidget(mEmailEdit,1,1); | 481 | topLayout->addWidget(mEmailEdit,1,1); |
477 | KPrefsDialogWidBool *wb; | 482 | KPrefsDialogWidBool *wb; |
478 | QHBox *dummy; | 483 | Q3HBox *dummy; |
479 | if ( QApplication::desktop()->width() > 480 ) { | 484 | if ( QApplication::desktop()->width() > 480 ) { |
480 | dummy = new QHBox(topFrame); | 485 | dummy = new Q3HBox(topFrame); |
481 | } else { | 486 | } else { |
482 | dummy = new QVBox(topFrame); | 487 | dummy = new Q3VBox(topFrame); |
483 | } | 488 | } |
484 | 489 | ||
485 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 490 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
486 | addWidBool(i18n("Full menu bar(nr)"), | 491 | addWidBool(i18n("Full menu bar(nr)"), |
487 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 492 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
488 | 493 | ||
489 | 494 | ||
490 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 495 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
491 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 496 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
492 | 497 | ||
493 | 498 | ||
494 | dummy = new QHBox(topFrame); | 499 | dummy = new Q3HBox(topFrame); |
495 | new QLabel(i18n("Days in What's Next:"),dummy); | 500 | new QLabel(i18n("Days in What's Next:"),dummy); |
496 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 501 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
497 | 502 | ||
498 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 503 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
499 | 504 | ||
500 | 505 | ||
501 | 506 | ||
502 | dummy = new QHBox(topFrame); | 507 | dummy = new Q3HBox(topFrame); |
503 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 508 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
504 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 509 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
505 | 510 | ||
506 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 511 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
507 | 512 | ||
508 | QHBox *prioBox = new QHBox(topFrame); | 513 | Q3HBox *prioBox = new Q3HBox(topFrame); |
509 | // intervalBox->setSpacing(spacingHint()); | 514 | // intervalBox->setSpacing(spacingHint()); |
510 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 515 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
511 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 516 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
512 | 517 | ||
513 | if ( QApplication::desktop()->width() < 300 ) | 518 | if ( QApplication::desktop()->width() < 300 ) |
514 | messa = i18n("Show topmost todo prios in What's N.:"); | 519 | messa = i18n("Show topmost todo prios in What's N.:"); |
515 | QLabel *prioLabel = new QLabel(messa, prioBox); | 520 | QLabel *prioLabel = new QLabel(messa, prioBox); |
516 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 521 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
517 | if ( QApplication::desktop()->width() < 300 ) | 522 | if ( QApplication::desktop()->width() < 300 ) |
518 | mPrioSpin->setFixedWidth( 40 ); | 523 | mPrioSpin->setFixedWidth( 40 ); |
519 | 524 | ||
520 | // KPrefsDialogWidBool *bcc = | 525 | // KPrefsDialogWidBool *bcc = |
521 | // addWidBool(i18n("Send copy to owner when mailing events"), | 526 | // addWidBool(i18n("Send copy to owner when mailing events"), |
522 | // &(KOPrefs::instance()->mBcc),topFrame); | 527 | // &(KOPrefs::instance()->mBcc),topFrame); |
523 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 528 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
524 | 529 | ||
525 | 530 | ||
526 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 531 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
527 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 532 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
528 | 533 | ||
529 | // addWidBool(i18n("Enable automatic saving of calendar"), | 534 | // addWidBool(i18n("Enable automatic saving of calendar"), |
530 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 535 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
531 | 536 | ||
532 | QHBox *intervalBox = new QHBox(topFrame); | 537 | Q3HBox *intervalBox = new Q3HBox(topFrame); |
533 | // intervalBox->setSpacing(spacingHint()); | 538 | // intervalBox->setSpacing(spacingHint()); |
534 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 539 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
535 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 540 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
536 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 541 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
537 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 542 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
538 | /* | 543 | /* |
539 | QHBox * agendasize = new QHBox ( topFrame ); | 544 | QHBox * agendasize = new QHBox ( topFrame ); |
540 | 545 | ||
541 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 546 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
542 | 547 | ||
543 | 548 | ||
544 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 549 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
545 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 550 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
546 | */ | 551 | */ |
547 | KPrefsDialogWidBool *verticalScreen = | 552 | KPrefsDialogWidBool *verticalScreen = |
548 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 553 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
@@ -607,109 +612,109 @@ void KOPrefsDialog::setupMainTab() | |||
607 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 612 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
608 | 613 | ||
609 | KPrefsWidRadios *destinationGroup = | 614 | KPrefsWidRadios *destinationGroup = |
610 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 615 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
611 | topFrame); | 616 | topFrame); |
612 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 617 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
613 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 618 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
614 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 619 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
615 | 620 | ||
616 | topLayout->setRowStretch(14,1); | 621 | topLayout->setRowStretch(14,1); |
617 | */ | 622 | */ |
618 | } | 623 | } |
619 | 624 | ||
620 | 625 | ||
621 | void KOPrefsDialog::setupTimeTab() | 626 | void KOPrefsDialog::setupTimeTab() |
622 | { | 627 | { |
623 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 628 | Q3Frame *topFrame = addPage(i18n("Time"),0,0); |
624 | // DesktopIcon("clock",KIcon::SizeMedium)); | 629 | // DesktopIcon("clock",KIcon::SizeMedium)); |
625 | 630 | ||
626 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 631 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
627 | topLayout->setSpacing(spacingHint()); | 632 | topLayout->setSpacing(spacingHint()); |
628 | topLayout->setMargin(marginHint()); | 633 | topLayout->setMargin(marginHint()); |
629 | 634 | ||
630 | QHBox *dummy = new QHBox(topFrame); | 635 | Q3HBox *dummy = new Q3HBox(topFrame); |
631 | KPrefsWidTime *dayBegins = | 636 | KPrefsWidTime *dayBegins = |
632 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 637 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
633 | dummy); | 638 | dummy); |
634 | //topLayout->addWidget(dayBegins->label(),2,0); | 639 | //topLayout->addWidget(dayBegins->label(),2,0); |
635 | 640 | ||
636 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 641 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
637 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 642 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
638 | 643 | ||
639 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 644 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
640 | topFrame),1,0); | 645 | topFrame),1,0); |
641 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 646 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
642 | mStartTimeSpin->setSuffix(":00"); | 647 | mStartTimeSpin->setSuffix(":00"); |
643 | topLayout->addWidget(mStartTimeSpin,1,1); | 648 | topLayout->addWidget(mStartTimeSpin,1,1); |
644 | 649 | ||
645 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 650 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
646 | topFrame),2,0); | 651 | topFrame),2,0); |
647 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 652 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
648 | mDefaultDurationSpin->setSuffix(":00"); | 653 | mDefaultDurationSpin->setSuffix(":00"); |
649 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 654 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
650 | 655 | ||
651 | QStringList alarmList; | 656 | QStringList alarmList; |
652 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 657 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
653 | << 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") ; |
654 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 659 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
655 | 3,0); | 660 | 3,0); |
656 | mAlarmTimeCombo = new QComboBox(topFrame); | 661 | mAlarmTimeCombo = new QComboBox(topFrame); |
657 | mAlarmTimeCombo->insertStringList(alarmList); | 662 | mAlarmTimeCombo->insertStringList(alarmList); |
658 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 663 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
659 | 664 | ||
660 | 665 | ||
661 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 666 | Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, |
662 | i18n("Working Hours"), | 667 | i18n("Working Hours"), |
663 | topFrame); | 668 | topFrame); |
664 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 669 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
665 | workingHoursGroup->layout()->setSpacing( 0 ); | 670 | workingHoursGroup->layout()->setSpacing( 0 ); |
666 | workingHoursGroup->layout()->setMargin( 4 ); | 671 | workingHoursGroup->layout()->setMargin( 4 ); |
667 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 672 | Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); |
668 | // workStartBox->setMargin( 0 ); | 673 | // workStartBox->setMargin( 0 ); |
669 | addWidTime(i18n("Daily starting hour:"), | 674 | addWidTime(i18n("Daily starting hour:"), |
670 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 675 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
671 | 676 | ||
672 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 677 | Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); |
673 | //workEndBox->setMargin( 0 ); | 678 | //workEndBox->setMargin( 0 ); |
674 | addWidTime(i18n("Daily ending hour:"), | 679 | addWidTime(i18n("Daily ending hour:"), |
675 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 680 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
676 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 681 | Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); |
677 | //excludeBox->setMargin( 0 ); | 682 | //excludeBox->setMargin( 0 ); |
678 | addWidBool(i18n("Exclude holidays"), | 683 | addWidBool(i18n("Exclude holidays"), |
679 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 684 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
680 | 685 | ||
681 | addWidBool(i18n("Exclude Saturdays"), | 686 | addWidBool(i18n("Exclude Saturdays"), |
682 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 687 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
683 | 688 | ||
684 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 689 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
685 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 690 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
686 | // topFrame); | 691 | // topFrame); |
687 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 692 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
688 | 693 | ||
689 | // topLayout->setRowStretch(6,1); | 694 | // topLayout->setRowStretch(6,1); |
690 | } | 695 | } |
691 | 696 | ||
692 | 697 | ||
693 | void KOPrefsDialog::setupViewsTab() | 698 | void KOPrefsDialog::setupViewsTab() |
694 | { | 699 | { |
695 | 700 | ||
696 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 701 | Q3Frame *topFrame = addPage(i18n("Views"),0,0); |
697 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 702 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
698 | 703 | ||
699 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 704 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); |
700 | topLayout->setSpacing(spacingHint()); | 705 | topLayout->setSpacing(spacingHint()); |
701 | topLayout->setMargin(marginHint()); | 706 | topLayout->setMargin(marginHint()); |
702 | 707 | ||
703 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 708 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
704 | // topLayout->addLayout(dayBeginsLayout,0,0); | 709 | // topLayout->addLayout(dayBeginsLayout,0,0); |
705 | 710 | ||
706 | // KPrefsWidTime *dayBegins = | 711 | // KPrefsWidTime *dayBegins = |
707 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 712 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
708 | // topFrame); | 713 | // topFrame); |
709 | // dayBeginsLayout->addWidget(dayBegins->label()); | 714 | // dayBeginsLayout->addWidget(dayBegins->label()); |
710 | // dayBeginsLayout->addStretch(1); | 715 | // dayBeginsLayout->addStretch(1); |
711 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 716 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
712 | 717 | ||
713 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 718 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
714 | // topLayout->addLayout(nextDaysLayout,1,0); | 719 | // topLayout->addLayout(nextDaysLayout,1,0); |
715 | // 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)); |
@@ -772,33 +777,33 @@ void KOPrefsDialog::setupViewsTab() | |||
772 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 777 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
773 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 778 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
774 | 779 | ||
775 | 780 | ||
776 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 781 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
777 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 782 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
778 | //topLayout->setRowStretch(11,1); | 783 | //topLayout->setRowStretch(11,1); |
779 | 784 | ||
780 | 785 | ||
781 | 786 | ||
782 | 787 | ||
783 | 788 | ||
784 | 789 | ||
785 | topFrame = addPage(i18n("ViewChange"),0,0); | 790 | topFrame = addPage(i18n("ViewChange"),0,0); |
786 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 791 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
787 | 792 | ||
788 | topLayout = new QGridLayout(topFrame,6,1); | 793 | topLayout = new Q3GridLayout(topFrame,6,1); |
789 | topLayout->setSpacing(spacingHint()); | 794 | topLayout->setSpacing(spacingHint()); |
790 | topLayout->setMargin(marginHint()); | 795 | topLayout->setMargin(marginHint()); |
791 | ii = 0; | 796 | ii = 0; |
792 | 797 | ||
793 | 798 | ||
794 | dummy = | 799 | dummy = |
795 | addWidBool(i18n("Hold fullscreen on view change"), | 800 | addWidBool(i18n("Hold fullscreen on view change"), |
796 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 801 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
797 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 802 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
798 | 803 | ||
799 | dummy = | 804 | dummy = |
800 | addWidBool(i18n("Hold non-fullscreen on view change"), | 805 | addWidBool(i18n("Hold non-fullscreen on view change"), |
801 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 806 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
802 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 807 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
803 | 808 | ||
804 | 809 | ||
@@ -825,60 +830,60 @@ void KOPrefsDialog::setupViewsTab() | |||
825 | dummy = | 830 | dummy = |
826 | addWidBool(i18n("Listview uses monthly timespan"), | 831 | addWidBool(i18n("Listview uses monthly timespan"), |
827 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 832 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
828 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 833 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
829 | dummy = | 834 | dummy = |
830 | addWidBool(i18n("Highlight selection in Time Edit"), | 835 | addWidBool(i18n("Highlight selection in Time Edit"), |
831 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 836 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
832 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 837 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
833 | 838 | ||
834 | 839 | ||
835 | 840 | ||
836 | 841 | ||
837 | 842 | ||
838 | topFrame = addPage(i18n("Month View"),0,0); | 843 | topFrame = addPage(i18n("Month View"),0,0); |
839 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 844 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
840 | 845 | ||
841 | topLayout = new QGridLayout(topFrame,5,1); | 846 | topLayout = new Q3GridLayout(topFrame,5,1); |
842 | topLayout->setSpacing(spacingHint()); | 847 | topLayout->setSpacing(spacingHint()); |
843 | topLayout->setMargin(marginHint()); | 848 | topLayout->setMargin(marginHint()); |
844 | ii = 0; | 849 | ii = 0; |
845 | QLabel *lab; | 850 | QLabel *lab; |
846 | QHBox *habo = new QHBox( topFrame ); | 851 | Q3HBox *habo = new Q3HBox( topFrame ); |
847 | if ( QApplication::desktop()->width() < 320 ) { | 852 | if ( QApplication::desktop()->width() < 320 ) { |
848 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 853 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
849 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 854 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
850 | ii++; | 855 | ii++; |
851 | 856 | ||
852 | } else { | 857 | } else { |
853 | new QLabel ( i18n("Show events that recur "), habo ); | 858 | new QLabel ( i18n("Show events that recur "), habo ); |
854 | 859 | ||
855 | } | 860 | } |
856 | dailyRecur = | 861 | dailyRecur = |
857 | addWidBool(i18n("daily"), | 862 | addWidBool(i18n("daily"), |
858 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 863 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
859 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 864 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
860 | 865 | ||
861 | weeklyRecur = | 866 | weeklyRecur = |
862 | addWidBool(i18n("weekly"), | 867 | addWidBool(i18n("weekly"), |
863 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 868 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
864 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 869 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
865 | ii++; | 870 | ii++; |
866 | 871 | ||
867 | 872 | ||
868 | habo = new QHBox( topFrame ); | 873 | habo = new Q3HBox( topFrame ); |
869 | if ( QApplication::desktop()->width() < 320 ) { | 874 | if ( QApplication::desktop()->width() < 320 ) { |
870 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 875 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
871 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 876 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
872 | ii++; | 877 | ii++; |
873 | 878 | ||
874 | } else { | 879 | } else { |
875 | new QLabel ( i18n("Show in every cell "), habo ); | 880 | new QLabel ( i18n("Show in every cell "), habo ); |
876 | } | 881 | } |
877 | weeklyRecur = | 882 | weeklyRecur = |
878 | addWidBool(i18n("short month"), | 883 | addWidBool(i18n("short month"), |
879 | &(KOPrefs::instance()->mMonthShowShort),habo); | 884 | &(KOPrefs::instance()->mMonthShowShort),habo); |
880 | weeklyRecur = | 885 | weeklyRecur = |
881 | addWidBool(i18n("icons"), | 886 | addWidBool(i18n("icons"), |
882 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 887 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
883 | 888 | ||
884 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 889 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
@@ -920,142 +925,142 @@ void KOPrefsDialog::setupViewsTab() | |||
920 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 925 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
921 | topLayout->addWidget(holidayColor->label(),ii,0); | 926 | topLayout->addWidget(holidayColor->label(),ii,0); |
922 | topLayout->addWidget(holidayColor->button(),ii++,1); | 927 | topLayout->addWidget(holidayColor->button(),ii++,1); |
923 | 928 | ||
924 | 929 | ||
925 | holidayColor = | 930 | holidayColor = |
926 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 931 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
927 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 932 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
928 | topLayout->addWidget(holidayColor->label(),ii,0); | 933 | topLayout->addWidget(holidayColor->label(),ii,0); |
929 | topLayout->addWidget(holidayColor->button(),ii++,1); | 934 | topLayout->addWidget(holidayColor->button(),ii++,1); |
930 | 935 | ||
931 | // *********************** Todo View | 936 | // *********************** Todo View |
932 | 937 | ||
933 | topFrame = addPage(i18n("Todo View"),0,0); | 938 | topFrame = addPage(i18n("Todo View"),0,0); |
934 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 939 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
935 | 940 | ||
936 | topLayout = new QGridLayout(topFrame,4,1); | 941 | topLayout = new Q3GridLayout(topFrame,4,1); |
937 | topLayout->setSpacing(spacingHint()); | 942 | topLayout->setSpacing(spacingHint()); |
938 | topLayout->setMargin(marginHint()); | 943 | topLayout->setMargin(marginHint()); |
939 | ii = 0; | 944 | ii = 0; |
940 | 945 | ||
941 | KPrefsDialogWidBool *showCompletedTodo = | 946 | KPrefsDialogWidBool *showCompletedTodo = |
942 | addWidBool(i18n("To-do view shows completed Todos"), | 947 | addWidBool(i18n("To-do view shows completed Todos"), |
943 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 948 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
944 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 949 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
945 | dummy = | 950 | dummy = |
946 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 951 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
947 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 952 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
948 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 953 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
949 | 954 | ||
950 | dummy = | 955 | dummy = |
951 | addWidBool(i18n("Small To-do view uses smaller font"), | 956 | addWidBool(i18n("Small To-do view uses smaller font"), |
952 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 957 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
953 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 958 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
954 | 959 | ||
955 | 960 | ||
956 | 961 | ||
957 | dummy = | 962 | dummy = |
958 | addWidBool(i18n("Todo view uses category colors"), | 963 | addWidBool(i18n("Todo view uses category colors"), |
959 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 964 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
960 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 965 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
961 | 966 | ||
962 | 967 | ||
963 | QWidget* wid = new QWidget( topFrame ); | 968 | QWidget* wid = new QWidget( topFrame ); |
964 | // Todo due today color | 969 | // Todo due today color |
965 | KPrefsWidColor *todoDueTodayColor = | 970 | KPrefsWidColor *todoDueTodayColor = |
966 | addWidColor(i18n("Todo due today color:"), | 971 | addWidColor(i18n("Todo due today color:"), |
967 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 972 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
968 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 973 | Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); |
969 | widLayout->addWidget( todoDueTodayColor->label() ); | 974 | widLayout->addWidget( todoDueTodayColor->label() ); |
970 | widLayout->addWidget( todoDueTodayColor->button() ); | 975 | widLayout->addWidget( todoDueTodayColor->button() ); |
971 | topLayout->addWidget(wid,ii++,0); | 976 | topLayout->addWidget(wid,ii++,0); |
972 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 977 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
973 | 978 | ||
974 | // Todo overdue color | 979 | // Todo overdue color |
975 | wid = new QWidget( topFrame ); | 980 | wid = new QWidget( topFrame ); |
976 | widLayout = new QHBoxLayout(wid); | 981 | widLayout = new Q3HBoxLayout(wid); |
977 | KPrefsWidColor *todoOverdueColor = | 982 | KPrefsWidColor *todoOverdueColor = |
978 | addWidColor(i18n("Todo overdue color:"), | 983 | addWidColor(i18n("Todo overdue color:"), |
979 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 984 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
980 | widLayout->addWidget(todoOverdueColor->label()); | 985 | widLayout->addWidget(todoOverdueColor->label()); |
981 | widLayout->addWidget(todoOverdueColor->button()); | 986 | widLayout->addWidget(todoOverdueColor->button()); |
982 | topLayout->addWidget(wid,ii++,0); | 987 | topLayout->addWidget(wid,ii++,0); |
983 | 988 | ||
984 | dummy = | 989 | dummy = |
985 | addWidBool(i18n("Colors are applied to text"), | 990 | addWidBool(i18n("Colors are applied to text"), |
986 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 991 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
987 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 992 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
988 | 993 | ||
989 | dummy = | 994 | dummy = |
990 | addWidBool(i18n("Allday Agenda view shows todos"), | 995 | addWidBool(i18n("Allday Agenda view shows todos"), |
991 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 996 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
992 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 997 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
993 | 998 | ||
994 | 999 | ||
995 | 1000 | ||
996 | 1001 | ||
997 | topFrame = addPage(i18n("Alarm"),0,0); | 1002 | topFrame = addPage(i18n("Alarm"),0,0); |
998 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 1003 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
999 | 1004 | ||
1000 | topLayout = new QGridLayout(topFrame,2,1); | 1005 | topLayout = new Q3GridLayout(topFrame,2,1); |
1001 | topLayout->setSpacing(spacingHint()); | 1006 | topLayout->setSpacing(spacingHint()); |
1002 | topLayout->setMargin(marginHint()); | 1007 | topLayout->setMargin(marginHint()); |
1003 | int iii = 0; | 1008 | int iii = 0; |
1004 | 1009 | ||
1005 | dummy = | 1010 | dummy = |
1006 | addWidBool(i18n("Use internal alarm notification"), | 1011 | addWidBool(i18n("Use internal alarm notification"), |
1007 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 1012 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
1008 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 1013 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
1009 | 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); | 1014 | 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); |
1010 | 1015 | ||
1011 | topLayout->addWidget(lab ,iii++,0); | 1016 | topLayout->addWidget(lab ,iii++,0); |
1012 | #ifndef DESKTOP_VERSION | 1017 | #ifndef DESKTOP_VERSION |
1013 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1018 | lab->setAlignment( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop); |
1014 | #else | 1019 | #else |
1015 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1020 | lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); |
1016 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1021 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1017 | #endif | 1022 | #endif |
1018 | 1023 | ||
1019 | QHBox* dummyBox = new QHBox(topFrame); | 1024 | Q3HBox* dummyBox = new Q3HBox(topFrame); |
1020 | new QLabel(i18n("Play beeps count:"),dummyBox); | 1025 | new QLabel(i18n("Play beeps count:"),dummyBox); |
1021 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 1026 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
1022 | topLayout->addWidget(dummyBox,iii++,0); | 1027 | topLayout->addWidget(dummyBox,iii++,0); |
1023 | 1028 | ||
1024 | dummyBox = new QHBox(topFrame); | 1029 | dummyBox = new Q3HBox(topFrame); |
1025 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 1030 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
1026 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 1031 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
1027 | topLayout->addWidget(dummyBox,iii++,0); | 1032 | topLayout->addWidget(dummyBox,iii++,0); |
1028 | 1033 | ||
1029 | dummyBox = new QHBox(topFrame); | 1034 | dummyBox = new Q3HBox(topFrame); |
1030 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1035 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
1031 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1036 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
1032 | topLayout->addWidget(dummyBox,iii++,0); | 1037 | topLayout->addWidget(dummyBox,iii++,0); |
1033 | 1038 | ||
1034 | dummyBox = new QHBox(topFrame); | 1039 | dummyBox = new Q3HBox(topFrame); |
1035 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1040 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1036 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1041 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1037 | topLayout->addWidget(dummyBox,iii++,0); | 1042 | topLayout->addWidget(dummyBox,iii++,0); |
1038 | 1043 | ||
1039 | 1044 | ||
1040 | 1045 | ||
1041 | 1046 | ||
1042 | 1047 | ||
1043 | 1048 | ||
1044 | 1049 | ||
1045 | QHBox* hbo = new QHBox ( topFrame ); | 1050 | Q3HBox* hbo = new Q3HBox ( topFrame ); |
1046 | mDefaultAlarmFile = new QLineEdit(hbo); | 1051 | mDefaultAlarmFile = new QLineEdit(hbo); |
1047 | QPushButton * loadTemplate = new QPushButton(hbo); | 1052 | QPushButton * loadTemplate = new QPushButton(hbo); |
1048 | QPixmap icon; | 1053 | QPixmap icon; |
1049 | if ( QApplication::desktop()->width() < 321 ) | 1054 | if ( QApplication::desktop()->width() < 321 ) |
1050 | icon = SmallIcon("fileimport16"); | 1055 | icon = SmallIcon("fileimport16"); |
1051 | else | 1056 | else |
1052 | icon = SmallIcon("fileimport"); | 1057 | icon = SmallIcon("fileimport"); |
1053 | loadTemplate->setIconSet (icon ) ; | 1058 | loadTemplate->setIconSet (icon ) ; |
1054 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 1059 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
1055 | int size = loadTemplate->sizeHint().height(); | 1060 | int size = loadTemplate->sizeHint().height(); |
1056 | loadTemplate->setFixedSize( size, size ); | 1061 | loadTemplate->setFixedSize( size, size ); |
1057 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 1062 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
1058 | // topLayout->addWidget(lab ,iii++,0); | 1063 | // topLayout->addWidget(lab ,iii++,0); |
1059 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 1064 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
1060 | topLayout->addWidget(lab ,iii++,0); | 1065 | topLayout->addWidget(lab ,iii++,0); |
1061 | topLayout->addWidget(hbo,iii++,0); | 1066 | topLayout->addWidget(hbo,iii++,0); |
@@ -1069,36 +1074,36 @@ void KOPrefsDialog::setupViewsTab() | |||
1069 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1074 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1070 | // #endif | 1075 | // #endif |
1071 | 1076 | ||
1072 | 1077 | ||
1073 | } | 1078 | } |
1074 | 1079 | ||
1075 | void KOPrefsDialog::selectSoundFile() | 1080 | void KOPrefsDialog::selectSoundFile() |
1076 | { | 1081 | { |
1077 | QString fileName = mDefaultAlarmFile->text(); | 1082 | QString fileName = mDefaultAlarmFile->text(); |
1078 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1083 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
1079 | if ( fileName.length() > 0 ) | 1084 | if ( fileName.length() > 0 ) |
1080 | mDefaultAlarmFile->setText( fileName ); | 1085 | mDefaultAlarmFile->setText( fileName ); |
1081 | } | 1086 | } |
1082 | void KOPrefsDialog::setupFontsTab() | 1087 | void KOPrefsDialog::setupFontsTab() |
1083 | { | 1088 | { |
1084 | 1089 | ||
1085 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1090 | Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); |
1086 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1091 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1087 | 1092 | ||
1088 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1093 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); |
1089 | topLayout->setSpacing(1); | 1094 | topLayout->setSpacing(1); |
1090 | topLayout->setMargin(3); | 1095 | topLayout->setMargin(3); |
1091 | KPrefsDialogWidFont * tVFont; | 1096 | KPrefsDialogWidFont * tVFont; |
1092 | int i = 0; | 1097 | int i = 0; |
1093 | KPrefsDialogWidFont *timeLabelsFont = | 1098 | KPrefsDialogWidFont *timeLabelsFont = |
1094 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 1099 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
1095 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 1100 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
1096 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1101 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1097 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1102 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1098 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1103 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1099 | ++i; | 1104 | ++i; |
1100 | 1105 | ||
1101 | 1106 | ||
1102 | timeLabelsFont = | 1107 | timeLabelsFont = |
1103 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 1108 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
1104 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 1109 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
@@ -1139,33 +1144,33 @@ void KOPrefsDialog::setupFontsTab() | |||
1139 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1144 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1140 | topLayout->addWidget(tVFont->label(),i,0); | 1145 | topLayout->addWidget(tVFont->label(),i,0); |
1141 | topLayout->addWidget(tVFont->preview(),i,1); | 1146 | topLayout->addWidget(tVFont->preview(),i,1); |
1142 | topLayout->addWidget(tVFont->button(),i,2); | 1147 | topLayout->addWidget(tVFont->button(),i,2); |
1143 | ++i; | 1148 | ++i; |
1144 | 1149 | ||
1145 | 1150 | ||
1146 | 1151 | ||
1147 | topLayout->setColStretch(1,1); | 1152 | topLayout->setColStretch(1,1); |
1148 | topLayout->setRowStretch(4,1); | 1153 | topLayout->setRowStretch(4,1); |
1149 | 1154 | ||
1150 | 1155 | ||
1151 | i = 0; | 1156 | i = 0; |
1152 | topFrame = addPage(i18n("View Fonts"),0, | 1157 | topFrame = addPage(i18n("View Fonts"),0, |
1153 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1158 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1154 | 1159 | ||
1155 | topLayout = new QGridLayout(topFrame,7,3); | 1160 | topLayout = new Q3GridLayout(topFrame,7,3); |
1156 | topLayout->setSpacing(1); | 1161 | topLayout->setSpacing(1); |
1157 | topLayout->setMargin(3); | 1162 | topLayout->setMargin(3); |
1158 | 1163 | ||
1159 | tVFont = | 1164 | tVFont = |
1160 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1165 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1161 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1166 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1162 | topLayout->addWidget(tVFont->label(),i,0); | 1167 | topLayout->addWidget(tVFont->label(),i,0); |
1163 | topLayout->addWidget(tVFont->preview(),i,1); | 1168 | topLayout->addWidget(tVFont->preview(),i,1); |
1164 | topLayout->addWidget(tVFont->button(),i,2); | 1169 | topLayout->addWidget(tVFont->button(),i,2); |
1165 | ++i; | 1170 | ++i; |
1166 | KPrefsDialogWidFont *agendaViewFont = | 1171 | KPrefsDialogWidFont *agendaViewFont = |
1167 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1172 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1168 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1173 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1169 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1174 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1170 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1175 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1171 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1176 | topLayout->addWidget(agendaViewFont->button(),i,2); |
@@ -1207,46 +1212,46 @@ void KOPrefsDialog::setupFontsTab() | |||
1207 | topLayout->addWidget(tVFont->button(),i,2); | 1212 | topLayout->addWidget(tVFont->button(),i,2); |
1208 | ++i; | 1213 | ++i; |
1209 | 1214 | ||
1210 | 1215 | ||
1211 | 1216 | ||
1212 | 1217 | ||
1213 | topLayout->setColStretch(1,1); | 1218 | topLayout->setColStretch(1,1); |
1214 | topLayout->setRowStretch(4,1); | 1219 | topLayout->setRowStretch(4,1); |
1215 | 1220 | ||
1216 | 1221 | ||
1217 | 1222 | ||
1218 | 1223 | ||
1219 | } | 1224 | } |
1220 | 1225 | ||
1221 | void KOPrefsDialog::setupColorsTab() | 1226 | void KOPrefsDialog::setupColorsTab() |
1222 | { | 1227 | { |
1223 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1228 | Q3Frame *topFrame = addPage(i18n("Colors"),0,0); |
1224 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1229 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1225 | 1230 | ||
1226 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1231 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
1227 | // topLayout->setSpacing(spacingHint()); | 1232 | // topLayout->setSpacing(spacingHint()); |
1228 | // topLayout->setMargin(marginHint()); | 1233 | // topLayout->setMargin(marginHint()); |
1229 | 1234 | ||
1230 | topLayout->setSpacing(2); | 1235 | topLayout->setSpacing(2); |
1231 | topLayout->setMargin(3); | 1236 | topLayout->setMargin(3); |
1232 | 1237 | ||
1233 | int ii = 1; | 1238 | int ii = 1; |
1234 | QGroupBox *categoryGroup ; | 1239 | Q3GroupBox *categoryGroup ; |
1235 | 1240 | ||
1236 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1241 | categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), |
1237 | topFrame); | 1242 | topFrame); |
1238 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1243 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1239 | 1244 | ||
1240 | mCategoryCombo = new QComboBox(categoryGroup); | 1245 | mCategoryCombo = new QComboBox(categoryGroup); |
1241 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1246 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1242 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1247 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1243 | 1248 | ||
1244 | mCategoryButton = new KColorButton(categoryGroup); | 1249 | mCategoryButton = new KColorButton(categoryGroup); |
1245 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1250 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1246 | updateCategoryColor(); | 1251 | updateCategoryColor(); |
1247 | 1252 | ||
1248 | 1253 | ||
1249 | // Holiday Color | 1254 | // Holiday Color |
1250 | 1255 | ||
1251 | KPrefsWidColor *holidayColor = | 1256 | KPrefsWidColor *holidayColor = |
1252 | addWidColor(i18n("Holiday color:"), | 1257 | addWidColor(i18n("Holiday color:"), |
@@ -1313,97 +1318,97 @@ void KOPrefsDialog::updateCategoryColor() | |||
1313 | { | 1318 | { |
1314 | QString cat = mCategoryCombo->currentText(); | 1319 | QString cat = mCategoryCombo->currentText(); |
1315 | QColor *color = mCategoryDict.find(cat); | 1320 | QColor *color = mCategoryDict.find(cat); |
1316 | if (!color) { | 1321 | if (!color) { |
1317 | color = KOPrefs::instance()->categoryColor(cat); | 1322 | color = KOPrefs::instance()->categoryColor(cat); |
1318 | } | 1323 | } |
1319 | if (color) { | 1324 | if (color) { |
1320 | mCategoryButton->setColor(*color); | 1325 | mCategoryButton->setColor(*color); |
1321 | } | 1326 | } |
1322 | } | 1327 | } |
1323 | 1328 | ||
1324 | void KOPrefsDialog::setupPrinterTab() | 1329 | void KOPrefsDialog::setupPrinterTab() |
1325 | { | 1330 | { |
1326 | mPrinterTab = addPage(i18n("Printing"),0, | 1331 | mPrinterTab = addPage(i18n("Printing"),0, |
1327 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1332 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1328 | 1333 | ||
1329 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1334 | Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); |
1330 | topLayout->setSpacing(spacingHint()); | 1335 | topLayout->setSpacing(spacingHint()); |
1331 | topLayout->setMargin(marginHint()); | 1336 | topLayout->setMargin(marginHint()); |
1332 | 1337 | ||
1333 | topLayout->setRowStretch(4,1); | 1338 | topLayout->setRowStretch(4,1); |
1334 | } | 1339 | } |
1335 | 1340 | ||
1336 | void KOPrefsDialog::setupGroupSchedulingTab() | 1341 | void KOPrefsDialog::setupGroupSchedulingTab() |
1337 | { | 1342 | { |
1338 | #if 0 | 1343 | #if 0 |
1339 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1344 | Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, |
1340 | DesktopIcon("personal",KIcon::SizeMedium)); | 1345 | DesktopIcon("personal",KIcon::SizeMedium)); |
1341 | 1346 | ||
1342 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1347 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
1343 | topLayout->setSpacing(spacingHint()); | 1348 | topLayout->setSpacing(spacingHint()); |
1344 | topLayout->setMargin(marginHint()); | 1349 | topLayout->setMargin(marginHint()); |
1345 | 1350 | ||
1346 | #if 0 | 1351 | #if 0 |
1347 | KPrefsWidRadios *schedulerGroup = | 1352 | KPrefsWidRadios *schedulerGroup = |
1348 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1353 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1349 | topFrame); | 1354 | topFrame); |
1350 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1355 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1351 | schedulerGroup->addRadio(i18n("Mail client")); | 1356 | schedulerGroup->addRadio(i18n("Mail client")); |
1352 | 1357 | ||
1353 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1358 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1354 | #endif | 1359 | #endif |
1355 | 1360 | ||
1356 | KPrefsWidRadios *sendGroup = | 1361 | KPrefsWidRadios *sendGroup = |
1357 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1362 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1358 | topFrame); | 1363 | topFrame); |
1359 | sendGroup->addRadio(i18n("Send to outbox")); | 1364 | sendGroup->addRadio(i18n("Send to outbox")); |
1360 | sendGroup->addRadio(i18n("Send directly")); | 1365 | sendGroup->addRadio(i18n("Send directly")); |
1361 | 1366 | ||
1362 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1367 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1363 | 1368 | ||
1364 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1369 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1365 | mAMails = new QListView(topFrame); | 1370 | mAMails = new Q3ListView(topFrame); |
1366 | mAMails->addColumn(i18n("Email"),300); | 1371 | mAMails->addColumn(i18n("Email"),300); |
1367 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1372 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1368 | 1373 | ||
1369 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1374 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1370 | aEmailsEdit = new QLineEdit(topFrame); | 1375 | aEmailsEdit = new QLineEdit(topFrame); |
1371 | aEmailsEdit->setEnabled(false); | 1376 | aEmailsEdit->setEnabled(false); |
1372 | topLayout->addWidget(aEmailsEdit,4,1); | 1377 | topLayout->addWidget(aEmailsEdit,4,1); |
1373 | 1378 | ||
1374 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1379 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1375 | topLayout->addWidget(add,5,0); | 1380 | topLayout->addWidget(add,5,0); |
1376 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1381 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1377 | topLayout->addWidget(del,5,1); | 1382 | topLayout->addWidget(del,5,1); |
1378 | 1383 | ||
1379 | //topLayout->setRowStretch(2,1); | 1384 | //topLayout->setRowStretch(2,1); |
1380 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1385 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1381 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1386 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1382 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1387 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1383 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1388 | connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); |
1384 | #endif | 1389 | #endif |
1385 | } | 1390 | } |
1386 | 1391 | ||
1387 | void KOPrefsDialog::setupGroupAutomationTab() | 1392 | void KOPrefsDialog::setupGroupAutomationTab() |
1388 | { | 1393 | { |
1389 | return; | 1394 | return; |
1390 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1395 | Q3Frame *topFrame = addPage(i18n("Group Automation"),0, |
1391 | DesktopIcon("personal",KIcon::SizeMedium)); | 1396 | DesktopIcon("personal",KIcon::SizeMedium)); |
1392 | 1397 | ||
1393 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1398 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); |
1394 | topLayout->setSpacing(spacingHint()); | 1399 | topLayout->setSpacing(spacingHint()); |
1395 | topLayout->setMargin(marginHint()); | 1400 | topLayout->setMargin(marginHint()); |
1396 | 1401 | ||
1397 | KPrefsWidRadios *autoRefreshGroup = | 1402 | KPrefsWidRadios *autoRefreshGroup = |
1398 | addWidRadios(i18n("Auto Send Refresh"), | 1403 | addWidRadios(i18n("Auto Send Refresh"), |
1399 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1404 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1400 | autoRefreshGroup->addRadio(i18n("Never")); | 1405 | autoRefreshGroup->addRadio(i18n("Never")); |
1401 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1406 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1402 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1407 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1403 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1408 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1404 | 1409 | ||
1405 | KPrefsWidRadios *autoInsertGroup = | 1410 | KPrefsWidRadios *autoInsertGroup = |
1406 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1411 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1407 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1412 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1408 | autoInsertGroup->addRadio(i18n("Never")); | 1413 | autoInsertGroup->addRadio(i18n("Never")); |
1409 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1414 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
@@ -1530,33 +1535,33 @@ void KOPrefsDialog::usrWriteConfig() | |||
1530 | sub = 1; | 1535 | sub = 1; |
1531 | KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1536 | KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1532 | date = mEndDateSavingEdit->date(); | 1537 | date = mEndDateSavingEdit->date(); |
1533 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1538 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1534 | sub = 1; | 1539 | sub = 1; |
1535 | else | 1540 | else |
1536 | sub = 0; | 1541 | sub = 0; |
1537 | KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1542 | KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1538 | // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1543 | // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1539 | 1544 | ||
1540 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1545 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1541 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1546 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1542 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1547 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1543 | 1548 | ||
1544 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1549 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1545 | 1550 | ||
1546 | QDictIterator<QColor> it(mCategoryDict); | 1551 | Q3DictIterator<QColor> it(mCategoryDict); |
1547 | while (it.current()) { | 1552 | while (it.current()) { |
1548 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1553 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1549 | ++it; | 1554 | ++it; |
1550 | } | 1555 | } |
1551 | 1556 | ||
1552 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1557 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1553 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1558 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1554 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1559 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1555 | 1560 | ||
1556 | KOPrefs::instance()->mAdditionalMails.clear(); | 1561 | KOPrefs::instance()->mAdditionalMails.clear(); |
1557 | // QListViewItem *item; | 1562 | // QListViewItem *item; |
1558 | // item = mAMails->firstChild(); | 1563 | // item = mAMails->firstChild(); |
1559 | // while (item) | 1564 | // while (item) |
1560 | // { | 1565 | // { |
1561 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1566 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1562 | // item = item->nextSibling(); | 1567 | // item = item->nextSibling(); |
@@ -1670,40 +1675,40 @@ void KOPrefsDialog::updateTimezoneOffset( int index ) | |||
1670 | 1675 | ||
1671 | } else { | 1676 | } else { |
1672 | if ( index == 24 ) { | 1677 | if ( index == 24 ) { |
1673 | mTimezoneOffsetSpin->setEnabled ( true ); | 1678 | mTimezoneOffsetSpin->setEnabled ( true ); |
1674 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1679 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1675 | 1680 | ||
1676 | } else { | 1681 | } else { |
1677 | mTimezoneOffsetSpin->setEnabled ( false ); | 1682 | mTimezoneOffsetSpin->setEnabled ( false ); |
1678 | mTimezoneOffsetSpin->setValue( 0 ); | 1683 | mTimezoneOffsetSpin->setValue( 0 ); |
1679 | } | 1684 | } |
1680 | } | 1685 | } |
1681 | */ | 1686 | */ |
1682 | } | 1687 | } |
1683 | 1688 | ||
1684 | void KOPrefsDialog::setupTimeZoneTab() | 1689 | void KOPrefsDialog::setupTimeZoneTab() |
1685 | { | 1690 | { |
1686 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1691 | Q3Frame *topFrame = addPage(i18n("Time Zone"),0,0); |
1687 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1692 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1688 | 1693 | ||
1689 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1694 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
1690 | topLayout->setSpacing(spacingHint()); | 1695 | topLayout->setSpacing(spacingHint()); |
1691 | topLayout->setMargin(marginHint()); | 1696 | topLayout->setMargin(marginHint()); |
1692 | 1697 | ||
1693 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1698 | Q3HBox *timeZoneBox = new Q3HBox( topFrame ); |
1694 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1699 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1695 | 1700 | ||
1696 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1701 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1697 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1702 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1698 | if ( QApplication::desktop()->width() < 300 ) { | 1703 | if ( QApplication::desktop()->width() < 300 ) { |
1699 | mTimeZoneCombo->setMaximumWidth(150); | 1704 | mTimeZoneCombo->setMaximumWidth(150); |
1700 | } | 1705 | } |
1701 | 1706 | ||
1702 | QStringList list; | 1707 | QStringList list; |
1703 | list = KGlobal::locale()->timeZoneList(); | 1708 | list = KGlobal::locale()->timeZoneList(); |
1704 | mTimeZoneCombo->insertStringList(list); | 1709 | mTimeZoneCombo->insertStringList(list); |
1705 | 1710 | ||
1706 | // find the currently set time zone and select it | 1711 | // find the currently set time zone and select it |
1707 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1712 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1708 | int nCurrentlySet = 11; | 1713 | int nCurrentlySet = 11; |
1709 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1714 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |