summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp149
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
@@ -22,26 +22,31 @@
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>
@@ -110,11 +115,11 @@ void KOPrefsDialog::setupGlobalTab()
110 115
111} 116}
112void KOPrefsDialog::setupMainTab() 117void 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
@@ -135,11 +140,11 @@ void KOPrefsDialog::setupMainTab()
135} 140}
136 141
137void KOPrefsDialog::setupMailTab() 142void 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"),
@@ -181,12 +186,12 @@ void KOPrefsDialog::setupMailTab()
181} 186}
182void KOPrefsDialog::setupFontsTab() 187void 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;
@@ -237,10 +242,10 @@ void KOPrefsDialog::usrWriteConfig()
237 242
238#if 0 243#if 0
239void KOPrefsDialog::setupLocaleDateTab() 244void KOPrefsDialog::setupLocaleDateTab()
240{ 245{
241QFrame *topFrame = addPage(i18n("Date Format"),0,0); 246Q3Frame *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
@@ -291,10 +296,10 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
291} 296}
292 297
293void KOPrefsDialog::setupLocaleTab() 298void 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 =
@@ -330,9 +335,9 @@ void KOPrefsDialog::setupLocaleTab()
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() );
@@ -360,11 +365,11 @@ void KOPrefsDialog::showSyncPage()
360void KOPrefsDialog::setupSyncAlgTab() 365void 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
@@ -402,10 +407,10 @@ void KOPrefsDialog::setupSyncAlgTab()
402void KOPrefsDialog::setupSyncTab() 407void 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;
@@ -450,12 +455,12 @@ void KOPrefsDialog::setupSyncTab()
450} 455}
451 456
452void KOPrefsDialog::setupMainTab() 457void 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 =
@@ -474,13 +479,13 @@ void KOPrefsDialog::setupMainTab()
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)"),
@@ -490,23 +495,23 @@ void KOPrefsDialog::setupMainTab()
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
@@ -528,9 +533,9 @@ void KOPrefsDialog::setupMainTab()
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);
@@ -619,16 +624,16 @@ void KOPrefsDialog::setupMainTab()
619 624
620 625
621void KOPrefsDialog::setupTimeTab() 626void 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);
@@ -657,24 +662,24 @@ void KOPrefsDialog::setupTimeTab()
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
@@ -692,12 +697,12 @@ void KOPrefsDialog::setupTimeTab()
692 697
693void KOPrefsDialog::setupViewsTab() 698void 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;
@@ -784,9 +789,9 @@ void KOPrefsDialog::setupViewsTab()
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
@@ -837,14 +842,14 @@ void KOPrefsDialog::setupViewsTab()
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++;
@@ -864,9 +869,9 @@ void KOPrefsDialog::setupViewsTab()
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++;
@@ -932,9 +937,9 @@ void KOPrefsDialog::setupViewsTab()
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
@@ -964,17 +969,17 @@ void KOPrefsDialog::setupViewsTab()
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());
@@ -996,9 +1001,9 @@ void KOPrefsDialog::setupViewsTab()
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
@@ -1009,30 +1014,30 @@ void KOPrefsDialog::setupViewsTab()
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
@@ -1041,9 +1046,9 @@ void KOPrefsDialog::setupViewsTab()
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 )
@@ -1081,12 +1086,12 @@ void KOPrefsDialog::selectSoundFile()
1081} 1086}
1082void KOPrefsDialog::setupFontsTab() 1087void 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;
@@ -1151,9 +1156,9 @@ void KOPrefsDialog::setupFontsTab()
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 =
@@ -1219,22 +1224,22 @@ void KOPrefsDialog::setupFontsTab()
1219} 1224}
1220 1225
1221void KOPrefsDialog::setupColorsTab() 1226void 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);
@@ -1325,9 +1330,9 @@ 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);
@@ -1335,12 +1340,12 @@ void KOPrefsDialog::setupPrinterTab()
1335 1340
1336void KOPrefsDialog::setupGroupSchedulingTab() 1341void 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
@@ -1361,9 +1366,9 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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);
@@ -1379,19 +1384,19 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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
1387void KOPrefsDialog::setupGroupAutomationTab() 1392void 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 =
@@ -1542,9 +1547,9 @@ void KOPrefsDialog::usrWriteConfig()
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 }
@@ -1682,16 +1687,16 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
1682} 1687}
1683 1688
1684void KOPrefsDialog::setupTimeZoneTab() 1689void 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 );