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 /korganizer/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 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 138 |
1 files changed, 72 insertions, 66 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index f1a6c3d..43c488f 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -23,24 +23,30 @@ | |||
23 | 23 | ||
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 | #include <QDesktopWidget> | ||
45 | //Added by qt3to4: | ||
46 | #include <Q3HBoxLayout> | ||
47 | #include <Q3GridLayout> | ||
48 | #include <QPixmap> | ||
49 | #include <Q3Frame> | ||
44 | 50 | ||
45 | #include <kcolorbutton.h> | 51 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 52 | #include <kdebug.h> |
@@ -116,8 +122,8 @@ void KOPrefsDialog::setupGlobalTab() | |||
116 | void KOPrefsDialog::setupLocaleDateTab() | 122 | void KOPrefsDialog::setupLocaleDateTab() |
117 | { | 123 | { |
118 | #if 0 | 124 | #if 0 |
119 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 125 | Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); |
120 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 126 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); |
121 | topLayout->setSpacing(mSpacingHint); | 127 | topLayout->setSpacing(mSpacingHint); |
122 | topLayout->setMargin(mMarginHint); | 128 | topLayout->setMargin(mMarginHint); |
123 | int iii = 0; | 129 | int iii = 0; |
@@ -172,8 +178,8 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); | |||
172 | void KOPrefsDialog::setupLocaleTab() | 178 | void KOPrefsDialog::setupLocaleTab() |
173 | { | 179 | { |
174 | #if 0 | 180 | #if 0 |
175 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 181 | Q3Frame *topFrame = addPage(i18n("Locale"),0,0); |
176 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 182 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
177 | topLayout->setSpacing(mSpacingHint); | 183 | topLayout->setSpacing(mSpacingHint); |
178 | topLayout->setMargin(mMarginHint); | 184 | topLayout->setMargin(mMarginHint); |
179 | int iii = 0; | 185 | int iii = 0; |
@@ -211,7 +217,7 @@ void KOPrefsDialog::setupLocaleTab() | |||
211 | } | 217 | } |
212 | else { | 218 | else { |
213 | QWidget * hb = new QWidget( topFrame ); | 219 | QWidget * hb = new QWidget( topFrame ); |
214 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 220 | Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); |
215 | sb = | 221 | sb = |
216 | addWidBool(i18n("Week starts on Sunday"), | 222 | addWidBool(i18n("Week starts on Sunday"), |
217 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 223 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
@@ -236,10 +242,10 @@ void KOPrefsDialog::setupLocaleTab() | |||
236 | 242 | ||
237 | void KOPrefsDialog::setupMainTab() | 243 | void KOPrefsDialog::setupMainTab() |
238 | { | 244 | { |
239 | QFrame *topFrame = addPage(i18n("General"),0,0); | 245 | Q3Frame *topFrame = addPage(i18n("General"),0,0); |
240 | // DesktopIcon("identity",KIcon::SizeMedium)); | 246 | // DesktopIcon("identity",KIcon::SizeMedium)); |
241 | 247 | ||
242 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 248 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
243 | topLayout->setSpacing(mSpacingHint); | 249 | topLayout->setSpacing(mSpacingHint); |
244 | topLayout->setMargin(mMarginHint); | 250 | topLayout->setMargin(mMarginHint); |
245 | 251 | ||
@@ -287,12 +293,12 @@ void KOPrefsDialog::setupMainTab() | |||
287 | ++iii; | 293 | ++iii; |
288 | if ( QApplication::desktop()->height() <= 240 ) { | 294 | if ( QApplication::desktop()->height() <= 240 ) { |
289 | topFrame = addPage(i18n("General") +" 2",0,0); | 295 | topFrame = addPage(i18n("General") +" 2",0,0); |
290 | topLayout = new QGridLayout(topFrame,4,2); | 296 | topLayout = new Q3GridLayout(topFrame,4,2); |
291 | topLayout->setSpacing(2); | 297 | topLayout->setSpacing(2); |
292 | topLayout->setMargin(3); | 298 | topLayout->setMargin(3); |
293 | iii = 0; | 299 | iii = 0; |
294 | } | 300 | } |
295 | QHBox *dummy = new QHBox(topFrame); | 301 | Q3HBox *dummy = new Q3HBox(topFrame); |
296 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 302 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
297 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 303 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
298 | 304 | ||
@@ -313,7 +319,7 @@ void KOPrefsDialog::setupMainTab() | |||
313 | // addWidBool(i18n("Enable automatic saving of calendar"), | 319 | // addWidBool(i18n("Enable automatic saving of calendar"), |
314 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 320 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
315 | 321 | ||
316 | QHBox *intervalBox = new QHBox(topFrame); | 322 | Q3HBox *intervalBox = new Q3HBox(topFrame); |
317 | // intervalBox->setSpacing(mSpacingHint); | 323 | // intervalBox->setSpacing(mSpacingHint); |
318 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); | 324 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
319 | ++iii; | 325 | ++iii; |
@@ -402,14 +408,14 @@ void KOPrefsDialog::setupMainTab() | |||
402 | 408 | ||
403 | void KOPrefsDialog::setupTimeTab() | 409 | void KOPrefsDialog::setupTimeTab() |
404 | { | 410 | { |
405 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 411 | Q3Frame *topFrame = addPage(i18n("Time"),0,0); |
406 | // DesktopIcon("clock",KIcon::SizeMedium)); | 412 | // DesktopIcon("clock",KIcon::SizeMedium)); |
407 | 413 | ||
408 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 414 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
409 | topLayout->setSpacing(mSpacingHint); | 415 | topLayout->setSpacing(mSpacingHint); |
410 | topLayout->setMargin(mMarginHint); | 416 | topLayout->setMargin(mMarginHint); |
411 | 417 | ||
412 | QHBox *dummy = new QHBox(topFrame); | 418 | Q3HBox *dummy = new Q3HBox(topFrame); |
413 | KPrefsDialogWidTime *dayBegins = | 419 | KPrefsDialogWidTime *dayBegins = |
414 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 420 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
415 | dummy); | 421 | dummy); |
@@ -441,28 +447,28 @@ void KOPrefsDialog::setupTimeTab() | |||
441 | int iii = 4; | 447 | int iii = 4; |
442 | if ( QApplication::desktop()->height() <= 240 ) { | 448 | if ( QApplication::desktop()->height() <= 240 ) { |
443 | topFrame = addPage(i18n("Time") +" 2",0,0); | 449 | topFrame = addPage(i18n("Time") +" 2",0,0); |
444 | topLayout = new QGridLayout(topFrame,1,2); | 450 | topLayout = new Q3GridLayout(topFrame,1,2); |
445 | topLayout->setSpacing(2); | 451 | topLayout->setSpacing(2); |
446 | topLayout->setMargin(3); | 452 | topLayout->setMargin(3); |
447 | iii = 0; | 453 | iii = 0; |
448 | } | 454 | } |
449 | 455 | ||
450 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 456 | Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, |
451 | i18n("Working Hours"), | 457 | i18n("Working Hours"), |
452 | topFrame); | 458 | topFrame); |
453 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); | 459 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); |
454 | workingHoursGroup->layout()->setSpacing( 0 ); | 460 | workingHoursGroup->layout()->setSpacing( 0 ); |
455 | workingHoursGroup->layout()->setMargin( 4 ); | 461 | workingHoursGroup->layout()->setMargin( 4 ); |
456 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 462 | Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); |
457 | // workStartBox->setMargin( 0 ); | 463 | // workStartBox->setMargin( 0 ); |
458 | addWidTime(i18n("Daily starting hour:"), | 464 | addWidTime(i18n("Daily starting hour:"), |
459 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 465 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
460 | 466 | ||
461 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 467 | Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); |
462 | //workEndBox->setMargin( 0 ); | 468 | //workEndBox->setMargin( 0 ); |
463 | addWidTime(i18n("Daily ending hour:"), | 469 | addWidTime(i18n("Daily ending hour:"), |
464 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 470 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
465 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 471 | Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); |
466 | //excludeBox->setMargin( 0 ); | 472 | //excludeBox->setMargin( 0 ); |
467 | addWidBool(i18n("Exclude holidays"), | 473 | addWidBool(i18n("Exclude holidays"), |
468 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 474 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
@@ -482,10 +488,10 @@ void KOPrefsDialog::setupTimeTab() | |||
482 | void KOPrefsDialog::setupViewsTab() | 488 | void KOPrefsDialog::setupViewsTab() |
483 | { | 489 | { |
484 | 490 | ||
485 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 491 | Q3Frame *topFrame = addPage(i18n("Views"),0,0); |
486 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 492 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
487 | 493 | ||
488 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 494 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); |
489 | topLayout->setSpacing(mSpacingHint); | 495 | topLayout->setSpacing(mSpacingHint); |
490 | topLayout->setMargin(mMarginHint); | 496 | topLayout->setMargin(mMarginHint); |
491 | 497 | ||
@@ -530,7 +536,7 @@ void KOPrefsDialog::setupViewsTab() | |||
530 | topFrame = addPage(i18n("ViewChange"),0,0); | 536 | topFrame = addPage(i18n("ViewChange"),0,0); |
531 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 537 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
532 | 538 | ||
533 | topLayout = new QGridLayout(topFrame,6,1); | 539 | topLayout = new Q3GridLayout(topFrame,6,1); |
534 | topLayout->setSpacing(mSpacingHint); | 540 | topLayout->setSpacing(mSpacingHint); |
535 | topLayout->setMargin(mMarginHint); | 541 | topLayout->setMargin(mMarginHint); |
536 | ii = 0; | 542 | ii = 0; |
@@ -594,7 +600,7 @@ void KOPrefsDialog::setupViewsTab() | |||
594 | topFrame = addPage(i18n("Agenda View"),0,0); | 600 | topFrame = addPage(i18n("Agenda View"),0,0); |
595 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 601 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
596 | 602 | ||
597 | topLayout = new QGridLayout(topFrame,5,1); | 603 | topLayout = new Q3GridLayout(topFrame,5,1); |
598 | topLayout->setSpacing(mSpacingHint); | 604 | topLayout->setSpacing(mSpacingHint); |
599 | topLayout->setMargin(mMarginHint); | 605 | topLayout->setMargin(mMarginHint); |
600 | ii = 0; | 606 | ii = 0; |
@@ -652,12 +658,12 @@ void KOPrefsDialog::setupViewsTab() | |||
652 | topFrame = addPage(i18n("Month View"),0,0); | 658 | topFrame = addPage(i18n("Month View"),0,0); |
653 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 659 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
654 | 660 | ||
655 | topLayout = new QGridLayout(topFrame,5,1); | 661 | topLayout = new Q3GridLayout(topFrame,5,1); |
656 | topLayout->setSpacing(mSpacingHint); | 662 | topLayout->setSpacing(mSpacingHint); |
657 | topLayout->setMargin(mMarginHint); | 663 | topLayout->setMargin(mMarginHint); |
658 | ii = 0; | 664 | ii = 0; |
659 | QLabel *lab; | 665 | QLabel *lab; |
660 | QHBox *habo = new QHBox( topFrame ); | 666 | Q3HBox *habo = new Q3HBox( topFrame ); |
661 | if ( QApplication::desktop()->width() <= 480 ) { | 667 | if ( QApplication::desktop()->width() <= 480 ) { |
662 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 668 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
663 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 669 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
@@ -677,7 +683,7 @@ void KOPrefsDialog::setupViewsTab() | |||
677 | ii++; | 683 | ii++; |
678 | 684 | ||
679 | 685 | ||
680 | habo = new QHBox( topFrame ); | 686 | habo = new Q3HBox( topFrame ); |
681 | if ( QApplication::desktop()->width() <= 480 ) { | 687 | if ( QApplication::desktop()->width() <= 480 ) { |
682 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 688 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
683 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 689 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
@@ -730,7 +736,7 @@ void KOPrefsDialog::setupViewsTab() | |||
730 | 736 | ||
731 | if ( QApplication::desktop()->height() <= 240 ) { | 737 | if ( QApplication::desktop()->height() <= 240 ) { |
732 | topFrame = addPage(i18n("Month View") +" 2",0,0); | 738 | topFrame = addPage(i18n("Month View") +" 2",0,0); |
733 | topLayout = new QGridLayout(topFrame,4,1); | 739 | topLayout = new Q3GridLayout(topFrame,4,1); |
734 | topLayout->setSpacing(2); | 740 | topLayout->setSpacing(2); |
735 | topLayout->setMargin(1); | 741 | topLayout->setMargin(1); |
736 | ii = 0; | 742 | ii = 0; |
@@ -764,19 +770,19 @@ void KOPrefsDialog::setupViewsTab() | |||
764 | topFrame = addPage(i18n("What's Next View"),0,0); | 770 | topFrame = addPage(i18n("What's Next View"),0,0); |
765 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 771 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
766 | 772 | ||
767 | topLayout = new QGridLayout(topFrame,4,1); | 773 | topLayout = new Q3GridLayout(topFrame,4,1); |
768 | topLayout->setSpacing(mSpacingHint); | 774 | topLayout->setSpacing(mSpacingHint); |
769 | topLayout->setMargin(mMarginHint); | 775 | topLayout->setMargin(mMarginHint); |
770 | ii = 0; | 776 | ii = 0; |
771 | 777 | ||
772 | 778 | ||
773 | QHBox* hdummy = new QHBox(topFrame); | 779 | Q3HBox* hdummy = new Q3HBox(topFrame); |
774 | new QLabel(i18n("Days in What's Next:"),hdummy); | 780 | new QLabel(i18n("Days in What's Next:"),hdummy); |
775 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 781 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
776 | 782 | ||
777 | topLayout->addWidget(hdummy,ii++,0); | 783 | topLayout->addWidget(hdummy,ii++,0); |
778 | 784 | ||
779 | QHBox *prioBox = new QHBox(topFrame); | 785 | Q3HBox *prioBox = new Q3HBox(topFrame); |
780 | // intervalBox->setSpacing(mSpacingHint); | 786 | // intervalBox->setSpacing(mSpacingHint); |
781 | topLayout->addWidget(prioBox,ii++,0); | 787 | topLayout->addWidget(prioBox,ii++,0); |
782 | 788 | ||
@@ -818,7 +824,7 @@ void KOPrefsDialog::setupViewsTab() | |||
818 | topFrame = addPage(i18n("Todo View"),0,0); | 824 | topFrame = addPage(i18n("Todo View"),0,0); |
819 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 825 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
820 | 826 | ||
821 | topLayout = new QGridLayout(topFrame,4,1); | 827 | topLayout = new Q3GridLayout(topFrame,4,1); |
822 | topLayout->setSpacing(mSpacingHint); | 828 | topLayout->setSpacing(mSpacingHint); |
823 | topLayout->setMargin(mMarginHint); | 829 | topLayout->setMargin(mMarginHint); |
824 | ii = 0; | 830 | ii = 0; |
@@ -855,7 +861,7 @@ dummy = | |||
855 | KPrefsDialogWidColor *todoRunColor = | 861 | KPrefsDialogWidColor *todoRunColor = |
856 | addWidColor(i18n("Color for running todos:"), | 862 | addWidColor(i18n("Color for running todos:"), |
857 | &(KOPrefs::instance()->mTodoRunColor),wid); | 863 | &(KOPrefs::instance()->mTodoRunColor),wid); |
858 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 864 | Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); |
859 | widLayout->addWidget( todoRunColor->label() ); | 865 | widLayout->addWidget( todoRunColor->label() ); |
860 | widLayout->addWidget( todoRunColor->button() ); | 866 | widLayout->addWidget( todoRunColor->button() ); |
861 | topLayout->addWidget(wid,ii++,0); | 867 | topLayout->addWidget(wid,ii++,0); |
@@ -865,7 +871,7 @@ dummy = | |||
865 | KPrefsDialogWidColor *todoDueTodayColor = | 871 | KPrefsDialogWidColor *todoDueTodayColor = |
866 | addWidColor(i18n("Todo due today color:"), | 872 | addWidColor(i18n("Todo due today color:"), |
867 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 873 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
868 | widLayout = new QHBoxLayout(wid); | 874 | widLayout = new Q3HBoxLayout(wid); |
869 | widLayout->addWidget( todoDueTodayColor->label() ); | 875 | widLayout->addWidget( todoDueTodayColor->label() ); |
870 | widLayout->addWidget( todoDueTodayColor->button() ); | 876 | widLayout->addWidget( todoDueTodayColor->button() ); |
871 | topLayout->addWidget(wid,ii++,0); | 877 | topLayout->addWidget(wid,ii++,0); |
@@ -873,7 +879,7 @@ dummy = | |||
873 | 879 | ||
874 | // Todo overdue color | 880 | // Todo overdue color |
875 | wid = new QWidget( topFrame ); | 881 | wid = new QWidget( topFrame ); |
876 | widLayout = new QHBoxLayout(wid); | 882 | widLayout = new Q3HBoxLayout(wid); |
877 | KPrefsDialogWidColor *todoOverdueColor = | 883 | KPrefsDialogWidColor *todoOverdueColor = |
878 | addWidColor(i18n("Todo overdue color:"), | 884 | addWidColor(i18n("Todo overdue color:"), |
879 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 885 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
@@ -890,7 +896,7 @@ dummy = | |||
890 | 896 | ||
891 | topFrame = addPage(i18n("View Options"),0,0); | 897 | topFrame = addPage(i18n("View Options"),0,0); |
892 | 898 | ||
893 | topLayout = new QGridLayout(topFrame,4,1); | 899 | topLayout = new Q3GridLayout(topFrame,4,1); |
894 | topLayout->setSpacing(mSpacingHint); | 900 | topLayout->setSpacing(mSpacingHint); |
895 | topLayout->setMargin(mMarginHint); | 901 | topLayout->setMargin(mMarginHint); |
896 | ii = 0; | 902 | ii = 0; |
@@ -929,16 +935,16 @@ dummy = | |||
929 | 935 | ||
930 | topFrame = addPage(i18n("Conflict detection"),0,0); | 936 | topFrame = addPage(i18n("Conflict detection"),0,0); |
931 | 937 | ||
932 | topLayout = new QGridLayout(topFrame,2,1); | 938 | topLayout = new Q3GridLayout(topFrame,2,1); |
933 | topLayout->setSpacing(mSpacingHint); | 939 | topLayout->setSpacing(mSpacingHint); |
934 | topLayout->setMargin(mMarginHint); | 940 | topLayout->setMargin(mMarginHint); |
935 | ii = 0; | 941 | ii = 0; |
936 | dummy = addWidBool(i18n("Enable conflict detection"), | 942 | dummy = addWidBool(i18n("Enable conflict detection"), |
937 | &(KOPrefs::instance()->mDetectConflicts),topFrame); | 943 | &(KOPrefs::instance()->mDetectConflicts),topFrame); |
938 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 944 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
939 | topFrame = new QFrame( topFrame ); | 945 | topFrame = new Q3Frame( topFrame ); |
940 | topLayout->addWidget(topFrame ,ii++,0); | 946 | topLayout->addWidget(topFrame ,ii++,0); |
941 | topLayout = new QGridLayout(topFrame,4,1); | 947 | topLayout = new Q3GridLayout(topFrame,4,1); |
942 | connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); | 948 | connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); |
943 | dummy = addWidBool(i18n("Include events which \"show as free\""), | 949 | dummy = addWidBool(i18n("Include events which \"show as free\""), |
944 | &(KOPrefs::instance()->mIncludeFree),topFrame); | 950 | &(KOPrefs::instance()->mIncludeFree),topFrame); |
@@ -970,7 +976,7 @@ dummy = | |||
970 | topFrame = addPage(i18n("Alarm"),0,0); | 976 | topFrame = addPage(i18n("Alarm"),0,0); |
971 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 977 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
972 | 978 | ||
973 | topLayout = new QGridLayout(topFrame,2,1); | 979 | topLayout = new Q3GridLayout(topFrame,2,1); |
974 | topLayout->setSpacing(mSpacingHint); | 980 | topLayout->setSpacing(mSpacingHint); |
975 | topLayout->setMargin(mMarginHint); | 981 | topLayout->setMargin(mMarginHint); |
976 | int iii = 0; | 982 | int iii = 0; |
@@ -989,33 +995,33 @@ dummy = | |||
989 | #ifndef DESKTOP_VERSION | 995 | #ifndef DESKTOP_VERSION |
990 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 996 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
991 | #else | 997 | #else |
992 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 998 | lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); |
993 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 999 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
994 | #endif | 1000 | #endif |
995 | 1001 | ||
996 | QHBox* dummyBox = new QHBox(topFrame); | 1002 | Q3HBox* dummyBox = new Q3HBox(topFrame); |
997 | new QLabel(i18n("Play beeps count:"),dummyBox); | 1003 | new QLabel(i18n("Play beeps count:"),dummyBox); |
998 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 1004 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
999 | topLayout->addWidget(dummyBox,iii++,0); | 1005 | topLayout->addWidget(dummyBox,iii++,0); |
1000 | 1006 | ||
1001 | dummyBox = new QHBox(topFrame); | 1007 | dummyBox = new Q3HBox(topFrame); |
1002 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 1008 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
1003 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 1009 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
1004 | topLayout->addWidget(dummyBox,iii++,0); | 1010 | topLayout->addWidget(dummyBox,iii++,0); |
1005 | 1011 | ||
1006 | dummyBox = new QHBox(topFrame); | 1012 | dummyBox = new Q3HBox(topFrame); |
1007 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1013 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
1008 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1014 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
1009 | topLayout->addWidget(dummyBox,iii++,0); | 1015 | topLayout->addWidget(dummyBox,iii++,0); |
1010 | 1016 | ||
1011 | dummyBox = new QHBox(topFrame); | 1017 | dummyBox = new Q3HBox(topFrame); |
1012 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1018 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1013 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1019 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1014 | topLayout->addWidget(dummyBox,iii++,0); | 1020 | topLayout->addWidget(dummyBox,iii++,0); |
1015 | 1021 | ||
1016 | 1022 | ||
1017 | 1023 | ||
1018 | QHBox* hbo = new QHBox ( topFrame ); | 1024 | Q3HBox* hbo = new Q3HBox ( topFrame ); |
1019 | mDefaultAlarmFile = new QLineEdit(hbo); | 1025 | mDefaultAlarmFile = new QLineEdit(hbo); |
1020 | QPushButton * loadTemplate = new QPushButton(hbo); | 1026 | QPushButton * loadTemplate = new QPushButton(hbo); |
1021 | QPixmap icon; | 1027 | QPixmap icon; |
@@ -1055,10 +1061,10 @@ void KOPrefsDialog::selectSoundFile() | |||
1055 | void KOPrefsDialog::setupFontsTab() | 1061 | void KOPrefsDialog::setupFontsTab() |
1056 | { | 1062 | { |
1057 | 1063 | ||
1058 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1064 | Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); |
1059 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1065 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1060 | 1066 | ||
1061 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1067 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); |
1062 | topLayout->setSpacing(1); | 1068 | topLayout->setSpacing(1); |
1063 | topLayout->setMargin(3); | 1069 | topLayout->setMargin(3); |
1064 | KPrefsDialogWidFont * tVFont; | 1070 | KPrefsDialogWidFont * tVFont; |
@@ -1125,7 +1131,7 @@ void KOPrefsDialog::setupFontsTab() | |||
1125 | topFrame = addPage(i18n("View Fonts"),0, | 1131 | topFrame = addPage(i18n("View Fonts"),0, |
1126 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1132 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1127 | 1133 | ||
1128 | topLayout = new QGridLayout(topFrame,7,3); | 1134 | topLayout = new Q3GridLayout(topFrame,7,3); |
1129 | topLayout->setSpacing(1); | 1135 | topLayout->setSpacing(1); |
1130 | topLayout->setMargin(3); | 1136 | topLayout->setMargin(3); |
1131 | 1137 | ||
@@ -1193,10 +1199,10 @@ void KOPrefsDialog::setupFontsTab() | |||
1193 | 1199 | ||
1194 | void KOPrefsDialog::setupColorsTab() | 1200 | void KOPrefsDialog::setupColorsTab() |
1195 | { | 1201 | { |
1196 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1202 | Q3Frame *topFrame = addPage(i18n("Colors"),0,0); |
1197 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1203 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1198 | 1204 | ||
1199 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1205 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
1200 | // topLayout->setSpacing(mSpacingHint); | 1206 | // topLayout->setSpacing(mSpacingHint); |
1201 | // topLayout->setMargin(mMarginHint); | 1207 | // topLayout->setMargin(mMarginHint); |
1202 | 1208 | ||
@@ -1204,9 +1210,9 @@ void KOPrefsDialog::setupColorsTab() | |||
1204 | topLayout->setMargin(3); | 1210 | topLayout->setMargin(3); |
1205 | 1211 | ||
1206 | int ii = 1; | 1212 | int ii = 1; |
1207 | QGroupBox *categoryGroup ; | 1213 | Q3GroupBox *categoryGroup ; |
1208 | 1214 | ||
1209 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1215 | categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), |
1210 | topFrame); | 1216 | topFrame); |
1211 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1217 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1212 | 1218 | ||
@@ -1250,7 +1256,7 @@ void KOPrefsDialog::setupColorsTab() | |||
1250 | topFrame = addPage(i18n("Colors") +" 2",0,0); | 1256 | topFrame = addPage(i18n("Colors") +" 2",0,0); |
1251 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1257 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1252 | 1258 | ||
1253 | topLayout = new QGridLayout(topFrame,5,2); | 1259 | topLayout = new Q3GridLayout(topFrame,5,2); |
1254 | // topLayout->setSpacing(mSpacingHint); | 1260 | // topLayout->setSpacing(mSpacingHint); |
1255 | // topLayout->setMargin(mMarginHint); | 1261 | // topLayout->setMargin(mMarginHint); |
1256 | 1262 | ||
@@ -1317,7 +1323,7 @@ void KOPrefsDialog::setupPrinterTab() | |||
1317 | mPrinterTab = addPage(i18n("Printing"),0, | 1323 | mPrinterTab = addPage(i18n("Printing"),0, |
1318 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1324 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1319 | 1325 | ||
1320 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1326 | Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); |
1321 | topLayout->setSpacing(mSpacingHint); | 1327 | topLayout->setSpacing(mSpacingHint); |
1322 | topLayout->setMargin(mMarginHint); | 1328 | topLayout->setMargin(mMarginHint); |
1323 | 1329 | ||
@@ -1327,10 +1333,10 @@ void KOPrefsDialog::setupPrinterTab() | |||
1327 | void KOPrefsDialog::setupGroupSchedulingTab() | 1333 | void KOPrefsDialog::setupGroupSchedulingTab() |
1328 | { | 1334 | { |
1329 | #if 0 | 1335 | #if 0 |
1330 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1336 | Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, |
1331 | DesktopIcon("personal",KIcon::SizeMedium)); | 1337 | DesktopIcon("personal",KIcon::SizeMedium)); |
1332 | 1338 | ||
1333 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1339 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
1334 | topLayout->setSpacing(mSpacingHint); | 1340 | topLayout->setSpacing(mSpacingHint); |
1335 | topLayout->setMargin(mMarginHint); | 1341 | topLayout->setMargin(mMarginHint); |
1336 | 1342 | ||
@@ -1353,7 +1359,7 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
1353 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1359 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1354 | 1360 | ||
1355 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1361 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1356 | mAMails = new QListView(topFrame); | 1362 | mAMails = new Q3ListView(topFrame); |
1357 | mAMails->addColumn(i18n("Email"),300); | 1363 | mAMails->addColumn(i18n("Email"),300); |
1358 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1364 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1359 | 1365 | ||
@@ -1371,17 +1377,17 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
1371 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1377 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1372 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1378 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1373 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1379 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1374 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1380 | connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); |
1375 | #endif | 1381 | #endif |
1376 | } | 1382 | } |
1377 | 1383 | ||
1378 | void KOPrefsDialog::setupGroupAutomationTab() | 1384 | void KOPrefsDialog::setupGroupAutomationTab() |
1379 | { | 1385 | { |
1380 | return; | 1386 | return; |
1381 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1387 | Q3Frame *topFrame = addPage(i18n("Group Automation"),0, |
1382 | DesktopIcon("personal",KIcon::SizeMedium)); | 1388 | DesktopIcon("personal",KIcon::SizeMedium)); |
1383 | 1389 | ||
1384 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1390 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); |
1385 | topLayout->setSpacing(mSpacingHint); | 1391 | topLayout->setSpacing(mSpacingHint); |
1386 | topLayout->setMargin(mMarginHint); | 1392 | topLayout->setMargin(mMarginHint); |
1387 | 1393 | ||
@@ -1515,7 +1521,7 @@ void KOPrefsDialog::usrWriteConfig() | |||
1515 | ++iii; | 1521 | ++iii; |
1516 | } | 1522 | } |
1517 | } | 1523 | } |
1518 | QDictIterator<QColor> it(mCategoryDict); | 1524 | Q3DictIterator<QColor> it(mCategoryDict); |
1519 | while (it.current()) { | 1525 | while (it.current()) { |
1520 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1526 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1521 | ++it; | 1527 | ++it; |