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
-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 | |||
@@ -18,34 +18,39 @@ | |||
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> |
@@ -106,19 +111,19 @@ KOPrefsDialog::~KOPrefsDialog() | |||
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); |
@@ -131,19 +136,19 @@ void KOPrefsDialog::setupMainTab() | |||
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 | ||
@@ -177,20 +182,20 @@ void KOPrefsDialog::setupMailTab() | |||
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); |
@@ -233,18 +238,18 @@ void KOPrefsDialog::usrWriteConfig() | |||
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; |
@@ -287,18 +292,18 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); | |||
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")); |
@@ -326,17 +331,17 @@ void KOPrefsDialog::setupLocaleTab() | |||
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() ); |
@@ -356,19 +361,19 @@ 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); |
@@ -398,18 +403,18 @@ void KOPrefsDialog::setupSyncAlgTab() | |||
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); |
@@ -446,20 +451,20 @@ void KOPrefsDialog::setupSyncTab() | |||
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)), |
@@ -470,47 +475,47 @@ void KOPrefsDialog::setupMainTab() | |||
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); |
@@ -524,17 +529,17 @@ void KOPrefsDialog::setupMainTab() | |||
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 | ||
@@ -615,24 +620,24 @@ void KOPrefsDialog::setupMainTab() | |||
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 | ||
@@ -653,32 +658,32 @@ void KOPrefsDialog::setupTimeTab() | |||
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"), |
@@ -688,20 +693,20 @@ void KOPrefsDialog::setupTimeTab() | |||
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), |
@@ -780,17 +785,17 @@ void KOPrefsDialog::setupViewsTab() | |||
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); |
@@ -833,22 +838,22 @@ void KOPrefsDialog::setupViewsTab() | |||
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 | ||
@@ -860,17 +865,17 @@ void KOPrefsDialog::setupViewsTab() | |||
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 | } |
@@ -928,17 +933,17 @@ void KOPrefsDialog::setupViewsTab() | |||
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); |
@@ -960,25 +965,25 @@ void KOPrefsDialog::setupViewsTab() | |||
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 = |
@@ -992,62 +997,62 @@ void KOPrefsDialog::setupViewsTab() | |||
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 ) ; |
@@ -1077,20 +1082,20 @@ void KOPrefsDialog::selectSoundFile() | |||
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); |
@@ -1147,17 +1152,17 @@ void KOPrefsDialog::setupFontsTab() | |||
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); |
@@ -1215,30 +1220,30 @@ void KOPrefsDialog::setupFontsTab() | |||
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); |
@@ -1321,30 +1326,30 @@ void KOPrefsDialog::updateCategoryColor() | |||
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 |
@@ -1357,17 +1362,17 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
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 | ||
@@ -1375,27 +1380,27 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
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")); |
@@ -1538,17 +1543,17 @@ void KOPrefsDialog::usrWriteConfig() | |||
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(); |
@@ -1678,24 +1683,24 @@ void KOPrefsDialog::updateTimezoneOffset( int index ) | |||
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 | ||