summaryrefslogtreecommitdiffabout
path: root/korganizer
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp148
-rw-r--r--korganizer/calendarview.h32
-rw-r--r--korganizer/calprintbase.cpp102
-rw-r--r--korganizer/calprinter.cpp23
-rw-r--r--korganizer/calprinter.h18
-rw-r--r--korganizer/calprintplugins.cpp4
-rw-r--r--korganizer/cellitem.cpp14
-rw-r--r--korganizer/cellitem.h4
-rw-r--r--korganizer/datenavigatorcontainer.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.h5
-rw-r--r--korganizer/filteredit_base.cpp40
-rw-r--r--korganizer/filteredit_base.h42
-rw-r--r--korganizer/filtereditdialog.cpp11
-rw-r--r--korganizer/filtereditdialog.h6
-rw-r--r--korganizer/incomingdialog.cpp30
-rw-r--r--korganizer/incomingdialog.h10
-rw-r--r--korganizer/incomingdialog_base.cpp14
-rw-r--r--korganizer/incomingdialog_base.h22
-rw-r--r--korganizer/interfaces/korganizer/baseview.h8
-rw-r--r--korganizer/interfaces/korganizer/calendarviewbase.h4
-rw-r--r--korganizer/journalentry.cpp39
-rw-r--r--korganizer/journalentry.h9
-rw-r--r--korganizer/kdatenavigator.cpp20
-rw-r--r--korganizer/kdatenavigator.h11
-rw-r--r--korganizer/koagenda.cpp169
-rw-r--r--korganizer/koagenda.h43
-rw-r--r--korganizer/koagendaitem.cpp70
-rw-r--r--korganizer/koagendaitem.h17
-rw-r--r--korganizer/koagendaview.cpp78
-rw-r--r--korganizer/koagendaview.h52
-rw-r--r--korganizer/kocounterdialog.h2
-rw-r--r--korganizer/kodaymatrix.cpp47
-rw-r--r--korganizer/kodaymatrix.h14
-rw-r--r--korganizer/kodialogmanager.cpp8
-rw-r--r--korganizer/kodialogmanager.h4
-rw-r--r--korganizer/koeditordetails.cpp38
-rw-r--r--korganizer/koeditordetails.h12
-rw-r--r--korganizer/koeditorgeneral.cpp39
-rw-r--r--korganizer/koeditorgeneral.h21
-rw-r--r--korganizer/koeditorgeneralevent.cpp32
-rw-r--r--korganizer/koeditorgeneralevent.h12
-rw-r--r--korganizer/koeditorgeneraltodo.cpp39
-rw-r--r--korganizer/koeditorgeneraltodo.h16
-rw-r--r--korganizer/koeditorrecurrence.cpp94
-rw-r--r--korganizer/koeditorrecurrence.h30
-rw-r--r--korganizer/koeventeditor.cpp43
-rw-r--r--korganizer/koeventpopupmenu.cpp17
-rw-r--r--korganizer/koeventpopupmenu.h16
-rw-r--r--korganizer/koeventview.cpp4
-rw-r--r--korganizer/koeventview.h4
-rw-r--r--korganizer/koeventviewer.cpp37
-rw-r--r--korganizer/koeventviewer.h17
-rw-r--r--korganizer/koeventviewerdialog.cpp5
-rw-r--r--korganizer/koeventviewerdialog.h5
-rw-r--r--korganizer/kofilterview.cpp48
-rw-r--r--korganizer/kofilterview.h36
-rw-r--r--korganizer/koimportoldialog.cpp30
-rw-r--r--korganizer/koimportoldialog.h4
-rw-r--r--korganizer/koincidenceeditor.cpp10
-rw-r--r--korganizer/kojournalview.cpp36
-rw-r--r--korganizer/kojournalview.h15
-rw-r--r--korganizer/kolistview.cpp193
-rw-r--r--korganizer/kolistview.h42
-rw-r--r--korganizer/komonthview.cpp218
-rw-r--r--korganizer/komonthview.h57
-rw-r--r--korganizer/koprefs.cpp8
-rw-r--r--korganizer/koprefs.h11
-rw-r--r--korganizer/koprefsdialog.cpp138
-rw-r--r--korganizer/koprefsdialog.h12
-rw-r--r--korganizer/korganizer.pro57
-rw-r--r--korganizer/korganizerE.pro6
-rw-r--r--korganizer/kotimespanview.cpp20
-rw-r--r--korganizer/kotimespanview.h6
-rw-r--r--korganizer/kotodoeditor.cpp43
-rw-r--r--korganizer/kotodoview.cpp198
-rw-r--r--korganizer/kotodoview.h58
-rw-r--r--korganizer/kotodoviewitem.cpp42
-rw-r--r--korganizer/kotodoviewitem.h14
-rw-r--r--korganizer/koviewmanager.cpp8
-rw-r--r--korganizer/kowhatsnextview.cpp38
-rw-r--r--korganizer/kowhatsnextview.h20
-rw-r--r--korganizer/ktimeedit.cpp89
-rw-r--r--korganizer/ktimeedit.h7
-rw-r--r--korganizer/lineview.cpp2
-rw-r--r--korganizer/lineview.h8
-rw-r--r--korganizer/main.cpp10
-rw-r--r--korganizer/mainwindow.cpp316
-rw-r--r--korganizer/mainwindow.h68
-rw-r--r--korganizer/navigatorbar.cpp29
-rw-r--r--korganizer/navigatorbar.h7
-rw-r--r--korganizer/outgoingdialog.cpp28
-rw-r--r--korganizer/outgoingdialog.h10
-rw-r--r--korganizer/outgoingdialog_base.cpp18
-rw-r--r--korganizer/outgoingdialog_base.h22
-rw-r--r--korganizer/publishdialog.cpp18
-rw-r--r--korganizer/publishdialog.h4
-rw-r--r--korganizer/publishdialog_base.cpp27
-rw-r--r--korganizer/publishdialog_base.h28
-rw-r--r--korganizer/savetemplatedialog.cpp7
-rw-r--r--korganizer/searchdialog.cpp43
-rw-r--r--korganizer/searchdialog.h16
-rw-r--r--korganizer/statusdialog.cpp9
-rw-r--r--korganizer/timeline.cpp6
-rw-r--r--korganizer/timeline.h4
-rw-r--r--korganizer/timespanview.cpp22
-rw-r--r--korganizer/timespanview.h10
106 files changed, 2091 insertions, 1688 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8385bcc..c1a2f76 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -32,22 +32,28 @@
32 32
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qradiobutton.h> 34#include <qradiobutton.h>
35#include <qbuttongroup.h> 35#include <q3buttongroup.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qclipboard.h> 37#include <qclipboard.h>
38#include <qcursor.h> 38#include <qcursor.h>
39#include <qmessagebox.h> 39#include <qmessagebox.h>
40#include <qprogressbar.h> 40#include <q3progressbar.h>
41#include <qmultilineedit.h> 41#include <q3multilineedit.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qwidgetstack.h> 43#include <q3widgetstack.h>
44#include <qptrlist.h> 44#include <q3ptrlist.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qgroupbox.h> 46#include <q3groupbox.h>
47#include <qfile.h> 47#include <qfile.h>
48#include <qdir.h> 48#include <qdir.h>
49#ifndef KORG_NOSPLITTER 49#ifndef KORG_NOSPLITTER
50#include <qsplitter.h> 50#include <qsplitter.h>
51//Added by qt3to4:
52#include <Q3VBoxLayout>
53#include <QKeyEvent>
54#include <Q3Frame>
55#include <QLabel>
56#include <Q3ValueList>
51#endif 57#endif
52 58
53#include <kglobal.h> 59#include <kglobal.h>
@@ -128,7 +134,7 @@
128#include <stdio.h> 134#include <stdio.h>
129#include <unistd.h> 135#include <unistd.h>
130#else 136#else
131#include <qprocess.h> 137#include <q3process.h>
132#endif 138#endif
133 139
134#ifdef DESKTOP_VERSION 140#ifdef DESKTOP_VERSION
@@ -140,7 +146,7 @@ extern int globalFlagBlockAgenda;
140extern int globalFlagBlockStartup; 146extern int globalFlagBlockStartup;
141 147
142 148
143MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) 149MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms,QDateTime start ) : Q3TextBrowser(parent)
144 150
145{ 151{
146 mAlarms = alarms; 152 mAlarms = alarms;
@@ -277,13 +283,13 @@ class KOBeamPrefs : public QDialog
277 QDialog( parent, name, true ) 283 QDialog( parent, name, true )
278 { 284 {
279 setCaption( i18n("Beam Options") ); 285 setCaption( i18n("Beam Options") );
280 QVBoxLayout* lay = new QVBoxLayout( this ); 286 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
281 lay->setSpacing( 3 ); 287 lay->setSpacing( 3 );
282 lay->setMargin( 3 ); 288 lay->setMargin( 3 );
283 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 289 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("File format"), this );
284 lay->addWidget( format ); 290 lay->addWidget( format );
285 format->setExclusive ( true ) ; 291 format->setExclusive ( true ) ;
286 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 292 Q3ButtonGroup* time = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Time format"), this );
287 lay->addWidget( time ); time->setExclusive ( true ) ; 293 lay->addWidget( time ); time->setExclusive ( true ) ;
288 vcal = new QRadioButton(" vCalendar ", format ); 294 vcal = new QRadioButton(" vCalendar ", format );
289 ical = new QRadioButton(" iCalendar ", format ); 295 ical = new QRadioButton(" iCalendar ", format );
@@ -312,12 +318,12 @@ class KOCatPrefs : public QDialog
312 QDialog( parent, name, true ) 318 QDialog( parent, name, true )
313 { 319 {
314 setCaption( i18n("Manage new Categories") ); 320 setCaption( i18n("Manage new Categories") );
315 QVBoxLayout* lay = new QVBoxLayout( this ); 321 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
316 lay->setSpacing( 3 ); 322 lay->setSpacing( 3 );
317 lay->setMargin( 3 ); 323 lay->setMargin( 3 );
318 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); 324 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this );
319 lay->addWidget( lab ); 325 lay->addWidget( lab );
320 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 326 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
321 lay->addWidget( format ); 327 lay->addWidget( format );
322 format->setExclusive ( true ) ; 328 format->setExclusive ( true ) ;
323 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 329 addCatBut = new QRadioButton(i18n("Add to category list"), format );
@@ -373,7 +379,7 @@ void CalendarView::init()
373 flag_clearallviewsEventDisplay = false; 379 flag_clearallviewsEventDisplay = false;
374 flag_clearallviewsupdateView = false; 380 flag_clearallviewsupdateView = false;
375 mNextAlarmDateTime = QDateTime::currentDateTime(); 381 mNextAlarmDateTime = QDateTime::currentDateTime();
376 setFocusPolicy (NoFocus ); 382 setFocusPolicy (Qt::NoFocus );
377 mViewerCallerIsSearchDialog = false; 383 mViewerCallerIsSearchDialog = false;
378 mBlockShowDates = false; 384 mBlockShowDates = false;
379 mConflictingEvent = 0; 385 mConflictingEvent = 0;
@@ -394,7 +400,7 @@ void CalendarView::init()
394 mStorage = new FileStorage( mCalendar ); 400 mStorage = new FileStorage( mCalendar );
395 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 401 mNavigator = new DateNavigator( this, "datevav", mViewManager );
396 402
397 QBoxLayout *topLayout = (QBoxLayout*)layout(); 403 Q3BoxLayout *topLayout = (Q3BoxLayout*)layout();
398#ifndef KORG_NOSPLITTER 404#ifndef KORG_NOSPLITTER
399 // create the main layout frames. 405 // create the main layout frames.
400 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 406 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
@@ -425,9 +431,9 @@ void CalendarView::init()
425 } 431 }
426#endif 432#endif
427 QWidget *rightBox = new QWidget( mPanner ); 433 QWidget *rightBox = new QWidget( mPanner );
428 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 434 Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
429 435
430 mRightFrame = new QWidgetStack( rightBox ); 436 mRightFrame = new Q3WidgetStack( rightBox );
431 rightLayout->addWidget( mRightFrame, 1 ); 437 rightLayout->addWidget( mRightFrame, 1 );
432 438
433 mLeftFrame = mLeftSplitter; 439 mLeftFrame = mLeftSplitter;
@@ -454,7 +460,7 @@ void CalendarView::init()
454 //QBoxLayout * leftFrameLayout; 460 //QBoxLayout * leftFrameLayout;
455 topLayout->addWidget( mMainFrame ); 461 topLayout->addWidget( mMainFrame );
456#ifdef DESKTOP_VERSION 462#ifdef DESKTOP_VERSION
457 mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); 463 mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,Qt::Horizontal, this );
458 topLayout->addWidget( mDateScrollBar ); 464 topLayout->addWidget( mDateScrollBar );
459 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); 465 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
460 if ( QApplication::desktop()->width() < 800 ) 466 if ( QApplication::desktop()->width() < 800 )
@@ -501,8 +507,8 @@ void CalendarView::init()
501 mCalEditView->hide(); 507 mCalEditView->hide();
502 QWidget *rightBox = new QWidget( mMainFrame ); 508 QWidget *rightBox = new QWidget( mMainFrame );
503 //mainBoxLayout->addWidget ( rightBox, 10 ); 509 //mainBoxLayout->addWidget ( rightBox, 10 );
504 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 510 Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
505 mRightFrame = new QWidgetStack( rightBox ); 511 mRightFrame = new Q3WidgetStack( rightBox );
506 rightLayout->addWidget( mRightFrame, 10 ); 512 rightLayout->addWidget( mRightFrame, 10 );
507 513
508 //mLeftFrame = (QWidget *)leftFrame; 514 //mLeftFrame = (QWidget *)leftFrame;
@@ -616,9 +622,9 @@ void CalendarView::init()
616 622
617 // kdDebug() << "CalendarView::CalendarView() done" << endl; 623 // kdDebug() << "CalendarView::CalendarView() done" << endl;
618 624
619 mDateFrame = new QVBox(0,0,WType_Popup); 625 mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
620 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 626 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
621 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 627 mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
622 mDateFrame->setLineWidth(3); 628 mDateFrame->setLineWidth(3);
623 mDateFrame->hide(); 629 mDateFrame->hide();
624 mDateFrame->setCaption( i18n( "Pick a date to display")); 630 mDateFrame->setCaption( i18n( "Pick a date to display"));
@@ -669,7 +675,7 @@ void CalendarView::nextConflict( bool all, bool allday )
669{ 675{
670 if ( flag_blockConflict ) return; 676 if ( flag_blockConflict ) return;
671 flag_blockConflict = true; 677 flag_blockConflict = true;
672 QPtrList<Event> testlist = mCalendar->events(); 678 Q3PtrList<Event> testlist = mCalendar->events();
673 Event * test = testlist.first(); 679 Event * test = testlist.first();
674 while ( test ) { 680 while ( test ) {
675 test->setTagged( false ); 681 test->setTagged( false );
@@ -685,7 +691,7 @@ void CalendarView::nextConflict( bool all, bool allday )
685 bool found = false; 691 bool found = false;
686 Event * cE = 0; 692 Event * cE = 0;
687 Event * cE2 = 0; 693 Event * cE2 = 0;
688 QPtrList<Event> testlist2 = testlist; 694 Q3PtrList<Event> testlist2 = testlist;
689 test = testlist.first(); 695 test = testlist.first();
690 bool skip = false; 696 bool skip = false;
691 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); 697 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") );
@@ -835,7 +841,7 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
835void CalendarView::checkFiles() 841void CalendarView::checkFiles()
836{ 842{
837 QString message; 843 QString message;
838 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 844 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
839 KopiCalendarFile * cal = calendars.first(); 845 KopiCalendarFile * cal = calendars.first();
840 while ( cal ) { 846 while ( cal ) {
841 if ( cal->mErrorOnLoad ) { 847 if ( cal->mErrorOnLoad ) {
@@ -857,7 +863,7 @@ void CalendarView::checkAlarms()
857 KConfig *config = KOGlobals::config(); 863 KConfig *config = KOGlobals::config();
858 config->setGroup( "AppRun" ); 864 config->setGroup( "AppRun" );
859 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 865 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
860 int daysto = dt.daysTo( QDate::currentDate() ); 866 int daysto = dt.daysTo( (QDateTime)QDate::currentDate() );
861 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 867 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
862 dt = dt.addDays( days ); 868 dt = dt.addDays( days );
863 int secto = dt.secsTo( QDateTime::currentDateTime() ); 869 int secto = dt.secsTo( QDateTime::currentDateTime() );
@@ -867,8 +873,8 @@ void CalendarView::checkAlarms()
867 QDateTime latest = dt.addSecs ( secs ); 873 QDateTime latest = dt.addSecs ( secs );
868 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 874 qDebug("KO: Last termination on %s ", latest.toString().latin1());
869 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 875 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
870 QPtrList<Incidence> el = mCalendar->rawIncidences(); 876 Q3PtrList<Incidence> el = mCalendar->rawIncidences();
871 QPtrList<Incidence> al; 877 Q3PtrList<Incidence> al;
872 Incidence* inL = el.first(); 878 Incidence* inL = el.first();
873 QDateTime cur = QDateTime::currentDateTime().addSecs(-59); 879 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
874 qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); 880 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
@@ -886,9 +892,9 @@ void CalendarView::checkAlarms()
886 inL = el.next(); 892 inL = el.next();
887 } 893 }
888 if ( al.count() ) { 894 if ( al.count() ) {
889 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); 895 QDialog* dia = new QDialog( this, "huhu", false, Qt::WDestructiveClose | Qt::WStyle_StaysOnTop );
890 dia->setCaption( i18n("KO/Pi: Missing alarms!") ); 896 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
891 QVBoxLayout* lay = new QVBoxLayout( dia ); 897 Q3VBoxLayout* lay = new Q3VBoxLayout( dia );
892 lay->setSpacing( 0 ); 898 lay->setSpacing( 0 );
893 lay->setMargin( 0 ); 899 lay->setMargin( 0 );
894 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 900 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
@@ -1216,7 +1222,7 @@ void CalendarView::computeAlarm( QString msg )
1216 return; 1222 return;
1217 } 1223 }
1218#else 1224#else
1219 QProcess* p = new QProcess(); 1225 Q3Process* p = new Q3Process();
1220 p->addArgument( tempfilename.latin1() ); 1226 p->addArgument( tempfilename.latin1() );
1221 p->start(); 1227 p->start();
1222 return; 1228 return;
@@ -1266,10 +1272,10 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
1266 //qDebug("nextsuspendalarm = \n%s ",mess.latin1() ); 1272 //qDebug("nextsuspendalarm = \n%s ",mess.latin1() );
1267 QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; 1273 QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm";
1268 QFile file( fn ); 1274 QFile file( fn );
1269 if (!file.open( IO_WriteOnly ) ) { 1275 if (!file.open( QIODevice::WriteOnly ) ) {
1270 qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); 1276 qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
1271 } else { 1277 } else {
1272 QTextStream ts( &file ); 1278 Q3TextStream ts( &file );
1273 ts << mess; 1279 ts << mess;
1274 file.close(); 1280 file.close();
1275 } 1281 }
@@ -1294,10 +1300,10 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
1294 //qDebug("nextalarm = \n%s ",mess.latin1() ); 1300 //qDebug("nextalarm = \n%s ",mess.latin1() );
1295 QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; 1301 QString fn = QDir::homeDirPath() + "/.kopi_next_alarm";
1296 QFile file( fn ); 1302 QFile file( fn );
1297 if (!file.open( IO_WriteOnly ) ) { 1303 if (!file.open( QIODevice::WriteOnly ) ) {
1298 qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); 1304 qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
1299 } else { 1305 } else {
1300 QTextStream ts( &file ); 1306 Q3TextStream ts( &file );
1301 ts << mess; 1307 ts << mess;
1302 file.close(); 1308 file.close();
1303 } 1309 }
@@ -1570,7 +1576,7 @@ Event* CalendarView::getLastSyncEvent()
1570 1576
1571// we check, if the to delete event has a id for a profile 1577// we check, if the to delete event has a id for a profile
1572// if yes, we set this id in the profile to delete 1578// if yes, we set this id in the profile to delete
1573void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) 1579void CalendarView::checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete )
1574{ 1580{
1575 if ( lastSync.count() == 0 ) { 1581 if ( lastSync.count() == 0 ) {
1576 //qDebug(" lastSync.count() == 0"); 1582 //qDebug(" lastSync.count() == 0");
@@ -1600,7 +1606,7 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t
1600} 1606}
1601void CalendarView::checkExternalId( Incidence * inc ) 1607void CalendarView::checkExternalId( Incidence * inc )
1602{ 1608{
1603 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; 1609 Q3PtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
1604 checkExternSyncEvent( lastSync, inc ); 1610 checkExternSyncEvent( lastSync, inc );
1605 1611
1606} 1612}
@@ -1624,8 +1630,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1624 Event* eventRSync; 1630 Event* eventRSync;
1625 Event* eventLSync; 1631 Event* eventLSync;
1626 clearAllViews(); 1632 clearAllViews();
1627 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); 1633 Q3PtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
1628 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); 1634 Q3PtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
1629 bool fullDateRange = false; 1635 bool fullDateRange = false;
1630 local->resetTempSyncStat(); 1636 local->resetTempSyncStat();
1631 mLastCalendarSync = QDateTime::currentDateTime(); 1637 mLastCalendarSync = QDateTime::currentDateTime();
@@ -1684,10 +1690,10 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1684 } 1690 }
1685 //qDebug("*************************** "); 1691 //qDebug("*************************** ");
1686 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 1692 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
1687 QPtrList<Incidence> er = remote->rawIncidences(); 1693 Q3PtrList<Incidence> er = remote->rawIncidences();
1688 Incidence* inR = er.first(); 1694 Incidence* inR = er.first();
1689 Incidence* inL; 1695 Incidence* inL;
1690 QProgressBar bar( er.count(),0 ); 1696 Q3ProgressBar bar( er.count(),0 );
1691 bar.setCaption (i18n("Syncing - close to abort!") ); 1697 bar.setCaption (i18n("Syncing - close to abort!") );
1692 1698
1693 // ************** setting up filter ************* 1699 // ************** setting up filter *************
@@ -1831,7 +1837,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1831 } 1837 }
1832 inR = er.next(); 1838 inR = er.next();
1833 } 1839 }
1834 QPtrList<Incidence> el = local->rawIncidences(); 1840 Q3PtrList<Incidence> el = local->rawIncidences();
1835 inL = el.first(); 1841 inL = el.first();
1836 modulo = (el.count()/10)+1; 1842 modulo = (el.count()/10)+1;
1837 bar.setCaption (i18n("Add / remove events") ); 1843 bar.setCaption (i18n("Add / remove events") );
@@ -2048,7 +2054,7 @@ void CalendarView::syncExternal( int mode )
2048 if ( syncOK ) { 2054 if ( syncOK ) {
2049 if ( mSyncManager->mWriteBackFile ) 2055 if ( mSyncManager->mWriteBackFile )
2050 { 2056 {
2051 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 2057 Q3PtrList<Incidence> iL = mCalendar->rawIncidences();
2052 Incidence* inc = iL.first(); 2058 Incidence* inc = iL.first();
2053 if ( phoneFormat ) { 2059 if ( phoneFormat ) {
2054 while ( inc ) { 2060 while ( inc ) {
@@ -2115,7 +2121,7 @@ bool CalendarView::importBday()
2115 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 2121 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
2116 ++count; 2122 ++count;
2117 } 2123 }
2118 QProgressBar bar(count,0 ); 2124 Q3ProgressBar bar(count,0 );
2119 int w = 300; 2125 int w = 300;
2120 if ( QApplication::desktop()->width() < 320 ) 2126 if ( QApplication::desktop()->width() < 320 )
2121 w = 220; 2127 w = 220;
@@ -2186,7 +2192,7 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd
2186 2192
2187 //qDebug("CalView 1 %i", count); 2193 //qDebug("CalView 1 %i", count);
2188 2194
2189 QProgressBar bar(count,0 ); 2195 Q3ProgressBar bar(count,0 );
2190 int w = 300; 2196 int w = 300;
2191 if ( QApplication::desktop()->width() < 320 ) 2197 if ( QApplication::desktop()->width() < 320 )
2192 w = 220; 2198 w = 220;
@@ -2350,7 +2356,7 @@ void CalendarView::setSyncEventsReadOnly()
2350 2356
2351bool CalendarView::loadCalendars() 2357bool CalendarView::loadCalendars()
2352{ 2358{
2353 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2359 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2354 KopiCalendarFile * cal = calendars.first(); 2360 KopiCalendarFile * cal = calendars.first();
2355 mCalendar->setDefaultCalendar( 1 ); 2361 mCalendar->setDefaultCalendar( 1 );
2356 openCalendar( MainWindow::defaultFileName(), false ); 2362 openCalendar( MainWindow::defaultFileName(), false );
@@ -2364,7 +2370,7 @@ bool CalendarView::loadCalendars()
2364} 2370}
2365bool CalendarView::restoreCalendarSettings() 2371bool CalendarView::restoreCalendarSettings()
2366{ 2372{
2367 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2373 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2368 KopiCalendarFile * cal = calendars.first(); 2374 KopiCalendarFile * cal = calendars.first();
2369 while ( cal ) { 2375 while ( cal ) {
2370 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); 2376 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
@@ -2529,7 +2535,7 @@ void CalendarView::watchSavedFile()
2529} 2535}
2530bool CalendarView::checkAllFileVersions() 2536bool CalendarView::checkAllFileVersions()
2531{ 2537{
2532 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2538 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2533 KopiCalendarFile * cal = calendars.first(); 2539 KopiCalendarFile * cal = calendars.first();
2534 mCalendar->setDefaultCalendar( 1 ); 2540 mCalendar->setDefaultCalendar( 1 );
2535 mCalendar->setDefaultCalendarEnabledOnly(); 2541 mCalendar->setDefaultCalendarEnabledOnly();
@@ -2591,7 +2597,7 @@ bool CalendarView::checkFileVersion(QString fn)
2591} 2597}
2592bool CalendarView::saveCalendars() 2598bool CalendarView::saveCalendars()
2593{ 2599{
2594 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2600 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2595 KopiCalendarFile * cal = calendars.first(); 2601 KopiCalendarFile * cal = calendars.first();
2596 mCalendar->setDefaultCalendar( 1 ); 2602 mCalendar->setDefaultCalendar( 1 );
2597 mCalendar->setDefaultCalendarEnabledOnly(); 2603 mCalendar->setDefaultCalendarEnabledOnly();
@@ -2695,7 +2701,7 @@ void CalendarView::readSettings()
2695#ifndef KORG_NOSPLITTER 2701#ifndef KORG_NOSPLITTER
2696 config->setGroup("KOrganizer Geometry"); 2702 config->setGroup("KOrganizer Geometry");
2697 2703
2698 QValueList<int> sizes = config->readIntListEntry("Separator1"); 2704 Q3ValueList<int> sizes = config->readIntListEntry("Separator1");
2699 if (sizes.count() != 2) { 2705 if (sizes.count() != 2) {
2700 sizes << mDateNavigator->minimumSizeHint().width(); 2706 sizes << mDateNavigator->minimumSizeHint().width();
2701 sizes << 300; 2707 sizes << 300;
@@ -2763,7 +2769,7 @@ void CalendarView::readSettings()
2763 config->setGroup( "Views" ); 2769 config->setGroup( "Views" );
2764 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 2770 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
2765 2771
2766 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); 2772 Q3ValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
2767 2773
2768 int resetval = 0; 2774 int resetval = 0;
2769 int maxVal = 0; 2775 int maxVal = 0;
@@ -2842,7 +2848,7 @@ void CalendarView::writeSettings()
2842 writeFilterSettings(config); 2848 writeFilterSettings(config);
2843 config->setGroup( "AppRun" ); 2849 config->setGroup( "AppRun" );
2844 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 2850 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
2845 int days = dt.daysTo( QDate::currentDate() ); 2851 int days = dt.daysTo( (QDateTime)QDate::currentDate() );
2846 dt = dt.addDays( days ); 2852 dt = dt.addDays( days );
2847 int secs = dt.secsTo( QDateTime::currentDateTime() ); 2853 int secs = dt.secsTo( QDateTime::currentDateTime() );
2848 config->writeEntry( "LatestProgramStopDays", days ); 2854 config->writeEntry( "LatestProgramStopDays", days );
@@ -2869,9 +2875,9 @@ void CalendarView::writeSettings()
2869 2875
2870#endif 2876#endif
2871 2877
2872 QValueList<int> listINT = mLeftFrame->sizes(); 2878 Q3ValueList<int> listINT = mLeftFrame->sizes();
2873 config->writeEntry("Left Splitter Frame",listINT); 2879 config->writeEntry("Left Splitter Frame",listINT);
2874 QValueList<int> listINT2 = mMainFrame->sizes(); 2880 Q3ValueList<int> listINT2 = mMainFrame->sizes();
2875 config->writeEntry("Main Splitter Frame",listINT2); 2881 config->writeEntry("Main Splitter Frame",listINT2);
2876#ifdef DESKTOP_VERSION 2882#ifdef DESKTOP_VERSION
2877 config->setGroup("WidgetLayout"); 2883 config->setGroup("WidgetLayout");
@@ -3166,7 +3172,7 @@ void CalendarView::checkConflictForEvent()
3166 return; 3172 return;
3167 } 3173 }
3168 } 3174 }
3169 QPtrList<Event> testlist = mCalendar->events(); 3175 Q3PtrList<Event> testlist = mCalendar->events();
3170 Event * test = testlist.first(); 3176 Event * test = testlist.first();
3171 QDateTime conflict; 3177 QDateTime conflict;
3172 QDateTime retVal; 3178 QDateTime retVal;
@@ -3428,7 +3434,7 @@ void CalendarView::slotSelectPickerDate( QDate d)
3428 3434
3429void CalendarView::removeCategories() 3435void CalendarView::removeCategories()
3430{ 3436{
3431 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 3437 Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
3432 QStringList catList = KOPrefs::instance()->mCustomCategories; 3438 QStringList catList = KOPrefs::instance()->mCustomCategories;
3433 QStringList catIncList; 3439 QStringList catIncList;
3434 QStringList newCatList; 3440 QStringList newCatList;
@@ -3449,7 +3455,7 @@ void CalendarView::removeCategories()
3449 3455
3450int CalendarView::addCategories() 3456int CalendarView::addCategories()
3451{ 3457{
3452 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 3458 Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
3453 QStringList catList = KOPrefs::instance()->mCustomCategories; 3459 QStringList catList = KOPrefs::instance()->mCustomCategories;
3454 QStringList catIncList; 3460 QStringList catIncList;
3455 Incidence* inc = incList.first(); 3461 Incidence* inc = incList.first();
@@ -3507,23 +3513,23 @@ void CalendarView::manageCategories()
3507 3513
3508void CalendarView::beamIncidence(Incidence * Inc) 3514void CalendarView::beamIncidence(Incidence * Inc)
3509{ 3515{
3510 QPtrList<Incidence> delSel ; 3516 Q3PtrList<Incidence> delSel ;
3511 delSel.append(Inc); 3517 delSel.append(Inc);
3512 beamIncidenceList( delSel ); 3518 beamIncidenceList( delSel );
3513} 3519}
3514void CalendarView::beamCalendar() 3520void CalendarView::beamCalendar()
3515{ 3521{
3516 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 3522 Q3PtrList<Incidence> delSel = mCalendar->rawIncidences();
3517 //qDebug("beamCalendar() "); 3523 //qDebug("beamCalendar() ");
3518 beamIncidenceList( delSel ); 3524 beamIncidenceList( delSel );
3519} 3525}
3520void CalendarView::beamFilteredCalendar() 3526void CalendarView::beamFilteredCalendar()
3521{ 3527{
3522 QPtrList<Incidence> delSel = mCalendar->incidences(); 3528 Q3PtrList<Incidence> delSel = mCalendar->incidences();
3523 //qDebug("beamFilteredCalendar() "); 3529 //qDebug("beamFilteredCalendar() ");
3524 beamIncidenceList( delSel ); 3530 beamIncidenceList( delSel );
3525} 3531}
3526void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 3532void CalendarView::beamIncidenceList(Q3PtrList<Incidence> delSel )
3527{ 3533{
3528 3534
3529 KOBeamPrefs beamDialog; 3535 KOBeamPrefs beamDialog;
@@ -4315,7 +4321,7 @@ void CalendarView::schedule_publish(Incidence *incidence)
4315 4321
4316 PublishDialog *publishdlg = new PublishDialog(); 4322 PublishDialog *publishdlg = new PublishDialog();
4317 if (incidence->attendeeCount()>0) { 4323 if (incidence->attendeeCount()>0) {
4318 QPtrList<Attendee> attendees = incidence->attendees(); 4324 Q3PtrList<Attendee> attendees = incidence->attendees();
4319 attendees.first(); 4325 attendees.first();
4320 while ( attendees.current()!=0 ) { 4326 while ( attendees.current()!=0 ) {
4321 publishdlg->addAttendee(attendees.current()); 4327 publishdlg->addAttendee(attendees.current());
@@ -4724,7 +4730,7 @@ void CalendarView::showDates(const DateList &selectedDates)
4724 4730
4725} 4731}
4726 4732
4727QPtrList<CalFilter> CalendarView::filters() 4733Q3PtrList<CalFilter> CalendarView::filters()
4728{ 4734{
4729 return mFilters; 4735 return mFilters;
4730 4736
@@ -4765,7 +4771,7 @@ void CalendarView::showFilter(bool visible)
4765 if (visible) { 4771 if (visible) {
4766 mCalEditView->readConfig(); 4772 mCalEditView->readConfig();
4767 mCalEditView->show(); 4773 mCalEditView->show();
4768 QValueList<int> sizes; 4774 Q3ValueList<int> sizes;
4769 sizes = mLeftFrame->sizes(); 4775 sizes = mLeftFrame->sizes();
4770 if ( sizes.count() == 4 && sizes[3] < 20 ) { 4776 if ( sizes.count() == 4 && sizes[3] < 20 ) {
4771 sizes.clear(); 4777 sizes.clear();
@@ -4846,21 +4852,21 @@ void CalendarView::takeOverCalendar()
4846 // TODO: Create Calendar::allIncidences() function and use it here 4852 // TODO: Create Calendar::allIncidences() function and use it here
4847 4853
4848 clearAllViews(); 4854 clearAllViews();
4849 QPtrList<Event> events = mCalendar->events(); 4855 Q3PtrList<Event> events = mCalendar->events();
4850 for(uint i=0; i<events.count(); ++i) { 4856 for(uint i=0; i<events.count(); ++i) {
4851 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 4857 events.at(i)->setOrganizer(KOPrefs::instance()->email());
4852 events.at(i)->recreate(); 4858 events.at(i)->recreate();
4853 events.at(i)->setReadOnly(false); 4859 events.at(i)->setReadOnly(false);
4854 } 4860 }
4855 4861
4856 QPtrList<Todo> todos = mCalendar->todos(); 4862 Q3PtrList<Todo> todos = mCalendar->todos();
4857 for(uint i=0; i<todos.count(); ++i) { 4863 for(uint i=0; i<todos.count(); ++i) {
4858 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 4864 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
4859 todos.at(i)->recreate(); 4865 todos.at(i)->recreate();
4860 todos.at(i)->setReadOnly(false); 4866 todos.at(i)->setReadOnly(false);
4861 } 4867 }
4862 4868
4863 QPtrList<Journal> journals = mCalendar->journals(); 4869 Q3PtrList<Journal> journals = mCalendar->journals();
4864 for(uint i=0; i<journals.count(); ++i) { 4870 for(uint i=0; i<journals.count(); ++i) {
4865 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 4871 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
4866 journals.at(i)->recreate(); 4872 journals.at(i)->recreate();
@@ -4875,7 +4881,7 @@ void CalendarView::showIntro()
4875 kdDebug() << "To be implemented." << endl; 4881 kdDebug() << "To be implemented." << endl;
4876} 4882}
4877 4883
4878QWidgetStack *CalendarView::viewStack() 4884Q3WidgetStack *CalendarView::viewStack()
4879{ 4885{
4880 return mRightFrame; 4886 return mRightFrame;
4881} 4887}
@@ -5060,7 +5066,7 @@ void CalendarView::lookForIncomingMessages()
5060bool CalendarView::removeCompletedSubTodos( Todo* t ) 5066bool CalendarView::removeCompletedSubTodos( Todo* t )
5061{ 5067{
5062 bool deleteTodo = true; 5068 bool deleteTodo = true;
5063 QPtrList<Incidence> subTodos; 5069 Q3PtrList<Incidence> subTodos;
5064 Incidence *aTodo; 5070 Incidence *aTodo;
5065 subTodos = t->relations(); 5071 subTodos = t->relations();
5066 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 5072 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
@@ -5086,8 +5092,8 @@ void CalendarView::purgeCompleted()
5086 5092
5087 if (result == KMessageBox::Continue) { 5093 if (result == KMessageBox::Continue) {
5088 5094
5089 QPtrList<Todo> todoCal; 5095 Q3PtrList<Todo> todoCal;
5090 QPtrList<Todo> rootTodos; 5096 Q3PtrList<Todo> rootTodos;
5091 //QPtrList<Incidence> rel; 5097 //QPtrList<Incidence> rel;
5092 Todo *aTodo; 5098 Todo *aTodo;
5093 todoCal = calendar()->todos(); 5099 todoCal = calendar()->todos();
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 60b1276..b4eada7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -24,13 +24,15 @@
24#ifndef CALENDARVIEW_H 24#ifndef CALENDARVIEW_H
25#define CALENDARVIEW_H 25#define CALENDARVIEW_H
26 26
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qwidget.h> 29#include <qwidget.h>
30#include <qptrlist.h> 30#include <q3ptrlist.h>
31#include <qvbox.h> 31#include <q3vbox.h>
32#include <qmap.h> 32#include <qmap.h>
33#include <qscrollbar.h> 33#include <qscrollbar.h>
34//Added by qt3to4:
35#include <QKeyEvent>
34#ifndef DESKTOP_VERSION 36#ifndef DESKTOP_VERSION
35#include <qtopia/ir.h> 37#include <qtopia/ir.h>
36#else 38#else
@@ -47,7 +49,7 @@
47#include <ksyncmanager.h> 49#include <ksyncmanager.h>
48//#include <koprefs.h> 50//#include <koprefs.h>
49 51
50class QWidgetStack; 52class Q3WidgetStack;
51class QSplitter; 53class QSplitter;
52class KopiCalendarFile; 54class KopiCalendarFile;
53class CalPrinter; 55class CalPrinter;
@@ -84,19 +86,19 @@ using namespace KCal;
84 @author Cornelius Schumacher 86 @author Cornelius Schumacher
85*/ 87*/
86 88
87#include <qtextbrowser.h> 89#include <q3textbrowser.h>
88#include <qtextcodec.h> 90#include <qtextcodec.h>
89 91
90class MissedAlarmTextBrowser : public QTextBrowser { 92class MissedAlarmTextBrowser : public Q3TextBrowser {
91 Q_OBJECT 93 Q_OBJECT
92 public: 94 public:
93 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); 95 MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms ,QDateTime start);
94 ~MissedAlarmTextBrowser(); 96 ~MissedAlarmTextBrowser();
95 void setSource(const QString & n); 97 void setSource(const QString & n);
96 98
97 private: 99 private:
98 Incidence * getNextInc(QDateTime start ); 100 Incidence * getNextInc(QDateTime start );
99 QPtrList<Incidence> mAlarms; 101 Q3PtrList<Incidence> mAlarms;
100 signals: 102 signals:
101 void showIncidence( QString uid); 103 void showIncidence( QString uid);
102}; 104};
@@ -127,7 +129,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
127 QDate startDate(); 129 QDate startDate();
128 QDate endDate(); 130 QDate endDate();
129 131
130 QWidgetStack *viewStack(); 132 Q3WidgetStack *viewStack();
131 QWidget *leftFrame(); 133 QWidget *leftFrame();
132 134
133 DateNavigator *dateNavigator(); 135 DateNavigator *dateNavigator();
@@ -441,7 +443,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
441 443
442 void editFilters(); 444 void editFilters();
443 void toggleFilerEnabled(); 445 void toggleFilerEnabled();
444 QPtrList<CalFilter> filters(); 446 Q3PtrList<CalFilter> filters();
445 void toggleFilter(); 447 void toggleFilter();
446 void showFilter(bool visible); 448 void showFilter(bool visible);
447 void updateFilter(); 449 void updateFilter();
@@ -495,7 +497,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
495 void beamIncidence(Incidence *) ; 497 void beamIncidence(Incidence *) ;
496 void beamCalendar() ; 498 void beamCalendar() ;
497 void beamFilteredCalendar() ; 499 void beamFilteredCalendar() ;
498 void beamIncidenceList(QPtrList<Incidence>) ; 500 void beamIncidenceList(Q3PtrList<Incidence>) ;
499 void manageCategories(); 501 void manageCategories();
500 void editCategories(); 502 void editCategories();
501 int addCategories(); 503 int addCategories();
@@ -575,7 +577,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
575 void setSyncEventsReadOnly(); 577 void setSyncEventsReadOnly();
576 578
577 QDateTime loadedFileVersion; 579 QDateTime loadedFileVersion;
578 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); 580 void checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete );
579 void checkExternalId( Incidence * inc ); 581 void checkExternalId( Incidence * inc );
580 int mGlobalSyncMode; 582 int mGlobalSyncMode;
581 QString mCurrentSyncDevice; 583 QString mCurrentSyncDevice;
@@ -593,10 +595,10 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
593 QSplitter *mPanner; 595 QSplitter *mPanner;
594 QSplitter *mLeftSplitter; 596 QSplitter *mLeftSplitter;
595 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; 597 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame;
596 QWidgetStack *mRightFrame; 598 Q3WidgetStack *mRightFrame;
597 599
598 KDatePicker* mDatePicker; 600 KDatePicker* mDatePicker;
599 QVBox* mDateFrame; 601 Q3VBox* mDateFrame;
600 602
601 DateNavigatorContainer *mDateNavigator; // widget showing small month view. 603 DateNavigatorContainer *mDateNavigator; // widget showing small month view.
602 604
@@ -618,7 +620,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
618 KODialogManager *mDialogManager; 620 KODialogManager *mDialogManager;
619 621
620 // Calendar filters 622 // Calendar filters
621 QPtrList<CalFilter> mFilters; 623 Q3PtrList<CalFilter> mFilters;
622 624
623 // various housekeeping variables. 625 // various housekeeping variables.
624 bool mModified; // flag indicating if calendar is modified 626 bool mModified; // flag indicating if calendar is modified
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp
index 7b7d54c..ecb9e03 100644
--- a/korganizer/calprintbase.cpp
+++ b/korganizer/calprintbase.cpp
@@ -25,11 +25,13 @@
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qframe.h> 28#include <q3frame.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qptrlist.h> 30#include <q3ptrlist.h>
31#include <qintdict.h> 31#include <q3intdict.h>
32#include <qfontmetrics.h> 32#include <qfontmetrics.h>
33//Added by qt3to4:
34#include <Q3VBoxLayout>
33 35
34#include <kglobal.h> 36#include <kglobal.h>
35#include <klocale.h> 37#include <klocale.h>
@@ -145,8 +147,8 @@ CalPrintBase::~CalPrintBase()
145 147
146QWidget *CalPrintBase::configWidget( QWidget *w ) 148QWidget *CalPrintBase::configWidget( QWidget *w )
147{ 149{
148 QFrame *wdg = new QFrame( w ); 150 Q3Frame *wdg = new Q3Frame( w );
149 QVBoxLayout *layout = new QVBoxLayout( wdg ); 151 Q3VBoxLayout *layout = new Q3VBoxLayout( wdg );
150 152
151 QLabel *title = new QLabel( description(), wdg ); 153 QLabel *title = new QLabel( description(), wdg );
152 QFont titleFont( title->font() ); 154 QFont titleFont( title->font() );
@@ -285,7 +287,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
285 p.setFont(QFont("helvetica", 7, QFont::Bold)); 287 p.setFont(QFont("helvetica", 7, QFont::Bold));
286 // int lineSpacing = p.fontMetrics().lineSpacing(); 288 // int lineSpacing = p.fontMetrics().lineSpacing();
287 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); 289 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
288 p.drawText(x, y, width, height/4, AlignCenter, calSys->monthName( qd ) ); 290 p.drawText(x, y, width, height/4, Qt::AlignCenter, calSys->monthName( qd ) );
289 291
290 int cellWidth = width/7; 292 int cellWidth = width/7;
291 int cellHeight = height/8; 293 int cellHeight = height/8;
@@ -301,7 +303,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
301 // tmpStr.sprintf("%c",(const char*)monthDate2.dayName(monthDate2.dayOfWeek())); 303 // tmpStr.sprintf("%c",(const char*)monthDate2.dayName(monthDate2.dayOfWeek()));
302 tmpStr=calSys->weekDayName( monthDate2 )[0].upper(); 304 tmpStr=calSys->weekDayName( monthDate2 )[0].upper();
303 p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight, 305 p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight,
304 AlignCenter, tmpStr); 306 Qt::AlignCenter, tmpStr);
305 monthDate2 = monthDate2.addDays(1); 307 monthDate2 = monthDate2.addDays(1);
306 } 308 }
307 309
@@ -318,7 +320,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
318 } 320 }
319 p.drawText( x+col*cellWidth, 321 p.drawText( x+col*cellWidth,
320 y+height/4+cellHeight+(row*cellHeight), 322 y+height/4+cellHeight+(row*cellHeight),
321 cellWidth, cellHeight, AlignCenter, 323 cellWidth, cellHeight, Qt::AlignCenter,
322 tmpStr.setNum(monthDate.day()) ); 324 tmpStr.setNum(monthDate.day()) );
323 monthDate = monthDate.addDays(1); 325 monthDate = monthDate.addDays(1);
324 } 326 }
@@ -358,7 +360,7 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
358// p.fillRect( x+1, y+1, 360// p.fillRect( x+1, y+1,
359// width-2, height-2, 361// width-2, height-2,
360// QBrush( Dense7Pattern ) ); 362// QBrush( Dense7Pattern ) );
361 p.drawText( x+5, y, width-10, height, AlignCenter | AlignVCenter, 363 p.drawText( x+5, y, width-10, height, Qt::AlignCenter | Qt::AlignVCenter,
362 calSys->weekDayName( qd ) ); 364 calSys->weekDayName( qd ) );
363} 365}
364 366
@@ -401,16 +403,16 @@ void CalPrintBase::drawTimeLine(QPainter &p,
401 p.setFont(QFont("helvetica", 12, QFont::Bold)); 403 p.setFont(QFont("helvetica", 12, QFont::Bold));
402 } 404 }
403 p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight, 405 p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight,
404 AlignTop|AlignRight, numStr); 406 Qt::AlignTop|Qt::AlignRight, numStr);
405 p.setFont(QFont("helvetica", 10, QFont::Normal)); 407 p.setFont(QFont("helvetica", 10, QFont::Normal));
406 p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3, 408 p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3,
407 AlignTop | AlignLeft, "00"); 409 Qt::AlignTop | Qt::AlignLeft, "00");
408 } else { 410 } else {
409 QTime time( curTime.hour(), 0 ); 411 QTime time( curTime.hour(), 0 );
410 numStr = KGlobal::locale()->formatTime( time ); 412 numStr = KGlobal::locale()->formatTime( time );
411 p.setFont(QFont("helvetica", 14, QFont::Bold)); 413 p.setFont(QFont("helvetica", 14, QFont::Bold));
412 p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3, 414 p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3,
413 AlignTop|AlignLeft, numStr); 415 Qt::AlignTop|Qt::AlignLeft, numStr);
414 } 416 }
415 currY+=cellHeight; 417 currY+=cellHeight;
416 } // enough space for half-hour line and time 418 } // enough space for half-hour line and time
@@ -472,7 +474,7 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
472 p.drawRect( x, offset, width, height ); 474 p.drawRect( x, offset, width, height );
473 475
474 p.drawText( x+5, offset+5, width-10, height-10, 476 p.drawText( x+5, offset+5, width-10, height-10,
475 AlignCenter | AlignVCenter | AlignJustify | WordBreak, 477 Qt::AlignCenter | Qt::AlignVCenter | Qt::AlignJustify | Qt::WordBreak,
476 text ); 478 text );
477 // reset the colors 479 // reset the colors
478 p.setBrush( oldBrush ); 480 p.setBrush( oldBrush );
@@ -493,7 +495,7 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
493 if (!multiDayStr.isEmpty()) { 495 if (!multiDayStr.isEmpty()) {
494 // p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) ); 496 // p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) );
495 p.drawText( x+5, offset+5, width-10, height-10, 497 p.drawText( x+5, offset+5, width-10, height-10,
496 AlignLeft | AlignTop | AlignJustify , 498 Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify ,
497 multiDayStr); 499 multiDayStr);
498 } 500 }
499 } else { 501 } else {
@@ -560,7 +562,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
560 // Calculate horizontal positions and widths of events taking into account 562 // Calculate horizontal positions and widths of events taking into account
561 // overlapping events 563 // overlapping events
562 564
563 QPtrList<KOrg::CellItem> cells; 565 Q3PtrList<KOrg::CellItem> cells;
564 cells.setAutoDelete( true ); 566 cells.setAutoDelete( true );
565 567
566 Event::List::ConstIterator itEvents; 568 Event::List::ConstIterator itEvents;
@@ -568,7 +570,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
568 cells.append( new PrintCellItem( *itEvents, qd ) ); 570 cells.append( new PrintCellItem( *itEvents, qd ) );
569 } 571 }
570 572
571 QPtrListIterator<KOrg::CellItem> it1( cells ); 573 Q3PtrListIterator<KOrg::CellItem> it1( cells );
572 for( it1.toFirst(); it1.current(); ++it1 ) { 574 for( it1.toFirst(); it1.current(); ++it1 ) {
573 KOrg::CellItem *placeItem = it1.current(); 575 KOrg::CellItem *placeItem = it1.current();
574 576
@@ -593,7 +595,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
593 p.setBackgroundColor( oldBgColor ); 595 p.setBackgroundColor( oldBgColor );
594 } 596 }
595 597
596 p.setBrush( QBrush( NoBrush ) ); 598 p.setBrush( QBrush( Qt::NoBrush ) );
597} 599}
598 600
599 601
@@ -635,7 +637,7 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
635 p.setPen( pe ); 637 p.setPen( pe );
636 p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 ); 638 p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 );
637 p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3, 639 p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3,
638 AlignLeft | AlignTop | AlignJustify | WordBreak, 640 Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify | Qt::TextWordWrap,
639 text); 641 text);
640 // p.restore(); 642 // p.restore();
641 } 643 }
@@ -670,7 +672,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
670 if (!hstring.isEmpty()) { 672 if (!hstring.isEmpty()) {
671 p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) ); 673 p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) );
672 674
673 p.drawText( x+5, y, width-25, mSubHeaderHeight, AlignLeft | AlignVCenter, 675 p.drawText( x+5, y, width-25, mSubHeaderHeight, Qt::AlignLeft | Qt::AlignVCenter,
674 hstring ); 676 hstring );
675 } 677 }
676 p.setFont(QFont("helvetica", 10, QFont::Bold)); 678 p.setFont(QFont("helvetica", 10, QFont::Bold));
@@ -680,7 +682,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
680 if ( fm.width( dayNumStr ) > width -10 ) 682 if ( fm.width( dayNumStr ) > width -10 )
681 dayNumStr = local->formatDate(qd, true); 683 dayNumStr = local->formatDate(qd, true);
682 } 684 }
683 p.drawText(x+5, y, width-10, mSubHeaderHeight, AlignRight | AlignVCenter, 685 p.drawText(x+5, y, width-10, mSubHeaderHeight, Qt::AlignRight | Qt::AlignVCenter,
684 dayNumStr); 686 dayNumStr);
685 Event::List eventList; 687 Event::List eventList;
686 eventList.fill( mCalendar->events( qd, true )); 688 eventList.fill( mCalendar->events( qd, true ));
@@ -724,7 +726,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
724 } // doesFloat 726 } // doesFloat
725 727
726 p.drawText(x+5, y+textY, width-10, lineSpacing, 728 p.drawText(x+5, y+textY, width-10, lineSpacing,
727 AlignLeft|AlignBottom, outStr); 729 Qt::AlignLeft|Qt::AlignBottom, outStr);
728 textY+=lineSpacing; 730 textY+=lineSpacing;
729 } 731 }
730 732
@@ -743,7 +745,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
743 text += i18n("To-Do: %1").arg(todo->summary()); 745 text += i18n("To-Do: %1").arg(todo->summary());
744 746
745 p.drawText(x+5, y+textY, width-10, lineSpacing, 747 p.drawText(x+5, y+textY, width-10, lineSpacing,
746 AlignLeft|AlignBottom, text); 748 Qt::AlignLeft|Qt::AlignBottom, text);
747 textY+=lineSpacing; 749 textY+=lineSpacing;
748 } 750 }
749 } 751 }
@@ -849,7 +851,7 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers,
849 for (int row = 0; row<rows; row++) { 851 for (int row = 0; row<rows; row++) {
850 int calWeek = weekDate.weekNumber(); 852 int calWeek = weekDate.weekNumber();
851 QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight); 853 QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight);
852 p.drawText( rc, AlignRight|AlignVCenter, QString::number(calWeek) ); 854 p.drawText( rc, Qt::AlignRight|Qt::AlignVCenter, QString::number(calWeek) );
853 weekDate = weekDate.addDays(7); 855 weekDate = weekDate.addDays(7);
854 } 856 }
855 p.setFont(oldFont); 857 p.setFont(oldFont);
@@ -897,7 +899,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
897 TodoParentStart startpt; 899 TodoParentStart startpt;
898 // This list keeps all starting points of the parent todos so the connection 900 // This list keeps all starting points of the parent todos so the connection
899 // lines of the tree can easily be drawn (needed if a new page is started) 901 // lines of the tree can easily be drawn (needed if a new page is started)
900 static QPtrList<TodoParentStart> startPoints; 902 static Q3PtrList<TodoParentStart> startPoints;
901 if (level<1) { 903 if (level<1) {
902 startPoints.clear(); 904 startPoints.clear();
903 } 905 }
@@ -910,12 +912,12 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
910 outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]"; 912 outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]";
911 } 913 }
912 int left = possummary+(level*10); 914 int left = possummary+(level*10);
913 rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr); 915 rect = p.boundingRect(left, y, (posdue-left-5),-1, Qt::WordBreak, outStr);
914 //qDebug("bottom1 %d ", rect.bottom() ); 916 //qDebug("bottom1 %d ", rect.bottom() );
915 if ( !item->description().isEmpty() && desc ) { 917 if ( !item->description().isEmpty() && desc ) {
916 outStr = item->description(); 918 outStr = item->description();
917 rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1, 919 rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1,
918 WordBreak, outStr ); 920 Qt::WordBreak, outStr );
919 } 921 }
920 //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight ); 922 //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight );
921 // if too big make new page 923 // if too big make new page
@@ -933,8 +935,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
933 start = rct->mRect.bottom() + 1; 935 start = rct->mRect.bottom() + 1;
934 else 936 else
935 start = p.viewport().top(); 937 start = p.viewport().top();
936 p.moveTo( center, start ); 938 p.drawLine( center, start, center, to );
937 p.lineTo( center, to );
938 rct->mSamePage=false; 939 rct->mSamePage=false;
939 } 940 }
940 } 941 }
@@ -951,12 +952,12 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
951 952
952 // Priority 953 // Priority
953 outStr.setNum(priority); 954 outStr.setNum(priority);
954 rect = p.boundingRect(pospriority, y + 10, 5, -1, AlignCenter, outStr); 955 rect = p.boundingRect(pospriority, y + 10, 5, -1, Qt::AlignCenter, outStr);
955 // Make it a more reasonable size 956 // Make it a more reasonable size
956 rect.setWidth(19); 957 rect.setWidth(19);
957 rect.setHeight(19); 958 rect.setHeight(19);
958 if ( priority > 0 && pospriority>=0 ) { 959 if ( priority > 0 && pospriority>=0 ) {
959 p.drawText(rect, AlignCenter, outStr); 960 p.drawText(rect, Qt::AlignCenter, outStr);
960 p.drawRect(rect); 961 p.drawRect(rect);
961 // cross out the rectangle for completed items 962 // cross out the rectangle for completed items
962 if ( item->isCompleted() ) { 963 if ( item->isCompleted() ) {
@@ -964,7 +965,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
964 p.drawLine( rect.topRight(), rect.bottomLeft() ); 965 p.drawLine( rect.topRight(), rect.bottomLeft() );
965 } else if (item->cancelled() ) { 966 } else if (item->cancelled() ) {
966 QPen pen = p.pen(); 967 QPen pen = p.pen();
967 p.setPen ( QPen ( black, 2) ); 968 p.setPen ( QPen ( Qt::black, 2) );
968 p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 ); 969 p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 );
969 p.setPen( pen ); 970 p.setPen( pen );
970 } 971 }
@@ -981,9 +982,8 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
981 bottom = 0; 982 bottom = 0;
982 int to( rect.top() + (rect.height()/2)+1 ); 983 int to( rect.top() + (rect.height()/2)+1 );
983 int endx( rect.left() ); 984 int endx( rect.left() );
984 p.moveTo(center, bottom); 985 p.drawLine(center,bottom, center,to);
985 p.lineTo(center, to); 986 p.drawLine(center,to, endx,to);
986 p.lineTo(endx, to);
987 } 987 }
988 988
989 // if completed, use strike out font 989 // if completed, use strike out font
@@ -999,9 +999,9 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
999 outStr += " [" +item->dtDueStr(true)+"]"; 999 outStr += " [" +item->dtDueStr(true)+"]";
1000 } 1000 }
1001 rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)), 1001 rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)),
1002 -1, WordBreak, outStr); 1002 -1, Qt::WordBreak, outStr);
1003 QRect newrect; 1003 QRect newrect;
1004 p.drawText( rect, WordBreak, outStr, -1, &newrect ); 1004 p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
1005 //ft.setStrikeOut(false); 1005 //ft.setStrikeOut(false);
1006 // p.setFont(ft); 1006 // p.setFont(ft);
1007 1007
@@ -1016,8 +1016,8 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
1016 y=newrect.bottom() + 5; 1016 y=newrect.bottom() + 5;
1017 outStr = item->description(); 1017 outStr = item->description();
1018 rect = p.boundingRect( left+20, y, x+width-(left+10), -1, 1018 rect = p.boundingRect( left+20, y, x+width-(left+10), -1,
1019 WordBreak, outStr ); 1019 Qt::WordBreak, outStr );
1020 p.drawText( rect, WordBreak, outStr, -1, &newrect ); 1020 p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
1021 } 1021 }
1022 1022
1023 // Set the new line position 1023 // Set the new line position
@@ -1138,8 +1138,8 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1138 mSubHeaderHeight+= mSubHeaderHeight; 1138 mSubHeaderHeight+= mSubHeaderHeight;
1139 KLocale *local = KGlobal::locale(); 1139 KLocale *local = KGlobal::locale();
1140 QFont font("helvetica", 18, QFont::Bold); 1140 QFont font("helvetica", 18, QFont::Bold);
1141 QPen penA( black,0); 1141 QPen penA( Qt::black,0);
1142 QPen penB( black,3); 1142 QPen penB( Qt::black,3);
1143 p.setFont(font); 1143 p.setFont(font);
1144 int lineSpacing = p.fontMetrics().lineSpacing(); 1144 int lineSpacing = p.fontMetrics().lineSpacing();
1145 QString title; 1145 QString title;
@@ -1161,7 +1161,7 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1161 QFontInfo info(p.font()); 1161 QFontInfo info(p.font());
1162 1162
1163 lineSpacing = p.fontMetrics().lineSpacing(); 1163 lineSpacing = p.fontMetrics().lineSpacing();
1164 p.drawText(0, lineSpacing * 0, width, lineSpacing, AlignRight |AlignTop, title ); 1164 p.drawText(0, lineSpacing * 0, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
1165 1165
1166 title.truncate(0); 1166 title.truncate(0);
1167 1167
@@ -1171,7 +1171,7 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1171 1171
1172 p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE)); 1172 p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE));
1173 title += QString::number(fd.year()); 1173 title += QString::number(fd.year());
1174 p.drawText(0, lineSpacing * 1, width, lineSpacing, AlignRight |AlignTop, title ); 1174 p.drawText(0, lineSpacing * 1, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
1175 mSubHeaderHeight = tempStore ; 1175 mSubHeaderHeight = tempStore ;
1176} 1176}
1177 1177
@@ -1197,7 +1197,7 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
1197 p.setPen( Qt::black); 1197 p.setPen( Qt::black);
1198 p.setFont(QFont("helvetica", 12, QFont::Bold, true)); 1198 p.setFont(QFont("helvetica", 12, QFont::Bold, true));
1199 p.drawText(offsetLeft, mHeaderHeight + 5, 1199 p.drawText(offsetLeft, mHeaderHeight + 5,
1200 width, mSubHeaderHeight, AlignHCenter | AlignVCenter, 1200 width, mSubHeaderHeight, Qt::AlignHCenter | Qt::AlignVCenter,
1201 dayName); 1201 dayName);
1202 1202
1203 p.setPen( QPen(Qt::black,2)); 1203 p.setPen( QPen(Qt::black,2));
@@ -1254,10 +1254,10 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
1254 p.drawRect(offsetLeft+2, 1+offset+startMinuteOff+startTime*cellHeight, 1254 p.drawRect(offsetLeft+2, 1+offset+startMinuteOff+startTime*cellHeight,
1255 width-4, cheight); 1255 width-4, cheight);
1256 p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24, 1256 p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24,
1257 cheight-10, AlignHCenter | AlignTop, text); 1257 cheight-10, Qt::AlignHCenter | Qt::AlignTop, text);
1258 } 1258 }
1259 } 1259 }
1260 p.setBrush(QBrush(NoBrush)); 1260 p.setBrush(QBrush(Qt::NoBrush));
1261 mSubHeaderHeight = tempStore ; 1261 mSubHeaderHeight = tempStore ;
1262} 1262}
1263 1263
@@ -1274,12 +1274,12 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
1274 1274
1275 QString numStr; 1275 QString numStr;
1276 for (int i = 0; i < hours; i++) { 1276 for (int i = 0; i < hours; i++) {
1277 p.setPen(QPen(black,1)); 1277 p.setPen(QPen(Qt::black,1));
1278 p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight); 1278 p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight);
1279 p.setPen(QPen(gray,0)); 1279 p.setPen(QPen(Qt::gray,0));
1280 p.drawLine(37, offset+i*cellHeight+(cellHeight/2), 1280 p.drawLine(37, offset+i*cellHeight+(cellHeight/2),
1281 width, offset+i*cellHeight+(cellHeight/2)); 1281 width, offset+i*cellHeight+(cellHeight/2));
1282 p.setPen(QPen(black,0)); 1282 p.setPen(QPen(Qt::black,0));
1283 1283
1284 if ( !KGlobal::locale()->use12Clock() ) { 1284 if ( !KGlobal::locale()->use12Clock() ) {
1285 numStr.setNum(i+startHour); 1285 numStr.setNum(i+startHour);
@@ -1289,16 +1289,16 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
1289 p.setFont(QFont("helvetica", 14, QFont::Bold)); 1289 p.setFont(QFont("helvetica", 14, QFont::Bold));
1290 } 1290 }
1291 p.drawText(0, offset+i*cellHeight, 33, cellHeight/2, 1291 p.drawText(0, offset+i*cellHeight, 33, cellHeight/2,
1292 AlignTop|AlignRight, numStr); 1292 Qt::AlignTop|Qt::AlignRight, numStr);
1293 p.setFont(QFont("helvetica", 12, QFont::Bold)); 1293 p.setFont(QFont("helvetica", 12, QFont::Bold));
1294 p.drawText(37, offset+i*cellHeight, 45, cellHeight/2, 1294 p.drawText(37, offset+i*cellHeight, 45, cellHeight/2,
1295 AlignTop | AlignLeft, "00"); 1295 Qt::AlignTop | Qt::AlignLeft, "00");
1296 } else { 1296 } else {
1297 QTime time( i + startHour, 0 ); 1297 QTime time( i + startHour, 0 );
1298 numStr = KGlobal::locale()->formatTime( time ); 1298 numStr = KGlobal::locale()->formatTime( time );
1299 p.setFont(QFont("helvetica", 12, QFont::Bold)); 1299 p.setFont(QFont("helvetica", 12, QFont::Bold));
1300 p.drawText(4, offset+i*cellHeight, 70, cellHeight/2, 1300 p.drawText(4, offset+i*cellHeight, 70, cellHeight/2,
1301 AlignTop|AlignLeft, numStr); 1301 Qt::AlignTop|Qt::AlignLeft, numStr);
1302 } 1302 }
1303 } mSubHeaderHeight = tempStore ; 1303 } mSubHeaderHeight = tempStore ;
1304} 1304}
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 0cdf28e..d4bf988 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -21,15 +21,18 @@
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 23
24#include <qvbuttongroup.h> 24// #include <qvbuttongroup.h>
25#include <qwidgetstack.h> 25#include <q3widgetstack.h>
26#include <qradiobutton.h> 26#include <qradiobutton.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qvbox.h> 31#include <q3vbox.h>
32#include <qsplitter.h> 32#include <qsplitter.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3PtrList>
33 36
34#include <kprinter.h> 37#include <kprinter.h>
35#include <kglobal.h> 38#include <kglobal.h>
@@ -174,14 +177,14 @@ void CalPrinter::updateConfig()
174 177
175/****************************************************************************/ 178/****************************************************************************/
176 179
177CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, 180CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
178 QWidget *parent, const char *name ) 181 QWidget *parent, const char *name )
179 : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ), 182 : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ),
180 mPrinter( p ), mPrintPlugins( plugins ) 183 mPrinter( p ), mPrintPlugins( plugins )
181{ 184{
182 QVBox *page = new QVBox(this);//makeVBoxMainWidget(); 185 Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget();
183 setMainWidget( page ); 186 setMainWidget( page );
184 QHBox *printerLayout = new QHBox( page ); 187 Q3HBox *printerLayout = new Q3HBox( page );
185 188
186 mPrinterLabel = new QLabel( printerLayout ); 189 mPrinterLabel = new QLabel( printerLayout );
187 QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."), 190 QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."),
@@ -191,20 +194,20 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
191 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) ); 194 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) );
192 195
193 QSplitter *splitter = new QSplitter( page ); 196 QSplitter *splitter = new QSplitter( page );
194 splitter->setOrientation( QSplitter::Horizontal ); 197 splitter->setOrientation( Qt::Horizontal );
195 198
196 mTypeGroup = new QVButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); 199 mTypeGroup = new Q3VButtonGroup( i18n("View Type"), splitter, "buttonGroup" );
197 // use the minimal width possible = max width of the radio buttons, not extensible 200 // use the minimal width possible = max width of the radio buttons, not extensible
198/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, 201/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4,
199 (QSizePolicy::SizeType)5, 0, 0, 202 (QSizePolicy::SizeType)5, 0, 0,
200 mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/ 203 mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/
201 204
202 QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); 205 QWidget *splitterRight = new QWidget( splitter, "splitterRight" );
203 QGridLayout *splitterRightLayout = new QGridLayout( splitterRight ); 206 Q3GridLayout *splitterRightLayout = new Q3GridLayout( splitterRight );
204 splitterRightLayout->setMargin( marginHint() ); 207 splitterRightLayout->setMargin( marginHint() );
205 splitterRightLayout->setSpacing( spacingHint() ); 208 splitterRightLayout->setSpacing( spacingHint() );
206 209
207 mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" ); 210 mConfigArea = new Q3WidgetStack( splitterRight, "configWidgetStack" );
208 splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); 211 splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 );
209 212
210 QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"), 213 QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"),
diff --git a/korganizer/calprinter.h b/korganizer/calprinter.h
index 7b58f4f..e065779 100644
--- a/korganizer/calprinter.h
+++ b/korganizer/calprinter.h
@@ -1,3 +1,5 @@
1//Added by qt3to4:
2#include <QLabel>
1/* 3/*
2 This file is part of KOrganizer. 4 This file is part of KOrganizer.
3 5
@@ -28,7 +30,7 @@
28 30
29#ifndef KORG_NOPRINTER 31#ifndef KORG_NOPRINTER
30 32
31#include <qptrlist.h> 33#include <q3ptrlist.h>
32 34
33#include <kdialogbase.h> 35#include <kdialogbase.h>
34 36
@@ -38,8 +40,8 @@
38 40
39using namespace KCal; 41using namespace KCal;
40 42
41class QVButtonGroup; 43class Q3VButtonGroup;
42class QWidgetStack; 44class Q3WidgetStack;
43class KPrinter; 45class KPrinter;
44class CalPrintDialog; 46class CalPrintDialog;
45class KConfig; 47class KConfig;
@@ -94,7 +96,7 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase
94 void print( PrintType type, const QDate &fd, const QDate &td ); 96 void print( PrintType type, const QDate &fd, const QDate &td );
95 97
96 protected: 98 protected:
97 QPtrList<CalPrintBase> mPrintPlugins; 99 Q3PtrList<CalPrintBase> mPrintPlugins;
98 100
99 private: 101 private:
100 KPrinter *mPrinter; 102 KPrinter *mPrinter;
@@ -109,7 +111,7 @@ class CalPrintDialog : public KDialogBase
109{ 111{
110 Q_OBJECT 112 Q_OBJECT
111 public: 113 public:
112 CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, 114 CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
113 QWidget *parent = 0, const char *name = 0 ); 115 QWidget *parent = 0, const char *name = 0 );
114 virtual ~CalPrintDialog(); 116 virtual ~CalPrintDialog();
115 CalPrintBase *selectedPlugin(); 117 CalPrintBase *selectedPlugin();
@@ -127,9 +129,9 @@ signals:
127 void okClicked(); 129 void okClicked();
128 private: 130 private:
129 KPrinter *mPrinter; 131 KPrinter *mPrinter;
130 QVButtonGroup *mTypeGroup; 132 Q3VButtonGroup *mTypeGroup;
131 QWidgetStack *mConfigArea; 133 Q3WidgetStack *mConfigArea;
132 QPtrList<CalPrintBase> mPrintPlugins; 134 Q3PtrList<CalPrintBase> mPrintPlugins;
133 QLabel *mPrinterLabel; 135 QLabel *mPrinterLabel;
134 QString mPreviewText; 136 QString mPreviewText;
135 QComboBox *mOrientationSelection; 137 QComboBox *mOrientationSelection;
diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp
index bc35ca4..9b6dc6e 100644
--- a/korganizer/calprintplugins.cpp
+++ b/korganizer/calprintplugins.cpp
@@ -25,11 +25,11 @@
25*/ 25*/
26 26
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qdatetimeedit.h> 28#include <q3datetimeedit.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33 33
34#include <kglobal.h> 34#include <kglobal.h>
35#include <klocale.h> 35#include <klocale.h>
diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp
index 61d06ac..1fd703c 100644
--- a/korganizer/cellitem.cpp
+++ b/korganizer/cellitem.cpp
@@ -27,7 +27,9 @@
27#include <klocale.h> 27#include <klocale.h>
28#include <kdebug.h> 28#include <kdebug.h>
29 29
30#include <qintdict.h> 30#include <q3intdict.h>
31//Added by qt3to4:
32#include <Q3PtrList>
31 33
32using namespace KOrg; 34using namespace KOrg;
33 35
@@ -36,17 +38,17 @@ QString CellItem::label() const
36 return i18n("<undefined>"); 38 return i18n("<undefined>");
37} 39}
38 40
39QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, 41Q3PtrList<CellItem> CellItem::placeItem( Q3PtrList<CellItem> cells,
40 CellItem *placeItem ) 42 CellItem *placeItem )
41{ 43{
42 kdDebug(5855) << "Placing " << placeItem->label() << endl; 44 kdDebug(5855) << "Placing " << placeItem->label() << endl;
43 45
44 QPtrList<KOrg::CellItem> conflictItems; 46 Q3PtrList<KOrg::CellItem> conflictItems;
45 int maxSubCells = 0; 47 int maxSubCells = 0;
46 QIntDict<KOrg::CellItem> subCellDict; 48 Q3IntDict<KOrg::CellItem> subCellDict;
47 49
48 // Find all items which are in same cell 50 // Find all items which are in same cell
49 QPtrListIterator<KOrg::CellItem> it2( cells ); 51 Q3PtrListIterator<KOrg::CellItem> it2( cells );
50 for( it2.toFirst(); it2.current(); ++it2 ) { 52 for( it2.toFirst(); it2.current(); ++it2 ) {
51 KOrg::CellItem *item = it2.current(); 53 KOrg::CellItem *item = it2.current();
52 if ( item == placeItem ) continue; 54 if ( item == placeItem ) continue;
@@ -83,7 +85,7 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
83 conflictItems.append( placeItem ); 85 conflictItems.append( placeItem );
84 placeItem->setSubCells( maxSubCells ); 86 placeItem->setSubCells( maxSubCells );
85 87
86 QPtrListIterator<KOrg::CellItem> it3( conflictItems ); 88 Q3PtrListIterator<KOrg::CellItem> it3( conflictItems );
87 for( it3.toFirst(); it3.current(); ++it3 ) { 89 for( it3.toFirst(); it3.current(); ++it3 ) {
88 (*it3)->setSubCells( maxSubCells ); 90 (*it3)->setSubCells( maxSubCells );
89 } 91 }
diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h
index 72773d0..b917bd5 100644
--- a/korganizer/cellitem.h
+++ b/korganizer/cellitem.h
@@ -25,7 +25,7 @@
25#define KORG_CELLITEM_H 25#define KORG_CELLITEM_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30namespace KOrg { 30namespace KOrg {
31 31
@@ -53,7 +53,7 @@ class CellItem
53 53
54 \return Placed items 54 \return Placed items
55 */ 55 */
56 static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells, 56 static Q3PtrList<CellItem> placeItem( Q3PtrList<CellItem> cells,
57 CellItem *placeItem ); 57 CellItem *placeItem );
58 58
59 private: 59 private:
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index ea510f1..53507d3 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -34,6 +34,8 @@
34 34
35#include "datenavigatorcontainer.h" 35#include "datenavigatorcontainer.h"
36#include "koprefs.h" 36#include "koprefs.h"
37//Added by qt3to4:
38#include <QResizeEvent>
37 39
38DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, 40DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
39 const char *name ) 41 const char *name )
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 87cc59f..75d387c 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -1,3 +1,6 @@
1//Added by qt3to4:
2#include <QResizeEvent>
3#include <Q3PtrList>
1/* 4/*
2 This file is part of KOrganizer. 5 This file is part of KOrganizer.
3 6
@@ -100,7 +103,7 @@ class DateNavigatorContainer: public QWidget
100 103
101 KCal::Calendar *mCalendar; 104 KCal::Calendar *mCalendar;
102 105
103 QPtrList<KDateNavigator> mExtraViews; 106 Q3PtrList<KDateNavigator> mExtraViews;
104 107
105 int mHorizontalCount; 108 int mHorizontalCount;
106 int mVerticalCount; 109 int mVerticalCount;
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 505edf6..9425963 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -11,42 +11,47 @@
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qpushbutton.h> 13#include <qpushbutton.h>
14#include <qframe.h> 14#include <q3frame.h>
15#include <qbuttongroup.h> 15#include <q3buttongroup.h>
16#include <qapplication.h> 16#include <qapplication.h>
17#include <QDesktopWidget>
17#include <qradiobutton.h> 18#include <qradiobutton.h>
18#include <qlistbox.h> 19#include <q3listbox.h>
19#include <qlabel.h> 20#include <qlabel.h>
20#include <qcheckbox.h> 21#include <qcheckbox.h>
21#include <qlayout.h> 22#include <qlayout.h>
22#include <qtooltip.h> 23#include <qtooltip.h>
23#include <qwhatsthis.h> 24#include <q3whatsthis.h>
25//Added by qt3to4:
26#include <Q3GridLayout>
27#include <Q3HBoxLayout>
28#include <Q3VBoxLayout>
24#include "tr.h" 29#include "tr.h"
25 30
26/* 31/*
27 * Constructs a FilterEdit_base as a child of 'parent', with the 32 * Constructs a FilterEdit_base as a child of 'parent', with the
28 * name 'name' and widget flags set to 'f'. 33 * name 'name' and widget flags set to 'f'.
29 */ 34 */
30FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) 35FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, Qt::WFlags fl )
31 : QWidget( parent, name, fl ) 36 : QWidget( parent, name, fl )
32{ 37{
33 if ( !name ) 38 if ( !name )
34 setName( "FilterEdit_base" ); 39 setName( "FilterEdit_base" );
35 FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); 40 FilterEdit_baseLayout = new Q3VBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
36 41
37 mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); 42 mCriteriaFrame = new Q3Frame( this, "mCriteriaFrame" );
38 mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); 43 mCriteriaFrame->setFrameShape( Q3Frame::StyledPanel );
39 mCriteriaFrame->setFrameShadow( QFrame::Raised ); 44 mCriteriaFrame->setFrameShadow( Q3Frame::Raised );
40 mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); 45 mCriteriaFrameLayout = new Q3VBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
41 46
42 ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); 47 ButtonGroup1 = new Q3ButtonGroup( mCriteriaFrame, "ButtonGroup1" );
43 ButtonGroup1->setColumnLayout(0, Qt::Vertical ); 48 ButtonGroup1->setColumnLayout(0, Qt::Vertical );
44 ButtonGroup1->layout()->setSpacing( 6 ); 49 ButtonGroup1->layout()->setSpacing( 6 );
45 ButtonGroup1->layout()->setMargin( 6 ); 50 ButtonGroup1->layout()->setMargin( 6 );
46 ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); 51 ButtonGroup1Layout = new Q3GridLayout( ButtonGroup1->layout() );
47 ButtonGroup1Layout->setAlignment( Qt::AlignTop ); 52 ButtonGroup1Layout->setAlignment( Qt::AlignTop );
48 53
49 layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 54 layout4 = new Q3HBoxLayout( 0, 0, 6, "layout4");
50 55
51 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); 56 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" );
52 layout4->addWidget( mCatShowCheck ); 57 layout4->addWidget( mCatShowCheck );
@@ -59,12 +64,12 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
59 64
60 ButtonGroup1Layout->addLayout( layout4, 0, 0 ); 65 ButtonGroup1Layout->addLayout( layout4, 0, 0 );
61 66
62 mCatList = new QListBox( ButtonGroup1, "mCatList" ); 67 mCatList = new Q3ListBox( ButtonGroup1, "mCatList" );
63 68
64 ButtonGroup1Layout->addWidget( mCatList, 1, 0 ); 69 ButtonGroup1Layout->addWidget( mCatList, 1, 0 );
65 mCriteriaFrameLayout->addWidget( ButtonGroup1 ); 70 mCriteriaFrameLayout->addWidget( ButtonGroup1 );
66 71
67 layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 72 layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7");
68 73
69 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); 74 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" );
70 layout7->addWidget( textLabel1 ); 75 layout7->addWidget( textLabel1 );
@@ -76,7 +81,7 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
76 layout7->addWidget( mCompletedCheck ); 81 layout7->addWidget( mCompletedCheck );
77 mCriteriaFrameLayout->addLayout( layout7 ); 82 mCriteriaFrameLayout->addLayout( layout7 );
78 83
79 layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); 84 layout9 = new Q3HBoxLayout( 0, 0, 6, "layout9");
80 85
81 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" ); 86 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" );
82 layout9->addWidget( textLabel1_2 ); 87 layout9->addWidget( textLabel1_2 );
@@ -91,7 +96,7 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
91 layout9->addWidget( mJournalCheck ); 96 layout9->addWidget( mJournalCheck );
92 mCriteriaFrameLayout->addLayout( layout9 ); 97 mCriteriaFrameLayout->addLayout( layout9 );
93 98
94 layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); 99 layout2 = new Q3HBoxLayout( 0, 0, 0, "layout2");
95 100
96 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); 101 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
97 layout2->addWidget( textLabel2 ); 102 layout2->addWidget( textLabel2 );
@@ -109,7 +114,6 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
109 FilterEdit_baseLayout->addWidget( mCriteriaFrame ); 114 FilterEdit_baseLayout->addWidget( mCriteriaFrame );
110 languageChange(); 115 languageChange();
111 resize( QSize(300, 200).expandedTo(minimumSizeHint()) ); 116 resize( QSize(300, 200).expandedTo(minimumSizeHint()) );
112 clearWState( WState_Polished );
113} 117}
114 118
115/* 119/*
diff --git a/korganizer/filteredit_base.h b/korganizer/filteredit_base.h
index 13a02c3..135f6fa 100644
--- a/korganizer/filteredit_base.h
+++ b/korganizer/filteredit_base.h
@@ -12,17 +12,23 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qwidget.h> 14#include <qwidget.h>
15//Added by qt3to4:
16#include <Q3VBoxLayout>
17#include <Q3Frame>
18#include <Q3GridLayout>
19#include <Q3HBoxLayout>
20#include <QLabel>
15 21
16class QVBoxLayout; 22class Q3VBoxLayout;
17class QHBoxLayout; 23class Q3HBoxLayout;
18class QGridLayout; 24class Q3GridLayout;
19class QSpacerItem; 25class QSpacerItem;
20class QFrame; 26class Q3Frame;
21class QButtonGroup; 27class Q3ButtonGroup;
22class QRadioButton; 28class QRadioButton;
23class QPushButton; 29class QPushButton;
24class QListBox; 30class Q3ListBox;
25class QListBoxItem; 31class Q3ListBoxItem;
26class QLabel; 32class QLabel;
27class QCheckBox; 33class QCheckBox;
28 34
@@ -31,15 +37,15 @@ class FilterEdit_base : public QWidget
31 Q_OBJECT 37 Q_OBJECT
32 38
33public: 39public:
34 FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 40 FilterEdit_base( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
35 ~FilterEdit_base(); 41 ~FilterEdit_base();
36 42
37 QFrame* mCriteriaFrame; 43 Q3Frame* mCriteriaFrame;
38 QButtonGroup* ButtonGroup1; 44 Q3ButtonGroup* ButtonGroup1;
39 QRadioButton* mCatShowCheck; 45 QRadioButton* mCatShowCheck;
40 QRadioButton* mCatHideCheck; 46 QRadioButton* mCatHideCheck;
41 QPushButton* mCatEditButton; 47 QPushButton* mCatEditButton;
42 QListBox* mCatList; 48 Q3ListBox* mCatList;
43 QLabel* textLabel1; 49 QLabel* textLabel1;
44 QCheckBox* mRecurringCheck; 50 QCheckBox* mRecurringCheck;
45 QCheckBox* mCompletedCheck; 51 QCheckBox* mCompletedCheck;
@@ -53,13 +59,13 @@ public:
53 QCheckBox* mConfidentialCheck; 59 QCheckBox* mConfidentialCheck;
54 60
55protected: 61protected:
56 QVBoxLayout* FilterEdit_baseLayout; 62 Q3VBoxLayout* FilterEdit_baseLayout;
57 QVBoxLayout* mCriteriaFrameLayout; 63 Q3VBoxLayout* mCriteriaFrameLayout;
58 QGridLayout* ButtonGroup1Layout; 64 Q3GridLayout* ButtonGroup1Layout;
59 QHBoxLayout* layout4; 65 Q3HBoxLayout* layout4;
60 QHBoxLayout* layout7; 66 Q3HBoxLayout* layout7;
61 QHBoxLayout* layout9; 67 Q3HBoxLayout* layout9;
62 QHBoxLayout* layout2; 68 Q3HBoxLayout* layout2;
63 69
64protected slots: 70protected slots:
65 virtual void languageChange(); 71 virtual void languageChange();
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index df84911..a3cff49 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -26,8 +26,13 @@
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qlistbox.h> 29#include <q3listbox.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <Q3GridLayout>
33#include <Q3PtrList>
34
35#include <QDesktopWidget>
31 36
32#include <kdebug.h> 37#include <kdebug.h>
33#include <klocale.h> 38#include <klocale.h>
@@ -53,7 +58,7 @@ public:
53 58
54}; 59};
55 60
56FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, 61FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent,
57 const char *name) : 62 const char *name) :
58 KDialogBase(parent,name,true,i18n("Edit Calendar Filters"), 63 KDialogBase(parent,name,true,i18n("Edit Calendar Filters"),
59 Ok|Apply|Cancel) 64 Ok|Apply|Cancel)
@@ -80,7 +85,7 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent,
80 85
81 mEditor = new FilterEdit_base(mainWidget); 86 mEditor = new FilterEdit_base(mainWidget);
82 87
83 QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); 88 Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2);
84 topLayout->setSpacing(spacingHint()); 89 topLayout->setSpacing(spacingHint());
85 topLayout->addWidget(mSelectionCombo,0,0); 90 topLayout->addWidget(mSelectionCombo,0,0);
86 topLayout->addWidget(upButton,0,1); 91 topLayout->addWidget(upButton,0,1);
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index 42aa3da..c1a52ed 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -23,7 +23,7 @@
23#ifndef _FILTEREDITDIALOG_H 23#ifndef _FILTEREDITDIALOG_H
24#define _FILTEREDITDIALOG_H 24#define _FILTEREDITDIALOG_H
25 25
26#include <qptrlist.h> 26#include <q3ptrlist.h>
27 27
28#include <kdialogbase.h> 28#include <kdialogbase.h>
29 29
@@ -46,7 +46,7 @@ class FilterEditDialog : public KDialogBase
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 public: 48 public:
49 FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0); 49 FilterEditDialog(Q3PtrList<CalFilter> *,QWidget *parent=0, const char *name=0);
50 virtual ~FilterEditDialog(); 50 virtual ~FilterEditDialog();
51 51
52 public slots: 52 public slots:
@@ -74,7 +74,7 @@ class FilterEditDialog : public KDialogBase
74 void writeFilter(CalFilter *); 74 void writeFilter(CalFilter *);
75 75
76 private: 76 private:
77 QPtrList<CalFilter> *mFilters; 77 Q3PtrList<CalFilter> *mFilters;
78 78
79 ComboFilterBox *mSelectionCombo; 79 ComboFilterBox *mSelectionCombo;
80 QPushButton *mRemoveButton; 80 QPushButton *mRemoveButton;
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index fe78356..c2402d4 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -17,10 +17,12 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qlistview.h> 20#include <q3listview.h>
21#include <qfile.h> 21#include <qfile.h>
22#include <qdir.h> 22#include <qdir.h>
23#include <qmap.h> 23#include <qmap.h>
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25#include <kglobal.h> 27#include <kglobal.h>
26#include <klocale.h> 28#include <klocale.h>
@@ -56,9 +58,9 @@
56#endif 58#endif
57 59
58 60
59ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, 61ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,
60 Scheduler::Method method,ScheduleMessage::Status status) 62 Scheduler::Method method,ScheduleMessage::Status status)
61 : QListViewItem(parent) 63 : Q3ListViewItem(parent)
62{ 64{
63 mIncidence = ev; 65 mIncidence = ev;
64 mMethod = method; 66 mMethod = method;
@@ -135,7 +137,7 @@ bool ScheduleItemVisitor::visit(Journal *)
135 * TRUE to construct a modal dialog. 137 * TRUE to construct a modal dialog.
136 */ 138 */
137IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, 139IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
138 QWidget* parent,const char* name,bool modal,WFlags fl) : 140 QWidget* parent,const char* name,bool modal,Qt::WFlags fl) :
139 IncomingDialog_base(parent,name,modal,fl) 141 IncomingDialog_base(parent,name,modal,fl)
140{ 142{
141 mCalendar = calendar; 143 mCalendar = calendar;
@@ -145,12 +147,12 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
145#else 147#else
146 mScheduler = new DummyScheduler(mCalendar); 148 mScheduler = new DummyScheduler(mCalendar);
147#endif 149#endif
148 mMessageListView->setColumnAlignment(1,AlignHCenter); 150 mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
149 mMessageListView->setColumnAlignment(2,AlignHCenter); 151 mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
150 mMessageListView->setColumnAlignment(3,AlignHCenter); 152 mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
151 mMessageListView->setColumnAlignment(4,AlignHCenter); 153 mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
152 QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), 154 QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
153 this,SLOT(showEvent(QListViewItem *))); 155 this,SLOT(showEvent(Q3ListViewItem *)));
154 retrieve(); 156 retrieve();
155} 157}
156 158
@@ -169,7 +171,7 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing)
169 171
170void IncomingDialog::retrieve() 172void IncomingDialog::retrieve()
171{ 173{
172 QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); 174 Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
173 175
174 ScheduleMessage *message; 176 ScheduleMessage *message;
175 for(message = messages.first();message;message = messages.next()) { 177 for(message = messages.first();message;message = messages.next()) {
@@ -252,7 +254,7 @@ void IncomingDialog::rejectMessage()
252 } 254 }
253} 255}
254 256
255void IncomingDialog::showEvent(QListViewItem *item) 257void IncomingDialog::showEvent(Q3ListViewItem *item)
256{ 258{
257 IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); 259 IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
258 if( incidence && incidence->typeID() == eventID ) { 260 if( incidence && incidence->typeID() == eventID ) {
@@ -269,7 +271,7 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
269 if (ev) { 271 if (ev) {
270 //user interaction before?? 272 //user interaction before??
271 Attendee *att; 273 Attendee *att;
272 QPtrList<Attendee> attlist = ev->attendees(); 274 Q3PtrList<Attendee> attlist = ev->attendees();
273 for (att=attlist.first(); att; att=attlist.next()) { 275 for (att=attlist.first(); att; att=attlist.next()) {
274 Event *event = new Event(*ev); 276 Event *event = new Event(*ev);
275 mOutgoing->addMessage(event,Scheduler::Request,att->email()); 277 mOutgoing->addMessage(event,Scheduler::Request,att->email());
@@ -514,7 +516,7 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
514#ifndef KORG_NOKABC 516#ifndef KORG_NOKABC
515 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 517 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
516 KABC::Addressee::List addressList; 518 KABC::Addressee::List addressList;
517 QPtrList <Attendee> attendees; 519 Q3PtrList <Attendee> attendees;
518 Attendee *att; 520 Attendee *att;
519 attendees = inc->attendees(); 521 attendees = inc->attendees();
520 for (att=attendees.first();att;att=attendees.next()) { 522 for (att=attendees.first();att;att=attendees.next()) {
diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h
index 413ce6a..e002b25 100644
--- a/korganizer/incomingdialog.h
+++ b/korganizer/incomingdialog.h
@@ -19,7 +19,7 @@
19#ifndef INCOMINGDIALOG_H 19#ifndef INCOMINGDIALOG_H
20#define INCOMINGDIALOG_H 20#define INCOMINGDIALOG_H
21 21
22#include <qlistview.h> 22#include <q3listview.h>
23 23
24#include <libkcal/calendar.h> 24#include <libkcal/calendar.h>
25#include <libkcal/scheduler.h> 25#include <libkcal/scheduler.h>
@@ -29,10 +29,10 @@
29 29
30using namespace KCal; 30using namespace KCal;
31 31
32class ScheduleItemIn : public QListViewItem 32class ScheduleItemIn : public Q3ListViewItem
33{ 33{
34 public: 34 public:
35 ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method, 35 ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,Scheduler::Method method,
36 ScheduleMessage::Status status); 36 ScheduleMessage::Status status);
37 virtual ~ScheduleItemIn() {} 37 virtual ~ScheduleItemIn() {}
38 38
@@ -72,7 +72,7 @@ class IncomingDialog : public IncomingDialog_base
72 Q_OBJECT 72 Q_OBJECT
73 public: 73 public:
74 IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, 74 IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
75 QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0); 75 QWidget* parent=0,const char* name=0,bool modal=false,Qt::WFlags fl=0);
76 ~IncomingDialog(); 76 ~IncomingDialog();
77 77
78 void setOutgoingDialog(OutgoingDialog *outgoing); 78 void setOutgoingDialog(OutgoingDialog *outgoing);
@@ -87,7 +87,7 @@ class IncomingDialog : public IncomingDialog_base
87 void acceptAllMessages(); 87 void acceptAllMessages();
88 void acceptMessage(); 88 void acceptMessage();
89 void rejectMessage(); 89 void rejectMessage();
90 void showEvent(QListViewItem *); 90 void showEvent(Q3ListViewItem *);
91 91
92 protected: 92 protected:
93 bool acceptMessage(ScheduleItemIn *item); 93 bool acceptMessage(ScheduleItemIn *item);
diff --git a/korganizer/incomingdialog_base.cpp b/korganizer/incomingdialog_base.cpp
index 8589803..5c5ace4 100644
--- a/korganizer/incomingdialog_base.cpp
+++ b/korganizer/incomingdialog_base.cpp
@@ -11,12 +11,14 @@
11#include "incomingdialog_base.h" 11#include "incomingdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3GridLayout>
20 22
21/* 23/*
22 * Constructs a IncomingDialog_base as a child of 'parent', with the 24 * Constructs a IncomingDialog_base as a child of 'parent', with the
@@ -25,13 +27,13 @@
25 * The dialog will by default be modeless, unless you set 'modal' to 27 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 28 * TRUE to construct a modal dialog.
27 */ 29 */
28IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 30IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 31 : QDialog( parent, name, modal, fl )
30 32
31{ 33{
32 if ( !name ) 34 if ( !name )
33 setName( "IncomingDialog_base" ); 35 setName( "IncomingDialog_base" );
34 IncomingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout"); 36 IncomingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout");
35 37
36 PushButton4 = new QPushButton( this, "PushButton4" ); 38 PushButton4 = new QPushButton( this, "PushButton4" );
37 39
@@ -42,7 +44,7 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo
42 44
43 IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 ); 45 IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 );
44 46
45 mMessageListView = new QListView( this, "mMessageListView" ); 47 mMessageListView = new Q3ListView( this, "mMessageListView" );
46 mMessageListView->addColumn( tr2i18n( "Summary" ) ); 48 mMessageListView->addColumn( tr2i18n( "Summary" ) );
47 mMessageListView->addColumn( tr2i18n( "Start Date" ) ); 49 mMessageListView->addColumn( tr2i18n( "Start Date" ) );
48 mMessageListView->addColumn( tr2i18n( "Start Time" ) ); 50 mMessageListView->addColumn( tr2i18n( "Start Time" ) );
diff --git a/korganizer/incomingdialog_base.h b/korganizer/incomingdialog_base.h
index 7732384..537ef86 100644
--- a/korganizer/incomingdialog_base.h
+++ b/korganizer/incomingdialog_base.h
@@ -12,12 +12,16 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class IncomingDialog_base : public QDialog 27class IncomingDialog_base : public QDialog
@@ -25,18 +29,18 @@ class IncomingDialog_base : public QDialog
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~IncomingDialog_base(); 33 ~IncomingDialog_base();
30 34
31 QPushButton* PushButton4; 35 QPushButton* PushButton4;
32 QPushButton* PushButton7; 36 QPushButton* PushButton7;
33 QListView* mMessageListView; 37 Q3ListView* mMessageListView;
34 QPushButton* PushButton7_2; 38 QPushButton* PushButton7_2;
35 QPushButton* PushButton8; 39 QPushButton* PushButton8;
36 QPushButton* PushButton9; 40 QPushButton* PushButton9;
37 41
38protected: 42protected:
39 QGridLayout* IncomingDialog_baseLayout; 43 Q3GridLayout* IncomingDialog_baseLayout;
40 44
41protected slots: 45protected slots:
42 virtual void languageChange(); 46 virtual void languageChange();
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 2ac9de1..c828573 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -24,8 +24,8 @@
24// KOBaseView is the abstract base class of all calendar views. 24// KOBaseView is the abstract base class of all calendar views.
25 25
26#include <qwidget.h> 26#include <qwidget.h>
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29 29
30#include <klocale.h> 30#include <klocale.h>
31#include <kdebug.h> 31#include <kdebug.h>
@@ -88,7 +88,7 @@ class BaseView : public QWidget
88 select a single event at a time, but some may be able to select 88 select a single event at a time, but some may be able to select
89 more than one. 89 more than one.
90 */ 90 */
91 virtual QPtrList<Incidence> selectedIncidences() = 0; 91 virtual Q3PtrList<Incidence> selectedIncidences() = 0;
92 92
93 /** 93 /**
94 @return a list of the dates of selected events. Most views can probably only 94 @return a list of the dates of selected events. Most views can probably only
@@ -153,7 +153,7 @@ class BaseView : public QWidget
153 153
154 @param eventList a list of events to show. 154 @param eventList a list of events to show.
155 */ 155 */
156 virtual void showEvents(QPtrList<Event> eventList) = 0; 156 virtual void showEvents(Q3PtrList<Event> eventList) = 0;
157 157
158 /** 158 /**
159 Updates the current display to reflect changes that may have happened 159 Updates the current display to reflect changes that may have happened
diff --git a/korganizer/interfaces/korganizer/calendarviewbase.h b/korganizer/interfaces/korganizer/calendarviewbase.h
index 3c715b1..1f49357 100644
--- a/korganizer/interfaces/korganizer/calendarviewbase.h
+++ b/korganizer/interfaces/korganizer/calendarviewbase.h
@@ -23,6 +23,8 @@
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qlayout.h> 25#include <qlayout.h>
26//Added by qt3to4:
27#include <Q3VBoxLayout>
26 28
27 29
28#include <libkcal/calendar.h> 30#include <libkcal/calendar.h>
@@ -40,7 +42,7 @@ class CalendarViewBase : public QWidget
40 Q_OBJECT 42 Q_OBJECT
41 public: 43 public:
42 CalendarViewBase(QWidget *parent, const char *name) : 44 CalendarViewBase(QWidget *parent, const char *name) :
43 QWidget(parent,name) {new QVBoxLayout(this);} 45 QWidget(parent,name) {new Q3VBoxLayout(this);}
44 virtual ~CalendarViewBase() {}; 46 virtual ~CalendarViewBase() {};
45 47
46 virtual KCal::Calendar *calendar() = 0; 48 virtual KCal::Calendar *calendar() = 0;
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 5269af7..2814c61 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -26,14 +26,21 @@
26 26
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qvbox.h> 29#include <q3vbox.h>
30#include <qfile.h> 30#include <qfile.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qtextstream.h> 32#include <q3textstream.h>
33#include <qtextcodec.h> 33#include <qtextcodec.h>
34#include <qpixmap.h> 34#include <qpixmap.h>
35#include <qpushbutton.h> 35#include <qpushbutton.h>
36#include <qapplication.h> 36#include <qapplication.h>
37#include <QDesktopWidget>
38//Added by qt3to4:
39#include <QResizeEvent>
40#include <Q3Frame>
41#include <QKeyEvent>
42#include <QEvent>
43#include <Q3VBoxLayout>
37 44
38#include <kdebug.h> 45#include <kdebug.h>
39#include <kglobal.h> 46#include <kglobal.h>
@@ -57,7 +64,7 @@
57#include <qpe/qpeapplication.h> 64#include <qpe/qpeapplication.h>
58#endif 65#endif
59JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : 66JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
60 QFrame(parent) 67 Q3Frame(parent)
61{ 68{
62 69
63 int fac = 5; 70 int fac = 5;
@@ -70,7 +77,7 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
70 mCalendar = calendar; 77 mCalendar = calendar;
71 mJournal = 0; 78 mJournal = 0;
72 visibleMode = true; 79 visibleMode = true;
73 QHBox * vb = new QHBox ( this ); 80 Q3HBox * vb = new Q3HBox ( this );
74 QPixmap iconp; 81 QPixmap iconp;
75 vb->setMargin ( KDialog::marginHint()-1 ); 82 vb->setMargin ( KDialog::marginHint()-1 );
76 QPushButton * toggleJournal = new QPushButton( vb ); 83 QPushButton * toggleJournal = new QPushButton( vb );
@@ -129,13 +136,13 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
129 } 136 }
130 //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); 137 //mCalendarBox->setMaximumWidth( maxwid/2 -20 );
131 mEditor->setWordWrap( KTextEdit::WidgetWidth ); 138 mEditor->setWordWrap( KTextEdit::WidgetWidth );
132 QBoxLayout *topLayout = new QVBoxLayout(this); 139 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
133 topLayout->addWidget(vb); 140 topLayout->addWidget(vb);
134 topLayout->addWidget(mEditor); 141 topLayout->addWidget(mEditor);
135 mEditor->installEventFilter(this); 142 mEditor->installEventFilter(this);
136 installEventFilter(this); 143 installEventFilter(this);
137 mTitle->installEventFilter(this); 144 mTitle->installEventFilter(this);
138 setFocusPolicy (QWidget::NoFocus); 145 setFocusPolicy (Qt::NoFocus);
139 146
140 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 147 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
141 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 148 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
@@ -168,7 +175,7 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
168 //setMaximumWidth( QApplication::desktop()->width() ); 175 //setMaximumWidth( QApplication::desktop()->width() );
169 //qDebug("MAXXX %d ", QApplication::desktop()->width()); 176 //qDebug("MAXXX %d ", QApplication::desktop()->width());
170#endif 177#endif
171 QFrame::resizeEvent( e ); 178 Q3Frame::resizeEvent( e );
172} 179}
173QSize JournalEntry::sizeHint() const 180QSize JournalEntry::sizeHint() const
174{ 181{
@@ -186,13 +193,13 @@ void JournalEntry::slotSaveTemplate()
186 return; 193 return;
187 194
188 QFile fileIn( fileName ); 195 QFile fileIn( fileName );
189 if (!fileIn.open( IO_WriteOnly ) ) { 196 if (!fileIn.open( QIODevice::WriteOnly ) ) {
190 KMessageBox::error( this, i18n("Error saving template file\n '%1'.") 197 KMessageBox::error( this, i18n("Error saving template file\n '%1'.")
191 .arg( fileName ) ); 198 .arg( fileName ) );
192 return; 199 return;
193 } 200 }
194 // QString text; 201 // QString text;
195 QTextStream tsIn( &fileIn ); 202 Q3TextStream tsIn( &fileIn );
196 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 203 tsIn.setCodec( QTextCodec::codecForName("utf8") );
197 tsIn << mEditor->text(); 204 tsIn << mEditor->text();
198 fileIn.close(); 205 fileIn.close();
@@ -208,12 +215,12 @@ void JournalEntry::slotLoadTemplate()
208 if ( fileName.length() == 0 ) 215 if ( fileName.length() == 0 )
209 return; 216 return;
210 QFile fileIn( fileName ); 217 QFile fileIn( fileName );
211 if (!fileIn.open( IO_ReadOnly ) ) { 218 if (!fileIn.open( QIODevice::ReadOnly ) ) {
212 KMessageBox::error( this, i18n("Error loading template file\n '%1'.") 219 KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
213 .arg( fileName ) ); 220 .arg( fileName ) );
214 return; 221 return;
215 } 222 }
216 QTextStream tsIn( &fileIn ); 223 Q3TextStream tsIn( &fileIn );
217 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 224 tsIn.setCodec( QTextCodec::codecForName("utf8") );
218 QString text = tsIn.read(); 225 QString text = tsIn.read();
219 fileIn.close(); 226 fileIn.close();
@@ -316,11 +323,11 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
316{ 323{
317// kdDebug() << "JournalEntry::event received " << e->type() << endl; 324// kdDebug() << "JournalEntry::event received " << e->type() << endl;
318 if ( isVisible() ) { 325 if ( isVisible() ) {
319 mEditor->setFocusPolicy (QWidget::StrongFocus); 326 mEditor->setFocusPolicy (Qt::StrongFocus);
320 mTitle->setFocusPolicy (QWidget::StrongFocus); 327 mTitle->setFocusPolicy (Qt::StrongFocus);
321 } else { 328 } else {
322 mEditor->setFocusPolicy (QWidget::NoFocus); 329 mEditor->setFocusPolicy (Qt::NoFocus);
323 mTitle->setFocusPolicy (QWidget::NoFocus); 330 mTitle->setFocusPolicy (Qt::NoFocus);
324 } 331 }
325 if ( e->type() == QEvent::FocusOut ) { 332 if ( e->type() == QEvent::FocusOut ) {
326 writeJournal(); 333 writeJournal();
@@ -335,7 +342,7 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
335 } 342 }
336 } 343 }
337 344
338 return QFrame::eventFilter( o, e ); // standard event processing 345 return Q3Frame::eventFilter( o, e ); // standard event processing
339} 346}
340 347
341void JournalEntry::writeJournal() 348void JournalEntry::writeJournal()
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index ee17da8..0adebe9 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -25,7 +25,12 @@
25// 25//
26// Widget showing one Journal entry 26// Widget showing one Journal entry
27 27
28#include <qframe.h> 28#include <q3frame.h>
29//Added by qt3to4:
30#include <QResizeEvent>
31#include <QEvent>
32#include <QLabel>
33#include <QKeyEvent>
29 34
30#include <libkcal/calendar.h> 35#include <libkcal/calendar.h>
31 36
@@ -37,7 +42,7 @@ class KOLocationBox;
37 42
38using namespace KCal; 43using namespace KCal;
39 44
40class JournalEntry : public QFrame { 45class JournalEntry : public Q3Frame {
41 Q_OBJECT 46 Q_OBJECT
42 public: 47 public:
43 JournalEntry(Calendar *,QWidget *parent); 48 JournalEntry(Calendar *,QWidget *parent);
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 6697602..ecc7a2f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -22,12 +22,16 @@
22*/ 22*/
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qkeycode.h> 25#include <qnamespace.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qtimer.h> 27#include <qtimer.h>
28#include <qframe.h> 28#include <q3frame.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <QWheelEvent>
33#include <Q3GridLayout>
34#include <QEvent>
31 35
32#include <kdebug.h> 36#include <kdebug.h>
33#include <klocale.h> 37#include <klocale.h>
@@ -46,12 +50,12 @@
46#include "kdatenavigator.h" 50#include "kdatenavigator.h"
47 51
48KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) 52KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
49 : QFrame(parent, name), 53 : Q3Frame(parent, name),
50 updateTimer(0L) 54 updateTimer(0L)
51{ 55{
52 setFrameStyle(QFrame::NoFrame); 56 setFrameStyle(Q3Frame::NoFrame);
53 QDate startDate = QDate::currentDate(); 57 QDate startDate = QDate::currentDate();
54 QGridLayout *topLayout = new QGridLayout(this,8,8); 58 Q3GridLayout *topLayout = new Q3GridLayout(this,8,8);
55 59
56 if (! startDate.isValid()) { 60 if (! startDate.isValid()) {
57 qDebug("KDateNavigator::invalid startdate "); 61 qDebug("KDateNavigator::invalid startdate ");
@@ -81,7 +85,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
81 for( i = 0; i < 7; i++ ) { 85 for( i = 0; i < 7; i++ ) {
82 headings[i] = new QLabel("",this); 86 headings[i] = new QLabel("",this);
83 //headings[i]->setFont(QFont("Arial", 10, QFont::Bold)); 87 //headings[i]->setFont(QFont("Arial", 10, QFont::Bold));
84 headings[i]->setAlignment(AlignCenter); 88 headings[i]->setAlignment(Qt::AlignCenter);
85 headings[i]->installEventFilter(this); 89 headings[i]->installEventFilter(this);
86 90
87 topLayout->addWidget(headings[i],1,i+1); 91 topLayout->addWidget(headings[i],1,i+1);
@@ -90,7 +94,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
90 // Create the weeknumber labels 94 // Create the weeknumber labels
91 for( i = 0; i < 6; i++ ) { 95 for( i = 0; i < 6; i++ ) {
92 weeknos[i] = new QLabel(this); 96 weeknos[i] = new QLabel(this);
93 weeknos[i]->setAlignment(AlignCenter ); 97 weeknos[i]->setAlignment(Qt::AlignCenter );
94 //weeknos[i]->setFont(QFont("Arial", 10)); 98 //weeknos[i]->setFont(QFont("Arial", 10));
95 if(!m_bShowWeekNums) { 99 if(!m_bShowWeekNums) {
96 weeknos[i]->hide(); 100 weeknos[i]->hide();
@@ -101,7 +105,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
101 } 105 }
102 106
103 daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix"); 107 daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix");
104 daymatrix->setFrameStyle(QFrame::Panel|QFrame::Sunken); 108 daymatrix->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
105 daymatrix->setLineWidth(1); 109 daymatrix->setLineWidth(1);
106 110
107 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ), 111 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ),
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 780ebb8..2cbca76 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -23,9 +23,12 @@
23#ifndef KDATENAVIGATOR_H 23#ifndef KDATENAVIGATOR_H
24#define KDATENAVIGATOR_H 24#define KDATENAVIGATOR_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qlabel.h> 28#include <qlabel.h>
29//Added by qt3to4:
30#include <QWheelEvent>
31#include <QEvent>
29 32
30#include <libkcal/calendar.h> 33#include <libkcal/calendar.h>
31 34
@@ -38,7 +41,7 @@ class KCalendarSystem;
38 41
39class NavigatorBar; 42class NavigatorBar;
40 43
41class KDateNavigator: public QFrame 44class KDateNavigator: public Q3Frame
42{ 45{
43 Q_OBJECT 46 Q_OBJECT
44 public: 47 public:
@@ -133,8 +136,8 @@ class KDateNavigator: public QFrame
133 int mMonthSignalOffset; 136 int mMonthSignalOffset;
134 NavigatorBar *mNavigatorBar; 137 NavigatorBar *mNavigatorBar;
135 138
136 QFrame *headingSep; 139 Q3Frame *headingSep;
137 QFrame *weeknumSep; 140 Q3Frame *weeknumSep;
138 QLabel *headings[7]; 141 QLabel *headings[7];
139 QLabel *weeknos[7]; 142 QLabel *weeknos[7];
140 KODayMatrix *daymatrix; 143 KODayMatrix *daymatrix;
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 1d4d6de..fe59787 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -29,12 +29,23 @@
29#include <qwidget.h> 29#include <qwidget.h>
30#undef protected 30#undef protected
31#endif 31#endif
32#include <qintdict.h> 32#include <q3intdict.h>
33#include <qdatetime.h> 33#include <qdatetime.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <qpopupmenu.h> 35#include <q3popupmenu.h>
36#include <qcursor.h> 36#include <qcursor.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <QDesktopWidget>
39//Added by qt3to4:
40#include <QResizeEvent>
41#include <QLabel>
42#include <QPixmap>
43#include <QMouseEvent>
44#include <QKeyEvent>
45#include <Q3MemArray>
46#include <QEvent>
47#include <Q3Frame>
48#include <Q3PtrList>
38 49
39#include <kdebug.h> 50#include <kdebug.h>
40#include <klocale.h> 51#include <klocale.h>
@@ -63,7 +74,7 @@ extern int globalFlagBlockStartup;
63 74
64//////////////////////////////////////////////////////////////////////////// 75////////////////////////////////////////////////////////////////////////////
65MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) 76MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
66 : QFrame(_agenda->viewport(),name), agenda(_agenda) 77 : Q3Frame(_agenda->viewport(),name), agenda(_agenda)
67{ 78{
68 setLineWidth(0); 79 setLineWidth(0);
69 setMargin(0); 80 setMargin(0);
@@ -169,8 +180,8 @@ void MarcusBains::updateLocation(bool recalculate)
169 Create an agenda widget with rows rows and columns columns. 180 Create an agenda widget with rows rows and columns columns.
170*/ 181*/
171KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, 182KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
172 const char *name,WFlags f) : 183 const char *name,Qt::WFlags f) :
173 QScrollView(parent,name,f) 184 Q3ScrollView(parent,name,f)
174{ 185{
175 186
176 mAllAgendaPopup = 0; 187 mAllAgendaPopup = 0;
@@ -190,8 +201,8 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
190 Create an agenda widget with columns columns and one row. This is used for 201 Create an agenda widget with columns columns and one row. This is used for
191 all-day events. 202 all-day events.
192*/ 203*/
193KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : 204KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,Qt::WFlags f) :
194 QScrollView(parent,name,f) 205 Q3ScrollView(parent,name,f)
195{ 206{
196 mAllAgendaPopup = 0; 207 mAllAgendaPopup = 0;
197 blockResize = false; 208 blockResize = false;
@@ -231,7 +242,7 @@ void KOAgenda::init()
231 mPopupTimer = new QTimer(this); 242 mPopupTimer = new QTimer(this);
232 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); 243 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
233 244
234 mNewItemPopup = new QPopupMenu( this ); 245 mNewItemPopup = new Q3PopupMenu( this );
235 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); 246 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
236 QString pathString = ""; 247 QString pathString = "";
237 if ( !KOPrefs::instance()->mToolBarMiniIcons ) { 248 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
@@ -240,18 +251,18 @@ void KOAgenda::init()
240 } else 251 } else
241 pathString += "iconsmini/"; 252 pathString += "iconsmini/";
242 253
243 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); 254 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
244 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); 255 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
245 mNewItemPopup->insertSeparator ( ); 256 mNewItemPopup->insertSeparator ( );
246 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); 257 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"day" ), i18n("Day view"),3 );
247 mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); 258 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
248 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); 259 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next week"),4 );
249 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); 260 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
250 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); 261 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"month" ), i18n("This month"),6 );
251 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); 262 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
252#ifndef _WIN32_ 263#ifndef _WIN32_
253 int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase 264 Qt::WindowFlags wflags = viewport()-> windowFlags() |Qt::WRepaintNoErase;//WResizeNoErase
254 viewport()->setWFlags ( wflags); 265 viewport()->setWindowFlags ( wflags);
255#endif 266#endif
256 mGridSpacingX = 80; 267 mGridSpacingX = 80;
257 mResizeBorderWidth = 8; 268 mResizeBorderWidth = 8;
@@ -263,7 +274,7 @@ void KOAgenda::init()
263 274
264 // Grab key strokes for keyboard navigation of agenda. Seems to have no 275 // Grab key strokes for keyboard navigation of agenda. Seems to have no
265 // effect. Has to be fixed. 276 // effect. Has to be fixed.
266 setFocusPolicy(WheelFocus); 277 setFocusPolicy(Qt::WheelFocus);
267 278
268 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); 279 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp()));
269 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); 280 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown()));
@@ -395,11 +406,11 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
395 406
396 case (QEvent::Leave): 407 case (QEvent::Leave):
397 if (!mActionItem) 408 if (!mActionItem)
398 setCursor(arrowCursor); 409 setCursor(Qt::arrowCursor);
399 return true; 410 return true;
400 411
401 default: 412 default:
402 return QScrollView::eventFilter(object,event); 413 return Q3ScrollView::eventFilter(object,event);
403 } 414 }
404} 415}
405void KOAgenda::popupMenu() 416void KOAgenda::popupMenu()
@@ -505,11 +516,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
505 bool objIsNotViewport = (object != viewport()); 516 bool objIsNotViewport = (object != viewport());
506 bool leftButt = false; 517 bool leftButt = false;
507#ifdef DESKTOP_VERSION 518#ifdef DESKTOP_VERSION
508 leftButt = (me->button() == LeftButton); 519 leftButt = (me->button() == Qt::LeftButton);
509#endif 520#endif
510 switch (me->type()) { 521 switch (me->type()) {
511 case QEvent::MouseButtonPress: 522 case QEvent::MouseButtonPress:
512 if (me->button() == LeftButton) { 523 if (me->button() == Qt::LeftButton) {
513 mPopupTimer->start( 600 ); 524 mPopupTimer->start( 600 );
514 mLeftMouseDown = true; 525 mLeftMouseDown = true;
515 } 526 }
@@ -578,10 +589,10 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
578 if ( objIsNotViewport ) { 589 if ( objIsNotViewport ) {
579 mPopupItem = (KOAgendaItem *)object; 590 mPopupItem = (KOAgendaItem *)object;
580 mPopupKind = 1; 591 mPopupKind = 1;
581 if (me->button() == RightButton) { 592 if (me->button() == Qt::RightButton) {
582 mPopupKind = 3; 593 mPopupKind = 3;
583 popupMenu(); 594 popupMenu();
584 } else if (me->button() == LeftButton) { 595 } else if (me->button() == Qt::LeftButton) {
585 mActionItem = (KOAgendaItem *)object; 596 mActionItem = (KOAgendaItem *)object;
586 if (mActionItem) { 597 if (mActionItem) {
587 emit signalClearSelection(); 598 emit signalClearSelection();
@@ -600,7 +611,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
600 mPopupKind = 2; 611 mPopupKind = 2;
601 selectItem(0); 612 selectItem(0);
602 mActionItem = 0; 613 mActionItem = 0;
603 if (me->button() == RightButton) { 614 if (me->button() == Qt::RightButton) {
604 int x,y; 615 int x,y;
605 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 616 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
606 int gx,gy; 617 int gx,gy;
@@ -611,19 +622,19 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
611 mStartCellY = gy; 622 mStartCellY = gy;
612 mPopupKind = 4; 623 mPopupKind = 4;
613 popupMenu(); 624 popupMenu();
614 } else if (me->button() == LeftButton) { 625 } else if (me->button() == Qt::LeftButton) {
615 setCursor(arrowCursor); 626 setCursor(Qt::arrowCursor);
616 startSelectAction(viewportPos); 627 startSelectAction(viewportPos);
617 } 628 }
618 } 629 }
619 break; 630 break;
620 631
621 case QEvent::MouseButtonRelease: 632 case QEvent::MouseButtonRelease:
622 if (me->button() == LeftButton ) { 633 if (me->button() == Qt::LeftButton ) {
623 mPopupTimer->stop(); 634 mPopupTimer->stop();
624 } 635 }
625 if (object != viewport()) { 636 if (object != viewport()) {
626 if (me->button() == LeftButton && mLeftMouseDown) { 637 if (me->button() == Qt::LeftButton && mLeftMouseDown) {
627 if (mActionItem) { 638 if (mActionItem) {
628 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); 639 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos));
629 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); 640 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 );
@@ -633,7 +644,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
633 mActionItem->resetMove(); 644 mActionItem->resetMove();
634 placeSubCells( mActionItem ); 645 placeSubCells( mActionItem );
635 // emit startDragSignal( mActionItem->incidence() ); 646 // emit startDragSignal( mActionItem->incidence() );
636 setCursor( arrowCursor ); 647 setCursor( Qt::arrowCursor );
637 mActionItem = 0; 648 mActionItem = 0;
638 mActionType = NOP; 649 mActionType = NOP;
639 mItemMoved = 0; 650 mItemMoved = 0;
@@ -645,11 +656,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
645 } 656 }
646 657
647 } else { // ---------- viewport() 658 } else { // ---------- viewport()
648 if (me->button() == LeftButton && mLeftMouseDown ) { //left click 659 if (me->button() == Qt::LeftButton && mLeftMouseDown ) { //left click
649 endSelectAction( true ); // emit new event signal 660 endSelectAction( true ); // emit new event signal
650 } 661 }
651 } 662 }
652 if (me->button() == LeftButton) 663 if (me->button() == Qt::LeftButton)
653 mLeftMouseDown = false; 664 mLeftMouseDown = false;
654 665
655 break; 666 break;
@@ -850,15 +861,15 @@ void KOAgenda::startItemAction(QPoint viewportPos)
850 if ( allowResize && gridDistanceX < mResizeBorderWidth && 861 if ( allowResize && gridDistanceX < mResizeBorderWidth &&
851 mActionItem->cellX() == mCurrentCellX) { 862 mActionItem->cellX() == mCurrentCellX) {
852 mActionType = RESIZELEFT; 863 mActionType = RESIZELEFT;
853 setCursor(sizeHorCursor); 864 setCursor(Qt::sizeHorCursor);
854 } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 865 } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
855 mActionItem->cellXWidth() == mCurrentCellX) { 866 mActionItem->cellXWidth() == mCurrentCellX) {
856 mActionType = RESIZERIGHT; 867 mActionType = RESIZERIGHT;
857 setCursor(sizeHorCursor); 868 setCursor(Qt::sizeHorCursor);
858 } else { 869 } else {
859 mActionType = MOVE; 870 mActionType = MOVE;
860 mActionItem->startMove(); 871 mActionItem->startMove();
861 setCursor(sizeAllCursor); 872 setCursor(Qt::sizeAllCursor);
862 } 873 }
863 } else { 874 } else {
864 int gridDistanceY = (y - gy * mGridSpacingY); 875 int gridDistanceY = (y - gy * mGridSpacingY);
@@ -866,16 +877,16 @@ void KOAgenda::startItemAction(QPoint viewportPos)
866 mActionItem->cellYTop() == mCurrentCellY && 877 mActionItem->cellYTop() == mCurrentCellY &&
867 !mActionItem->firstMultiItem()) { 878 !mActionItem->firstMultiItem()) {
868 mActionType = RESIZETOP; 879 mActionType = RESIZETOP;
869 setCursor(sizeVerCursor); 880 setCursor(Qt::sizeVerCursor);
870 } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 881 } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
871 mActionItem->cellYBottom() == mCurrentCellY && 882 mActionItem->cellYBottom() == mCurrentCellY &&
872 !mActionItem->lastMultiItem()) { 883 !mActionItem->lastMultiItem()) {
873 mActionType = RESIZEBOTTOM; 884 mActionType = RESIZEBOTTOM;
874 setCursor(sizeVerCursor); 885 setCursor(Qt::sizeVerCursor);
875 } else { 886 } else {
876 mActionType = MOVE; 887 mActionType = MOVE;
877 mActionItem->startMove(); 888 mActionItem->startMove();
878 setCursor(sizeAllCursor); 889 setCursor(Qt::sizeAllCursor);
879 } 890 }
880 } 891 }
881} 892}
@@ -906,7 +917,7 @@ void KOAgenda::performItemAction(QPoint viewportPos)
906 mActionItem->resetMove(); 917 mActionItem->resetMove();
907 placeSubCells( mActionItem ); 918 placeSubCells( mActionItem );
908 // emit startDragSignal( mActionItem->incidence() ); 919 // emit startDragSignal( mActionItem->incidence() );
909 setCursor( arrowCursor ); 920 setCursor( Qt::arrowCursor );
910 mActionItem = 0; 921 mActionItem = 0;
911 mActionType = NOP; 922 mActionType = NOP;
912 mItemMoved = 0; 923 mItemMoved = 0;
@@ -915,18 +926,18 @@ void KOAgenda::performItemAction(QPoint viewportPos)
915 } else { 926 } else {
916 switch ( mActionType ) { 927 switch ( mActionType ) {
917 case MOVE: 928 case MOVE:
918 setCursor( sizeAllCursor ); 929 setCursor( Qt::sizeAllCursor );
919 break; 930 break;
920 case RESIZETOP: 931 case RESIZETOP:
921 case RESIZEBOTTOM: 932 case RESIZEBOTTOM:
922 setCursor( sizeVerCursor ); 933 setCursor( Qt::sizeVerCursor );
923 break; 934 break;
924 case RESIZELEFT: 935 case RESIZELEFT:
925 case RESIZERIGHT: 936 case RESIZERIGHT:
926 setCursor( sizeHorCursor ); 937 setCursor( Qt::sizeHorCursor );
927 break; 938 break;
928 default: 939 default:
929 setCursor( arrowCursor ); 940 setCursor( Qt::arrowCursor );
930 } 941 }
931 } 942 }
932 943
@@ -971,7 +982,7 @@ void KOAgenda::performItemAction(QPoint viewportPos)
971 int x,y; 982 int x,y;
972 gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); 983 gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y);
973 //moveChild(mActionItem,childX(mActionItem),y); 984 //moveChild(mActionItem,childX(mActionItem),y);
974 QScrollView::moveChild( mActionItem,childX(mActionItem),y ); 985 Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y );
975 } 986 }
976 } else if (mActionType == RESIZEBOTTOM) { 987 } else if (mActionType == RESIZEBOTTOM) {
977 if (mCurrentCellY >= mActionItem->cellYTop()) { 988 if (mCurrentCellY >= mActionItem->cellYTop()) {
@@ -1019,7 +1030,7 @@ void KOAgenda::endItemAction()
1019 type = -1; 1030 type = -1;
1020 KOAgendaItem *modifiedItem = placeItem; 1031 KOAgendaItem *modifiedItem = placeItem;
1021 //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); 1032 //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */);
1022 QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); 1033 Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems();
1023 KOAgendaItem *item; 1034 KOAgendaItem *item;
1024 1035
1025 if ( placeItem->incidence()->typeID() == todoID ) { 1036 if ( placeItem->incidence()->typeID() == todoID ) {
@@ -1110,7 +1121,7 @@ void KOAgenda::endItemAction()
1110 emit incidenceSelected( mActionItem->incidence() ); 1121 emit incidenceSelected( mActionItem->incidence() );
1111 mScrollUpTimer.stop(); 1122 mScrollUpTimer.stop();
1112 mScrollDownTimer.stop(); 1123 mScrollDownTimer.stop();
1113 setCursor( arrowCursor ); 1124 setCursor( Qt::arrowCursor );
1114 mActionItem = 0; 1125 mActionItem = 0;
1115 mActionType = NOP; 1126 mActionType = NOP;
1116 mItemMoved = 0; 1127 mItemMoved = 0;
@@ -1136,25 +1147,25 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
1136 int gridDistanceX = (x - gx * mGridSpacingX); 1147 int gridDistanceX = (x - gx * mGridSpacingX);
1137 if (gridDistanceX < mResizeBorderWidth && 1148 if (gridDistanceX < mResizeBorderWidth &&
1138 moveItem->cellX() == gx) { 1149 moveItem->cellX() == gx) {
1139 setCursor(sizeHorCursor); 1150 setCursor(Qt::sizeHorCursor);
1140 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 1151 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
1141 moveItem->cellXWidth() == gx) { 1152 moveItem->cellXWidth() == gx) {
1142 setCursor(sizeHorCursor); 1153 setCursor(Qt::sizeHorCursor);
1143 } else { 1154 } else {
1144 setCursor(arrowCursor); 1155 setCursor(Qt::arrowCursor);
1145 } 1156 }
1146 } else { 1157 } else {
1147 int gridDistanceY = (y - gy * mGridSpacingY); 1158 int gridDistanceY = (y - gy * mGridSpacingY);
1148 if (gridDistanceY < mResizeBorderWidth && 1159 if (gridDistanceY < mResizeBorderWidth &&
1149 moveItem->cellYTop() == gy && 1160 moveItem->cellYTop() == gy &&
1150 !moveItem->firstMultiItem()) { 1161 !moveItem->firstMultiItem()) {
1151 setCursor(sizeVerCursor); 1162 setCursor(Qt::sizeVerCursor);
1152 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 1163 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
1153 moveItem->cellYBottom() == gy && 1164 moveItem->cellYBottom() == gy &&
1154 !moveItem->lastMultiItem()) { 1165 !moveItem->lastMultiItem()) {
1155 setCursor(sizeVerCursor); 1166 setCursor(Qt::sizeVerCursor);
1156 } else { 1167 } else {
1157 setCursor(arrowCursor); 1168 setCursor(Qt::arrowCursor);
1158 } 1169 }
1159 } 1170 }
1160} 1171}
@@ -1173,9 +1184,9 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
1173void KOAgenda::placeSubCells(KOAgendaItem *placeItem) 1184void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
1174{ 1185{
1175 1186
1176 QPtrList<KOAgendaItem> conflictItems; 1187 Q3PtrList<KOAgendaItem> conflictItems;
1177 int maxSubCells = 0; 1188 int maxSubCells = 0;
1178 QIntDict<KOAgendaItem> subCellDict(7); 1189 Q3IntDict<KOAgendaItem> subCellDict(7);
1179 1190
1180 KOAgendaItem *item; 1191 KOAgendaItem *item;
1181 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1192 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
@@ -1240,7 +1251,7 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
1240 item=conflictItems.next() ) { 1251 item=conflictItems.next() ) {
1241 if ( placeItem != item ) { 1252 if ( placeItem != item ) {
1242 KOAgendaItem *item2; 1253 KOAgendaItem *item2;
1243 QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); 1254 Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems();
1244 for ( item2=conflictItems2.first(); item2 != 0; 1255 for ( item2=conflictItems2.first(); item2 != 0;
1245 item2=conflictItems2.next() ) { 1256 item2=conflictItems2.next() ) {
1246 if ( item2->subCells() != maxSubCells) { 1257 if ( item2->subCells() != maxSubCells) {
@@ -1325,9 +1336,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1325 if ( vySel < 0 ) 1336 if ( vySel < 0 )
1326 off += vySel; 1337 off += vySel;
1327 //qDebug("OFF %d %d %d", off,vySel, vy ); 1338 //qDebug("OFF %d %d %d", off,vySel, vy );
1328 bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); 1339 bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,QPainter::CompositionMode_Source);
1329 } else { 1340 } else {
1330 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); 1341 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
1331 } 1342 }
1332 } 1343 }
1333 if ( mSelectionHeight > 0 ) { 1344 if ( mSelectionHeight > 0 ) {
@@ -1342,7 +1353,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1342 int p_hei = 5; 1353 int p_hei = 5;
1343 if ( hei < 5 ) p_hei = hei; 1354 if ( hei < 5 ) p_hei = hei;
1344 hei -= 5; 1355 hei -= 5;
1345 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); 1356 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
1346 offset += 5; 1357 offset += 5;
1347 } 1358 }
1348 } 1359 }
@@ -1365,7 +1376,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1365 contentsToViewport ( cx, cy, vx,vy); 1376 contentsToViewport ( cx, cy, vx,vy);
1366 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; 1377 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
1367 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) 1378 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
1368 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); 1379 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
1369 1380
1370 if ( mSelectionHeight > 0 ) { 1381 if ( mSelectionHeight > 0 ) {
1371 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); 1382 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
@@ -1379,7 +1390,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1379 int p_hei = 5; 1390 int p_hei = 5;
1380 if ( hei < 5 ) p_hei = hei; 1391 if ( hei < 5 ) p_hei = hei;
1381 hei -= 5; 1392 hei -= 5;
1382 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); 1393 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
1383 offset += 5; 1394 offset += 5;
1384 } 1395 }
1385 } 1396 }
@@ -1576,14 +1587,14 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
1576 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; 1587 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY;
1577 if ( lGridSpacingY > 0 ) { 1588 if ( lGridSpacingY > 0 ) {
1578 while (y < cy + ch) { 1589 while (y < cy + ch) {
1579 p->setPen( SolidLine ); 1590 p->setPen( Qt::SolidLine );
1580 p->drawLine(cx,y,cx+cw,y); 1591 p->drawLine(cx,y,cx+cw,y);
1581 y+=lGridSpacingY; 1592 y+=lGridSpacingY;
1582 p->setPen( DotLine ); 1593 p->setPen( Qt::DotLine );
1583 p->drawLine(cx,y,cx+cw,y); 1594 p->drawLine(cx,y,cx+cw,y);
1584 y+=lGridSpacingY; 1595 y+=lGridSpacingY;
1585 } 1596 }
1586 p->setPen( SolidLine ); 1597 p->setPen( Qt::SolidLine );
1587 } 1598 }
1588 mPixPainter.end() ; 1599 mPixPainter.end() ;
1589} 1600}
@@ -1717,7 +1728,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1717 item->select(false); 1728 item->select(false);
1718 mUnusedItems.append( item ); 1729 mUnusedItems.append( item );
1719 mItems.remove( item ); 1730 mItems.remove( item );
1720 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1731 Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1721 KOAgendaItem *itemit; 1732 KOAgendaItem *itemit;
1722 //globalFlagBlockAgendaItemPaint = 1; 1733 //globalFlagBlockAgendaItemPaint = 1;
1723 for ( itemit=oldconflictItems.first(); itemit != 0; 1734 for ( itemit=oldconflictItems.first(); itemit != 0;
@@ -1747,7 +1758,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1747 return; 1758 return;
1748 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); 1759 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ ");
1749 QDate currentDate = QDate::currentDate(); 1760 QDate currentDate = QDate::currentDate();
1750 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); 1761 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda );
1751 QDateTime dt; 1762 QDateTime dt;
1752 if ( todo->hasCompletedDate() ) 1763 if ( todo->hasCompletedDate() )
1753 dt = todo->completed(); 1764 dt = todo->completed();
@@ -1779,7 +1790,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1779 } 1790 }
1780 qApp->processEvents(); 1791 qApp->processEvents();
1781 globalFlagBlockAgendaItemPaint = 0; 1792 globalFlagBlockAgendaItemPaint = 0;
1782 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1793 Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1783 KOAgendaItem *itemit; 1794 KOAgendaItem *itemit;
1784 for ( itemit=oldconflictItems.first(); itemit != 0; 1795 for ( itemit=oldconflictItems.first(); itemit != 0;
1785 itemit=oldconflictItems.next() ) { 1796 itemit=oldconflictItems.next() ) {
@@ -1867,7 +1878,7 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd,
1867 int width = XEnd - XBegin + 1; 1878 int width = XEnd - XBegin + 1;
1868 int count = 0; 1879 int count = 0;
1869 KOAgendaItem *current = 0; 1880 KOAgendaItem *current = 0;
1870 QPtrList<KOAgendaItem> multiItems; 1881 Q3PtrList<KOAgendaItem> multiItems;
1871 for (cellX = XBegin;cellX <= XEnd;++cellX) { 1882 for (cellX = XBegin;cellX <= XEnd;++cellX) {
1872 if (cellX == XBegin) cellYTop = YTop; 1883 if (cellX == XBegin) cellYTop = YTop;
1873 else cellYTop = 0; 1884 else cellYTop = 0;
@@ -1927,7 +1938,7 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
1927 mSelectionHeight = 0; 1938 mSelectionHeight = 0;
1928 mResizeTimer.start( 150 , true ); 1939 mResizeTimer.start( 150 , true );
1929 computeSizes(); 1940 computeSizes();
1930 QScrollView::resizeEvent( ev ); 1941 Q3ScrollView::resizeEvent( ev );
1931 return; 1942 return;
1932 1943
1933} 1944}
@@ -2016,7 +2027,7 @@ void KOAgenda::popupAlarm()
2016 } 2027 }
2017 // TODO: deal correctly with multiple alarms 2028 // TODO: deal correctly with multiple alarms
2018 Alarm* alarm; 2029 Alarm* alarm;
2019 QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); 2030 Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms());
2020 for(alarm=list.first();alarm;alarm=list.next()) { 2031 for(alarm=list.first();alarm;alarm=list.next()) {
2021 alarm->toggleAlarm(); 2032 alarm->toggleAlarm();
2022 } 2033 }
@@ -2107,16 +2118,16 @@ void KOAgenda::selectItem(KOAgendaItem *item)
2107void KOAgenda::keyPressEvent( QKeyEvent *kev ) 2118void KOAgenda::keyPressEvent( QKeyEvent *kev )
2108{ 2119{
2109 switch(kev->key()) { 2120 switch(kev->key()) {
2110 case Key_PageDown: 2121 case Qt::Key_PageDown:
2111 verticalScrollBar()->addPage(); 2122 verticalScrollBar()->addPage();
2112 break; 2123 break;
2113 case Key_PageUp: 2124 case Qt::Key_PageUp:
2114 verticalScrollBar()->subtractPage(); 2125 verticalScrollBar()->subtractPage();
2115 break; 2126 break;
2116 case Key_Down: 2127 case Qt::Key_Down:
2117 verticalScrollBar()->addLine(); 2128 verticalScrollBar()->addLine();
2118 break; 2129 break;
2119 case Key_Up: 2130 case Qt::Key_Up:
2120 verticalScrollBar()->subtractLine(); 2131 verticalScrollBar()->subtractLine();
2121 break; 2132 break;
2122 default: 2133 default:
@@ -2146,7 +2157,7 @@ void KOAgenda::setDateList(const DateList &selectedDates)
2146 mSelectedDates = selectedDates; 2157 mSelectedDates = selectedDates;
2147} 2158}
2148 2159
2149void KOAgenda::setHolidayMask(QMemArray<bool> *mask) 2160void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask)
2150{ 2161{
2151 mHolidayMask = mask; 2162 mHolidayMask = mask;
2152 2163
@@ -2162,7 +2173,7 @@ void KOAgenda::setHolidayMask(QMemArray<bool> *mask)
2162void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) 2173void KOAgenda::contentsMousePressEvent ( QMouseEvent *event )
2163{ 2174{
2164 2175
2165 QScrollView::contentsMousePressEvent(event); 2176 Q3ScrollView::contentsMousePressEvent(event);
2166} 2177}
2167 2178
2168void KOAgenda::storePosition() 2179void KOAgenda::storePosition()
@@ -2196,13 +2207,13 @@ void KOAgenda::restorePosition()
2196void KOAgenda::moveChild( QWidget *w, int x , int y ) 2207void KOAgenda::moveChild( QWidget *w, int x , int y )
2197{ 2208{
2198 ++x; 2209 ++x;
2199 QScrollView::moveChild( w, x , y ); 2210 Q3ScrollView::moveChild( w, x , y );
2200} 2211}
2201#include <qmessagebox.h> 2212#include <qmessagebox.h>
2202#ifdef DESKTOP_VERSION 2213#ifdef DESKTOP_VERSION
2203#include <qprinter.h> 2214#include <qprinter.h>
2204#include <qpainter.h> 2215#include <qpainter.h>
2205#include <qpaintdevicemetrics.h> 2216#include <q3paintdevicemetrics.h>
2206 2217
2207#endif 2218#endif
2208void KOAgenda::printSelection() 2219void KOAgenda::printSelection()
@@ -2231,7 +2242,7 @@ void KOAgenda::printSelection()
2231 return; 2242 return;
2232 } 2243 }
2233 QPainter p( printer ); 2244 QPainter p( printer );
2234 QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); 2245 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( printer );
2235 QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); 2246 QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() );
2236 //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); 2247 //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true );
2237 int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); 2248 int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 380ce62..0708341 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -23,27 +23,36 @@
23#ifndef KOAGENDA_H 23#ifndef KOAGENDA_H
24#define KOAGENDA_H 24#define KOAGENDA_H
25 25
26#include <qscrollview.h> 26#include <q3scrollview.h>
27#include <qtimer.h> 27#include <qtimer.h>
28#include <qmemarray.h> 28#include <q3memarray.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qpixmap.h> 30#include <qpixmap.h>
31#include <qguardedptr.h> 31#include <qpointer.h>
32//Added by qt3to4:
33#include <QResizeEvent>
34#include <Q3Frame>
35#include <QLabel>
36#include <QMouseEvent>
37#include <Q3PtrList>
38#include <Q3PopupMenu>
39#include <QKeyEvent>
40#include <QEvent>
32 41
33#include "koagendaitem.h" 42#include "koagendaitem.h"
34#include "koeventview.h" 43#include "koeventview.h"
35 44
36class QPopupMenu; 45class Q3PopupMenu;
37class QTime; 46class QTime;
38class KConfig; 47class KConfig;
39class QFrame; 48class Q3Frame;
40class KOAgenda; 49class KOAgenda;
41class KCal::Event; 50class KCal::Event;
42class KCal::Todo; 51class KCal::Todo;
43 52
44using namespace KCal; 53using namespace KCal;
45 54
46class MarcusBains : public QFrame { 55class MarcusBains : public Q3Frame {
47 Q_OBJECT 56 Q_OBJECT
48 public: 57 public:
49 MarcusBains(KOAgenda *agenda=0,const char *name=0); 58 MarcusBains(KOAgenda *agenda=0,const char *name=0);
@@ -63,7 +72,7 @@ class MarcusBains : public QFrame {
63}; 72};
64 73
65 74
66class KOAgenda : public QScrollView 75class KOAgenda : public Q3ScrollView
67{ 76{
68 Q_OBJECT 77 Q_OBJECT
69 public: 78 public:
@@ -71,9 +80,9 @@ class KOAgenda : public QScrollView
71 RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT }; 80 RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT };
72 81
73 KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0, 82 KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0,
74 const char * name=0, WFlags f=0 ); 83 const char * name=0, Qt::WFlags f=0 );
75 KOAgenda ( int columns, QWidget * parent=0, 84 KOAgenda ( int columns, QWidget * parent=0,
76 const char * name=0, WFlags f=0 ); 85 const char * name=0, Qt::WFlags f=0 );
77 virtual ~KOAgenda(); 86 virtual ~KOAgenda();
78 bool mInvalidPixmap; 87 bool mInvalidPixmap;
79 88
@@ -117,7 +126,7 @@ class KOAgenda : public QScrollView
117 126
118 void checkScrollBoundaries(); 127 void checkScrollBoundaries();
119 128
120 void setHolidayMask(QMemArray<bool> *); 129 void setHolidayMask(Q3MemArray<bool> *);
121 void setDateList(const DateList &selectedDates); 130 void setDateList(const DateList &selectedDates);
122 DateList dateList() const; 131 DateList dateList() const;
123 void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); 132 void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false);
@@ -277,10 +286,10 @@ class KOAgenda : public QScrollView
277 KOAgendaItem *mClickedItem; 286 KOAgendaItem *mClickedItem;
278 287
279 // The KOAgendaItem, which is being moved/resized 288 // The KOAgendaItem, which is being moved/resized
280 QGuardedPtr<KOAgendaItem> mActionItem; 289 QPointer<KOAgendaItem> mActionItem;
281 290
282 // Currently selected item 291 // Currently selected item
283 QGuardedPtr<KOAgendaItem> mSelectedItem; 292 QPointer<KOAgendaItem> mSelectedItem;
284 293
285 // The Marcus Bains Line widget. 294 // The Marcus Bains Line widget.
286 MarcusBains *mMarcusBains; 295 MarcusBains *mMarcusBains;
@@ -291,16 +300,16 @@ class KOAgenda : public QScrollView
291 bool mItemMoved; 300 bool mItemMoved;
292 301
293 // List of all Items contained in agenda 302 // List of all Items contained in agenda
294 QPtrList<KOAgendaItem> mItems; 303 Q3PtrList<KOAgendaItem> mItems;
295 QPtrList<KOAgendaItem> mUnusedItems; 304 Q3PtrList<KOAgendaItem> mUnusedItems;
296 KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); 305 KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport);
297 QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems 306 Q3PopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
298 QPopupMenu *mNewItemPopup; 307 Q3PopupMenu *mNewItemPopup;
299 308
300 int mOldLowerScrollValue; 309 int mOldLowerScrollValue;
301 int mOldUpperScrollValue; 310 int mOldUpperScrollValue;
302 KOAgendaItem * getItemForTodo ( Todo * todo ); 311 KOAgendaItem * getItemForTodo ( Todo * todo );
303 QMemArray<bool> *mHolidayMask; 312 Q3MemArray<bool> *mHolidayMask;
304 int mCurPixWid; 313 int mCurPixWid;
305 int mCurPixHei; 314 int mCurPixHei;
306}; 315};
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 407424d..0f9a38f 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -19,13 +19,23 @@
19 19
20#include <qlabel.h> 20#include <qlabel.h>
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qhbox.h> 22#include <q3hbox.h>
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qwhatsthis.h> 25#include <q3whatsthis.h>
26#include <qdragobject.h> 26#include <q3dragobject.h>
27#include <qdrawutil.h> 27#include <qdrawutil.h>
28#include <qpainter.h> 28#include <qpainter.h>
29#include <QDesktopWidget>
30//Added by qt3to4:
31#include <Q3PtrList>
32#include <QPixmap>
33#include <QDragEnterEvent>
34#include <QDropEvent>
35#include <QResizeEvent>
36#include <QMouseEvent>
37#include <QEvent>
38#include <QPaintEvent>
29 39
30#include <kiconloader.h> 40#include <kiconloader.h>
31#include <kdebug.h> 41#include <kdebug.h>
@@ -57,10 +67,10 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
57 67
58//-------------------------------------------------------------------------- 68//--------------------------------------------------------------------------
59 69
60class KOAgendaItemWhatsThis :public QWhatsThis 70class KOAgendaItemWhatsThis :public Q3WhatsThis
61{ 71{
62public: 72public:
63 KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; 73 KOAgendaItemWhatsThis( KOAgendaItem* view ) : Q3WhatsThis( view ),_view (view) { };
64 74
65protected: 75protected:
66 virtual QString text( const QPoint& ) 76 virtual QString text( const QPoint& )
@@ -72,15 +82,15 @@ private:
72}; 82};
73 83
74KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, 84KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday,
75 const char *name,WFlags) : 85 const char *name,Qt::WFlags) :
76 QWidget(parent, name), mIncidence(incidence), mDate(qd) 86 QWidget(parent, name), mIncidence(incidence), mDate(qd)
77{ 87{
78#ifndef DESKTOP_VERSION 88#ifndef DESKTOP_VERSION
79 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); 89 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
80#endif 90#endif
81 mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); 91 mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this);
82 int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase 92 Qt::WindowFlags wflags = windowFlags() |Qt::WRepaintNoErase;// WResizeNoErase
83 setWFlags ( wflags); 93 setWindowFlags ( wflags);
84 mAllDay = allday; 94 mAllDay = allday;
85 init ( incidence, qd ); 95 init ( incidence, qd );
86 //setMouseTracking(true); 96 //setMouseTracking(true);
@@ -103,7 +113,7 @@ void KOAgendaItem::initColor ()
103 if ( (mIncidence->typeID() == todoID ) && 113 if ( (mIncidence->typeID() == todoID ) &&
104 ( !((static_cast<Todo*>(mIncidence))->isCompleted()) && 114 ( !((static_cast<Todo*>(mIncidence))->isCompleted()) &&
105 ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) { 115 ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) {
106 if ( (static_cast<Todo*>(mIncidence))->dtDue() < QDateTime::currentDateTime().date()) 116 if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date())
107 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; 117 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ;
108 else 118 else
109 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; 119 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
@@ -132,7 +142,7 @@ void KOAgendaItem::initColor ()
132 } 142 }
133 mColorGroup = QColorGroup( BackgroundColor.light(), 143 mColorGroup = QColorGroup( BackgroundColor.light(),
134 BackgroundColor.dark(),BackgroundColor.light(), 144 BackgroundColor.dark(),BackgroundColor.light(),
135 BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; 145 BackgroundColor.dark(),BackgroundColor, Qt::black, BackgroundColor) ;
136 setBackgroundColor( mBackgroundColor ); 146 setBackgroundColor( mBackgroundColor );
137 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); 147 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250);
138} 148}
@@ -228,28 +238,28 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
228 ++yOff; 238 ++yOff;
229 } 239 }
230 if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) { 240 if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) {
231 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red ); 241 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::red );
232 if ( horLayout ) 242 if ( horLayout )
233 ++xOff; 243 ++xOff;
234 else 244 else
235 ++yOff; 245 ++yOff;
236 } 246 }
237 if (mIncidence->doesRecur()) { 247 if (mIncidence->doesRecur()) {
238 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, blue ); 248 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::blue );
239 if ( horLayout ) 249 if ( horLayout )
240 ++xOff; 250 ++xOff;
241 else 251 else
242 ++yOff; 252 ++yOff;
243 } 253 }
244 if (mIncidence->description().length() > 0) { 254 if (mIncidence->description().length() > 0) {
245 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkGreen ); 255 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkGreen );
246 if ( horLayout ) 256 if ( horLayout )
247 ++xOff; 257 ++xOff;
248 else 258 else
249 ++yOff; 259 ++yOff;
250 } 260 }
251 if (mIncidence->isReadOnly()) { 261 if (mIncidence->isReadOnly()) {
252 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, white ); 262 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::white );
253 if ( horLayout ) 263 if ( horLayout )
254 ++xOff; 264 ++xOff;
255 else 265 else
@@ -259,7 +269,7 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
259 if (mIncidence->attendeeCount()>0) { 269 if (mIncidence->attendeeCount()>0) {
260 270
261 if (mIncidence->organizer() == KOPrefs::instance()->email()) { 271 if (mIncidence->organizer() == KOPrefs::instance()->email()) {
262 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, black ); 272 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::black );
263 if ( horLayout ) 273 if ( horLayout )
264 ++xOff; 274 ++xOff;
265 else 275 else
@@ -270,14 +280,14 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
270 280
271 281
272 } else { 282 } else {
273 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, yellow ); 283 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::yellow );
274 if ( horLayout ) 284 if ( horLayout )
275 ++xOff; 285 ++xOff;
276 else 286 else
277 ++yOff; 287 ++yOff;
278 288
279 } 289 }
280 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkYellow ); 290 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkYellow );
281 if ( horLayout ) 291 if ( horLayout )
282 ++xOff; 292 ++xOff;
283 else 293 else
@@ -420,9 +430,9 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
420 } 430 }
421 int align; 431 int align;
422#ifndef DESKTOP_VERSION 432#ifndef DESKTOP_VERSION
423 align = ( AlignLeft|WordBreak|AlignTop); 433 align = ( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop);
424#else 434#else
425 align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 435 align = ( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
426#endif 436#endif
427 if ( addIcon ) { 437 if ( addIcon ) {
428 if ( ! horLayout ) { 438 if ( ! horLayout ) {
@@ -435,7 +445,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
435 } 445 }
436 } 446 }
437 if ( mWhiteText ) 447 if ( mWhiteText )
438 paint->setPen ( white); 448 paint->setPen ( Qt::white);
439 if ( x < 0 ) { 449 if ( x < 0 ) {
440 w = w+x-3; 450 w = w+x-3;
441 x = 3; 451 x = 3;
@@ -444,9 +454,9 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
444 if ( w > parentWidget()->width() ){ 454 if ( w > parentWidget()->width() ){
445 w = parentWidget()->width() - 6; 455 w = parentWidget()->width() - 6;
446#ifndef DESKTOP_VERSION 456#ifndef DESKTOP_VERSION
447 align = ( AlignHCenter|WordBreak|AlignTop); 457 align = ( Qt::AlignHCenter|Qt::TextWordWrap|Qt::AlignTop);
448#else 458#else
449 align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop); 459 align = ( Qt::AlignHCenter|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
450#endif 460#endif
451 461
452 } 462 }
@@ -561,7 +571,7 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
561 } 571 }
562 } 572 }
563 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh); 573 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh);
564 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP); 574 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,QPainter::CompositionMode_Source);
565} 575}
566void KOAgendaItem::computeText() 576void KOAgendaItem::computeText()
567{ 577{
@@ -628,7 +638,7 @@ void KOAgendaItem::computeText()
628 if (!mIncidence->location().isEmpty()) { 638 if (!mIncidence->location().isEmpty()) {
629 tipText += "\n"+i18n("Location: ")+mIncidence->location(); 639 tipText += "\n"+i18n("Location: ")+mIncidence->location();
630 } 640 }
631 QToolTip::add(this,tipText,toolTipGroup(),""); 641 QToolTip::add(this,tipText /*TODO:hacker: ,toolTipGroup(),"" */);
632#endif 642#endif
633} 643}
634void KOAgendaItem::updateItem() 644void KOAgendaItem::updateItem()
@@ -795,7 +805,7 @@ void KOAgendaItem::expandRight(int dx)
795 805
796QToolTipGroup *KOAgendaItem::toolTipGroup() 806QToolTipGroup *KOAgendaItem::toolTipGroup()
797{ 807{
798 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 808 /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
799 return mToolTipGroup; 809 return mToolTipGroup;
800} 810}
801 811
@@ -803,7 +813,7 @@ void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e )
803{ 813{
804#ifndef KORG_NODND 814#ifndef KORG_NODND
805 if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) || 815 if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) ||
806 !QTextDrag::canDecode( e ) ) { 816 !Q3TextDrag::canDecode( e ) ) {
807 e->ignore(); 817 e->ignore();
808 return; 818 return;
809 } 819 }
@@ -815,7 +825,7 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
815{ 825{
816#ifndef KORG_NODND 826#ifndef KORG_NODND
817 QString text; 827 QString text;
818 if(QTextDrag::decode(e,text)) 828 if(Q3TextDrag::decode(e,text))
819 { 829 {
820 kdDebug() << "Dropped : " << text << endl; 830 kdDebug() << "Dropped : " << text << endl;
821 QStringList emails = QStringList::split(",",text); 831 QStringList emails = QStringList::split(",",text);
@@ -833,12 +843,12 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
833} 843}
834 844
835 845
836QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() 846Q3PtrList<KOAgendaItem> KOAgendaItem::conflictItems()
837{ 847{
838 return mConflictItems; 848 return mConflictItems;
839} 849}
840 850
841void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci) 851void KOAgendaItem::setConflictItems(Q3PtrList<KOAgendaItem> ci)
842{ 852{
843 mConflictItems = ci; 853 mConflictItems = ci;
844 KOAgendaItem *item; 854 KOAgendaItem *item;
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 27ee720..17cf975 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -19,11 +19,18 @@
19#ifndef KOAGENDAITEM_H 19#ifndef KOAGENDAITEM_H
20#define KOAGENDAITEM_H 20#define KOAGENDAITEM_H
21 21
22#include <qframe.h> 22#include <q3frame.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qpalette.h> 26#include <qpalette.h>
27//Added by qt3to4:
28#include <QDropEvent>
29#include <QPaintEvent>
30#include <QResizeEvent>
31#include <Q3PtrList>
32#include <QEvent>
33#include <QDragEnterEvent>
27 34
28#include <libkcal/incidence.h> 35#include <libkcal/incidence.h>
29 36
@@ -45,7 +52,7 @@ class KOAgendaItem : public QWidget
45 Q_OBJECT 52 Q_OBJECT
46 public: 53 public:
47 KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, 54 KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0,
48 WFlags f=0 ); 55 Qt::WFlags f=0 );
49 ~KOAgendaItem(); 56 ~KOAgendaItem();
50 QString getWhatsThisText(); 57 QString getWhatsThisText();
51 void init ( Incidence *incidence, QDate qd ); 58 void init ( Incidence *incidence, QDate qd );
@@ -96,8 +103,8 @@ class KOAgendaItem : public QWidget
96 103
97 static QToolTipGroup *toolTipGroup(); 104 static QToolTipGroup *toolTipGroup();
98 105
99 QPtrList<KOAgendaItem> conflictItems(); 106 Q3PtrList<KOAgendaItem> conflictItems();
100 void setConflictItems(QPtrList<KOAgendaItem>); 107 void setConflictItems(Q3PtrList<KOAgendaItem>);
101 void addConflictItem(KOAgendaItem *ci); 108 void addConflictItem(KOAgendaItem *ci);
102 void paintMe( bool, QPainter* painter = 0 ); 109 void paintMe( bool, QPainter* painter = 0 );
103 void repaintMe(); 110 void repaintMe();
@@ -161,7 +168,7 @@ class KOAgendaItem : public QWidget
161 QColorGroup mColorGroup; 168 QColorGroup mColorGroup;
162 QString mDisplayedText; 169 QString mDisplayedText;
163 bool mSelected; 170 bool mSelected;
164 QPtrList<KOAgendaItem> mConflictItems; 171 Q3PtrList<KOAgendaItem> mConflictItems;
165}; 172};
166 173
167#endif // KOAGENDAITEM_H 174#endif // KOAGENDAITEM_H
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6e65a03..87993ae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -21,21 +21,33 @@
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 23
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qvbox.h> 25#include <q3vbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#ifndef KORG_NOSPLITTER 29#ifndef KORG_NOSPLITTER
30#include <qsplitter.h> 30#include <qsplitter.h>
31#endif 31#endif
32#include <qfont.h> 32#include <qfont.h>
33#include <qfontmetrics.h> 33#include <qfontmetrics.h>
34#include <qpopupmenu.h> 34#include <q3popupmenu.h>
35#include <qtooltip.h> 35#include <qtooltip.h>
36#include <qpainter.h> 36#include <qpainter.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qapplication.h> 38#include <qapplication.h>
39#include <QDesktopWidget>
40//Added by qt3to4:
41#include <QResizeEvent>
42#include <QPixmap>
43#include <QMouseEvent>
44#include <Q3GridLayout>
45#include <Q3ValueList>
46#include <QKeyEvent>
47#include <Q3HBoxLayout>
48#include <Q3VBoxLayout>
49#include <QPaintEvent>
50#include <Q3PtrList>
39 51
40#include <kapplication.h> 52#include <kapplication.h>
41#include <KDGanttMinimizeSplitter.h> 53#include <KDGanttMinimizeSplitter.h>
@@ -78,8 +90,8 @@ using namespace KOrg;
78 90
79#define IDLETIMEOUT 45 91#define IDLETIMEOUT 45
80 92
81TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : 93TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,Qt::WFlags f) :
82 QScrollView(parent,name,f) 94 Q3ScrollView(parent,name,f)
83{ 95{
84 myPix.resize( 1, 1 ); 96 myPix.resize( 1, 1 );
85 mRows = rows; 97 mRows = rows;
@@ -95,7 +107,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
95 107
96 resizeContents(50,mRows * mCellHeight); 108 resizeContents(50,mRows * mCellHeight);
97 109
98 viewport()->setBackgroundMode( PaletteBackground ); 110 viewport()->setBackgroundMode( Qt::PaletteBackground );
99} 111}
100 112
101void TimeLabels::setCellHeight(int height) 113void TimeLabels::setCellHeight(int height)
@@ -283,7 +295,7 @@ void TimeLabels::paintEvent(QPaintEvent*)
283//////////////////////////////////////////////////////////////////////////// 295////////////////////////////////////////////////////////////////////////////
284 296
285EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) 297EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
286 : QFrame(parent,name) 298 : Q3Frame(parent,name)
287{ 299{
288 mColumns = 1; 300 mColumns = 1;
289 mTopBox = 0; 301 mTopBox = 0;
@@ -393,7 +405,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
393 expandPix = SmallIcon("1leftrightarrow" ); 405 expandPix = SmallIcon("1leftrightarrow" );
394 } 406 }
395 407
396 QBoxLayout *topLayout = new QVBoxLayout(this); 408 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
397 409
398 // Create day name labels for agenda columns 410 // Create day name labels for agenda columns
399 // Create agenda splitter 411 // Create agenda splitter
@@ -401,13 +413,13 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
401 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); 413 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
402 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 414 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
403 topLayout->addWidget( mSplitterAgenda ); 415 topLayout->addWidget( mSplitterAgenda );
404 mAllDayFrame = new QHBox(mSplitterAgenda); 416 mAllDayFrame = new Q3HBox(mSplitterAgenda);
405 mAllDayFrame->setFocusPolicy(NoFocus); 417 mAllDayFrame->setFocusPolicy(Qt::NoFocus);
406 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 418 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
407 agendaFrame->setFocusPolicy(NoFocus); 419 agendaFrame->setFocusPolicy(Qt::NoFocus);
408 420
409 // Create all-day agenda widget 421 // Create all-day agenda widget
410 mDummyAllDayLeft = new QVBox( mAllDayFrame ); 422 mDummyAllDayLeft = new Q3VBox( mAllDayFrame );
411 423
412 mExpandButton = new QPushButton(mDummyAllDayLeft); 424 mExpandButton = new QPushButton(mDummyAllDayLeft);
413 mExpandButton->setPixmap( expandPix ); 425 mExpandButton->setPixmap( expandPix );
@@ -420,16 +432,16 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
420 // QSizePolicy::Fixed ) ); 432 // QSizePolicy::Fixed ) );
421 mExpandButton->setFixedSize( widebut, widebut); 433 mExpandButton->setFixedSize( widebut, widebut);
422 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 434 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
423 mExpandButton->setFocusPolicy(NoFocus); 435 mExpandButton->setFocusPolicy(Qt::NoFocus);
424 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 436 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
425 mAllDayAgenda->setFocusPolicy(NoFocus); 437 mAllDayAgenda->setFocusPolicy(Qt::NoFocus);
426 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); 438 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
427 439
428 // Create event context menu for all day agenda 440 // Create event context menu for all day agenda
429 //mAllDayAgendaPopup = eventPopup(); 441 //mAllDayAgendaPopup = eventPopup();
430 442
431 // Create agenda frame 443 // Create agenda frame
432 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); 444 Q3GridLayout *agendaLayout = new Q3GridLayout(agendaFrame,4,3);
433 // QHBox *agendaFrame = new QHBox(splitterAgenda); 445 // QHBox *agendaFrame = new QHBox(splitterAgenda);
434 446
435 // create event indicator bars 447 // create event indicator bars
@@ -437,10 +449,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
437#ifndef DESKTOP_VERSION 449#ifndef DESKTOP_VERSION
438 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 450 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
439#endif 451#endif
440 mDayLabelsFrame = new QHBox(agendaFrame); 452 mDayLabelsFrame = new Q3HBox(agendaFrame);
441 //topLayout->addWidget(mDayLabelsFrame); 453 //topLayout->addWidget(mDayLabelsFrame);
442 mDayLabels = new QFrame (mDayLabelsFrame); 454 mDayLabels = new Q3Frame (mDayLabelsFrame);
443 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 455 mLayoutDayLabels = new Q3HBoxLayout(mDayLabels);
444 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); 456 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
445 agendaLayout->addWidget(mEventIndicatorTop,1,1); 457 agendaLayout->addWidget(mEventIndicatorTop,1,1);
446 458
@@ -460,12 +472,12 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
460 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); 472 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame);
461 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); 473 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2);
462 agendaLayout->setColStretch(1,1); 474 agendaLayout->setColStretch(1,1);
463 mAgenda->setFocusPolicy(NoFocus); 475 mAgenda->setFocusPolicy(Qt::NoFocus);
464 // Create event context menu for agenda 476 // Create event context menu for agenda
465 mAllAgendaPopup = eventPopup(); 477 mAllAgendaPopup = eventPopup();
466 478
467#if 0 479#if 0
468 mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), 480 mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")),
469 i18n("Toggle Alarm"),mAgenda, 481 i18n("Toggle Alarm"),mAgenda,
470 SLOT(popupAlarm()),true); 482 SLOT(popupAlarm()),true);
471 483
@@ -918,9 +930,9 @@ int KOAgendaView::currentDateCount()
918 return mSelectedDates.count(); 930 return mSelectedDates.count();
919} 931}
920 932
921QPtrList<Incidence> KOAgendaView::selectedIncidences() 933Q3PtrList<Incidence> KOAgendaView::selectedIncidences()
922{ 934{
923 QPtrList<Incidence> selected; 935 Q3PtrList<Incidence> selected;
924 Incidence *incidence; 936 Incidence *incidence;
925 937
926 incidence = mAgenda->selectedIncidence(); 938 incidence = mAgenda->selectedIncidence();
@@ -987,8 +999,8 @@ void KOAgendaView::updateConfig()
987 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 999 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
988 1000
989 // ToolTips displaying summary of events 1001 // ToolTips displaying summary of events
990 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 1002 /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
991 ->mEnableToolTips); 1003 ->mEnableToolTips); */
992 1004
993 //setHolidayMasks(); 1005 //setHolidayMasks();
994 1006
@@ -1117,7 +1129,7 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
1117} 1129}
1118 1130
1119 1131
1120void KOAgendaView::showEvents(QPtrList<Event>) 1132void KOAgendaView::showEvents(Q3PtrList<Event>)
1121{ 1133{
1122 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; 1134 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl;
1123} 1135}
@@ -1165,11 +1177,11 @@ void KOAgendaView::fillAgenda()
1165 mMinY.resize(mSelectedDates.count()); 1177 mMinY.resize(mSelectedDates.count());
1166 mMaxY.resize(mSelectedDates.count()); 1178 mMaxY.resize(mSelectedDates.count());
1167 1179
1168 QPtrList<Event> dayEvents; 1180 Q3PtrList<Event> dayEvents;
1169 1181
1170 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1182 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1171 // Therefore, gtodoset all of them. 1183 // Therefore, gtodoset all of them.
1172 QPtrList<Todo> todos = calendar()->todos(); 1184 Q3PtrList<Todo> todos = calendar()->todos();
1173 1185
1174 mAgenda->setDateList(mSelectedDates); 1186 mAgenda->setDateList(mSelectedDates);
1175 1187
@@ -1300,7 +1312,7 @@ void KOAgendaView::fillAgenda()
1300 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1312 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1301 // Already completed items can be displayed on their original due date 1313 // Already completed items can be displayed on their original due date
1302 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda 1314 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
1303 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; 1315 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)today) && KOPrefs::instance()->mShowTodoInAgenda;
1304 bool fillIn = false; 1316 bool fillIn = false;
1305 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) 1317 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate )
1306 fillIn = true; 1318 fillIn = true;
@@ -1503,7 +1515,7 @@ void KOAgendaView::readSettings(KConfig *config)
1503 config->setGroup("Views"); 1515 config->setGroup("Views");
1504 1516
1505 //#ifndef KORG_NOSPLITTER 1517 //#ifndef KORG_NOSPLITTER
1506 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); 1518 Q3ValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
1507 if (sizes.count() == 2) { 1519 if (sizes.count() == 2) {
1508 if ( sizes[0] < 20 ) { 1520 if ( sizes[0] < 20 ) {
1509 sizes[1] = sizes[1] +20 - sizes[0]; 1521 sizes[1] = sizes[1] +20 - sizes[0];
@@ -1524,7 +1536,7 @@ void KOAgendaView::writeSettings(KConfig *config)
1524 config->setGroup("Views"); 1536 config->setGroup("Views");
1525 1537
1526 //#ifndef KORG_NOSPLITTER 1538 //#ifndef KORG_NOSPLITTER
1527 QValueList<int> list = mSplitterAgenda->sizes(); 1539 Q3ValueList<int> list = mSplitterAgenda->sizes();
1528 config->writeEntry("Separator AgendaView",list); 1540 config->writeEntry("Separator AgendaView",list);
1529 //qDebug("write %d %d ", list[0],list[1] ); 1541 //qDebug("write %d %d ", list[0],list[1] );
1530 //#endif 1542 //#endif
@@ -1541,7 +1553,7 @@ void KOAgendaView::setHolidayMasks()
1541 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); 1553 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
1542 bool showHoliday = false; 1554 bool showHoliday = false;
1543 if ( KOPrefs::instance()->mExcludeHolidays ) { 1555 if ( KOPrefs::instance()->mExcludeHolidays ) {
1544 QPtrList<Event> events = calendar()->events( date, true ); 1556 Q3PtrList<Event> events = calendar()->events( date, true );
1545 Event *event; 1557 Event *event;
1546 for( event = events.first(); event; event = events.next() ) { 1558 for( event = events.first(); event; event = events.next() ) {
1547 if ( event->isHoliday()) { 1559 if ( event->isHoliday()) {
@@ -1663,7 +1675,7 @@ void KOAgendaView::updateTodo( Todo * t, int )
1663 removeAD = true; 1675 removeAD = true;
1664 } 1676 }
1665 else { 1677 else {
1666 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; 1678 bool overdue = (!t->isCompleted()) && (t->dtDue() < (QDateTime)QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
1667 if ( overdue && 1679 if ( overdue &&
1668 QDate::currentDate() >= mSelectedDates.first() && 1680 QDate::currentDate() >= mSelectedDates.first() &&
1669 QDate::currentDate() <= mSelectedDates.last()) { 1681 QDate::currentDate() <= mSelectedDates.last()) {
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 5e68146..3b871d9 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -23,21 +23,31 @@
23#ifndef KOAGENDAVIEW_H 23#ifndef KOAGENDAVIEW_H
24#define KOAGENDAVIEW_H 24#define KOAGENDAVIEW_H
25 25
26#include <qscrollview.h> 26#include <q3scrollview.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <Q3BoxLayout>
30#ifndef DESKTOP_VERSION 31#ifndef DESKTOP_VERSION
31#include <qksplitter.h> 32#include <qksplitter.h>
32#else 33#else
33#include <qsplitter.h> 34#include <qsplitter.h>
34#endif 35#endif
35#include <qmemarray.h> 36#include <q3memarray.h>
37//Added by qt3to4:
38#include <QPaintEvent>
39#include <QResizeEvent>
40#include <Q3Frame>
41#include <QPixmap>
42#include <QLabel>
43#include <QMouseEvent>
44#include <Q3PtrList>
45#include <QKeyEvent>
36 46
37#include "koeventview.h" 47#include "koeventview.h"
38 48
39class QHBox; 49class Q3HBox;
40class QFrame; 50class Q3Frame;
41class QLabel; 51class QLabel;
42class QPushButton; 52class QPushButton;
43class CalendarView; 53class CalendarView;
@@ -55,7 +65,7 @@ class KOAgendaButton : public QPushButton
55 { 65 {
56 mNum = -3; 66 mNum = -3;
57 setFlat( true ); 67 setFlat( true );
58 setFocusPolicy(NoFocus); 68 setFocusPolicy(Qt::NoFocus);
59 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); 69 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
60 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); 70 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) );
61 }; 71 };
@@ -70,10 +80,10 @@ private:
70 int mNum; 80 int mNum;
71}; 81};
72 82
73class TimeLabels : public QScrollView { 83class TimeLabels : public Q3ScrollView {
74 Q_OBJECT 84 Q_OBJECT
75 public: 85 public:
76 TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); 86 TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0);
77 87
78 void setCellHeight(int height); 88 void setCellHeight(int height);
79 89
@@ -113,7 +123,7 @@ class TimeLabels : public QScrollView {
113 KOAgenda* mAgenda; 123 KOAgenda* mAgenda;
114}; 124};
115 125
116class EventIndicator : public QFrame { 126class EventIndicator : public Q3Frame {
117 Q_OBJECT 127 Q_OBJECT
118 public: 128 public:
119 enum Location { Top, Bottom }; 129 enum Location { Top, Bottom };
@@ -132,11 +142,11 @@ class EventIndicator : public QFrame {
132 int mXOffset; 142 int mXOffset;
133 KDGanttMinimizeSplitter* mPaintWidget; 143 KDGanttMinimizeSplitter* mPaintWidget;
134 int mColumns; 144 int mColumns;
135 QHBox *mTopBox; 145 Q3HBox *mTopBox;
136 QBoxLayout *mTopLayout; 146 Q3BoxLayout *mTopLayout;
137 Location mLocation; 147 Location mLocation;
138 QPixmap mPixmap; 148 QPixmap mPixmap;
139 QMemArray<bool> mEnabled; 149 Q3MemArray<bool> mEnabled;
140}; 150};
141 151
142/** 152/**
@@ -159,7 +169,7 @@ class KOAgendaView : public KOEventView {
159 virtual int currentDateCount(); 169 virtual int currentDateCount();
160 170
161 /** returns the currently selected events */ 171 /** returns the currently selected events */
162 virtual QPtrList<Incidence> selectedIncidences(); 172 virtual Q3PtrList<Incidence> selectedIncidences();
163 173
164 /** returns the currently selected events */ 174 /** returns the currently selected events */
165 virtual DateList selectedDates(); 175 virtual DateList selectedDates();
@@ -185,7 +195,7 @@ class KOAgendaView : public KOEventView {
185 virtual void updateView(); 195 virtual void updateView();
186 virtual void updateConfig(); 196 virtual void updateConfig();
187 virtual void showDates(const QDate &start, const QDate &end); 197 virtual void showDates(const QDate &start, const QDate &end);
188 virtual void showEvents(QPtrList<Event> eventList); 198 virtual void showEvents(Q3PtrList<Event> eventList);
189 199
190 void updateTodo( Todo *, int ); 200 void updateTodo( Todo *, int );
191 void changeEventDisplay(Event *, int); 201 void changeEventDisplay(Event *, int);
@@ -260,10 +270,10 @@ class KOAgendaView : public KOEventView {
260 QTimer* mIdleTimer; 270 QTimer* mIdleTimer;
261 QDateTime mIdleStart; 271 QDateTime mIdleStart;
262 // view widgets 272 // view widgets
263 QFrame *mDayLabels; 273 Q3Frame *mDayLabels;
264 QHBox *mDayLabelsFrame; 274 Q3HBox *mDayLabelsFrame;
265 QBoxLayout *mLayoutDayLabels; 275 Q3BoxLayout *mLayoutDayLabels;
266 QFrame *mAllDayFrame; 276 Q3Frame *mAllDayFrame;
267 KOAgenda *mAllDayAgenda; 277 KOAgenda *mAllDayAgenda;
268 KOAgenda *mAgenda; 278 KOAgenda *mAgenda;
269 TimeLabels *mTimeLabels; 279 TimeLabels *mTimeLabels;
@@ -284,12 +294,12 @@ class KOAgendaView : public KOEventView {
284 EventIndicator *mEventIndicatorTop; 294 EventIndicator *mEventIndicatorTop;
285 EventIndicator *mEventIndicatorBottom; 295 EventIndicator *mEventIndicatorBottom;
286 296
287 QMemArray<int> mMinY; 297 Q3MemArray<int> mMinY;
288 QMemArray<int> mMaxY; 298 Q3MemArray<int> mMaxY;
289 299
290 QMemArray<bool> mHolidayMask; 300 Q3MemArray<bool> mHolidayMask;
291 301
292 QPtrList<KOAgendaButton> mDayLabelsList; 302 Q3PtrList<KOAgendaButton> mDayLabelsList;
293 QDateTime mTimeSpanBegin; 303 QDateTime mTimeSpanBegin;
294 QDateTime mTimeSpanEnd; 304 QDateTime mTimeSpanEnd;
295 bool mTimeSpanInAllDay; 305 bool mTimeSpanInAllDay;
diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h
index c8dcf45..493d9e1 100644
--- a/korganizer/kocounterdialog.h
+++ b/korganizer/kocounterdialog.h
@@ -22,7 +22,7 @@
22// Viewer dialog for counter events. 22// Viewer dialog for counter events.
23// 23//
24 24
25#include <qtextview.h> 25#include <q3textview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 52fd1e8..4f681b3 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -24,9 +24,18 @@
24 24
25#include <qevent.h> 25#include <qevent.h>
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qwhatsthis.h> 29#include <q3whatsthis.h>
30//Added by qt3to4:
31#include <QDragLeaveEvent>
32#include <Q3Frame>
33#include <QDragEnterEvent>
34#include <QDragMoveEvent>
35#include <QDropEvent>
36#include <QResizeEvent>
37#include <QMouseEvent>
38#include <QPaintEvent>
30 39
31#include <kglobal.h> 40#include <kglobal.h>
32#include <kdebug.h> 41#include <kdebug.h>
@@ -54,15 +63,15 @@
54// ============================================================================ 63// ============================================================================
55 64
56DynamicTip::DynamicTip( QWidget * parent ) 65DynamicTip::DynamicTip( QWidget * parent )
57 : QToolTip( parent ) 66 /* TODO:hacker: : QToolTip( parent ) */
58{ 67{
59 matrix = (KODayMatrix*)parent; 68 matrix = (KODayMatrix*)parent;
60} 69}
61 70
62class KODaymatrixWhatsThis :public QWhatsThis 71class KODaymatrixWhatsThis :public Q3WhatsThis
63{ 72{
64public: 73public:
65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;}; 74 KODaymatrixWhatsThis( KODayMatrix* view ) : Q3WhatsThis( view ),_view (view) { ;};
66 ~KODaymatrixWhatsThis() { ; }; 75 ~KODaymatrixWhatsThis() { ; };
67 76
68protected: 77protected:
@@ -91,7 +100,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
91 //show holiday names only 100 //show holiday names only
92 QString str = matrix->getHolidayLabel(col+row*7); 101 QString str = matrix->getHolidayLabel(col+row*7);
93 if (str.isEmpty()) return; 102 if (str.isEmpty()) return;
94 tip(rct, str); 103 /* TODO:hacker: tip(rct, str);*/
95} 104}
96 105
97 106
@@ -103,7 +112,7 @@ const int KODayMatrix::NOSELECTION = -1000;
103const int KODayMatrix::NUMDAYS = 42; 112const int KODayMatrix::NUMDAYS = 42;
104 113
105KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) 114KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
106 : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) 115 : Q3Frame( parent, name , Qt::WNoAutoErase ), mCalendar( 0 )
107 116
108 117
109{ 118{
@@ -151,7 +160,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
151 if ( tmp < 0 || tmp > NUMDAYS-1 || !mCalendar ) 160 if ( tmp < 0 || tmp > NUMDAYS-1 || !mCalendar )
152 return QString(); 161 return QString();
153 QDate mDate = days[tmp]; 162 QDate mDate = days[tmp];
154 QPtrList<Event> eventlist = mCalendar->events(mDate); 163 Q3PtrList<Event> eventlist = mCalendar->events(mDate);
155 Event *event; 164 Event *event;
156 QStringList mToolTip; 165 QStringList mToolTip;
157 for(event=eventlist.first();event != 0;event=eventlist.next()) { 166 for(event=eventlist.first();event != 0;event=eventlist.next()) {
@@ -205,7 +214,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
205 } 214 }
206 mToolTip.sort(); 215 mToolTip.sort();
207 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 216 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
208 QPtrList<Todo> todolist = mCalendar->todos(mDate); 217 Q3PtrList<Todo> todolist = mCalendar->todos(mDate);
209 Todo *todo; 218 Todo *todo;
210 for(todo=todolist.first();todo != 0;todo=todolist.next()) { 219 for(todo=todolist.first();todo != 0;todo=todolist.next()) {
211 QString mToolTipText; 220 QString mToolTipText;
@@ -220,7 +229,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
220 } 229 }
221 } 230 }
222 if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 231 if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
223 QPtrList<Journal> j_list = mCalendar->journals4Date( mDate ); 232 Q3PtrList<Journal> j_list = mCalendar->journals4Date( mDate );
224 Journal *j = j_list.first(); 233 Journal *j = j_list.first();
225 while ( j ) { 234 while ( j ) {
226 QString mToolTipText; 235 QString mToolTipText;
@@ -441,7 +450,7 @@ void KODayMatrix::updateViewTimed()
441 450
442 int i; 451 int i;
443 int timeSpan = NUMDAYS-1; 452 int timeSpan = NUMDAYS-1;
444 QPtrList<Event> events = mCalendar->events(); 453 Q3PtrList<Event> events = mCalendar->events();
445 Event *event; 454 Event *event;
446 QDateTime dt; 455 QDateTime dt;
447 bool ok; 456 bool ok;
@@ -526,7 +535,7 @@ void KODayMatrix::updateViewTimed()
526 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 535 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
527 bDays.fill( false); 536 bDays.fill( false);
528 // insert due todos 537 // insert due todos
529 QPtrList<Todo> todos = mCalendar->todos( ); 538 Q3PtrList<Todo> todos = mCalendar->todos( );
530 Todo *todo; 539 Todo *todo;
531 for(todo = todos.first(); todo; todo = todos.next()) { 540 for(todo = todos.first(); todo; todo = todos.next()) {
532 //insertTodo( todo ); 541 //insertTodo( todo );
@@ -551,7 +560,7 @@ void KODayMatrix::updateViewTimed()
551 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 560 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
552 bDays.fill( false); 561 bDays.fill( false);
553 // insert due todos 562 // insert due todos
554 QPtrList<Journal> todos = mCalendar->journals( ); 563 Q3PtrList<Journal> todos = mCalendar->journals( );
555 Journal *todo; 564 Journal *todo;
556 for(todo = todos.first(); todo; todo = todos.next()) { 565 for(todo = todos.first(); todo; todo = todos.next()) {
557 int day = mStartDate.daysTo( todo->dtStart().date() ); 566 int day = mStartDate.daysTo( todo->dtStart().date() );
@@ -575,7 +584,7 @@ void KODayMatrix::updateViewTimed()
575 //qDebug("KODayMatrix::updateViewTimed "); 584 //qDebug("KODayMatrix::updateViewTimed ");
576 for(int i = 0; i < NUMDAYS; i++) { 585 for(int i = 0; i < NUMDAYS; i++) {
577 // if events are set for the day then remember to draw it bold 586 // if events are set for the day then remember to draw it bold
578 QPtrList<Event> eventlist = mCalendar->events(days[i]); 587 Q3PtrList<Event> eventlist = mCalendar->events(days[i]);
579 Event *event; 588 Event *event;
580 int numEvents = eventlist.count(); 589 int numEvents = eventlist.count();
581 QString holiStr = ""; 590 QString holiStr = "";
@@ -675,7 +684,7 @@ void KODayMatrix::updateEvents()
675 684
676 for( int i = 0; i < NUMDAYS; i++ ) { 685 for( int i = 0; i < NUMDAYS; i++ ) {
677 // if events are set for the day then remember to draw it bold 686 // if events are set for the day then remember to draw it bold
678 QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); 687 Q3PtrList<Event> eventlist = mCalendar->events( days[ i ] );
679 int numEvents = eventlist.count(); 688 int numEvents = eventlist.count();
680 Event *event; 689 Event *event;
681 for( event = eventlist.first(); event != 0;event=eventlist.next()) { 690 for( event = eventlist.first(); event != 0;event=eventlist.next()) {
@@ -739,7 +748,7 @@ int KODayMatrix::getDayIndexFrom(int x, int y)
739void KODayMatrix::mousePressEvent (QMouseEvent* e) 748void KODayMatrix::mousePressEvent (QMouseEvent* e)
740{ 749{
741 750
742 if ( e->button() == LeftButton ) 751 if ( e->button() == Qt::LeftButton )
743 mouseDown = true; 752 mouseDown = true;
744 mSelStart = getDayIndexFrom(e->x(), e->y()); 753 mSelStart = getDayIndexFrom(e->x(), e->y());
745 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; 754 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
@@ -752,7 +761,7 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e)
752void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) 761void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
753{ 762{
754 mRedrawNeeded = true; 763 mRedrawNeeded = true;
755 if ( e->button() == LeftButton ) 764 if ( e->button() == Qt::LeftButton )
756 if ( ! mouseDown ) { 765 if ( ! mouseDown ) {
757 return; 766 return;
758 } 767 }
@@ -1195,7 +1204,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
1195 //qDebug("NO redraw "); 1204 //qDebug("NO redraw ");
1196 } 1205 }
1197 1206
1198 bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); 1207 bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,QPainter::CompositionMode_Source);
1199 mRedrawNeeded = false; 1208 mRedrawNeeded = false;
1200} 1209}
1201 1210
@@ -1208,7 +1217,7 @@ void KODayMatrix::resizeEvent(QResizeEvent * e)
1208 QRect sz = frameRect(); 1217 QRect sz = frameRect();
1209 daysize.setHeight(sz.height()*7 / NUMDAYS); 1218 daysize.setHeight(sz.height()*7 / NUMDAYS);
1210 daysize.setWidth(sz.width() / 7); 1219 daysize.setWidth(sz.width() / 7);
1211 QFrame::resizeEvent( e ); 1220 Q3Frame::resizeEvent( e );
1212} 1221}
1213 1222
1214QSize KODayMatrix::sizeHint() const 1223QSize KODayMatrix::sizeHint() const
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index b96e08f..6edf7cd 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -26,7 +26,7 @@
26#include <libkcal/calendar.h> 26#include <libkcal/calendar.h>
27 27
28#include <qstring.h> 28#include <qstring.h>
29#include <qframe.h> 29#include <q3frame.h>
30#include <qcolor.h> 30#include <qcolor.h>
31#include <qpen.h> 31#include <qpen.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
@@ -34,6 +34,14 @@
34#include <qpixmap.h> 34#include <qpixmap.h>
35#include <qbitarray.h> 35#include <qbitarray.h>
36#include <qmap.h> 36#include <qmap.h>
37//Added by qt3to4:
38#include <QDragMoveEvent>
39#include <QDropEvent>
40#include <QDragLeaveEvent>
41#include <QPaintEvent>
42#include <QResizeEvent>
43#include <QMouseEvent>
44#include <QDragEnterEvent>
37 45
38class QDragEnterEvent; 46class QDragEnterEvent;
39class QDragMoveEvent; 47class QDragMoveEvent;
@@ -51,7 +59,7 @@ using namespace KCal;
51 * This class asks the day matrix object for a appropriate label which 59 * This class asks the day matrix object for a appropriate label which
52 * is in our special case the name of the holiday or null if this day is no holiday. 60 * is in our special case the name of the holiday or null if this day is no holiday.
53 */ 61 */
54class DynamicTip : public QToolTip 62class DynamicTip /* TODO:hacker: : public QToolTip */
55{ 63{
56public: 64public:
57 65
@@ -103,7 +111,7 @@ private:
103 * 111 *
104 * @author Eitzenberger Thomas 112 * @author Eitzenberger Thomas
105 */ 113 */
106class KODayMatrix: public QFrame { 114class KODayMatrix: public Q3Frame {
107 115
108 Q_OBJECT 116 Q_OBJECT
109 117
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index ea30fac..deb1e46 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -41,6 +41,8 @@
41#include "kconfig.h" 41#include "kconfig.h"
42#include "kodialogmanager.h" 42#include "kodialogmanager.h"
43#include <kapplication.h> 43#include <kapplication.h>
44//Added by qt3to4:
45#include <Q3PtrList>
44 46
45KODialogManager::KODialogManager( CalendarView *mainView ) : 47KODialogManager::KODialogManager( CalendarView *mainView ) :
46 QObject(), mMainView( mainView ) 48 QObject(), mMainView( mainView )
@@ -188,8 +190,8 @@ void KODialogManager::showSearchDialog()
188 mMainView, SLOT(beamIncidence(Incidence *))); 190 mMainView, SLOT(beamIncidence(Incidence *)));
189 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), 191 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)),
190 mMainView, SLOT(moveIncidence(Incidence *))); 192 mMainView, SLOT(moveIncidence(Incidence *)));
191 connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), 193 connect(lview, SIGNAL(beamIncidenceList(Q3PtrList<Incidence> )),
192 mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); 194 mMainView, SLOT(beamIncidenceList(Q3PtrList<Incidence> )));
193 195
194 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); 196 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig()));
195 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); 197 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList()));
@@ -246,7 +248,7 @@ void KODialogManager::showArchiveDialog()
246#endif 248#endif
247} 249}
248 250
249void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) 251void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters)
250{ 252{
251 if (!mFilterEditDialog) { 253 if (!mFilterEditDialog) {
252 mFilterEditDialog = new FilterEditDialog(filters,mMainView); 254 mFilterEditDialog = new FilterEditDialog(filters,mMainView);
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index b68ddc2..00ad1df 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -25,7 +25,7 @@
25#define KODIALOGMANAGER_H 25#define KODIALOGMANAGER_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <libkcal/calfilter.h> 30#include <libkcal/calfilter.h>
31 31
@@ -78,7 +78,7 @@ class KODialogManager : public QObject
78 // void showCategoryEditDialog(); 78 // void showCategoryEditDialog();
79 void showSearchDialog(); 79 void showSearchDialog();
80 void showArchiveDialog(); 80 void showArchiveDialog();
81 void showFilterEditDialog(QPtrList<CalFilter> *filters); 81 void showFilterEditDialog(Q3PtrList<CalFilter> *filters);
82 void showPluginDialog(); 82 void showPluginDialog();
83 void hideSearchDialog(); 83 void hideSearchDialog();
84 84
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 9a4b4ec..a01c838 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -22,14 +22,20 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapp.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3GridLayout>
36#include <QLabel>
37#include <Q3PtrList>
38#include <Q3VBoxLayout>
33 39
34#include <klocale.h> 40#include <klocale.h>
35#include <kglobal.h> 41#include <kglobal.h>
@@ -80,7 +86,7 @@ void CustomListViewItem<Attendee *>::updateItem()
80KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 86KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
81 : QWidget( parent, name), mDisableItemUpdate( false ) 87 : QWidget( parent, name), mDisableItemUpdate( false )
82{ 88{
83 QGridLayout *topLayout = new QGridLayout(this); 89 Q3GridLayout *topLayout = new Q3GridLayout(this);
84 topLayout->setSpacing(spacing); 90 topLayout->setSpacing(spacing);
85 topLayout->setMargin(KDialog::marginHint()-2); 91 topLayout->setMargin(KDialog::marginHint()-2);
86 92
@@ -101,11 +107,11 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
101 } 107 }
102 mListView->setAllColumnsShowFocus (true ); 108 mListView->setAllColumnsShowFocus (true );
103 //mListView->setSingleClick( true ); 109 //mListView->setSingleClick( true );
104 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 110 connect(mListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
105 SLOT(updateAttendeeInput())); 111 SLOT(updateAttendeeInput()));
106 112
107 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 113 connect(mListView,SIGNAL(executed(Q3ListViewItem * ,const QPoint&, int )),
108 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 114 SLOT(itemClicked(Q3ListViewItem * ,const QPoint& , int )));
109 115
110 mRsvpButton = new QCheckBox(this); 116 mRsvpButton = new QCheckBox(this);
111 mRsvpButton->setText(i18n("Request response")); 117 mRsvpButton->setText(i18n("Request response"));
@@ -140,7 +146,7 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
140 146
141 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 147 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
142 QWidget *buttonBox = new QWidget(this); 148 QWidget *buttonBox = new QWidget(this);
143 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); 149 Q3VBoxLayout *buttonLayout = new Q3VBoxLayout(buttonBox);
144 150
145 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); 151 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
146 buttonLayout->addWidget(newButton); 152 buttonLayout->addWidget(newButton);
@@ -365,7 +371,7 @@ void KOEditorDetails::readEvent(Incidence *event)
365 setDefaults(); 371 setDefaults();
366 //mListView->clear(); 372 //mListView->clear();
367 //mdelAttendees.clear(); 373 //mdelAttendees.clear();
368 QPtrList<Attendee> tmpAList = event->attendees(); 374 Q3PtrList<Attendee> tmpAList = event->attendees();
369 Attendee *a; 375 Attendee *a;
370 for (a = tmpAList.first(); a; a = tmpAList.next()) 376 for (a = tmpAList.first(); a; a = tmpAList.next())
371 insertAttendee(new Attendee(*a)); 377 insertAttendee(new Attendee(*a));
@@ -377,7 +383,7 @@ void KOEditorDetails::readEvent(Incidence *event)
377void KOEditorDetails::writeEvent(Incidence *event) 383void KOEditorDetails::writeEvent(Incidence *event)
378{ 384{
379 event->clearAttendees(); 385 event->clearAttendees();
380 QListViewItem *item; 386 Q3ListViewItem *item;
381 AttendeeListItem *a; 387 AttendeeListItem *a;
382 for (item = mListView->firstChild(); item; 388 for (item = mListView->firstChild(); item;
383 item = item->nextSibling()) { 389 item = item->nextSibling()) {
@@ -404,7 +410,7 @@ bool KOEditorDetails::validateInput()
404 410
405void KOEditorDetails::updateAttendeeInput() 411void KOEditorDetails::updateAttendeeInput()
406{ 412{
407 QListViewItem *item = mListView->selectedItem(); 413 Q3ListViewItem *item = mListView->selectedItem();
408 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); 414 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
409 if (aItem) { 415 if (aItem) {
410 fillAttendeeInput( aItem ); 416 fillAttendeeInput( aItem );
@@ -451,7 +457,7 @@ void KOEditorDetails::setEnabledAttendeeInput( bool enabled )
451 mRemoveButton->setEnabled( enabled ); 457 mRemoveButton->setEnabled( enabled );
452} 458}
453 459
454void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c ) 460void KOEditorDetails::itemClicked(Q3ListViewItem * item ,const QPoint & pnt, int c )
455{ 461{
456 if ( item && c == 4 ) { 462 if ( item && c == 4 ) {
457 mRsvpButton->setChecked( !mRsvpButton->isChecked() ); 463 mRsvpButton->setChecked( !mRsvpButton->isChecked() );
@@ -462,7 +468,7 @@ void KOEditorDetails::updateAttendeeItem()
462{ 468{
463 if (mDisableItemUpdate) return; 469 if (mDisableItemUpdate) return;
464 470
465 QListViewItem *item = mListView->selectedItem(); 471 Q3ListViewItem *item = mListView->selectedItem();
466 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); 472 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
467 if ( !aItem ) return; 473 if ( !aItem ) return;
468 474
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 5f8f6f2..40e896c 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -24,17 +24,17 @@
24#define _KOEDITORDETAILS_H 24#define _KOEDITORDETAILS_H
25 25
26#include <qmap.h> 26#include <qmap.h>
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qcheckbox.h> 29#include <qcheckbox.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qmultilineedit.h> 34#include <q3multilineedit.h>
35#include <klistview.h> 35#include <klistview.h>
36#include <qradiobutton.h> 36#include <qradiobutton.h>
37#include <qptrlist.h> 37#include <q3ptrlist.h>
38 38
39#include <kapplication.h> 39#include <kapplication.h>
40 40
@@ -83,7 +83,7 @@ class KOEditorDetails : public QWidget
83 void updateAttendeeInput(); 83 void updateAttendeeInput();
84 void clearAttendeeInput(); 84 void clearAttendeeInput();
85 void fillAttendeeInput(AttendeeListItem *); 85 void fillAttendeeInput(AttendeeListItem *);
86 void itemClicked(QListViewItem *,const QPoint & pnt, int c); 86 void itemClicked(Q3ListViewItem *,const QPoint & pnt, int c);
87 void updateAttendeeItem(); 87 void updateAttendeeItem();
88 void setEnabledAttendeeInput(bool); 88 void setEnabledAttendeeInput(bool);
89 89
@@ -103,7 +103,7 @@ class KOEditorDetails : public QWidget
103 QPushButton* mRemoveButton; 103 QPushButton* mRemoveButton;
104 QPushButton* mAddressBookButton; 104 QPushButton* mAddressBookButton;
105 105
106 QPtrList<Attendee> mdelAttendees; 106 Q3PtrList<Attendee> mdelAttendees;
107}; 107};
108 108
109#endif 109#endif
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 21f220c..8105432 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -24,15 +24,22 @@
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qtimer.h> 32#include <qtimer.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qregexp.h> 34#include <qregexp.h>
35//Added by qt3to4:
36#include <Q3HBoxLayout>
37#include <QLabel>
38#include <Q3GridLayout>
39#include <Q3PtrList>
40#include <Q3PopupMenu>
35 41
42#include <QDesktopWidget>
36 43
37#include <kglobal.h> 44#include <kglobal.h>
38#include <kdialog.h> 45#include <kdialog.h>
@@ -69,9 +76,9 @@ KOEditorGeneral::~KOEditorGeneral()
69{ 76{
70} 77}
71 78
72void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) 79void KOEditorGeneral::initHeader(QWidget *parent,Q3BoxLayout *topLayout)
73{ 80{
74 QGridLayout *headerLayout = new QGridLayout(topLayout); 81 Q3GridLayout *headerLayout = new Q3GridLayout(topLayout);
75 82
76#if 0 83#if 0
77 mOwnerLabel = new QLabel(i18n("Owner:"),parent); 84 mOwnerLabel = new QLabel(i18n("Owner:"),parent);
@@ -195,10 +202,10 @@ void KOEditorGeneral::selectedCatPopup( int index )
195 setCategories( categories.join(",") ); 202 setCategories( categories.join(",") );
196} 203}
197 204
198void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) 205void KOEditorGeneral::initCategories(QWidget *parent, Q3BoxLayout *topLayout)
199{ 206{
200 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); 207 Q3BoxLayout *categoriesLayout = new Q3HBoxLayout( topLayout );
201 mCatPopup = new QPopupMenu ( parent ); 208 mCatPopup = new Q3PopupMenu ( parent );
202 mCatPopup->setCheckable (true); 209 mCatPopup->setCheckable (true);
203 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); 210 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
204 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); 211 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
@@ -214,9 +221,9 @@ void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
214 categoriesLayout->addWidget(mCategoriesLabel,1); 221 categoriesLayout->addWidget(mCategoriesLabel,1);
215} 222}
216 223
217void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) 224void KOEditorGeneral::initSecrecy(QWidget *parent, Q3BoxLayout *topLayout)
218{ 225{
219 QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); 226 Q3BoxLayout *secrecyLayout = new Q3HBoxLayout( topLayout );
220 227
221 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); 228 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent);
222 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent); 229 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent);
@@ -228,7 +235,7 @@ void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
228 secrecyLayout->addWidget(mSecrecyCombo); 235 secrecyLayout->addWidget(mSecrecyCombo);
229} 236}
230 237
231void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) 238void KOEditorGeneral::initDescription(QWidget *parent,Q3BoxLayout *topLayout)
232{ 239{
233 mDescriptionEdit = new KTextEdit(parent); 240 mDescriptionEdit = new KTextEdit(parent);
234 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont ); 241 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont );
@@ -243,9 +250,9 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
243 250
244} 251}
245 252
246void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) 253void KOEditorGeneral::initAlarm(QWidget *parent,Q3BoxLayout *topLayout)
247{ 254{
248 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); 255 Q3BoxLayout *alarmLayout = new Q3HBoxLayout(topLayout);
249 256
250 //mAlarmBell = new QLabel(parent); 257 //mAlarmBell = new QLabel(parent);
251 //mAlarmBell->setPixmap(SmallIcon("bell")); 258 //mAlarmBell->setPixmap(SmallIcon("bell"));
@@ -528,7 +535,7 @@ void KOEditorGeneral::readIncidence(Incidence *event)
528 mAlarmSoundButton->setOn(false); 535 mAlarmSoundButton->setOn(false);
529 536
530 // set up alarm stuff 537 // set up alarm stuff
531 QPtrList<Alarm> alarms = event->alarms(); 538 Q3PtrList<Alarm> alarms = event->alarms();
532 Alarm* alarm; 539 Alarm* alarm;
533 mAlarmIncrCombo->setCurrentItem(0); 540 mAlarmIncrCombo->setCurrentItem(0);
534 for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) { 541 for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) {
@@ -590,7 +597,7 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
590 if (mAlarmButton->isChecked()) { 597 if (mAlarmButton->isChecked()) {
591 if (event->alarms().count() == 0) 598 if (event->alarms().count() == 0)
592 event->newAlarm(); 599 event->newAlarm();
593 QPtrList<Alarm> alarms = event->alarms(); 600 Q3PtrList<Alarm> alarms = event->alarms();
594 Alarm *alarm; 601 Alarm *alarm;
595 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { 602 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
596 alarm->setEnabled(true); 603 alarm->setEnabled(true);
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b10a5d4..45f26fd 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -23,19 +23,20 @@
23#ifndef KOEDITORGENERAL_H 23#ifndef KOEDITORGENERAL_H
24#define KOEDITORGENERAL_H 24#define KOEDITORGENERAL_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qpopupmenu.h> 30#include <q3popupmenu.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qcombobox.h> 38#include <qcombobox.h>
39#include <Q3BoxLayout>
39 40
40#include <ktextedit.h> 41#include <ktextedit.h>
41#include <krestrictedline.h> 42#include <krestrictedline.h>
@@ -55,11 +56,11 @@ class KOEditorGeneral : public QObject
55 KOEditorGeneral (QObject* parent=0,const char* name=0); 56 KOEditorGeneral (QObject* parent=0,const char* name=0);
56 virtual ~KOEditorGeneral(); 57 virtual ~KOEditorGeneral();
57 void setFocusOn( int i ); 58 void setFocusOn( int i );
58 void initHeader(QWidget *,QBoxLayout *); 59 void initHeader(QWidget *,Q3BoxLayout *);
59 void initDescription(QWidget *,QBoxLayout *); 60 void initDescription(QWidget *,Q3BoxLayout *);
60 void initSecrecy(QWidget *,QBoxLayout *); 61 void initSecrecy(QWidget *,Q3BoxLayout *);
61 void initCategories(QWidget *,QBoxLayout *); 62 void initCategories(QWidget *,Q3BoxLayout *);
62 void initAlarm(QWidget *,QBoxLayout *); 63 void initAlarm(QWidget *,Q3BoxLayout *);
63 64
64 /** Set widgets to default values */ 65 /** Set widgets to default values */
65 void setDefaults(bool allDay); 66 void setDefaults(bool allDay);
@@ -115,7 +116,7 @@ class KOEditorGeneral : public QObject
115 QPushButton *mCategoriesLabel; 116 QPushButton *mCategoriesLabel;
116 117
117 private: 118 private:
118 QPopupMenu * mCatPopup; 119 Q3PopupMenu * mCatPopup;
119 QString getFittingPath( const QString &) ; 120 QString getFittingPath( const QString &) ;
120 QString mAlarmSound; 121 QString mAlarmSound;
121 QString mAlarmProgram; 122 QString mAlarmProgram;
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2c6ed9f..73a4139 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -23,11 +23,17 @@
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qvbox.h> 26#include <q3vbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qvgroupbox.h> 28#include <q3vgroupbox.h>
29#include <qwidgetstack.h> 29#include <q3widgetstack.h>
30#include <qdatetime.h> 30#include <qdatetime.h>
31//Added by qt3to4:
32#include <Q3HBoxLayout>
33#include <Q3GridLayout>
34#include <Q3Frame>
35#include <QLabel>
36#include <Q3VBoxLayout>
31 37
32#include <kdebug.h> 38#include <kdebug.h>
33#include <kglobal.h> 39#include <kglobal.h>
@@ -84,19 +90,19 @@ void KOEditorGeneralEvent::finishSetup()
84 mSummaryEdit->setFocus(); 90 mSummaryEdit->setFocus();
85} 91}
86 92
87void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) 93void KOEditorGeneralEvent::initTime(QWidget *parent,Q3BoxLayout *topLayout)
88{ 94{
89 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 95 Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
90 96
91 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 97 Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
92 i18n("Date && Time"),parent); 98 i18n("Date && Time"),parent);
93 timeLayout->addWidget(timeGroupBox); 99 timeLayout->addWidget(timeGroupBox);
94 100
95 timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() ); 101 timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
96 timeGroupBox->layout()->setMargin( KDialog::marginHint() ); 102 timeGroupBox->layout()->setMargin( KDialog::marginHint() );
97 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 103 Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
98 104
99 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); 105 Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,2,3);
100 layoutTimeBox->setSpacing(topLayout->spacing()); 106 layoutTimeBox->setSpacing(topLayout->spacing());
101 107
102 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); 108 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame);
@@ -118,7 +124,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
118 mEndTimeEdit = new KOTimeEdit(timeBoxFrame); 124 mEndTimeEdit = new KOTimeEdit(timeBoxFrame);
119 layoutTimeBox->addWidget(mEndTimeEdit,1,2); 125 layoutTimeBox->addWidget(mEndTimeEdit,1,2);
120 QWidget* duration = new QWidget( timeBoxFrame ); 126 QWidget* duration = new QWidget( timeBoxFrame );
121 QHBoxLayout *flagsBox = new QHBoxLayout( duration ); 127 Q3HBoxLayout *flagsBox = new Q3HBoxLayout( duration );
122 mNoTimeButton = new QCheckBox(i18n("All day event"),duration); 128 mNoTimeButton = new QCheckBox(i18n("All day event"),duration);
123 flagsBox->addWidget(mNoTimeButton); 129 flagsBox->addWidget(mNoTimeButton);
124 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); 130 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool)));
@@ -129,7 +135,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
129 flagsBox->addWidget( mDurationLabel ); 135 flagsBox->addWidget( mDurationLabel );
130 //} 136 //}
131 flagsBox->setStretchFactor(mDurationLabel, 10 ); 137 flagsBox->setStretchFactor(mDurationLabel, 10 );
132 mDurationLabel->setAlignment( AlignRight | AlignVCenter); 138 mDurationLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter);
133 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); 139 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 );
134 140
135 // time widgets are checked if they contain a valid time 141 // time widgets are checked if they contain a valid time
@@ -147,9 +153,9 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
147 connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime))); 153 connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime)));
148} 154}
149 155
150void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) 156void KOEditorGeneralEvent::initClass(QWidget *parent,Q3BoxLayout *topLayout)
151{ 157{
152 QBoxLayout *classLayout = new QHBoxLayout(topLayout); 158 Q3BoxLayout *classLayout = new Q3HBoxLayout(topLayout);
153 159
154 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); 160 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent);
155 classLayout->addWidget(freeTimeLabel); 161 classLayout->addWidget(freeTimeLabel);
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index d798905..5d97a5c 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -23,15 +23,15 @@
23#ifndef _KOEDITORGENERALEVENT_H 23#ifndef _KOEDITORGENERALEVENT_H
24#define _KOEDITORGENERALEVENT_H 24#define _KOEDITORGENERALEVENT_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36 36
37#include <krestrictedline.h> 37#include <krestrictedline.h>
@@ -51,8 +51,8 @@ class KOEditorGeneralEvent : public KOEditorGeneral
51 KOEditorGeneralEvent (QObject* parent=0,const char* name=0); 51 KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
52 virtual ~KOEditorGeneralEvent(); 52 virtual ~KOEditorGeneralEvent();
53 53
54 void initTime(QWidget *,QBoxLayout *); 54 void initTime(QWidget *,Q3BoxLayout *);
55 void initClass(QWidget *,QBoxLayout *); 55 void initClass(QWidget *,Q3BoxLayout *);
56 56
57 void finishSetup(); 57 void finishSetup();
58 58
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index d32d5a5..baee9fc 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -22,14 +22,21 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3GridLayout>
37#include <Q3Frame>
38#include <QLabel>
39#include <Q3VBoxLayout>
33 40
34#include <kglobal.h> 41#include <kglobal.h>
35#include <klocale.h> 42#include <klocale.h>
@@ -82,18 +89,18 @@ void KOEditorGeneralTodo::finishSetup()
82 mSummaryEdit->setFocus(); 89 mSummaryEdit->setFocus();
83} 90}
84 91
85void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) 92void KOEditorGeneralTodo::initTime(QWidget *parent,Q3BoxLayout *topLayout)
86{ 93{
87 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 94 Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
88 95
89 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 96 Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
90 i18n("Date && Time"),parent); 97 i18n("Date && Time"),parent);
91 timeLayout->addWidget(timeGroupBox); 98 timeLayout->addWidget(timeGroupBox);
92 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); 99 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 );
93 timeGroupBox->layout()->setMargin( KDialog::marginHint() ); 100 timeGroupBox->layout()->setMargin( KDialog::marginHint() );
94 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 101 Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
95 102
96 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); 103 Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,3,3);
97 layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); 104 layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
98 layoutTimeBox->setColStretch( 1, 1 ); 105 layoutTimeBox->setColStretch( 1, 1 );
99 106
@@ -133,7 +140,7 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
133} 140}
134 141
135 142
136void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) 143void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout)
137{ 144{
138 mCompletedCombo = new QComboBox(parent); 145 mCompletedCombo = new QComboBox(parent);
139 // xgettext:no-c-format 146 // xgettext:no-c-format
@@ -173,10 +180,10 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
173 } 180 }
174} 181}
175 182
176void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) 183void KOEditorGeneralTodo::initPriority(QWidget *parent, Q3BoxLayout *topLayout)
177{ 184{
178 185
179 QHBox* h = new QHBox ( parent ); 186 Q3HBox* h = new Q3HBox ( parent );
180 topLayout->addWidget( h ); 187 topLayout->addWidget( h );
181 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); 188 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
182 // topLayout->addWidget(priorityLabel); 189 // topLayout->addWidget(priorityLabel);
@@ -189,9 +196,9 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
189 //topLayout->addWidget(mPriorityCombo); 196 //topLayout->addWidget(mPriorityCombo);
190} 197}
191 198
192void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) 199void KOEditorGeneralTodo::initStatus(QWidget *parent,Q3BoxLayout *topLayout)
193{ 200{
194 QBoxLayout *statusLayout = new QHBoxLayout(topLayout); 201 Q3BoxLayout *statusLayout = new Q3HBoxLayout(topLayout);
195 202
196 initCompletion( parent, statusLayout ); 203 initCompletion( parent, statusLayout );
197 204
@@ -396,7 +403,7 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable )
396void KOEditorGeneralTodo::startDateChanged(QDate newdate) 403void KOEditorGeneralTodo::startDateChanged(QDate newdate)
397{ 404{
398 if ( mDueCheck->isChecked() ) 405 if ( mDueCheck->isChecked() )
399 emit dateTimesChanged(newdate,mDueDateEdit->date()); 406 emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date());
400} 407}
401void KOEditorGeneralTodo::enableTimeEdits(bool enable) 408void KOEditorGeneralTodo::enableTimeEdits(bool enable)
402{ 409{
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index 2e56a7a..2e97ff5 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -23,15 +23,15 @@
23#ifndef _KOEDITORGENERALTODO_H 23#ifndef _KOEDITORGENERALTODO_H
24#define _KOEDITORGENERALTODO_H 24#define _KOEDITORGENERALTODO_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36 36
37#include "koeditorgeneral.h" 37#include "koeditorgeneral.h"
@@ -50,10 +50,10 @@ class KOEditorGeneralTodo : public KOEditorGeneral
50 KOEditorGeneralTodo (QObject* parent=0,const char* name=0); 50 KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
51 virtual ~KOEditorGeneralTodo(); 51 virtual ~KOEditorGeneralTodo();
52 52
53 void initTime(QWidget *, QBoxLayout *); 53 void initTime(QWidget *, Q3BoxLayout *);
54 void initStatus(QWidget *, QBoxLayout *); 54 void initStatus(QWidget *, Q3BoxLayout *);
55 void initCompletion(QWidget *, QBoxLayout *); 55 void initCompletion(QWidget *, Q3BoxLayout *);
56 void initPriority(QWidget *, QBoxLayout *); 56 void initPriority(QWidget *, Q3BoxLayout *);
57 57
58 void finishSetup(); 58 void finishSetup();
59 59
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index e0380c4..e0ae3a0 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -22,17 +22,25 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qlistbox.h> 32#include <q3listbox.h>
33#include <qspinbox.h> 33#include <qspinbox.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <QDesktopWidget>
37//Added by qt3to4:
38#include <Q3HBoxLayout>
39#include <QLabel>
40#include <Q3GridLayout>
41#include <Q3PtrList>
42#include <Q3Frame>
43#include <Q3VBoxLayout>
36 44
37#include <kdialog.h> 45#include <kdialog.h>
38#include <kglobal.h> 46#include <kglobal.h>
@@ -81,7 +89,7 @@ int RecurBase::frequency()
81RecurDaily::RecurDaily( QWidget *parent, const char *name ) : 89RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
82 RecurBase( parent, name ) 90 RecurBase( parent, name )
83{ 91{
84 QBoxLayout *topLayout = new QHBoxLayout( this ); 92 Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
85 topLayout->setSpacing( KDialog::spacingHint() ); 93 topLayout->setSpacing( KDialog::spacingHint() );
86 topLayout->setMargin( KDialog::marginHintSmall() ); 94 topLayout->setMargin( KDialog::marginHintSmall() );
87 95
@@ -100,13 +108,13 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
100RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : 108RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
101 RecurBase( parent, name ) 109 RecurBase( parent, name )
102{ 110{
103 QBoxLayout *topLayout = new QVBoxLayout( this ); 111 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
104 topLayout->setSpacing( KDialog::spacingHint() ); 112 topLayout->setSpacing( KDialog::spacingHint() );
105 topLayout->setMargin( KDialog::marginHintSmall() ); 113 topLayout->setMargin( KDialog::marginHintSmall() );
106 114
107 //topLayout->addStretch( 1 ); 115 //topLayout->addStretch( 1 );
108 116
109 QBoxLayout *weeksLayout = new QHBoxLayout( topLayout ); 117 Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout );
110 118
111 QLabel *preLabel = new QLabel( i18n("Recur every"), this ); 119 QLabel *preLabel = new QLabel( i18n("Recur every"), this );
112 weeksLayout->addWidget( preLabel ); 120 weeksLayout->addWidget( preLabel );
@@ -116,8 +124,8 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
116 QLabel *postLabel = new QLabel( i18n("week(s) on:"), this ); 124 QLabel *postLabel = new QLabel( i18n("week(s) on:"), this );
117 weeksLayout->addWidget( postLabel ); 125 weeksLayout->addWidget( postLabel );
118 126
119 QHBox *dayBox = new QHBox( this ); 127 Q3HBox *dayBox = new Q3HBox( this );
120 topLayout->addWidget( dayBox, 1, AlignVCenter ); 128 topLayout->addWidget( dayBox, 1, Qt::AlignVCenter );
121 // TODO: Respect start of week setting 129 // TODO: Respect start of week setting
122 for ( int i = 0; i < 7; ++i ) { 130 for ( int i = 0; i < 7; ++i ) {
123 QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true ); 131 QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true );
@@ -156,12 +164,12 @@ QBitArray RecurWeekly::days()
156RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : 164RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
157 RecurBase( parent, name ) 165 RecurBase( parent, name )
158{ 166{
159 QBoxLayout *topLayout = new QVBoxLayout( this ); 167 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
160 topLayout->setSpacing( KDialog::spacingHint() ); 168 topLayout->setSpacing( KDialog::spacingHint() );
161 topLayout->setMargin( KDialog::marginHintSmall() ); 169 topLayout->setMargin( KDialog::marginHintSmall() );
162 170
163 171
164 QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); 172 Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
165 173
166 QLabel *preLabel = new QLabel( i18n("every"), this ); 174 QLabel *preLabel = new QLabel( i18n("every"), this );
167 freqLayout->addWidget( preLabel ); 175 freqLayout->addWidget( preLabel );
@@ -172,11 +180,11 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
172 freqLayout->addWidget( postLabel ); 180 freqLayout->addWidget( postLabel );
173 181
174 182
175 QButtonGroup *buttonGroup = new QButtonGroup( this ); 183 Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
176 buttonGroup->setFrameStyle( QFrame::NoFrame ); 184 buttonGroup->setFrameStyle( Q3Frame::NoFrame );
177 topLayout->addWidget( buttonGroup, 1, AlignVCenter ); 185 topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
178 186
179 QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 ); 187 Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 3, 2 );
180 buttonLayout->setSpacing( KDialog::spacingHint() ); 188 buttonLayout->setSpacing( KDialog::spacingHint() );
181 buttonLayout->setMargin( KDialog::marginHintSmall() ); 189 buttonLayout->setMargin( KDialog::marginHintSmall() );
182 190
@@ -189,7 +197,7 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
189 mByDayRadio = new QRadioButton( recurOnText, buttonGroup ); 197 mByDayRadio = new QRadioButton( recurOnText, buttonGroup );
190 buttonLayout->addWidget( mByDayRadio, 0, 0 ); 198 buttonLayout->addWidget( mByDayRadio, 0, 0 );
191 199
192 mByDayCombo = new QComboBox( buttonGroup ); 200 mByDayCombo = new Q3ComboBox( buttonGroup );
193 mByDayCombo->setSizeLimit( 7 ); 201 mByDayCombo->setSizeLimit( 7 );
194 mByDayCombo->insertItem( i18n("1st") ); 202 mByDayCombo->insertItem( i18n("1st") );
195 mByDayCombo->insertItem( i18n("2nd") ); 203 mByDayCombo->insertItem( i18n("2nd") );
@@ -293,12 +301,12 @@ int RecurMonthly::weekday()
293RecurYearly::RecurYearly( QWidget *parent, const char *name ) : 301RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
294 RecurBase( parent, name ) 302 RecurBase( parent, name )
295{ 303{
296 QBoxLayout *topLayout = new QVBoxLayout( this ); 304 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
297 topLayout->setSpacing( KDialog::spacingHint() ); 305 topLayout->setSpacing( KDialog::spacingHint() );
298 topLayout->setMargin( KDialog::marginHintSmall() ); 306 topLayout->setMargin( KDialog::marginHintSmall() );
299 307
300 308
301 QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); 309 Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
302 310
303 QLabel *preLabel = new QLabel( i18n("every"), this ); 311 QLabel *preLabel = new QLabel( i18n("every"), this );
304 freqLayout->addWidget( preLabel ); 312 freqLayout->addWidget( preLabel );
@@ -309,18 +317,18 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
309 freqLayout->addWidget( postLabel ); 317 freqLayout->addWidget( postLabel );
310 318
311 319
312 QButtonGroup *buttonGroup = new QButtonGroup( this ); 320 Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
313 buttonGroup->setFrameStyle( QFrame::NoFrame ); 321 buttonGroup->setFrameStyle( Q3Frame::NoFrame );
314 topLayout->addWidget( buttonGroup, 1, AlignVCenter ); 322 topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
315 323
316 QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 2, 3 ); 324 Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 2, 3 );
317 325
318 mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup); 326 mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup);
319 buttonLayout->addWidget( mByMonthRadio, 0, 0 , Qt::AlignRight); 327 buttonLayout->addWidget( mByMonthRadio, 0, 0 , Qt::AlignRight);
320 mByDayLabel = new QLabel( i18n("%1 of ").arg(1), buttonGroup ); 328 mByDayLabel = new QLabel( i18n("%1 of ").arg(1), buttonGroup );
321 329
322 buttonLayout->addWidget( mByDayLabel, 0, 1 ); 330 buttonLayout->addWidget( mByDayLabel, 0, 1 );
323 mByMonthCombo = new QComboBox( buttonGroup ); 331 mByMonthCombo = new Q3ComboBox( buttonGroup );
324 mByMonthCombo->insertItem( i18n("January") ); 332 mByMonthCombo->insertItem( i18n("January") );
325 mByMonthCombo->insertItem( i18n("February") ); 333 mByMonthCombo->insertItem( i18n("February") );
326 mByMonthCombo->insertItem( i18n("March") ); 334 mByMonthCombo->insertItem( i18n("March") );
@@ -383,15 +391,15 @@ int RecurYearly::day()
383ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : 391ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
384 QWidget( parent, name ) 392 QWidget( parent, name )
385{ 393{
386 QBoxLayout *topLayout = new QVBoxLayout( this ); 394 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
387 395
388 QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"), 396 Q3GroupBox *groupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Exceptions"),
389 this ); 397 this );
390 topLayout->addWidget( groupBox ); 398 topLayout->addWidget( groupBox );
391 399
392 QWidget *box = new QWidget( groupBox ); 400 QWidget *box = new QWidget( groupBox );
393 401
394 QGridLayout *boxLayout = new QGridLayout( box ); 402 Q3GridLayout *boxLayout = new Q3GridLayout( box );
395 403
396 mExceptionDateEdit = new KDateEdit( box ); 404 mExceptionDateEdit = new KDateEdit( box );
397 boxLayout->addWidget( mExceptionDateEdit, 0, 0 ); 405 boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
@@ -403,7 +411,7 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
403 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box ); 411 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box );
404 boxLayout->addWidget( deleteExceptionButton, 3, 0 ); 412 boxLayout->addWidget( deleteExceptionButton, 3, 0 );
405 413
406 mExceptionList = new QListBox( box ); 414 mExceptionList = new Q3ListBox( box );
407 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); 415 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 );
408 416
409 boxLayout->setRowStretch( 4, 1 ); 417 boxLayout->setRowStretch( 4, 1 );
@@ -506,27 +514,27 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
506 const char *name ) 514 const char *name )
507 : QWidget( parent, name ) 515 : QWidget( parent, name )
508{ 516{
509 QBoxLayout *topLayout = new QVBoxLayout( this ); 517 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
510 518
511 mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), 519 mRangeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Range"),
512 this ); 520 this );
513 topLayout->addWidget( mRangeGroupBox ); 521 topLayout->addWidget( mRangeGroupBox );
514 522
515 QWidget *rangeBox = new QWidget( mRangeGroupBox ); 523 QWidget *rangeBox = new QWidget( mRangeGroupBox );
516 QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); 524 Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox );
517 rangeLayout->setSpacing( KDialog::spacingHint() ); 525 rangeLayout->setSpacing( KDialog::spacingHint() );
518 rangeLayout->setMargin( KDialog::marginHintSmall() ); 526 rangeLayout->setMargin( KDialog::marginHintSmall() );
519 527
520 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox ); 528 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
521 rangeLayout->addWidget( mStartDateLabel ); 529 rangeLayout->addWidget( mStartDateLabel );
522 530
523 mRangeButtonGroup = new QButtonGroup; 531 mRangeButtonGroup = new Q3ButtonGroup;
524 532
525 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox ); 533 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );
526 mRangeButtonGroup->insert( mNoEndDateButton ); 534 mRangeButtonGroup->insert( mNoEndDateButton );
527 rangeLayout->addWidget( mNoEndDateButton ); 535 rangeLayout->addWidget( mNoEndDateButton );
528 536
529 QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); 537 Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout );
530 durationLayout->setSpacing( KDialog::spacingHint() ); 538 durationLayout->setSpacing( KDialog::spacingHint() );
531 539
532 mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox ); 540 mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox );
@@ -539,7 +547,7 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
539 QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox ); 547 QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox );
540 durationLayout ->addWidget( endDurationLabel ); 548 durationLayout ->addWidget( endDurationLabel );
541 549
542 QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); 550 Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout );
543 endDateLayout->setSpacing( KDialog::spacingHint() ); 551 endDateLayout->setSpacing( KDialog::spacingHint() );
544 552
545 mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox ); 553 mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox );
@@ -666,7 +674,7 @@ void RecurrenceRangeDialog::setDateTimes( const QDateTime &start,
666RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : 674RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
667 QWidget( parent, name ) 675 QWidget( parent, name )
668{ 676{
669 QBoxLayout *topLayout = new QVBoxLayout( this ); 677 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
670 678
671 mTypeCombo = new QComboBox( this ); 679 mTypeCombo = new QComboBox( this );
672 mTypeCombo->insertItem( i18n("Daily") ); 680 mTypeCombo->insertItem( i18n("Daily") );
@@ -725,7 +733,7 @@ void RecurrenceChooser::emitChoice()
725KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : 733KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
726 QWidget( parent, name ) 734 QWidget( parent, name )
727{ 735{
728 QGridLayout *topLayout = new QGridLayout( this, 2,2 ); 736 Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 );
729 topLayout->setSpacing( KDialog::spacingHint() ); 737 topLayout->setSpacing( KDialog::spacingHint() );
730 topLayout->setMargin( KDialog::marginHintSmall() ); 738 topLayout->setMargin( KDialog::marginHintSmall() );
731 739
@@ -735,7 +743,7 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
735 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 ); 743 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
736 744
737 745
738 mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), 746 mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"),
739 this ); 747 this );
740 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); 748 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
741 749
@@ -752,14 +760,14 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
752// layoutTimeFrame->addWidget( mDateTimeLabel ); 760// layoutTimeFrame->addWidget( mDateTimeLabel );
753 //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); 761 //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
754 //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); 762 //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) );
755 mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); 763 mRuleBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Rule"), this );
756 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); 764 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
757 mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); 765 mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
758 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ), 766 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
759 SLOT( showCurrentRule( int ) ) ); 767 SLOT( showCurrentRule( int ) ) );
760 768
761 769
762 mRuleStack = new QWidgetStack( mRuleBox ); 770 mRuleStack = new Q3WidgetStack( mRuleBox );
763 771
764 mDaily = new RecurDaily( mRuleStack ); 772 mDaily = new RecurDaily( mRuleStack );
765 mRuleStack->addWidget( mDaily, 0 ); 773 mRuleStack->addWidget( mDaily, 0 );
@@ -896,8 +904,8 @@ void KOEditorRecurrence::readEvent(Incidence *event)
896 904
897 setDefaults( event->dtStart(), dtEnd ); 905 setDefaults( event->dtStart(), dtEnd );
898 QBitArray rDays( 7 ); 906 QBitArray rDays( 7 );
899 QPtrList<Recurrence::rMonthPos> rmp; 907 Q3PtrList<Recurrence::rMonthPos> rmp;
900 QPtrList<int> rmd; 908 Q3PtrList<int> rmd;
901 int day = 0; 909 int day = 0;
902 int count = 0; 910 int count = 0;
903 int month = 0; 911 int month = 0;
@@ -968,7 +976,7 @@ void KOEditorRecurrence::readEvent(Incidence *event)
968 mYearly->setByMonth( month, day ); 976 mYearly->setByMonth( month, day );
969#if 0 977#if 0
970 //qDebug("2day = %d ",day ); 978 //qDebug("2day = %d ",day );
971 QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); 979 Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
972 int month; 980 int month;
973 if ( !monthlist.isEmpty() ) { 981 if ( !monthlist.isEmpty() ) {
974 month = monthlist.first()->rPos ; 982 month = monthlist.first()->rPos ;
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 75e0c73..6c012bd 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -23,17 +23,19 @@
23#ifndef _KOEDITORRECURRENCE_H 23#ifndef _KOEDITORRECURRENCE_H
24#define _KOEDITORRECURRENCE_H 24#define _KOEDITORRECURRENCE_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qbuttongroup.h> 36#include <q3buttongroup.h>
37#include <Q3ListBox>
38#include <Q3ComboBox>
37 39
38#include <kdialogbase.h> 40#include <kdialogbase.h>
39 41
@@ -41,7 +43,7 @@
41 43
42#include "ktimeedit.h" 44#include "ktimeedit.h"
43 45
44class QWidgetStack; 46class Q3WidgetStack;
45class QSpinBox; 47class QSpinBox;
46 48
47class KDateEdit; 49class KDateEdit;
@@ -98,7 +100,7 @@ class RecurMonthly : public RecurBase
98 100
99 private: 101 private:
100 QRadioButton *mByDayRadio; 102 QRadioButton *mByDayRadio;
101 QComboBox *mByDayCombo; 103 Q3ComboBox *mByDayCombo;
102 104
103 QRadioButton *mByPosRadio; 105 QRadioButton *mByPosRadio;
104 QComboBox *mByPosCountCombo; 106 QComboBox *mByPosCountCombo;
@@ -122,7 +124,7 @@ class RecurYearly : public RecurBase
122 private: 124 private:
123 int mDay; 125 int mDay;
124 QRadioButton *mByMonthRadio; 126 QRadioButton *mByMonthRadio;
125 QComboBox *mByMonthCombo; 127 Q3ComboBox *mByMonthCombo;
126 QLabel* mByDayLabel; 128 QLabel* mByDayLabel;
127 QLabel* mDayOfLabel; 129 QLabel* mDayOfLabel;
128 QRadioButton *mByDayRadio; 130 QRadioButton *mByDayRadio;
@@ -180,7 +182,7 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase
180 182
181 private: 183 private:
182 KDateEdit *mExceptionDateEdit; 184 KDateEdit *mExceptionDateEdit;
183 QListBox *mExceptionList; 185 Q3ListBox *mExceptionList;
184 DateList mExceptionDates; 186 DateList mExceptionDates;
185}; 187};
186 188
@@ -235,8 +237,8 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
235 void showCurrentRange(); 237 void showCurrentRange();
236 238
237 private: 239 private:
238 QButtonGroup *mRangeButtonGroup; 240 Q3ButtonGroup *mRangeButtonGroup;
239 QGroupBox *mRangeGroupBox; 241 Q3GroupBox *mRangeGroupBox;
240 QLabel *mStartDateLabel; 242 QLabel *mStartDateLabel;
241 QRadioButton *mNoEndDateButton; 243 QRadioButton *mNoEndDateButton;
242 QRadioButton *mEndDurationButton; 244 QRadioButton *mEndDurationButton;
@@ -300,11 +302,11 @@ class KOEditorRecurrence : public QWidget
300 private: 302 private:
301 QCheckBox *mEnabledCheck; 303 QCheckBox *mEnabledCheck;
302 304
303 QGroupBox *mTimeGroupBox; 305 Q3GroupBox *mTimeGroupBox;
304 QLabel *mDateTimeLabel; 306 QLabel *mDateTimeLabel;
305 307
306 QGroupBox *mRuleBox; 308 Q3GroupBox *mRuleBox;
307 QWidgetStack *mRuleStack; 309 Q3WidgetStack *mRuleStack;
308 RecurrenceChooser *mRecurrenceChooser; 310 RecurrenceChooser *mRecurrenceChooser;
309 311
310 RecurDaily *mDaily; 312 RecurDaily *mDaily;
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 3e87197..62ad250 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -22,14 +22,19 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qdir.h> 29#include <qdir.h>
30#include <qlayout.h> 30#include <qlayout.h>
31#include <qwidgetstack.h> 31#include <q3widgetstack.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3PtrList>
37#include <Q3VBoxLayout>
33 38
34#include <kiconloader.h> 39#include <kiconloader.h>
35#include <kstandarddirs.h> 40#include <kstandarddirs.h>
@@ -105,8 +110,8 @@ void KOEventEditor::setupGeneral()
105 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 110 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
106 111
107 if( KOPrefs::instance()->mCompactDialogs ) { 112 if( KOPrefs::instance()->mCompactDialogs ) {
108 QFrame *topFrame = addPage(i18n("General")); 113 Q3Frame *topFrame = addPage(i18n("General"));
109 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 114 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
110 topLayout->setSpacing(spacingHint()-1); 115 topLayout->setSpacing(spacingHint()-1);
111 topLayout->setMargin(marginHint()-1); 116 topLayout->setMargin(marginHint()-1);
112 topLayout->addStretch ( 1 ); 117 topLayout->addStretch ( 1 );
@@ -119,13 +124,13 @@ void KOEventEditor::setupGeneral()
119 topLayout->addStretch ( 1 ); 124 topLayout->addStretch ( 1 );
120 mGeneral->enableAlarm( false ); 125 mGeneral->enableAlarm( false );
121 126
122 QBoxLayout *buttonLayout; 127 Q3BoxLayout *buttonLayout;
123 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) 128 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
124 buttonLayout = new QVBoxLayout( topLayout ); 129 buttonLayout = new Q3VBoxLayout( topLayout );
125 else 130 else
126 buttonLayout = new QHBoxLayout( topLayout ); 131 buttonLayout = new Q3HBoxLayout( topLayout );
127 QHBox* buttonWidget = new QHBox (topFrame); 132 Q3HBox* buttonWidget = new Q3HBox (topFrame);
128 QIconSet icon; 133 QIcon icon;
129 if ( QApplication::desktop()->width() < 321 ) 134 if ( QApplication::desktop()->width() < 321 )
130 icon = SmallIcon("fileexport16"); 135 icon = SmallIcon("fileexport16");
131 else 136 else
@@ -146,9 +151,9 @@ void KOEventEditor::setupGeneral()
146 151
147 topLayout->addStretch( 1 ); 152 topLayout->addStretch( 1 );
148 153
149 QFrame *topFrame2 = addPage(i18n("Details")); 154 Q3Frame *topFrame2 = addPage(i18n("Details"));
150 155
151 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 156 Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
152 topLayout2->setSpacing(spacingHint()-1); 157 topLayout2->setSpacing(spacingHint()-1);
153 topLayout2->setMargin(marginHint()-1); 158 topLayout2->setMargin(marginHint()-1);
154 topLayout2->setSpacing(spacingHint()); 159 topLayout2->setSpacing(spacingHint());
@@ -160,18 +165,18 @@ void KOEventEditor::setupGeneral()
160 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 165 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
161 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 166 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
162 } else { 167 } else {
163 QFrame *topFrame = addPage(i18n("General")); 168 Q3Frame *topFrame = addPage(i18n("General"));
164 169
165 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 170 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
166 topLayout->setSpacing(spacingHint()); 171 topLayout->setSpacing(spacingHint());
167 172
168 mGeneral->initHeader(topFrame,topLayout); 173 mGeneral->initHeader(topFrame,topLayout);
169 mGeneral->initTime(topFrame,topLayout); 174 mGeneral->initTime(topFrame,topLayout);
170 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 175 Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
171 mGeneral->initAlarm(topFrame,alarmLineLayout); 176 mGeneral->initAlarm(topFrame,alarmLineLayout);
172 mGeneral->initClass(topFrame,alarmLineLayout); 177 mGeneral->initClass(topFrame,alarmLineLayout);
173 mGeneral->initDescription(topFrame,topLayout); 178 mGeneral->initDescription(topFrame,topLayout);
174 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 179 Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
175 mGeneral->initCategories( topFrame, detailsLayout ); 180 mGeneral->initCategories( topFrame, detailsLayout );
176 mGeneral->initSecrecy( topFrame, detailsLayout ); 181 mGeneral->initSecrecy( topFrame, detailsLayout );
177 } 182 }
@@ -182,8 +187,8 @@ void KOEventEditor::setupGeneral()
182 187
183void KOEventEditor::setupRecurrence() 188void KOEventEditor::setupRecurrence()
184{ 189{
185 QFrame *topFrame = addPage( i18n("Recurrence") ); 190 Q3Frame *topFrame = addPage( i18n("Recurrence") );
186 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 191 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
187 192
188 mRecurrence = new KOEditorRecurrence( topFrame ); 193 mRecurrence = new KOEditorRecurrence( topFrame );
189 topLayout->addWidget( mRecurrence ); 194 topLayout->addWidget( mRecurrence );
@@ -356,7 +361,7 @@ void KOEventEditor::slotLoadTemplate()
356 .arg( fileName ) ); 361 .arg( fileName ) );
357 return ; 362 return ;
358 } 363 }
359 QPtrList<Event> events = cal.events(); 364 Q3PtrList<Event> events = cal.events();
360 Event* event = events.first(); 365 Event* event = events.first();
361 if ( !event ) { 366 if ( !event ) {
362 KMessageBox::error( this, 367 KMessageBox::error( this,
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index fc4d9a4..81047c1 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -22,6 +22,9 @@
22*/ 22*/
23 23
24#include <qcursor.h> 24#include <qcursor.h>
25//Added by qt3to4:
26#include <Q3ValueList>
27#include <Q3PopupMenu>
25 28
26#include <klocale.h> 29#include <klocale.h>
27#include <kdebug.h> 30#include <kdebug.h>
@@ -32,7 +35,7 @@
32#include "koeventpopupmenu.h" 35#include "koeventpopupmenu.h"
33#include "koprefs.h" 36#include "koprefs.h"
34 37
35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() 38KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu()
36{ 39{
37 mCurrentIncidence = 0; 40 mCurrentIncidence = 0;
38 mHasAdditionalItems = false; 41 mHasAdditionalItems = false;
@@ -53,11 +56,11 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
53 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), 56 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"),
54 this,SLOT(popupCancel()))); 57 this,SLOT(popupCancel())));
55 isDisabled = false; 58 isDisabled = false;
56 mCatPopup = new QPopupMenu ( this ); 59 mCatPopup = new Q3PopupMenu ( this );
57 mCatPopup->setCheckable (true); 60 mCatPopup->setCheckable (true);
58 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); 61 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup()));
59 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); 62 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int )));
60 mCalPopup = new QPopupMenu ( this ); 63 mCalPopup = new Q3PopupMenu ( this );
61 mCalPopup->setCheckable (true); 64 mCalPopup->setCheckable (true);
62 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); 65 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup()));
63 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); 66 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int )));
@@ -65,7 +68,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
65 //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); 68 //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
66 insertItem (i18n("Categories"),mCatPopup ); 69 insertItem (i18n("Categories"),mCatPopup );
67 insertItem (i18n("Calendar"),mCalPopup ); 70 insertItem (i18n("Calendar"),mCalPopup );
68 QValueList<int>::Iterator it; 71 Q3ValueList<int>::Iterator it;
69 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { 72 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
70 mSingleOnlyItems.append(*it); 73 mSingleOnlyItems.append(*it);
71 } 74 }
@@ -74,7 +77,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
74void KOEventPopupMenu::enableDefault( bool enable ) 77void KOEventPopupMenu::enableDefault( bool enable )
75{ 78{
76 isDisabled = !enable; 79 isDisabled = !enable;
77 QValueList<int>::Iterator it; 80 Q3ValueList<int>::Iterator it;
78 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { 81 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) {
79 setItemEnabled(*it,enable); 82 setItemEnabled(*it,enable);
80 } 83 }
@@ -146,7 +149,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
146 if (mCurrentIncidence) { 149 if (mCurrentIncidence) {
147 // Enable/Disabled menu items only valid for editable events. 150 // Enable/Disabled menu items only valid for editable events.
148 if ( !isDisabled ) { 151 if ( !isDisabled ) {
149 QValueList<int>::Iterator it; 152 Q3ValueList<int>::Iterator it;
150 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { 153 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
151 setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); 154 setItemEnabled(*it,!mCurrentIncidence->isReadOnly());
152 } 155 }
@@ -155,7 +158,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
155 } 158 }
156} 159}
157 160
158void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, 161void KOEventPopupMenu::addAdditionalItem(const QIcon &icon,const QString &text,
159 const QObject *receiver, const char *member, 162 const QObject *receiver, const char *member,
160 bool editOnly) 163 bool editOnly)
161{ 164{
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h
index e28745b..de5220b 100644
--- a/korganizer/koeventpopupmenu.h
+++ b/korganizer/koeventpopupmenu.h
@@ -26,18 +26,20 @@
26// Context menu for event views with standard event actions 26// Context menu for event views with standard event actions
27// 27//
28 28
29#include <qpopupmenu.h> 29#include <q3popupmenu.h>
30//Added by qt3to4:
31#include <Q3ValueList>
30 32
31#include <libkcal/incidence.h> 33#include <libkcal/incidence.h>
32 34
33using namespace KCal; 35using namespace KCal;
34 36
35class KOEventPopupMenu : public QPopupMenu { 37class KOEventPopupMenu : public Q3PopupMenu {
36 Q_OBJECT 38 Q_OBJECT
37 public: 39 public:
38 KOEventPopupMenu(); 40 KOEventPopupMenu();
39 41
40 void addAdditionalItem(const QIconSet &icon,const QString &text, 42 void addAdditionalItem(const QIcon &icon,const QString &text,
41 const QObject *receiver, const char *member, 43 const QObject *receiver, const char *member,
42 bool editOnly=false); 44 bool editOnly=false);
43 45
@@ -73,11 +75,11 @@ class KOEventPopupMenu : public QPopupMenu {
73 Incidence *mCurrentIncidence; 75 Incidence *mCurrentIncidence;
74 76
75 bool mHasAdditionalItems; 77 bool mHasAdditionalItems;
76 QValueList<int> mEditOnlyItems; 78 Q3ValueList<int> mEditOnlyItems;
77 QValueList<int> mSingleOnlyItems; 79 Q3ValueList<int> mSingleOnlyItems;
78 bool isDisabled; 80 bool isDisabled;
79 QPopupMenu *mCatPopup; 81 Q3PopupMenu *mCatPopup;
80 QPopupMenu *mCalPopup; 82 Q3PopupMenu *mCalPopup;
81}; 83};
82 84
83#endif 85#endif
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1d26930..a4ba85e 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -21,7 +21,7 @@
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 23
24#include <qpopupmenu.h> 24#include <q3popupmenu.h>
25#include <qcursor.h> 25#include <qcursor.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
@@ -73,7 +73,7 @@ KOEventPopupMenu *KOEventView::eventPopup()
73 73
74//--------------------------------------------------------------------------- 74//---------------------------------------------------------------------------
75 75
76void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) 76void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event)
77{ 77{
78 mCurrentIncidence = event; 78 mCurrentIncidence = event;
79 if (event) popup->popup(QCursor::pos()); 79 if (event) popup->popup(QCursor::pos());
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index 77ec111..f28e68b 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -30,6 +30,8 @@
30#include <korganizer/baseview.h> 30#include <korganizer/baseview.h>
31 31
32#include "koeventpopupmenu.h" 32#include "koeventpopupmenu.h"
33//Added by qt3to4:
34#include <Q3PopupMenu>
33 35
34using namespace KCal; 36using namespace KCal;
35 37
@@ -87,7 +89,7 @@ class KOEventView : public KOrg::BaseView
87 * @param event event, which is to be manipulated by the menu actions 89 * @param event event, which is to be manipulated by the menu actions
88 * @param popup a popop menu created with eventPopup() 90 * @param popup a popop menu created with eventPopup()
89 */ 91 */
90 void showIncidencePopup(QPopupMenu *popup, Incidence *event); 92 void showIncidencePopup(Q3PopupMenu *popup, Incidence *event);
91 93
92 /** 94 /**
93 Perform the default action for an incidence, e.g. open the event editor, 95 Perform the default action for an incidence, e.g. open the event editor,
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index c0acf34..4df26a9 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -17,12 +17,17 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qcstring.h> 20#include <q3cstring.h>
21#include <qwhatsthis.h> 21#include <q3whatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <QDesktopWidget>
24#include <qlabel.h> 25#include <qlabel.h>
25#include <qlayout.h> 26#include <qlayout.h>
27//Added by qt3to4:
28#include <QKeyEvent>
29#include <Q3PtrList>
30#include <Q3VBoxLayout>
26 31
27#include <klocale.h> 32#include <klocale.h>
28#include <kapplication.h> 33#include <kapplication.h>
@@ -55,14 +60,14 @@
55#include <kabc/addresseeview.h> 60#include <kabc/addresseeview.h>
56#include <qprinter.h> 61#include <qprinter.h>
57#include <qpainter.h> 62#include <qpainter.h>
58#include <qpaintdevicemetrics.h> 63#include <q3paintdevicemetrics.h>
59#else //DESKTOP_VERSION 64#else //DESKTOP_VERSION
60#include <qtopia/qcopenvelope_qws.h> 65#include <qtopia/qcopenvelope_qws.h>
61#endif //DESKTOP_VERSION 66#endif //DESKTOP_VERSION
62#include <externalapphandler.h> 67#include <externalapphandler.h>
63 68
64KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 69KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
65 : QTextBrowser(parent,name) 70 : Q3TextBrowser(parent,name)
66{ 71{
67 mSyncMode = false; 72 mSyncMode = false;
68 mColorMode = 0; 73 mColorMode = 0;
@@ -86,7 +91,7 @@ void KOEventViewer::printMe()
86 return; 91 return;
87 QPainter p; 92 QPainter p;
88 p.begin ( &printer ); 93 p.begin ( &printer );
89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 94 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
90 float dx, dy; 95 float dx, dy;
91 int wid = (m.width() * 9)/10; 96 int wid = (m.width() * 9)/10;
92 dx = (float) wid/(float)contentsWidth (); 97 dx = (float) wid/(float)contentsWidth ();
@@ -134,7 +139,7 @@ void KOEventViewer::setSource(const QString& n)
134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 139 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
135 QDialog dia( this,"dia123", true ); 140 QDialog dia( this,"dia123", true );
136 dia.setCaption( i18n("Details of attendee") ); 141 dia.setCaption( i18n("Details of attendee") );
137 QVBoxLayout lay ( &dia ); 142 Q3VBoxLayout lay ( &dia );
138 KABC::AddresseeView av ( &dia ); 143 KABC::AddresseeView av ( &dia );
139 av.setAddressee( (*it) ); 144 av.setAddressee( (*it) );
140 lay.addWidget( &av ); 145 lay.addWidget( &av );
@@ -155,7 +160,7 @@ void KOEventViewer::setSource(const QString& n)
155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 160 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
156 return; 161 return;
157 } 162 }
158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 163 Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
159 if (attendees.count()) { 164 if (attendees.count()) {
160 Attendee *a; 165 Attendee *a;
161 for(a=attendees.first();a;a=attendees.next()) { 166 for(a=attendees.first();a;a=attendees.next()) {
@@ -200,14 +205,14 @@ void KOEventViewer::setSource(const QString& n)
200 const QByteArray noParamData; 205 const QByteArray noParamData;
201 const QByteArray paramData; 206 const QByteArray paramData;
202 QByteArray replyData; 207 QByteArray replyData;
203 QCString replyTypeStr; 208 Q3CString replyTypeStr;
204#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 209#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
205 bool foundAbbrowser = PING_ABBROWSER; 210 bool foundAbbrowser = PING_ABBROWSER;
206 211
207 if (foundAbbrowser) { 212 if (foundAbbrowser) {
208 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 213 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
209 //client->send("kaddressbook","KAddressBookIface", 214 //client->send("kaddressbook","KAddressBookIface",
210 QDataStream arg(paramData, IO_WriteOnly); 215 QDataStream arg(paramData, QIODevice::WriteOnly);
211 arg << n.mid(6); 216 arg << n.mid(6);
212 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 217 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
213 return; 218 return;
@@ -231,7 +236,7 @@ void KOEventViewer::setSource(const QString& n)
231} 236}
232void KOEventViewer::mailToAttendees( bool all ) 237void KOEventViewer::mailToAttendees( bool all )
233{ 238{
234 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 239 Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
235 if (attendees.count() == 0) return; 240 if (attendees.count() == 0) return;
236 QStringList nameList; 241 QStringList nameList;
237 QStringList emailList; 242 QStringList emailList;
@@ -260,7 +265,7 @@ void KOEventViewer::mailToAttendees( bool all )
260} 265}
261void KOEventViewer::addTag(const QString & tag,const QString & text) 266void KOEventViewer::addTag(const QString & tag,const QString & text)
262{ 267{
263 int number=text.contains("\n"); 268 int number=text.count("\n");
264 QString str = "<" + tag + ">"; 269 QString str = "<" + tag + ">";
265 QString tmpText=text; 270 QString tmpText=text;
266 QString tmpStr=str; 271 QString tmpStr=str;
@@ -587,7 +592,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
587 592
588 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); 593 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
589 } 594 }
590 QPtrList<Incidence> Relations = event->relations(); 595 Q3PtrList<Incidence> Relations = event->relations();
591 Incidence *to; 596 Incidence *to;
592 if ( Relations.first() ) 597 if ( Relations.first() )
593 addTag("b",i18n("Sub todos:<br>")); 598 addTag("b",i18n("Sub todos:<br>"));
@@ -621,7 +626,7 @@ void KOEventViewer::formatCategories(Incidence *event)
621} 626}
622void KOEventViewer::formatAttendees(Incidence *event) 627void KOEventViewer::formatAttendees(Incidence *event)
623{ 628{
624 QPtrList<Attendee> attendees = event->attendees(); 629 Q3PtrList<Attendee> attendees = event->attendees();
625 if (attendees.count()) { 630 if (attendees.count()) {
626 631
627 632
@@ -654,7 +659,7 @@ void KOEventViewer::formatAttendees(Incidence *event)
654 mText.append(event->organizer()); 659 mText.append(event->organizer());
655#endif 660#endif
656 661
657 if (iconPath) { 662 if (!iconPath.isEmpty()) {
658 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 663 mText += " <a href=\"mailto:" + event->organizer() + "\">";
659 mText += "<IMG src=\"" + iconPath + "\">"; 664 mText += "<IMG src=\"" + iconPath + "\">";
660 mText += "</a>\n"; 665 mText += "</a>\n";
@@ -704,7 +709,7 @@ void KOEventViewer::formatAttendees(Incidence *event)
704 709
705 710
706 if (!a->email().isEmpty()) { 711 if (!a->email().isEmpty()) {
707 if (iconPath) { 712 if (!iconPath.isEmpty()) {
708 mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; 713 mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">";
709 if ( a->RSVP() ) { 714 if ( a->RSVP() ) {
710 ++a_count_nr; 715 ++a_count_nr;
@@ -862,7 +867,7 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e )
862 e->ignore(); 867 e->ignore();
863 break; 868 break;
864 default: 869 default:
865 QTextBrowser::keyPressEvent ( e ); 870 Q3TextBrowser::keyPressEvent ( e );
866 break; 871 break;
867 } 872 }
868} 873}
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 64eb4ff..3df667f 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -22,7 +22,10 @@
22// Viewer widget for events. 22// Viewer widget for events.
23// 23//
24 24
25#include <qtextbrowser.h> 25#include <q3textbrowser.h>
26//Added by qt3to4:
27#include <Q3VBoxLayout>
28#include <QKeyEvent>
26 29
27#include <libkcal/event.h> 30#include <libkcal/event.h>
28#include <libkcal/journal.h> 31#include <libkcal/journal.h>
@@ -37,7 +40,7 @@ using namespace KCal;
37#include <qlayout.h> 40#include <qlayout.h>
38#include <qdialog.h> 41#include <qdialog.h>
39#include <qlabel.h> 42#include <qlabel.h>
40#include <qbuttongroup.h> 43#include <q3buttongroup.h>
41#include <kglobal.h> 44#include <kglobal.h>
42 45
43class KOPrintPrefs : public QDialog 46class KOPrintPrefs : public QDialog
@@ -47,13 +50,13 @@ class KOPrintPrefs : public QDialog
47 QDialog( parent, name, true ) 50 QDialog( parent, name, true )
48 { 51 {
49 setCaption( i18n("KO/Pi Printout") ); 52 setCaption( i18n("KO/Pi Printout") );
50 QVBoxLayout* lay = new QVBoxLayout( this ); 53 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
51 lay->setSpacing( 9 ); 54 lay->setSpacing( 9 );
52 lay->setMargin( 9 ); 55 lay->setMargin( 9 );
53 QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this ); 56 QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this );
54 lay->addWidget( lab ); 57 lay->addWidget( lab );
55 lab->setAlignment( AlignCenter ); 58 lab->setAlignment( Qt::AlignCenter );
56 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); 59 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Printout Mode"), this );
57 lay->addWidget( format ); 60 lay->addWidget( format );
58 format->setExclusive ( true ) ; 61 format->setExclusive ( true ) ;
59 pmNo = new QRadioButton(i18n("Print unscaled"), format ); 62 pmNo = new QRadioButton(i18n("Print unscaled"), format );
@@ -83,7 +86,7 @@ private:
83 86
84#endif 87#endif
85 88
86class KOEventViewer : public QTextBrowser { 89class KOEventViewer : public Q3TextBrowser {
87 Q_OBJECT 90 Q_OBJECT
88 public: 91 public:
89 KOEventViewer(QWidget *parent=0,const char *name=0); 92 KOEventViewer(QWidget *parent=0,const char *name=0);
@@ -117,7 +120,7 @@ class KOEventViewer : public QTextBrowser {
117 void keyPressEvent ( QKeyEvent * e ); 120 void keyPressEvent ( QKeyEvent * e );
118 121
119 private: 122 private:
120 QTextBrowser *mEventTextView; 123 Q3TextBrowser *mEventTextView;
121 bool mSyncMode; 124 bool mSyncMode;
122 QString deTag(QString text); 125 QString deTag(QString text);
123 126
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 2e936f3..3a37852 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -22,12 +22,15 @@
22#include <libkcal/event.h> 22#include <libkcal/event.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25//Added by qt3to4:
26#include <QHideEvent>
27#include <QKeyEvent>
25 28
26#include "koeventviewer.h" 29#include "koeventviewer.h"
27#include <kmessagebox.h> 30#include <kmessagebox.h>
28#include "koprefs.h" 31#include "koprefs.h"
29#include <libkcal/todo.h> 32#include <libkcal/todo.h>
30#include "qapp.h" 33#include "qapplication.h"
31 34
32#include "koeventviewerdialog.h" 35#include "koeventviewerdialog.h"
33extern int globalFlagBlockAgenda; 36extern int globalFlagBlockAgenda;
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 71696f4..947c10b 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -22,7 +22,10 @@
22// Viewer dialog for events. 22// Viewer dialog for events.
23// 23//
24 24
25#include <qtextview.h> 25#include <q3textview.h>
26//Added by qt3to4:
27#include <QKeyEvent>
28#include <QHideEvent>
26 29
27#include <kdialogbase.h> 30#include <kdialogbase.h>
28 31
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ee9c9f6..8335ba9 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -27,10 +27,14 @@
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qdialog.h> 29#include <qdialog.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qtextcodec.h> 31#include <qtextcodec.h>
32#include <qwhatsthis.h> 32#include <q3whatsthis.h>
33#include <qdir.h> 33#include <qdir.h>
34//Added by qt3to4:
35#include <Q3GridLayout>
36#include <Q3Frame>
37#include <Q3PtrList>
34 38
35 39
36#include <libkcal/calfilter.h> 40#include <libkcal/calfilter.h>
@@ -47,8 +51,8 @@
47 51
48 52
49 53
50KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, 54KOFilterView::KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent,
51 const char* name,WFlags fl ) 55 const char* name,Qt::WFlags fl )
52 : KOFilterView_base(parent,name,fl) 56 : KOFilterView_base(parent,name,fl)
53{ 57{
54 mFilters = filterList; 58 mFilters = filterList;
@@ -114,14 +118,14 @@ void KOFilterView::setSelectedFilter( int fil )
114 118
115KOCalEditView::KOCalEditView(QWidget* parent, 119KOCalEditView::KOCalEditView(QWidget* parent,
116 const char* name ) 120 const char* name )
117 : QScrollView(parent,name) 121 : Q3ScrollView(parent,name)
118{ 122{
119 mw = 0; 123 mw = 0;
120 setResizePolicy( AutoOneFit ); 124 setResizePolicy( AutoOneFit );
121 setFrameStyle ( QFrame::Panel | QFrame::Plain ); 125 setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain );
122 setLineWidth ( 1 ); 126 setLineWidth ( 1 );
123 setMidLineWidth ( 1 ); 127 setMidLineWidth ( 1 );
124 setFocusPolicy(NoFocus); 128 setFocusPolicy(Qt::NoFocus);
125} 129}
126 130
127KOCalEditView::~KOCalEditView() 131KOCalEditView::~KOCalEditView()
@@ -247,55 +251,55 @@ void KOCalEditView::readConfig()
247 mw = new QWidget ( viewport() ); 251 mw = new QWidget ( viewport() );
248 addChild(mw); 252 addChild(mw);
249 int ii = 0; 253 int ii = 0;
250 mainLayout = new QGridLayout ( mw , 2, 8 ); 254 mainLayout = new Q3GridLayout ( mw , 2, 8 );
251 mainLayout->setMargin( 2 ); 255 mainLayout->setMargin( 2 );
252 mainLayout->setSpacing( 2 ); 256 mainLayout->setSpacing( 2 );
253 QPushButton * addButT = new QPushButton ( mw ); 257 QPushButton * addButT = new QPushButton ( mw );
254 addButT->setFocusPolicy(NoFocus); 258 addButT->setFocusPolicy(Qt::NoFocus);
255 mainLayout->addWidget( addButT,0,0 ); 259 mainLayout->addWidget( addButT,0,0 );
256 addButT->setText( "D"); 260 addButT->setText( "D");
257 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); 261 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo()));
258 QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); 262 Q3WhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
259 //addBut->setPixmap ( SmallIcon("greenhook16")); 263 //addBut->setPixmap ( SmallIcon("greenhook16"));
260 QPushButton *addBut = new QPushButton ( mw ); 264 QPushButton *addBut = new QPushButton ( mw );
261 addBut->setFocusPolicy(NoFocus); 265 addBut->setFocusPolicy(Qt::NoFocus);
262 mainLayout->addWidget( addBut,0,++ii ); 266 mainLayout->addWidget( addBut,0,++ii );
263 addBut->setPixmap ( SmallIcon("eye")); 267 addBut->setPixmap ( SmallIcon("eye"));
264 QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); 268 Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
265 connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); 269 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
266 int max = addBut->sizeHint().height(); 270 int max = addBut->sizeHint().height();
267 addBut->setMaximumWidth( max ); 271 addBut->setMaximumWidth( max );
268 addButT->setFixedSize( QSize( max, max ) ); 272 addButT->setFixedSize( QSize( max, max ) );
269 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); 273 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
270 mainLayout->addWidget( lab,0,++ii ); 274 mainLayout->addWidget( lab,0,++ii );
271 QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); 275 Q3WhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
272 //lab = new QLabel ( i18n(" "), mw ); 276 //lab = new QLabel ( i18n(" "), mw );
273 //mainLayout->addWidget( lab,0,++ii ); 277 //mainLayout->addWidget( lab,0,++ii );
274 //lab->setFixedWidth( 1 ); 278 //lab->setFixedWidth( 1 );
275 addBut = new QPushButton ( mw ); 279 addBut = new QPushButton ( mw );
276 addBut->setFocusPolicy(NoFocus); 280 addBut->setFocusPolicy(Qt::NoFocus);
277 mainLayout->addWidget( addBut,0,++ii ); 281 mainLayout->addWidget( addBut,0,++ii );
278 addBut->setPixmap ( SmallIcon("bell")); 282 addBut->setPixmap ( SmallIcon("bell"));
279 QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); 283 Q3WhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
280 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); 284 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
281 addBut->setMaximumWidth( addBut->sizeHint().height() ); 285 addBut->setMaximumWidth( addBut->sizeHint().height() );
282 286
283 addBut = new QPushButton ( mw ); 287 addBut = new QPushButton ( mw );
284 addBut->setFocusPolicy(NoFocus); 288 addBut->setFocusPolicy(Qt::NoFocus);
285 mainLayout->addWidget( addBut,0,++ii ); 289 mainLayout->addWidget( addBut,0,++ii );
286 addBut->setPixmap ( SmallIcon("pencil")); 290 addBut->setPixmap ( SmallIcon("pencil"));
287 QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); 291 Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
288 connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); 292 connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
289 addBut->setMaximumWidth( addBut->sizeHint().height() ); 293 addBut->setMaximumWidth( addBut->sizeHint().height() );
290 lab = new QLabel ( "", mw ); 294 lab = new QLabel ( "", mw );
291 mainLayout->addWidget( lab,0,++ii ); 295 mainLayout->addWidget( lab,0,++ii );
292 296
293 addBut = new QPushButton ( mw ); 297 addBut = new QPushButton ( mw );
294 addBut->setFocusPolicy(NoFocus); 298 addBut->setFocusPolicy(Qt::NoFocus);
295 mainLayout->addWidget( addBut,0,++ii ); 299 mainLayout->addWidget( addBut,0,++ii );
296 addBut->setPixmap ( SmallIcon("plus")); 300 addBut->setPixmap ( SmallIcon("plus"));
297 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 301 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
298 QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); 302 Q3WhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
299 lab = new QLabel ( " ", mw ); 303 lab = new QLabel ( " ", mw );
300 mainLayout->addWidget( lab,0,++ii ); 304 mainLayout->addWidget( lab,0,++ii );
301 305
@@ -431,11 +435,11 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask )
431 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No ) 435 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No )
432 return 0; 436 return 0;
433 QFile fileIn( absFile ); 437 QFile fileIn( absFile );
434 if (!fileIn.open( IO_WriteOnly ) ) { 438 if (!fileIn.open( QIODevice::WriteOnly ) ) {
435 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); 439 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
436 return 0; 440 return 0;
437 } 441 }
438 QTextStream tsIn( &fileIn ); 442 Q3TextStream tsIn( &fileIn );
439 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 443 tsIn.setCodec( QTextCodec::codecForName("utf8") );
440 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; 444 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
441 fileIn.close(); 445 fileIn.close();
@@ -475,7 +479,7 @@ void KOCalEditView::disableRO()
475{ 479{
476 toggleList( mROB, false ); 480 toggleList( mROB, false );
477} 481}
478void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable ) 482void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable )
479{ 483{
480 bool dis = !enable; 484 bool dis = !enable;
481 KOCalCheckButton* it = list.first(); 485 KOCalCheckButton* it = list.first();
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 0dd423a..f1bbab4 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -26,12 +26,18 @@
26#include <qstring.h> 26#include <qstring.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qradiobutton.h> 30#include <qradiobutton.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qlabel.h> 32#include <qlabel.h>
32#include <qdialog.h> 33#include <qdialog.h>
33#include <qscrollview.h> 34#include <q3scrollview.h>
34#include <qpushbutton.h> 35#include <qpushbutton.h>
36//Added by qt3to4:
37#include <Q3GridLayout>
38#include <Q3PtrList>
39#include <QKeyEvent>
40#include <Q3VBoxLayout>
35#include <kconfig.h> 41#include <kconfig.h>
36#include "kofilterview_base.h" 42#include "kofilterview_base.h"
37 43
@@ -42,7 +48,7 @@
42#include <kglobal.h> 48#include <kglobal.h>
43#include <kmessagebox.h> 49#include <kmessagebox.h>
44 50
45class QGridLayout; 51class Q3GridLayout;
46 52
47using namespace KCal; 53using namespace KCal;
48 54
@@ -54,7 +60,7 @@ class KONewCalPrefs : public QDialog
54 QDialog( parent, name, true ) 60 QDialog( parent, name, true )
55 { 61 {
56 setCaption( i18n("Add new Calendar") ); 62 setCaption( i18n("Add new Calendar") );
57 QVBoxLayout* lay = new QVBoxLayout( this ); 63 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
58 lay->setSpacing( 3 ); 64 lay->setSpacing( 3 );
59 lay->setMargin( 3 ); 65 lay->setMargin( 3 );
60 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 66 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
@@ -110,7 +116,7 @@ class KOCalButton : public QPushButton
110 connect( this, SIGNAL( clicked() ), 116 connect( this, SIGNAL( clicked() ),
111 SLOT( bottonClicked() )); 117 SLOT( bottonClicked() ));
112 mNumber = -1; 118 mNumber = -1;
113 setFocusPolicy(NoFocus); 119 setFocusPolicy(Qt::NoFocus);
114 } 120 }
115 void setNum ( int num ) {mNumber = num; } 121 void setNum ( int num ) {mNumber = num; }
116 signals: 122 signals:
@@ -135,7 +141,7 @@ class KOCalCheckButton : public QCheckBox
135 connect( this, SIGNAL( toggled ( bool ) ), 141 connect( this, SIGNAL( toggled ( bool ) ),
136 SLOT( bottonClicked( bool ) )); 142 SLOT( bottonClicked( bool ) ));
137 mNumber = -1; 143 mNumber = -1;
138 setFocusPolicy(NoFocus); 144 setFocusPolicy(Qt::NoFocus);
139 //setMaximumWidth( 10 ); 145 //setMaximumWidth( 10 );
140 146
141 } 147 }
@@ -163,7 +169,7 @@ class KOCalRadioButton : public QRadioButton
163 connect( this, SIGNAL( toggled ( bool ) ), 169 connect( this, SIGNAL( toggled ( bool ) ),
164 SLOT( bottonClicked( bool ) )); 170 SLOT( bottonClicked( bool ) ));
165 mNumber = -1; 171 mNumber = -1;
166 setFocusPolicy(NoFocus); 172 setFocusPolicy(Qt::NoFocus);
167 //setMaximumWidth( 10 ); 173 //setMaximumWidth( 10 );
168 174
169 } 175 }
@@ -188,7 +194,7 @@ class KOFilterView : public KOFilterView_base
188{ 194{
189 Q_OBJECT 195 Q_OBJECT
190 public: 196 public:
191 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 197 KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, Qt::WFlags fl=0);
192 ~KOFilterView(); 198 ~KOFilterView();
193 199
194 void updateFilters(); 200 void updateFilters();
@@ -204,10 +210,10 @@ class KOFilterView : public KOFilterView_base
204 void editFilters(); 210 void editFilters();
205 211
206 private: 212 private:
207 QPtrList<CalFilter> *mFilters; 213 Q3PtrList<CalFilter> *mFilters;
208}; 214};
209 215
210class KOCalEditView : public QScrollView 216class KOCalEditView : public Q3ScrollView
211{ 217{
212 Q_OBJECT 218 Q_OBJECT
213 public: 219 public:
@@ -244,12 +250,12 @@ class KOCalEditView : public QScrollView
244 250
245 private: 251 private:
246 QWidget *mw; 252 QWidget *mw;
247 void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); 253 void toggleList ( Q3PtrList<KOCalCheckButton> , bool b = true );
248 QPtrList<KOCalRadioButton> mStdandardB; 254 Q3PtrList<KOCalRadioButton> mStdandardB;
249 QPtrList<KOCalCheckButton> mEnabledB; 255 Q3PtrList<KOCalCheckButton> mEnabledB;
250 QPtrList<KOCalCheckButton> mAlarmB; 256 Q3PtrList<KOCalCheckButton> mAlarmB;
251 QPtrList<KOCalCheckButton> mROB; 257 Q3PtrList<KOCalCheckButton> mROB;
252 QGridLayout* mainLayout; 258 Q3GridLayout* mainLayout;
253}; 259};
254 260
255 261
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 79b97e8..63d044c 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -22,20 +22,20 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qprogressbar.h> 28#include <q3progressbar.h>
29#include <qprogressdialog.h> 29#include <q3progressdialog.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qhbox.h> 34#include <q3hbox.h>
35#include <qregexp.h> 35#include <qregexp.h>
36#include <qheader.h> 36#include <q3header.h>
37#include <qdatetime.h> 37#include <qdatetime.h>
38#include <qlistview.h> 38#include <q3listview.h>
39 39
40#include <kdebug.h> 40#include <kdebug.h>
41#include <klocale.h> 41#include <klocale.h>
@@ -70,13 +70,13 @@ QDateTime mDdate2Qdtr( DATE dt)
70 return qdt; 70 return qdt;
71} 71}
72 72
73class OLEListViewItem : public QCheckListItem 73class OLEListViewItem : public Q3CheckListItem
74{ 74{
75 public: 75 public:
76 OLEListViewItem( QListView *parent, QString text ) : 76 OLEListViewItem( Q3ListView *parent, QString text ) :
77 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; }; 77 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { mData = 0; };
78 OLEListViewItem( QListViewItem *after, QString text ) : 78 OLEListViewItem( Q3ListViewItem *after, QString text ) :
79 QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; }; 79 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { mData = 0; };
80 ~OLEListViewItem() {}; 80 ~OLEListViewItem() {};
81 void setData( DWORD data ) {mData= data; }; 81 void setData( DWORD data ) {mData= data; };
82 DWORD data() { return mData ;}; 82 DWORD data() { return mData ;};
@@ -89,9 +89,9 @@ KOImportOLdialog::KOImportOLdialog( const QString &caption,
89 KDialogBase( Plain, caption, User1 | Close, Ok, 89 KDialogBase( Plain, caption, User1 | Close, Ok,
90 parent, caption, true, false, i18n("Import!") ) 90 parent, caption, true, false, i18n("Import!") )
91{ 91{
92 QHBox * mw = new QHBox( this ); 92 Q3HBox * mw = new Q3HBox( this );
93 setMainWidget( mw ); 93 setMainWidget( mw );
94 mListView = new QListView( mw ); 94 mListView = new Q3ListView( mw );
95 mListView->addColumn(i18n("Select Folder to import")); 95 mListView->addColumn(i18n("Select Folder to import"));
96 mListView->addColumn(i18n("Content Type")); 96 mListView->addColumn(i18n("Content Type"));
97 mCalendar = calendar; 97 mCalendar = calendar;
@@ -212,7 +212,7 @@ void KOImportOLdialog::readCalendarData( DWORD folder )
212 LPDISPATCH itm; 212 LPDISPATCH itm;
213 int i; 213 int i;
214 folderItems = mf.GetItems(); 214 folderItems = mf.GetItems();
215 QProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this ); 215 Q3ProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this );
216 bar.setCaption (i18n("Importing!") ); 216 bar.setCaption (i18n("Importing!") );
217 int h = bar.sizeHint().height() ; 217 int h = bar.sizeHint().height() ;
218 int w = 300; 218 int w = 300;
diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h
index c8847c5..d66f099 100644
--- a/korganizer/koimportoldialog.h
+++ b/korganizer/koimportoldialog.h
@@ -31,7 +31,7 @@
31 31
32 32
33class QDateTime; 33class QDateTime;
34class QListView; 34class Q3ListView;
35class OLEListViewItem; 35class OLEListViewItem;
36class _AppointmentItem; 36class _AppointmentItem;
37namespace KPIM { class CategorySelectDialog; } 37namespace KPIM { class CategorySelectDialog; }
@@ -72,7 +72,7 @@ class KOImportOLdialog : public KDialogBase
72 void ol2kopiCalendar( _AppointmentItem * , bool computeRecurrence = true ); 72 void ol2kopiCalendar( _AppointmentItem * , bool computeRecurrence = true );
73 73
74 Calendar *mCalendar; 74 Calendar *mCalendar;
75 QListView * mListView; 75 Q3ListView * mListView;
76 QString getUidByEmail( QString email ); 76 QString getUidByEmail( QString email );
77 77
78 private: 78 private:
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 236f6f9..2060ea1 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -22,12 +22,14 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qdir.h> 30#include <qdir.h>
31//Added by qt3to4:
32#include <Q3VBoxLayout>
31 33
32#include <kdebug.h> 34#include <kdebug.h>
33#include <klocale.h> 35#include <klocale.h>
@@ -82,9 +84,9 @@ KOIncidenceEditor::~KOIncidenceEditor()
82 84
83void KOIncidenceEditor::setupAttendeesTab() 85void KOIncidenceEditor::setupAttendeesTab()
84{ 86{
85 QFrame *topFrame = addPage(i18n("Attendees")); 87 Q3Frame *topFrame = addPage(i18n("Attendees"));
86 88
87 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 89 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
88 90
89 mDetails = new KOEditorDetails(spacingHint()-2,topFrame); 91 mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
90 topLayout->addWidget(mDetails); 92 topLayout->addWidget(mDetails);
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 406df5a..51594ff 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -25,13 +25,19 @@
25// View of Journal entries 25// View of Journal entries
26 26
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qscrollview.h> 28#include <q3scrollview.h>
29#include <qpopupmenu.h> 29#include <q3popupmenu.h>
30#include <qhbox.h> 30#include <q3hbox.h>
31#include <qpushbutton.h> 31#include <qpushbutton.h>
32#include <qlabel.h> 32#include <qlabel.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <QDesktopWidget>
36//Added by qt3to4:
37#include <QPixmap>
38#include <Q3PtrList>
39#include <QKeyEvent>
40#include <Q3VBoxLayout>
35 41
36#include <klocale.h> 42#include <klocale.h>
37#include <kdebug.h> 43#include <kdebug.h>
@@ -51,7 +57,7 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
51 : KOrg::BaseView(calendar, parent, name) 57 : KOrg::BaseView(calendar, parent, name)
52{ 58{
53 mCalendar = calendar; 59 mCalendar = calendar;
54 QHBox * vb = new QHBox ( this ); 60 Q3HBox * vb = new Q3HBox ( this );
55 QPushButton * newJournal = new QPushButton( vb ); 61 QPushButton * newJournal = new QPushButton( vb );
56 QPixmap icon; 62 QPixmap icon;
57 if ( QApplication::desktop()->width() < 321 ) 63 if ( QApplication::desktop()->width() < 321 )
@@ -63,15 +69,15 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
63 newJournal->setFixedSize( size, size ); 69 newJournal->setFixedSize( size, size );
64 mDateLabel = new QLabel ( vb ); 70 mDateLabel = new QLabel ( vb );
65 mDateLabel->setMargin(1); 71 mDateLabel->setMargin(1);
66 mDateLabel->setAlignment(AlignCenter); 72 mDateLabel->setAlignment(Qt::AlignCenter);
67 QScrollView * sv = new QScrollView( this ); 73 Q3ScrollView * sv = new Q3ScrollView( this );
68 QVBoxLayout * hbl = new QVBoxLayout( this ); 74 Q3VBoxLayout * hbl = new Q3VBoxLayout( this );
69 hbl->addWidget( vb ); 75 hbl->addWidget( vb );
70 hbl->addWidget( sv ); 76 hbl->addWidget( sv );
71 parWid = new QWidget( sv->viewport() ); 77 parWid = new QWidget( sv->viewport() );
72 sv->addChild(parWid); 78 sv->addChild(parWid);
73 sv->setResizePolicy( QScrollView:: AutoOneFit ); 79 sv->setResizePolicy( Q3ScrollView:: AutoOneFit );
74 mTopLayout = new QVBoxLayout(parWid); 80 mTopLayout = new Q3VBoxLayout(parWid);
75 connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); 81 connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) );
76 getNewEntry(); 82 getNewEntry();
77} 83}
@@ -96,9 +102,9 @@ JournalEntry* KOJournalView::getNewEntry()
96 return Entry; 102 return Entry;
97} 103}
98 104
99QPtrList<Incidence> KOJournalView::selectedIncidences() 105Q3PtrList<Incidence> KOJournalView::selectedIncidences()
100{ 106{
101 QPtrList<Incidence> eventList; 107 Q3PtrList<Incidence> eventList;
102 108
103 return eventList; 109 return eventList;
104} 110}
@@ -162,13 +168,13 @@ void KOJournalView::showOnly ( Journal* j )
162 showDates( mDate, QDate() ); 168 showDates( mDate, QDate() );
163 return; 169 return;
164 } 170 }
165 QPtrList<Journal> jl; 171 Q3PtrList<Journal> jl;
166 jl.append ( j ); 172 jl.append ( j );
167 showList( jl ); 173 showList( jl );
168 JournalEntry* mEntry = jEntries.first(); 174 JournalEntry* mEntry = jEntries.first();
169 mEntry->setShowOnly(); 175 mEntry->setShowOnly();
170} 176}
171void KOJournalView::showList(QPtrList<Journal> jl) 177void KOJournalView::showList(Q3PtrList<Journal> jl)
172{ 178{
173 static bool ff = false; 179 static bool ff = false;
174 if ( ff ) return; 180 if ( ff ) return;
@@ -225,11 +231,11 @@ void KOJournalView::showDates(const QDate &start, const QDate &)
225{ 231{
226 mDate = start; 232 mDate = start;
227 mDateLabel->setText(KGlobal::locale()->formatDate(mDate)); 233 mDateLabel->setText(KGlobal::locale()->formatDate(mDate));
228 QPtrList<Journal> jl = calendar()->journals4Date( start ); 234 Q3PtrList<Journal> jl = calendar()->journals4Date( start );
229 showList( jl ); 235 showList( jl );
230} 236}
231 237
232void KOJournalView::showEvents(QPtrList<Event>) 238void KOJournalView::showEvents(Q3PtrList<Event>)
233{ 239{
234 // After new creation of list view no events are selected. 240 // After new creation of list view no events are selected.
235// emit incidenceSelected( 0 ); 241// emit incidenceSelected( 0 );
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 7fa94ae..22f26cd 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -25,6 +25,11 @@
25 25
26#include <korganizer/baseview.h> 26#include <korganizer/baseview.h>
27#include <qlayout.h> 27#include <qlayout.h>
28//Added by qt3to4:
29#include <QKeyEvent>
30#include <Q3PtrList>
31#include <QLabel>
32#include <Q3BoxLayout>
28 33
29class JournalEntry; 34class JournalEntry;
30class QLabel; 35class QLabel;
@@ -46,7 +51,7 @@ class KOJournalView : public KOrg::BaseView
46 51
47 virtual int currentDateCount(); 52 virtual int currentDateCount();
48 void clearList(); 53 void clearList();
49 virtual QPtrList<Incidence> selectedIncidences(); 54 virtual Q3PtrList<Incidence> selectedIncidences();
50 DateList selectedDates() 55 DateList selectedDates()
51 {DateList q; 56 {DateList q;
52 return q;}; 57 return q;};
@@ -60,17 +65,17 @@ class KOJournalView : public KOrg::BaseView
60 void flushView(); 65 void flushView();
61 void updateConfig(); 66 void updateConfig();
62 void showDates( const QDate &start, const QDate &end ); 67 void showDates( const QDate &start, const QDate &end );
63 void showEvents(QPtrList<Event> eventList); 68 void showEvents(Q3PtrList<Event> eventList);
64 69
65 void changeEventDisplay(Event *, int); 70 void changeEventDisplay(Event *, int);
66 71
67 private: 72 private:
68 void showList(QPtrList<Journal> jl); 73 void showList(Q3PtrList<Journal> jl);
69 Calendar *mCalendar; 74 Calendar *mCalendar;
70 JournalEntry* getNewEntry(); 75 JournalEntry* getNewEntry();
71 QPtrList<JournalEntry> jEntries; 76 Q3PtrList<JournalEntry> jEntries;
72 void keyPressEvent ( QKeyEvent * ) ; 77 void keyPressEvent ( QKeyEvent * ) ;
73 QBoxLayout *mTopLayout; 78 Q3BoxLayout *mTopLayout;
74 QWidget *parWid; 79 QWidget *parWid;
75 QLabel * mDateLabel; 80 QLabel * mDateLabel;
76 QDate mDate; 81 QDate mDate;
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 192f8c0..0ea1d50 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -22,20 +22,29 @@
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qlistview.h> 25#include <q3listview.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qpopupmenu.h> 28#include <q3popupmenu.h>
29#include <qprogressbar.h> 29#include <q3progressbar.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qtextstream.h> 33#include <q3textstream.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qwhatsthis.h> 35#include <q3whatsthis.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <qpaintdevicemetrics.h> 38#include <q3paintdevicemetrics.h>
39//Added by qt3to4:
40#include <QPixmap>
41#include <QMouseEvent>
42#include <QKeyEvent>
43#include <QEvent>
44#include <Q3VBoxLayout>
45#include <Q3PtrList>
46
47#include<QDesktopWidget>
39 48
40#include <klocale.h> 49#include <klocale.h>
41#include <kdebug.h> 50#include <kdebug.h>
@@ -70,10 +79,10 @@
70extern QPixmap* sgListViewCompletedPix[6]; 79extern QPixmap* sgListViewCompletedPix[6];
71extern QPixmap* sgListViewJournalPix; 80extern QPixmap* sgListViewJournalPix;
72 81
73class KOListViewWhatsThis :public QWhatsThis 82class KOListViewWhatsThis :public Q3WhatsThis
74{ 83{
75public: 84public:
76 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 85 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
77 86
78protected: 87protected:
79 virtual QString text( const QPoint& p) 88 virtual QString text( const QPoint& p)
@@ -274,29 +283,29 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
274 mListView->addColumn(i18n("Calendar")); 283 mListView->addColumn(i18n("Calendar"));
275 mListView->addColumn(i18n("Last Modified")); 284 mListView->addColumn(i18n("Last Modified"));
276 285
277 mListView->setColumnAlignment(0,AlignLeft); 286 mListView->setColumnAlignment(0,Qt::AlignLeft);
278 mListView->setColumnAlignment(1,AlignLeft); 287 mListView->setColumnAlignment(1,Qt::AlignLeft);
279 mListView->setColumnAlignment(2,AlignHCenter); 288 mListView->setColumnAlignment(2,Qt::AlignHCenter);
280 mListView->setColumnAlignment(3,AlignLeft); 289 mListView->setColumnAlignment(3,Qt::AlignLeft);
281 mListView->setColumnAlignment(4,AlignHCenter); 290 mListView->setColumnAlignment(4,Qt::AlignHCenter);
282 mListView->setColumnAlignment(5,AlignLeft); 291 mListView->setColumnAlignment(5,Qt::AlignLeft);
283 mListView->setColumnAlignment(6,AlignLeft); 292 mListView->setColumnAlignment(6,Qt::AlignLeft);
284 mListView->setColumnAlignment(7,AlignLeft); 293 mListView->setColumnAlignment(7,Qt::AlignLeft);
285 mListView->setColumnAlignment(8,AlignLeft); 294 mListView->setColumnAlignment(8,Qt::AlignLeft);
286 mListView->setColumnAlignment(9,AlignLeft); 295 mListView->setColumnAlignment(9,Qt::AlignLeft);
287 mListView->setColumnAlignment(10,AlignLeft); 296 mListView->setColumnAlignment(10,Qt::AlignLeft);
288 mListView->setColumnAlignment(11,AlignLeft); 297 mListView->setColumnAlignment(11,Qt::AlignLeft);
289 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); 298 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
290 299
291 int iii = 0; 300 int iii = 0;
292 for ( iii = 0; iii< 12 ; ++iii ) 301 for ( iii = 0; iii< 12 ; ++iii )
293 mListView->setColumnWidthMode( iii, QListView::Manual ); 302 mListView->setColumnWidthMode( iii, Q3ListView::Manual );
294 303
295 QBoxLayout *layoutTop = new QVBoxLayout(this); 304 Q3BoxLayout *layoutTop = new Q3VBoxLayout(this);
296 layoutTop->addWidget(mListView); 305 layoutTop->addWidget(mListView);
297 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 306 mListView->setFont ( KOPrefs::instance()->mListViewFont );
298 mPopupMenu = eventPopup(); 307 mPopupMenu = eventPopup();
299 QPopupMenu* selPopup = new QPopupMenu ( this ); 308 Q3PopupMenu* selPopup = new Q3PopupMenu ( this );
300 mPopupMenu->insertSeparator(); 309 mPopupMenu->insertSeparator();
301 310
302 selPopup->insertItem(i18n("All"),this, 311 selPopup->insertItem(i18n("All"),this,
@@ -306,20 +315,20 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
306 selPopup->insertItem(i18n("Delete selected..."),this, 315 selPopup->insertItem(i18n("Delete selected..."),this,
307 SLOT(deleteAll())); 316 SLOT(deleteAll()));
308 mPopupMenu->insertItem(i18n("Selection"), selPopup ); 317 mPopupMenu->insertItem(i18n("Selection"), selPopup );
309 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 318 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
310 i18n("Hide all selected"),this, 319 i18n("Hide all selected"),this,
311 SLOT(hideAll()),true); 320 SLOT(hideAll()),true);
312 321
313 selPopup->insertSeparator(); 322 selPopup->insertSeparator();
314 QPopupMenu * exportPO = new QPopupMenu ( this ); 323 Q3PopupMenu * exportPO = new Q3PopupMenu ( this );
315 selPopup->insertItem( i18n("Export"), exportPO ); 324 selPopup->insertItem( i18n("Export"), exportPO );
316#ifdef DESKTOP_VERSION 325#ifdef DESKTOP_VERSION
317 mPopupMenu->insertSeparator(); 326 mPopupMenu->insertSeparator();
318 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 327 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
319 i18n("Print complete list..."),this, 328 i18n("Print complete list..."),this,
320 SLOT(printList()),true); 329 SLOT(printList()),true);
321#endif 330#endif
322 mCalPopup = new QPopupMenu ( this ); 331 mCalPopup = new Q3PopupMenu ( this );
323 selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); 332 selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
324 333
325 selPopup->insertItem(i18n("Set categories")+"...",this, 334 selPopup->insertItem(i18n("Set categories")+"...",this,
@@ -327,10 +336,10 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
327 selPopup->insertItem( i18n("Set alarm..."),this, 336 selPopup->insertItem( i18n("Set alarm..."),this,
328 SLOT(setAlarm())); 337 SLOT(setAlarm()));
329#if 0 338#if 0
330 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 339 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
331 i18n("Set categories")+"...",this, 340 i18n("Set categories")+"...",this,
332 SLOT(setCat()),true); 341 SLOT(setCat()),true);
333 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 342 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
334 i18n("Set alarm..."),this, 343 i18n("Set alarm..."),this,
335 SLOT(setAlarm()),true); 344 SLOT(setAlarm()),true);
336#endif 345#endif
@@ -356,7 +365,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
356 selPopup->insertItem( i18n("Beam via IR..."),this, 365 selPopup->insertItem( i18n("Beam via IR..."),this,
357 SLOT(beamSelected())); 366 SLOT(beamSelected()));
358#if 0 367#if 0
359 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 368 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
360 i18n("Beam via IR"),this, 369 i18n("Beam via IR"),this,
361 SLOT(beamSelected()),true); 370 SLOT(beamSelected()),true);
362#endif 371#endif
@@ -375,13 +384,13 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
375 */ 384 */
376 QObject::connect(mListView,SIGNAL( newEvent()), 385 QObject::connect(mListView,SIGNAL( newEvent()),
377 this,SIGNAL(signalNewEvent())); 386 this,SIGNAL(signalNewEvent()));
378 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 387 QObject::connect(mListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
379 this,SLOT(defaultItemAction(QListViewItem *))); 388 this,SLOT(defaultItemAction(Q3ListViewItem *)));
380 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, 389 QObject::connect(mListView,SIGNAL(rightButtonPressed( Q3ListViewItem *,
381 const QPoint &, int )), 390 const QPoint &, int )),
382 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 391 this,SLOT(popupMenu(Q3ListViewItem *,const QPoint &,int)));
383 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 392 QObject::connect(mListView,SIGNAL(currentChanged(Q3ListViewItem *)),
384 SLOT(processSelectionChange(QListViewItem *))); 393 SLOT(processSelectionChange(Q3ListViewItem *)));
385 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 394 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
386 SIGNAL(showIncidenceSignal(Incidence *)) ); 395 SIGNAL(showIncidenceSignal(Incidence *)) );
387 396
@@ -428,7 +437,7 @@ void KOListView::setCalendar( int c )
428 return; 437 return;
429 } 438 }
430 439
431 QPtrList<Incidence> delSel = getSelectedIncidences() ; 440 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
432 int icount = delSel.count(); 441 int icount = delSel.count();
433 if ( icount ) { 442 if ( icount ) {
434 Incidence *incidence = delSel.first(); 443 Incidence *incidence = delSel.first();
@@ -442,7 +451,7 @@ void KOListView::setCalendar( int c )
442 incidence = delSel.next(); 451 incidence = delSel.next();
443 } 452 }
444 } 453 }
445 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 454 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
446 KopiCalendarFile * cal = calendars.first(); 455 KopiCalendarFile * cal = calendars.first();
447 while ( cal ) { 456 while ( cal ) {
448 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); 457 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
@@ -497,7 +506,7 @@ void KOListView::setAlarm()
497 KOAlarmPrefs kap( this); 506 KOAlarmPrefs kap( this);
498 if ( !kap.exec() ) 507 if ( !kap.exec() )
499 return; 508 return;
500 QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos 509 Q3PtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos
501 Incidence* inc = delSel.first(); 510 Incidence* inc = delSel.first();
502 int count = 0; 511 int count = 0;
503 while ( inc ) { 512 while ( inc ) {
@@ -522,7 +531,7 @@ void KOListView::setAlarm()
522 else 531 else
523 alarm->setType(Alarm::Invalid); 532 alarm->setType(Alarm::Invalid);
524 } else { 533 } else {
525 QPtrList<Alarm> alarms = inc->alarms(); 534 Q3PtrList<Alarm> alarms = inc->alarms();
526 Alarm *alarm; 535 Alarm *alarm;
527 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { 536 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
528 alarm->setEnabled(false); 537 alarm->setEnabled(false);
@@ -552,7 +561,7 @@ void KOListView::setCategories( bool removeOld )
552 } 561 }
553 QStringList catList = csd->selectedCategories(); 562 QStringList catList = csd->selectedCategories();
554 delete csd; 563 delete csd;
555 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; 564 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
556 Incidence* inc = delSel.first(); 565 Incidence* inc = delSel.first();
557 while ( inc ) { 566 while ( inc ) {
558 if ( removeOld ) { 567 if ( removeOld ) {
@@ -572,7 +581,7 @@ void KOListView::setCategories( bool removeOld )
572 581
573void KOListView::beamSelected() 582void KOListView::beamSelected()
574{ 583{
575 QPtrList<Incidence> delSel = getSelectedIncidences() ; 584 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
576 if ( delSel.count() ) 585 if ( delSel.count() )
577 emit beamIncidenceList( delSel ); 586 emit beamIncidenceList( delSel );
578} 587}
@@ -587,7 +596,7 @@ void KOListView::saveDescriptionToFile()
587 if ( result != 0 ) { 596 if ( result != 0 ) {
588 return; 597 return;
589 } 598 }
590 QPtrList<Incidence> delSel = getSelectedIncidences() ; 599 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
591 int icount = delSel.count(); 600 int icount = delSel.count();
592 if ( icount ) { 601 if ( icount ) {
593 QString fn = KOPrefs::instance()->mLastSaveFile; 602 QString fn = KOPrefs::instance()->mLastSaveFile;
@@ -645,11 +654,11 @@ void KOListView::saveDescriptionToFile()
645 incidence = delSel.next(); 654 incidence = delSel.next();
646 } 655 }
647 QFile file( fn ); 656 QFile file( fn );
648 if (!file.open( IO_WriteOnly ) ) { 657 if (!file.open( QIODevice::WriteOnly ) ) {
649 topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); 658 topLevelWidget()->setCaption(i18n("File open error - nothing saved!") );
650 return; 659 return;
651 } 660 }
652 QTextStream ts( &file ); 661 Q3TextStream ts( &file );
653 ts << text; 662 ts << text;
654 file.close(); 663 file.close();
655 //qDebug("%s ", text.latin1()); 664 //qDebug("%s ", text.latin1());
@@ -667,12 +676,12 @@ void KOListView::saveToFile()
667{ 676{
668 writeToFile( true ); 677 writeToFile( true );
669} 678}
670QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos ) 679Q3PtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos )
671{ 680{
672 QPtrList<Incidence> delSel ; 681 Q3PtrList<Incidence> delSel ;
673 bool addSubTodos = false; 682 bool addSubTodos = false;
674 bool askSubTodos = true; 683 bool askSubTodos = true;
675 QListViewItem *item = mListView->firstChild (); 684 Q3ListViewItem *item = mListView->firstChild ();
676 while ( item ) { 685 while ( item ) {
677 if ( item->isSelected() ) { 686 if ( item->isSelected() ) {
678 Incidence* inc = ((KOListViewItem *)item)->data(); 687 Incidence* inc = ((KOListViewItem *)item)->data();
@@ -706,7 +715,7 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
706 askSubTodos = false; 715 askSubTodos = false;
707 } 716 }
708 if ( addSubTodos ) { 717 if ( addSubTodos ) {
709 QPtrList<Incidence> tempSel ; 718 Q3PtrList<Incidence> tempSel ;
710 inc->addRelationsToList( &tempSel ); 719 inc->addRelationsToList( &tempSel );
711 Incidence* tempinc = tempSel.first(); 720 Incidence* tempinc = tempSel.first();
712 while ( tempinc ) { 721 while ( tempinc ) {
@@ -730,7 +739,7 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
730 739
731void KOListView::writeToFile( bool iCal ) 740void KOListView::writeToFile( bool iCal )
732{ 741{
733 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; 742 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
734 if ( !iCal ) { 743 if ( !iCal ) {
735 bool journal = false; 744 bool journal = false;
736 Incidence *incidence = delSel.first(); 745 Incidence *incidence = delSel.first();
@@ -803,8 +812,8 @@ void KOListView::writeToFile( bool iCal )
803} 812}
804void KOListView::hideAll() 813void KOListView::hideAll()
805{ 814{
806 QPtrList<QListViewItem> delSel ; 815 Q3PtrList<Q3ListViewItem> delSel ;
807 QListViewItem *item = mListView->firstChild (); 816 Q3ListViewItem *item = mListView->firstChild ();
808 while ( item ) { 817 while ( item ) {
809 if ( item->isSelected() ) { 818 if ( item->isSelected() ) {
810 delSel.append(item); 819 delSel.append(item);
@@ -813,7 +822,7 @@ void KOListView::hideAll()
813 } 822 }
814 item = delSel.first() ; 823 item = delSel.first() ;
815 while ( item ) { 824 while ( item ) {
816 QListViewItem * del = item; 825 Q3ListViewItem * del = item;
817 item = delSel.next(); 826 item = delSel.next();
818 delete del; 827 delete del;
819 } 828 }
@@ -824,7 +833,7 @@ void KOListView::printList()
824} 833}
825void KOListView::deleteAll() 834void KOListView::deleteAll()
826{ 835{
827 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; 836 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;;
828 if ( delSel.count() ) { 837 if ( delSel.count() ) {
829 int icount = delSel.count(); 838 int icount = delSel.count();
830 Incidence *incidence = delSel.first(); 839 Incidence *incidence = delSel.first();
@@ -838,11 +847,11 @@ void KOListView::deleteAll()
838 int delCounter = 0; 847 int delCounter = 0;
839 QDialog dia ( this, "p-dialog", true ); 848 QDialog dia ( this, "p-dialog", true );
840 QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); 849 QLabel lab (i18n("Close dialog to abort deletion!"), &dia );
841 QVBoxLayout lay( &dia ); 850 Q3VBoxLayout lay( &dia );
842 lay.setMargin(7); 851 lay.setMargin(7);
843 lay.setSpacing(7); 852 lay.setSpacing(7);
844 lay.addWidget( &lab); 853 lay.addWidget( &lab);
845 QProgressBar bar( icount, &dia ); 854 Q3ProgressBar bar( icount, &dia );
846 lay.addWidget( &bar); 855 lay.addWidget( &bar);
847 int w = 220; 856 int w = 220;
848 int h = 50; 857 int h = 50;
@@ -884,10 +893,10 @@ int KOListView::currentDateCount()
884 return 0; 893 return 0;
885} 894}
886 895
887QPtrList<Incidence> KOListView::selectedIncidences() 896Q3PtrList<Incidence> KOListView::selectedIncidences()
888{ 897{
889 QPtrList<Incidence> eventList; 898 Q3PtrList<Incidence> eventList;
890 QListViewItem *item = mListView->firstChild (); 899 Q3ListViewItem *item = mListView->firstChild ();
891 while ( item ) { 900 while ( item ) {
892 if ( item->isSelected() ) { 901 if ( item->isSelected() ) {
893 eventList.append(((KOListViewItem *)item)->data()); 902 eventList.append(((KOListViewItem *)item)->data());
@@ -987,7 +996,7 @@ void KOListView::showDates(const QDate &start, const QDate &end)
987 996
988} 997}
989 998
990void KOListView::addEvents(QPtrList<Event> eventList) 999void KOListView::addEvents(Q3PtrList<Event> eventList)
991{ 1000{
992 1001
993 Event *ev; 1002 Event *ev;
@@ -999,7 +1008,7 @@ void KOListView::addEvents(QPtrList<Event> eventList)
999 } 1008 }
1000} 1009}
1001 1010
1002void KOListView::addTodos(QPtrList<Todo> eventList) 1011void KOListView::addTodos(Q3PtrList<Todo> eventList)
1003{ 1012{
1004 Todo *ev; 1013 Todo *ev;
1005 for(ev = eventList.first(); ev; ev = eventList.next()) { 1014 for(ev = eventList.first(); ev; ev = eventList.next()) {
@@ -1009,7 +1018,7 @@ void KOListView::addTodos(QPtrList<Todo> eventList)
1009 updateView(); 1018 updateView();
1010 } 1019 }
1011} 1020}
1012void KOListView::addJournals(QPtrList<Journal> eventList) 1021void KOListView::addJournals(Q3PtrList<Journal> eventList)
1013{ 1022{
1014 Journal *ev; 1023 Journal *ev;
1015 for(ev = eventList.first(); ev; ev = eventList.next()) { 1024 for(ev = eventList.first(); ev; ev = eventList.next()) {
@@ -1044,7 +1053,7 @@ void KOListView::addIncidence(Incidence *incidence)
1044 else delete item; 1053 else delete item;
1045} 1054}
1046 1055
1047void KOListView::showEvents(QPtrList<Event> eventList) 1056void KOListView::showEvents(Q3PtrList<Event> eventList)
1048{ 1057{
1049 clear(); 1058 clear();
1050 1059
@@ -1095,14 +1104,14 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event)
1095 return 0; 1104 return 0;
1096} 1105}
1097 1106
1098void KOListView::defaultItemAction(QListViewItem *i) 1107void KOListView::defaultItemAction(Q3ListViewItem *i)
1099{ 1108{
1100 KOListViewItem *item = static_cast<KOListViewItem *>( i ); 1109 KOListViewItem *item = static_cast<KOListViewItem *>( i );
1101 if ( item ) defaultAction( item->data() ); 1110 if ( item ) defaultAction( item->data() );
1102 1111
1103} 1112}
1104 1113
1105void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) 1114void KOListView::popupMenu(Q3ListViewItem *item,const QPoint &,int)
1106{ 1115{
1107 mActiveItem = (KOListViewItem *)item; 1116 mActiveItem = (KOListViewItem *)item;
1108 if (mActiveItem) { 1117 if (mActiveItem) {
@@ -1131,7 +1140,7 @@ void KOListView::writeSettings(KConfig *config, QString setting)
1131 mListView->saveLayout(config, setting); 1140 mListView->saveLayout(config, setting);
1132} 1141}
1133 1142
1134void KOListView::processSelectionChange(QListViewItem *) 1143void KOListView::processSelectionChange(Q3ListViewItem *)
1135{ 1144{
1136 1145
1137 KOListViewItem *item = 1146 KOListViewItem *item =
@@ -1180,8 +1189,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1180 1189
1181 switch ( e->key() ) { 1190 switch ( e->key() ) {
1182 case Qt::Key_Down: 1191 case Qt::Key_Down:
1183 if ( e->state() == ShiftButton ) { 1192 if ( e->state() == Qt::ShiftButton ) {
1184 QListViewItem* cn = currentItem(); 1193 Q3ListViewItem* cn = currentItem();
1185 if ( !cn ) 1194 if ( !cn )
1186 cn = firstChild(); 1195 cn = firstChild();
1187 if ( !cn ) 1196 if ( !cn )
@@ -1194,10 +1203,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1194 e->accept(); 1203 e->accept();
1195 return; 1204 return;
1196 } 1205 }
1197 if ( e->state() == ControlButton ) { 1206 if ( e->state() == Qt::ControlButton ) {
1198 int count = childCount (); 1207 int count = childCount ();
1199 int jump = count / 5; 1208 int jump = count / 5;
1200 QListViewItem* cn; 1209 Q3ListViewItem* cn;
1201 cn = currentItem(); 1210 cn = currentItem();
1202 if ( ! cn ) 1211 if ( ! cn )
1203 return; 1212 return;
@@ -1211,13 +1220,13 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1211 ensureItemVisible ( cn ); 1220 ensureItemVisible ( cn );
1212 1221
1213 } else 1222 } else
1214 QListView::keyPressEvent ( e ) ; 1223 Q3ListView::keyPressEvent ( e ) ;
1215 e->accept(); 1224 e->accept();
1216 break; 1225 break;
1217 1226
1218 case Qt::Key_Up: 1227 case Qt::Key_Up:
1219 if ( e->state() == ShiftButton ) { 1228 if ( e->state() == Qt::ShiftButton ) {
1220 QListViewItem* cn = firstChild(); 1229 Q3ListViewItem* cn = firstChild();
1221 if ( cn ) { 1230 if ( cn ) {
1222 setCurrentItem ( cn ); 1231 setCurrentItem ( cn );
1223 ensureItemVisible ( cn ); 1232 ensureItemVisible ( cn );
@@ -1225,10 +1234,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1225 e->accept(); 1234 e->accept();
1226 return; 1235 return;
1227 } 1236 }
1228 if ( e->state() == ControlButton ) { 1237 if ( e->state() == Qt::ControlButton ) {
1229 int count = childCount (); 1238 int count = childCount ();
1230 int jump = count / 5; 1239 int jump = count / 5;
1231 QListViewItem* cn; 1240 Q3ListViewItem* cn;
1232 cn = currentItem(); 1241 cn = currentItem();
1233 if ( ! cn ) 1242 if ( ! cn )
1234 return; 1243 return;
@@ -1241,11 +1250,11 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1241 setCurrentItem ( cn ); 1250 setCurrentItem ( cn );
1242 ensureItemVisible ( cn ); 1251 ensureItemVisible ( cn );
1243 } else 1252 } else
1244 QListView::keyPressEvent ( e ) ; 1253 Q3ListView::keyPressEvent ( e ) ;
1245 e->accept(); 1254 e->accept();
1246 break; 1255 break;
1247 case Qt::Key_I: { 1256 case Qt::Key_I: {
1248 QListViewItem* cn; 1257 Q3ListViewItem* cn;
1249 cn = currentItem(); 1258 cn = currentItem();
1250 if ( cn ) { 1259 if ( cn ) {
1251 KOListViewItem* ci = (KOListViewItem*)( cn ); 1260 KOListViewItem* ci = (KOListViewItem*)( cn );
@@ -1265,12 +1274,12 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1265 case Qt::Key_Return: 1274 case Qt::Key_Return:
1266 case Qt::Key_Enter: 1275 case Qt::Key_Enter:
1267 { 1276 {
1268 QListViewItem* cn; 1277 Q3ListViewItem* cn;
1269 cn = currentItem(); 1278 cn = currentItem();
1270 if ( cn ) { 1279 if ( cn ) {
1271 KOListViewItem* ci = (KOListViewItem*)( cn ); 1280 KOListViewItem* ci = (KOListViewItem*)( cn );
1272 if ( ci ){ 1281 if ( ci ){
1273 if ( e->state() == ShiftButton ) 1282 if ( e->state() == Qt::ShiftButton )
1274 ci->setSelected( false ); 1283 ci->setSelected( false );
1275 else 1284 else
1276 ci->setSelected( true ); 1285 ci->setSelected( true );
@@ -1300,12 +1309,12 @@ KOListViewListView::KOListViewListView(KOListView * lv )
1300#ifndef DESKTOP_VERSION 1309#ifndef DESKTOP_VERSION
1301 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 1310 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
1302#endif 1311#endif
1303 setSelectionMode( QListView::Multi ); 1312 setSelectionMode( Q3ListView::Multi );
1304 setMultiSelection( true); 1313 setMultiSelection( true);
1305} 1314}
1306bool KOListViewListView::hasMultiSelection(QListViewItem* item) 1315bool KOListViewListView::hasMultiSelection(Q3ListViewItem* item)
1307{ 1316{
1308 QListViewItem *qitem = firstChild (); 1317 Q3ListViewItem *qitem = firstChild ();
1309 while ( qitem ) { 1318 while ( qitem ) {
1310 if ( qitem->isSelected() && item != qitem ) 1319 if ( qitem->isSelected() && item != qitem )
1311 return true; 1320 return true;
@@ -1317,7 +1326,7 @@ void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1317{ 1326{
1318 if (!e) return; 1327 if (!e) return;
1319 QPoint vp = contentsToViewport(e->pos()); 1328 QPoint vp = contentsToViewport(e->pos());
1320 QListViewItem *item = itemAt(vp); 1329 Q3ListViewItem *item = itemAt(vp);
1321 if (!item) { 1330 if (!item) {
1322 emit newEvent(); 1331 emit newEvent();
1323 return; 1332 return;
@@ -1329,8 +1338,8 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1329{ 1338{
1330 //qDebug("contentsMousePressEvent++++ "); 1339 //qDebug("contentsMousePressEvent++++ ");
1331 KListView::contentsMousePressEvent( e ); 1340 KListView::contentsMousePressEvent( e );
1332 if ( e->button() == RightButton ) { 1341 if ( e->button() == Qt::RightButton ) {
1333 QListViewItem* ci = currentItem(); 1342 Q3ListViewItem* ci = currentItem();
1334 clearSelection () ; 1343 clearSelection () ;
1335 if ( ci ) 1344 if ( ci )
1336 ci->setSelected( true ); 1345 ci->setSelected( true );
@@ -1348,7 +1357,7 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
1348void KOListViewListView::popupMenu() 1357void KOListViewListView::popupMenu()
1349{ 1358{
1350 mPopupTimer->stop(); 1359 mPopupTimer->stop();
1351 QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); 1360 QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, Qt::RightButton , Qt::RightButton );
1352 QApplication::postEvent( this->viewport(), e ); 1361 QApplication::postEvent( this->viewport(), e );
1353 1362
1354} 1363}
@@ -1356,14 +1365,14 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1356{ 1365{
1357 //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); 1366 //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y());
1358 mYMousePos = mapToGlobal( (e->pos())).y(); 1367 mYMousePos = mapToGlobal( (e->pos())).y();
1359 if ( e->button() == LeftButton ) { 1368 if ( e->button() == Qt::LeftButton ) {
1360 mPopupTimer->start( 600 ); 1369 mPopupTimer->start( 600 );
1361 mEventPos = contentsToViewport(e->pos()); 1370 mEventPos = contentsToViewport(e->pos());
1362 mEventGlobalPos = e->globalPos(); 1371 mEventGlobalPos = e->globalPos();
1363 } 1372 }
1364 KListView::contentsMousePressEvent( e ); 1373 KListView::contentsMousePressEvent( e );
1365 if ( e->button() == RightButton ) { 1374 if ( e->button() == Qt::RightButton ) {
1366 QListViewItem* ci = currentItem(); 1375 Q3ListViewItem* ci = currentItem();
1367 //clearSelection(); 1376 //clearSelection();
1368 if ( ci ) 1377 if ( ci )
1369 ci->setSelected( true ); 1378 ci->setSelected( true );
@@ -1390,7 +1399,7 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
1390} 1399}
1391 1400
1392#define protected public 1401#define protected public
1393#include <qheader.h> 1402#include <q3header.h>
1394#undef protected 1403#undef protected
1395void KOListViewListView::printList() 1404void KOListViewListView::printList()
1396{ 1405{
@@ -1407,7 +1416,7 @@ void KOListViewListView::printList()
1407 QPainter p; 1416 QPainter p;
1408 p.begin ( &printer ); 1417 p.begin ( &printer );
1409 p.setFont(font()); 1418 p.setFont(font());
1410 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 1419 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
1411 float dx, dy; 1420 float dx, dy;
1412 int wid = (m.width() * 9)/10; 1421 int wid = (m.width() * 9)/10;
1413 dx = (float) wid/(float)contentsWidth (); 1422 dx = (float) wid/(float)contentsWidth ();
@@ -1443,7 +1452,7 @@ void KOListViewListView::printList()
1443 p.save(); 1452 p.save();
1444 for ( iii = 0; iii < cou; ++iii ) { 1453 for ( iii = 0; iii < cou; ++iii ) {
1445 int align = columnAlignment( iii ); 1454 int align = columnAlignment( iii );
1446 if ( align == AlignAuto ) align = AlignLeft; 1455 if ( align == Qt::AlignLeft ) align = Qt::AlignLeft;
1447 p.restore(); 1456 p.restore();
1448 p.save(); 1457 p.save();
1449 p.translate( header()->sectionPos( iii ), 0); 1458 p.translate( header()->sectionPos( iii ), 0);
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 99d0561..9fb0b00 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -24,9 +24,15 @@
24#ifndef _KOLISTVIEW_H 24#ifndef _KOLISTVIEW_H
25#define _KOLISTVIEW_H 25#define _KOLISTVIEW_H
26 26
27#include <qlistview.h> 27#include <q3listview.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qdict.h> 29#include <q3dict.h>
30//Added by qt3to4:
31#include <QMouseEvent>
32#include <Q3PtrList>
33#include <Q3PopupMenu>
34#include <QKeyEvent>
35#include <Q3VBoxLayout>
30 36
31#include <klistview.h> 37#include <klistview.h>
32 38
@@ -47,7 +53,7 @@ class KOListViewWhatsThis;
47#include <qspinbox.h> 53#include <qspinbox.h>
48#include <qtooltip.h> 54#include <qtooltip.h>
49#include <qcheckbox.h> 55#include <qcheckbox.h>
50#include <qhbox.h> 56#include <q3hbox.h>
51#include <qlabel.h> 57#include <qlabel.h>
52#include <kiconloader.h> 58#include <kiconloader.h>
53#include "kfiledialog.h" 59#include "kfiledialog.h"
@@ -60,7 +66,7 @@ class KOAlarmPrefs : public QDialog
60 QDialog( par, name, true ) 66 QDialog( par, name, true )
61 { 67 {
62 setCaption( i18n("Alarm Options") ); 68 setCaption( i18n("Alarm Options") );
63 QVBoxLayout* alarmLayout = new QVBoxLayout( this ); 69 Q3VBoxLayout* alarmLayout = new Q3VBoxLayout( this );
64 alarmLayout->setSpacing( 3 ); 70 alarmLayout->setSpacing( 3 );
65 alarmLayout->setMargin( 3 ); 71 alarmLayout->setMargin( 3 );
66 QWidget *parent = this; 72 QWidget *parent = this;
@@ -74,7 +80,7 @@ class KOAlarmPrefs : public QDialog
74 mAlarmIncrCombo->insertItem(i18n("hour(s)")); 80 mAlarmIncrCombo->insertItem(i18n("hour(s)"));
75 mAlarmIncrCombo->insertItem(i18n("day(s)")); 81 mAlarmIncrCombo->insertItem(i18n("day(s)"));
76 alarmLayout->addWidget(mAlarmIncrCombo); 82 alarmLayout->addWidget(mAlarmIncrCombo);
77 QHBox * hb = new QHBox ( parent ); 83 Q3HBox * hb = new Q3HBox ( parent );
78 alarmLayout->addWidget(hb); 84 alarmLayout->addWidget(hb);
79 mAlarmSoundButton = new QPushButton(hb); 85 mAlarmSoundButton = new QPushButton(hb);
80 mAlarmSoundButton->setPixmap(SmallIcon("playsound")); 86 mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
@@ -210,7 +216,7 @@ class KOListViewListView : public KListView
210 Q_OBJECT 216 Q_OBJECT
211 public: 217 public:
212 KOListViewListView(KOListView * lv ); 218 KOListViewListView(KOListView * lv );
213 bool hasMultiSelection(QListViewItem*); 219 bool hasMultiSelection(Q3ListViewItem*);
214 void printList(); 220 void printList();
215 signals: 221 signals:
216 void newEvent(); 222 void newEvent();
@@ -240,13 +246,13 @@ class KOListView : public KOEventView
240 246
241 virtual int maxDatesHint(); 247 virtual int maxDatesHint();
242 virtual int currentDateCount(); 248 virtual int currentDateCount();
243 virtual QPtrList<Incidence> selectedIncidences(); 249 virtual Q3PtrList<Incidence> selectedIncidences();
244 virtual DateList selectedDates(); 250 virtual DateList selectedDates();
245 251
246 void showDates(bool show); 252 void showDates(bool show);
247 Incidence* currentItem(); 253 Incidence* currentItem();
248 void addTodos(QPtrList<Todo> eventList); 254 void addTodos(Q3PtrList<Todo> eventList);
249 void addJournals(QPtrList<Journal> eventList); 255 void addJournals(Q3PtrList<Journal> eventList);
250 virtual void printPreview(CalPrinter *calPrinter, 256 virtual void printPreview(CalPrinter *calPrinter,
251 const QDate &, const QDate &); 257 const QDate &, const QDate &);
252 258
@@ -257,11 +263,11 @@ class KOListView : public KOEventView
257 void setStartDate(const QDate &start); 263 void setStartDate(const QDate &start);
258 int count(); 264 int count();
259 QString getWhatsThisText(QPoint p); 265 QString getWhatsThisText(QPoint p);
260 QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); 266 Q3PtrList<Incidence> getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false );
261 void showCompletedTodos(); 267 void showCompletedTodos();
262 signals: 268 signals:
263 void signalNewEvent(); 269 void signalNewEvent();
264 void beamIncidenceList(QPtrList<Incidence>); 270 void beamIncidenceList(Q3PtrList<Incidence>);
265 271
266 public slots: 272 public slots:
267 void hideAll(); 273 void hideAll();
@@ -269,7 +275,7 @@ class KOListView : public KOEventView
269 void resetFocus(); 275 void resetFocus();
270 virtual void updateView(); 276 virtual void updateView();
271 virtual void showDates(const QDate &start, const QDate &end); 277 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 278 virtual void showEvents(Q3PtrList<Event> eventList);
273 void clearSelection(); 279 void clearSelection();
274 void allSelection(); 280 void allSelection();
275 281
@@ -287,29 +293,29 @@ class KOListView : public KOEventView
287 void setCategories( bool removeOld ); 293 void setCategories( bool removeOld );
288 void changeEventDisplay(Event *, int); 294 void changeEventDisplay(Event *, int);
289 295
290 void defaultItemAction(QListViewItem *item); 296 void defaultItemAction(Q3ListViewItem *item);
291 void popupMenu(QListViewItem *item,const QPoint &,int); 297 void popupMenu(Q3ListViewItem *item,const QPoint &,int);
292 void setCalendar( int c ); 298 void setCalendar( int c );
293 void populateCalPopup(); 299 void populateCalPopup();
294 300
295 protected slots: 301 protected slots:
296 void processSelectionChange(QListViewItem *); 302 void processSelectionChange(Q3ListViewItem *);
297 void catChanged( Incidence* ); 303 void catChanged( Incidence* );
298 304
299 protected: 305 protected:
300 void writeToFile( bool iCal ); 306 void writeToFile( bool iCal );
301 void addEvents(QPtrList<Event> eventList); 307 void addEvents(Q3PtrList<Event> eventList);
302 void addIncidence(Incidence *); 308 void addIncidence(Incidence *);
303 KOListViewItem *getItemForEvent(Incidence *event); 309 KOListViewItem *getItemForEvent(Incidence *event);
304 310
305 private: 311 private:
306 bool mForceShowCompletedTodos; 312 bool mForceShowCompletedTodos;
307 QPopupMenu* mCalPopup; 313 Q3PopupMenu* mCalPopup;
308 KOListViewWhatsThis *mKOListViewWhatsThis; 314 KOListViewWhatsThis *mKOListViewWhatsThis;
309 KOListViewListView *mListView; 315 KOListViewListView *mListView;
310 KOEventPopupMenu *mPopupMenu; 316 KOEventPopupMenu *mPopupMenu;
311 KOListViewItem *mActiveItem; 317 KOListViewItem *mActiveItem;
312 QDict<Incidence> mUidDict; 318 Q3Dict<Incidence> mUidDict;
313 QDate mStartDate; 319 QDate mStartDate;
314 void keyPressEvent ( QKeyEvent * ) ; 320 void keyPressEvent ( QKeyEvent * ) ;
315}; 321};
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 85e9166..ca55c43 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -17,22 +17,34 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qpopupmenu.h> 20#include <q3popupmenu.h>
21#include <qfont.h> 21#include <qfont.h>
22#include <qfontmetrics.h> 22#include <qfontmetrics.h>
23#include <qkeycode.h> 23#include <qnamespace.h>
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qvbox.h> 25#include <q3vbox.h>
26#include <qwidgetstack.h> 26#include <q3widgetstack.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qtooltip.h> 28#include <qtooltip.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qwhatsthis.h> 31#include <q3whatsthis.h>
32#ifndef DESKTOP_VERSION 32#ifndef DESKTOP_VERSION
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#else 34#else
35#include <qapplication.h> 35#include <qapplication.h>
36#include <QDesktopWidget>
37//Added by qt3to4:
38#include <QResizeEvent>
39#include <QLabel>
40#include <QPixmap>
41#include <QFocusEvent>
42#include <QMouseEvent>
43#include <QKeyEvent>
44#include <Q3VBoxLayout>
45#include <Q3Frame>
46#include <Q3PointArray>
47#include <Q3PtrList>
36#endif 48#endif
37 49
38#include <kdebug.h> 50#include <kdebug.h>
@@ -59,10 +71,10 @@
59#ifdef DESKTOP_VERSION 71#ifdef DESKTOP_VERSION
60QToolTipGroup *MonthViewCell::mToolTipGroup = 0; 72QToolTipGroup *MonthViewCell::mToolTipGroup = 0;
61#endif 73#endif
62class KNOWhatsThis :public QWhatsThis 74class KNOWhatsThis :public Q3WhatsThis
63{ 75{
64public: 76public:
65 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; 77 KNOWhatsThis( KNoScrollListBox* sbox ) : Q3WhatsThis( sbox ), _wid( sbox) { };
66 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; 78 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); };
67 79
68protected: 80protected:
@@ -77,7 +89,7 @@ private:
77 89
78 90
79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 91KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
80 : QListBox(parent, name, WRepaintNoErase) 92 : Q3ListBox(parent, name, Qt::WNoAutoErase)
81{ 93{
82#ifndef DESKTOP_VERSION 94#ifndef DESKTOP_VERSION
83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 95 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
@@ -85,8 +97,8 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
85 mBlockDeselect = false; 97 mBlockDeselect = false;
86 mWT = new KNOWhatsThis(this); 98 mWT = new KNOWhatsThis(this);
87 resetOnFocusIn = true; 99 resetOnFocusIn = true;
88 setVScrollBarMode(QScrollView::AlwaysOff); 100 setVScrollBarMode(Q3ScrollView::AlwaysOff);
89 setHScrollBarMode(QScrollView::AlwaysOff); 101 setHScrollBarMode(Q3ScrollView::AlwaysOff);
90} 102}
91KNoScrollListBox::~KNoScrollListBox() 103KNoScrollListBox::~KNoScrollListBox()
92{ 104{
@@ -100,7 +112,7 @@ KNoScrollListBox::~KNoScrollListBox()
100 112
101void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) 113void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
102{ 114{
103 QListBox::focusInEvent ( e ); 115 Q3ListBox::focusInEvent ( e );
104 if ( count() ){ 116 if ( count() ){
105 int ci = currentItem(); 117 int ci = currentItem();
106 if ( ci < 0 ) ci = 0; 118 if ( ci < 0 ) ci = 0;
@@ -112,24 +124,24 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
112 resetOnFocusIn = true; 124 resetOnFocusIn = true;
113 125
114 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { 126 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) {
115 QListBoxItem *fi = firstItem (); 127 Q3ListBoxItem *fi = firstItem ();
116 if (fi ) { 128 if (fi ) {
117 int ihei = fi->height( this ); 129 int ihei = fi->height( this );
118 int hei = numRows () * ihei; 130 int hei = numRows () * ihei;
119 if ( hei < height() - horizontalScrollBar()->height () ) { 131 if ( hei < height() - horizontalScrollBar()->height () ) {
120 setVScrollBarMode(QScrollView::AlwaysOff); 132 setVScrollBarMode(Q3ScrollView::AlwaysOff);
121 } 133 }
122 else 134 else
123 setVScrollBarMode(QScrollView::Auto); 135 setVScrollBarMode(Q3ScrollView::Auto);
124 if ( ihei *3 > height() ) { 136 if ( ihei *3 > height() ) {
125 setHScrollBarMode(QScrollView::AlwaysOff); 137 setHScrollBarMode(Q3ScrollView::AlwaysOff);
126 } 138 }
127 else { 139 else {
128 setHScrollBarMode(QScrollView::Auto); 140 setHScrollBarMode(Q3ScrollView::Auto);
129 } 141 }
130 } else { 142 } else {
131 setVScrollBarMode(QScrollView::Auto); 143 setVScrollBarMode(Q3ScrollView::Auto);
132 setHScrollBarMode(QScrollView::Auto); 144 setHScrollBarMode(Q3ScrollView::Auto);
133 } 145 }
134 } 146 }
135 } 147 }
@@ -141,10 +153,10 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
141 if ( i >= 0 ) { 153 if ( i >= 0 ) {
142 setSelected ( i, false ); 154 setSelected ( i, false );
143 } 155 }
144 QListBox::focusOutEvent ( e ); 156 Q3ListBox::focusOutEvent ( e );
145 } 157 }
146 setVScrollBarMode(QScrollView::AlwaysOff); 158 setVScrollBarMode(Q3ScrollView::AlwaysOff);
147 setHScrollBarMode(QScrollView::AlwaysOff); 159 setHScrollBarMode(Q3ScrollView::AlwaysOff);
148 if ( ! mBlockDeselect ) 160 if ( ! mBlockDeselect )
149 emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); 161 emit highlightIncidence( 0, (MonthViewCell*)this, 0 );
150 mBlockDeselect = false; 162 mBlockDeselect = false;
@@ -152,7 +164,7 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
152 164
153QString KNoScrollListBox::getWhatsThisText(QPoint p) 165QString KNoScrollListBox::getWhatsThisText(QPoint p)
154{ 166{
155 QListBoxItem* item = itemAt ( p ); 167 Q3ListBoxItem* item = itemAt ( p );
156 if ( ! item ) { 168 if ( ! item ) {
157 return i18n("Click in the cell\nto add an event!"); 169 return i18n("Click in the cell\nto add an event!");
158 } 170 }
@@ -165,7 +177,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
165{ 177{
166 //qDebug("KNoScrollListBox::keyPressEvent "); 178 //qDebug("KNoScrollListBox::keyPressEvent ");
167 switch(e->key()) { 179 switch(e->key()) {
168 case Key_Right: 180 case Qt::Key_Right:
169 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 181 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
170 { 182 {
171 e->ignore(); 183 e->ignore();
@@ -173,7 +185,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
173 } 185 }
174 scrollBy(10,0); 186 scrollBy(10,0);
175 break; 187 break;
176 case Key_Left: 188 case Qt::Key_Left:
177 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 189 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
178 { 190 {
179 e->ignore(); 191 e->ignore();
@@ -181,7 +193,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
181 } 193 }
182 scrollBy(-10,0); 194 scrollBy(-10,0);
183 break; 195 break;
184 case Key_Up: 196 case Qt::Key_Up:
185 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 197 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
186 e->ignore(); 198 e->ignore();
187 break; 199 break;
@@ -201,7 +213,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
201 } 213 }
202 } 214 }
203 break; 215 break;
204 case Key_Down: 216 case Qt::Key_Down:
205 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 217 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
206 e->ignore(); 218 e->ignore();
207 break; 219 break;
@@ -221,12 +233,12 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
221 } 233 }
222 } 234 }
223 break; 235 break;
224 case Key_I: 236 case Qt::Key_I:
225 QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); 237 QTimer::singleShot( 1, this, SLOT ( oneDown() ) );
226 e->ignore(); 238 e->ignore();
227 break; 239 break;
228 case Key_Return: 240 case Qt::Key_Return:
229 case Key_Enter: 241 case Qt::Key_Enter:
230 { 242 {
231 if ( currentItem() >= 0 ) { 243 if ( currentItem() >= 0 ) {
232 emit doubleClicked( item( currentItem() ) ); 244 emit doubleClicked( item( currentItem() ) );
@@ -236,7 +248,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
236 } 248 }
237 } 249 }
238 break; 250 break;
239 case Key_Shift: 251 case Qt::Key_Shift:
240 emit shiftDown(); 252 emit shiftDown();
241 break; 253 break;
242 default: 254 default:
@@ -266,7 +278,7 @@ void KNoScrollListBox::oneDown()
266void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) 278void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
267{ 279{
268 switch(e->key()) { 280 switch(e->key()) {
269 case Key_Shift: 281 case Qt::Key_Shift:
270 emit shiftUp(); 282 emit shiftUp();
271 break; 283 break;
272 default: 284 default:
@@ -276,15 +288,15 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
276 288
277void KNoScrollListBox::mousePressEvent(QMouseEvent *e) 289void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
278{ 290{
279 QListBox::mousePressEvent(e); 291 Q3ListBox::mousePressEvent(e);
280 292
281 if(e->button() == RightButton) { 293 if(e->button() == Qt::RightButton) {
282 emit rightClick(); 294 emit rightClick();
283 } 295 }
284} 296}
285 297
286MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) 298MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s)
287 : QListBoxItem() 299 : Q3ListBoxItem()
288{ 300{
289 mblockRepaint = true; 301 mblockRepaint = true;
290 isWeekItem = KOPrefs::instance()->mMonthViewWeek; 302 isWeekItem = KOPrefs::instance()->mMonthViewWeek;
@@ -395,14 +407,14 @@ void MonthViewItem::paint(QPainter *p)
395 p->setBrush( QBrush( textColor ) ); 407 p->setBrush( QBrush( textColor ) );
396 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ; 408 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ;
397 if ( mMultiday == 2 || mMultiday == 3 ) { 409 if ( mMultiday == 2 || mMultiday == 3 ) {
398 QPointArray pa ( 3 ); 410 Q3PointArray pa ( 3 );
399 pa.setPoint (0, x, yyy ); 411 pa.setPoint (0, x, yyy );
400 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 ); 412 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 );
401 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 ); 413 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
402 p->drawPolygon( pa ); 414 p->drawPolygon( pa );
403 } 415 }
404 if ( mMultiday == 2 || mMultiday == 1 ) { 416 if ( mMultiday == 2 || mMultiday == 1 ) {
405 QPointArray pa ( 3 ); 417 Q3PointArray pa ( 3 );
406 pa.setPoint (0, x+sizeM +sizeM/2, yyy ); 418 pa.setPoint (0, x+sizeM +sizeM/2, yyy );
407 pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); 419 pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
408 pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); 420 pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
@@ -462,7 +474,7 @@ void MonthViewItem::paint(QPainter *p)
462 } 474 }
463} 475}
464 476
465int MonthViewItem::height(const QListBox *lb) const 477int MonthViewItem::height(const Q3ListBox *lb) const
466{ 478{
467 int ret = 10; 479 int ret = 10;
468 if ( lb ) 480 if ( lb )
@@ -470,7 +482,7 @@ int MonthViewItem::height(const QListBox *lb) const
470 return ret; 482 return ret;
471} 483}
472 484
473int MonthViewItem::width(const QListBox *lb) const 485int MonthViewItem::width(const Q3ListBox *lb) const
474{ 486{
475 if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) { 487 if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) {
476 int size = PIXMAP_SIZE; 488 int size = PIXMAP_SIZE;
@@ -514,10 +526,10 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
514 //mLabel->setLineWidth( 1 ); 526 //mLabel->setLineWidth( 1 );
515 //mLabel->setAlignment( AlignCenter ); 527 //mLabel->setAlignment( AlignCenter );
516 mLabel->setFlat( true ); 528 mLabel->setFlat( true );
517 mLabel->setFocusPolicy(NoFocus); 529 mLabel->setFocusPolicy(Qt::NoFocus);
518 //mItemList = new KNoScrollListBox( this ); 530 //mItemList = new KNoScrollListBox( this );
519 setMinimumSize( 10, 10 ); 531 setMinimumSize( 10, 10 );
520 setFrameStyle( QFrame::Panel | QFrame::Plain ); 532 setFrameStyle( Q3Frame::Panel | Q3Frame::Plain );
521 setLineWidth( 1 ); 533 setLineWidth( 1 );
522 //topLayout->addWidget( mItemList ); 534 //topLayout->addWidget( mItemList );
523 mLabel->raise(); 535 mLabel->raise();
@@ -529,13 +541,13 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
529 updateConfig(); 541 updateConfig();
530 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); 542 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() ));
531 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); 543 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() ));
532 connect( this , SIGNAL( doubleClicked( QListBoxItem *) ), 544 connect( this , SIGNAL( doubleClicked( Q3ListBoxItem *) ),
533 SLOT( defaultAction( QListBoxItem * ) ) ); 545 SLOT( defaultAction( Q3ListBoxItem * ) ) );
534 connect( this, SIGNAL( rightButtonPressed( QListBoxItem *, 546 connect( this, SIGNAL( rightButtonPressed( Q3ListBoxItem *,
535 const QPoint &) ), 547 const QPoint &) ),
536 SLOT( contextMenu( QListBoxItem * ) ) ); 548 SLOT( contextMenu( Q3ListBoxItem * ) ) );
537 connect( this, SIGNAL( highlighted( QListBoxItem *) ), 549 connect( this, SIGNAL( highlighted( Q3ListBoxItem *) ),
538 SLOT( selection( QListBoxItem * ) ) ); 550 SLOT( selection( Q3ListBoxItem * ) ) );
539 551
540 /* 552 /*
541 connect( this, SIGNAL( clicked( QListBoxItem * ) ), 553 connect( this, SIGNAL( clicked( QListBoxItem * ) ),
@@ -545,7 +557,7 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
545#ifdef DESKTOP_VERSION 557#ifdef DESKTOP_VERSION
546QToolTipGroup *MonthViewCell::toolTipGroup() 558QToolTipGroup *MonthViewCell::toolTipGroup()
547{ 559{
548 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 560 /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
549 return mToolTipGroup; 561 return mToolTipGroup;
550} 562}
551#endif 563#endif
@@ -637,7 +649,7 @@ void MonthViewCell::startUpdateCell()
637{ 649{
638 blockSignals( true ); 650 blockSignals( true );
639 mdayCount = 0; 651 mdayCount = 0;
640 setFocusPolicy(NoFocus); 652 setFocusPolicy(Qt::NoFocus);
641 if ( !mMonthView->isUpdatePossible() ) 653 if ( !mMonthView->isUpdatePossible() )
642 return; 654 return;
643 MonthViewItem *mitem = (MonthViewItem*) firstItem (); 655 MonthViewItem *mitem = (MonthViewItem*) firstItem ();
@@ -692,7 +704,7 @@ int MonthViewCell::insertEvent(Event *event)
692 useToolTips = false; 704 useToolTips = false;
693#endif 705#endif
694 QString mToolTipText; 706 QString mToolTipText;
695 setFocusPolicy(WheelFocus); 707 setFocusPolicy(Qt::WheelFocus);
696 if ( !(event->doesRecur() == Recurrence::rNone) ) { 708 if ( !(event->doesRecur() == Recurrence::rNone) ) {
697 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 709 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
698 return mdayCount; 710 return mdayCount;
@@ -834,7 +846,7 @@ int MonthViewCell::insertEvent(Event *event)
834 } 846 }
835 for ( i = pos; i < itcount;++i ) { 847 for ( i = pos; i < itcount;++i ) {
836 // qDebug("i %d mday %u count %d ",i,itcount,mdayCount ); 848 // qDebug("i %d mday %u count %d ",i,itcount,mdayCount );
837 QListBoxItem* it = this->item ( i ); 849 Q3ListBoxItem* it = this->item ( i );
838 if ( it && text < it->text() ) { 850 if ( it && text < it->text() ) {
839 pos = i; 851 pos = i;
840 break; 852 break;
@@ -850,7 +862,7 @@ int MonthViewCell::insertEvent(Event *event)
850} 862}
851void MonthViewCell::insertTodo(Todo *todo) 863void MonthViewCell::insertTodo(Todo *todo)
852{ 864{
853 setFocusPolicy(WheelFocus); 865 setFocusPolicy(Qt::WheelFocus);
854 QString text; 866 QString text;
855 if (todo->hasDueDate()) { 867 if (todo->hasDueDate()) {
856 if (!todo->doesFloat()) { 868 if (!todo->doesFloat()) {
@@ -922,7 +934,7 @@ void MonthViewCell::finishUpdateCell()
922#ifdef DESKTOP_VERSION 934#ifdef DESKTOP_VERSION
923 if (mToolTip.count() > 0 ) { 935 if (mToolTip.count() > 0 ) {
924 mToolTip.sort(); 936 mToolTip.sort();
925 QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); 937 /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */
926 } 938 }
927#endif 939#endif
928 //sort(); 940 //sort();
@@ -938,13 +950,13 @@ void MonthViewCell::updateCell()
938 return; 950 return;
939 startUpdateCell(); 951 startUpdateCell();
940 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 952 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
941 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 953 Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true );
942 Event *event; 954 Event *event;
943 for( event = events.first(); event; event = events.next() ) { // for event 955 for( event = events.first(); event; event = events.next() ) { // for event
944 insertEvent(event); 956 insertEvent(event);
945 } 957 }
946 // insert due todos 958 // insert due todos
947 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 959 Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
948 Todo *todo; 960 Todo *todo;
949 for(todo = todos.first(); todo; todo = todos.next()) { 961 for(todo = todos.first(); todo; todo = todos.next()) {
950 insertTodo( todo ); 962 insertTodo( todo );
@@ -992,28 +1004,28 @@ void MonthViewCell::enableScrollBars( bool enabled )
992 1004
993 return; 1005 return;
994 if ( enabled ) { 1006 if ( enabled ) {
995 QListBoxItem *fi = firstItem (); 1007 Q3ListBoxItem *fi = firstItem ();
996 if (fi ) { 1008 if (fi ) {
997 int ihei = fi->height( this ); 1009 int ihei = fi->height( this );
998 int hei = numRows () * ihei; 1010 int hei = numRows () * ihei;
999 if ( hei < height() - horizontalScrollBar()->height () ) { 1011 if ( hei < height() - horizontalScrollBar()->height () ) {
1000 setVScrollBarMode(QScrollView::AlwaysOff); 1012 setVScrollBarMode(Q3ScrollView::AlwaysOff);
1001 } 1013 }
1002 else 1014 else
1003 setVScrollBarMode(QScrollView::Auto); 1015 setVScrollBarMode(Q3ScrollView::Auto);
1004 if ( ihei *3 > height() ) { 1016 if ( ihei *3 > height() ) {
1005 setHScrollBarMode(QScrollView::AlwaysOff); 1017 setHScrollBarMode(Q3ScrollView::AlwaysOff);
1006 } 1018 }
1007 else { 1019 else {
1008 setHScrollBarMode(QScrollView::Auto); 1020 setHScrollBarMode(Q3ScrollView::Auto);
1009 } 1021 }
1010 } else { 1022 } else {
1011 setVScrollBarMode(QScrollView::Auto); 1023 setVScrollBarMode(Q3ScrollView::Auto);
1012 setHScrollBarMode(QScrollView::Auto); 1024 setHScrollBarMode(Q3ScrollView::Auto);
1013 } 1025 }
1014 } else { 1026 } else {
1015 setVScrollBarMode(QScrollView::AlwaysOff); 1027 setVScrollBarMode(Q3ScrollView::AlwaysOff);
1016 setHScrollBarMode(QScrollView::AlwaysOff); 1028 setHScrollBarMode(Q3ScrollView::AlwaysOff);
1017 } 1029 }
1018} 1030}
1019 1031
@@ -1083,7 +1095,7 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e )
1083 KNoScrollListBox::resizeEvent ( e ); 1095 KNoScrollListBox::resizeEvent ( e );
1084} 1096}
1085 1097
1086void MonthViewCell::defaultAction( QListBoxItem *item ) 1098void MonthViewCell::defaultAction( Q3ListBoxItem *item )
1087{ 1099{
1088 1100
1089 if ( !item ) { 1101 if ( !item ) {
@@ -1105,7 +1117,7 @@ void MonthViewCell::newEvent()
1105 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 1117 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
1106 emit newEventSignal( dt ); 1118 emit newEventSignal( dt );
1107} 1119}
1108void MonthViewCell::cellClicked( QListBoxItem *item ) 1120void MonthViewCell::cellClicked( Q3ListBoxItem *item )
1109{ 1121{
1110 mMonthView->setSelectedCell( this ); 1122 mMonthView->setSelectedCell( this );
1111 if ( item == 0 ) { 1123 if ( item == 0 ) {
@@ -1116,7 +1128,7 @@ void MonthViewCell::cellClicked( QListBoxItem *item )
1116 1128
1117} 1129}
1118 1130
1119void MonthViewCell::contextMenu( QListBoxItem *item ) 1131void MonthViewCell::contextMenu( Q3ListBoxItem *item )
1120{ 1132{
1121 mMonthView->setPopupCell( this ); 1133 mMonthView->setPopupCell( this );
1122 if ( !item ) { 1134 if ( !item ) {
@@ -1133,7 +1145,7 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
1133 } 1145 }
1134} 1146}
1135 1147
1136void MonthViewCell::selection( QListBoxItem *item ) 1148void MonthViewCell::selection( Q3ListBoxItem *item )
1137{ 1149{
1138 if ( !item ) { 1150 if ( !item ) {
1139 emit highlightIncidence( 0 , this, 0 ); 1151 emit highlightIncidence( 0 , this, 0 );
@@ -1185,8 +1197,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1185 clPending = true; 1197 clPending = true;
1186 mPopupCell = 0; 1198 mPopupCell = 0;
1187 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); 1199 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
1188 mWidStack = new QWidgetStack( this ); 1200 mWidStack = new Q3WidgetStack( this );
1189 QVBoxLayout* hb = new QVBoxLayout( this ); 1201 Q3VBoxLayout* hb = new Q3VBoxLayout( this );
1190 mMonthView = new QWidget( mWidStack ); 1202 mMonthView = new QWidget( mWidStack );
1191 mWeekView = new QWidget( mWidStack ); 1203 mWeekView = new QWidget( mWidStack );
1192#if QT_VERSION >= 0x030000 1204#if QT_VERSION >= 0x030000
@@ -1215,15 +1227,15 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1215 for( i = 0; i < mDaysPerWeek; i++ ) { 1227 for( i = 0; i < mDaysPerWeek; i++ ) {
1216 QLabel *label = new QLabel( mMonthView ); 1228 QLabel *label = new QLabel( mMonthView );
1217 label->setFont(bfont); 1229 label->setFont(bfont);
1218 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1230 label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
1219 label->setLineWidth(1); 1231 label->setLineWidth(1);
1220 label->setAlignment(AlignCenter); 1232 label->setAlignment(Qt::AlignCenter);
1221 mDayLabels.insert( i, label ); 1233 mDayLabels.insert( i, label );
1222 label = new QLabel( mWeekView ); 1234 label = new QLabel( mWeekView );
1223 label->setFont(bfont); 1235 label->setFont(bfont);
1224 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1236 label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
1225 label->setLineWidth(1); 1237 label->setLineWidth(1);
1226 label->setAlignment(AlignCenter); 1238 label->setAlignment(Qt::AlignCenter);
1227 mDayLabelsW.insert( i, label ); 1239 mDayLabelsW.insert( i, label );
1228 } 1240 }
1229 1241
@@ -1232,34 +1244,34 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1232 mWeekLabelsW.resize( 2 ); 1244 mWeekLabelsW.resize( 2 );
1233 for( i = 0; i < mNumWeeks+1; i++ ) { 1245 for( i = 0; i < mNumWeeks+1; i++ ) {
1234 KOWeekButton *label = new KOWeekButton( mMonthView ); 1246 KOWeekButton *label = new KOWeekButton( mMonthView );
1235 label->setFocusPolicy(NoFocus); 1247 label->setFocusPolicy(Qt::NoFocus);
1236 label->setFont(bfont); 1248 label->setFont(bfont);
1237 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 1249 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
1238 label->setFlat(true); 1250 label->setFlat(true);
1239 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 1251 Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
1240 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1252 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
1241 //label->setLineWidth(1); 1253 //label->setLineWidth(1);
1242 //label->setAlignment(AlignCenter); 1254 //label->setAlignment(AlignCenter);
1243 mWeekLabels.insert( i, label ); 1255 mWeekLabels.insert( i, label );
1244 } 1256 }
1245 mWeekLabels[mNumWeeks]->setText( i18n("W")); 1257 mWeekLabels[mNumWeeks]->setText( i18n("W"));
1246 mWeekLabels[mNumWeeks]->setFocusPolicy(WheelFocus); 1258 mWeekLabels[mNumWeeks]->setFocusPolicy(Qt::WheelFocus);
1247 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); 1259 Q3WhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
1248 1260
1249 for( i = 0; i < 1+1; i++ ) { 1261 for( i = 0; i < 1+1; i++ ) {
1250 KOWeekButton *label = new KOWeekButton( mWeekView ); 1262 KOWeekButton *label = new KOWeekButton( mWeekView );
1251 label->setFocusPolicy(NoFocus); 1263 label->setFocusPolicy(Qt::NoFocus);
1252 label->setFont(bfont); 1264 label->setFont(bfont);
1253 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 1265 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
1254 label->setFlat(true); 1266 label->setFlat(true);
1255 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 1267 Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
1256 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1268 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
1257 //label->setLineWidth(1); 1269 //label->setLineWidth(1);
1258 //label->setAlignment(AlignCenter); 1270 //label->setAlignment(AlignCenter);
1259 mWeekLabelsW.insert( i, label ); 1271 mWeekLabelsW.insert( i, label );
1260 } 1272 }
1261 mWeekLabelsW[1]->setText( i18n("W")); 1273 mWeekLabelsW[1]->setText( i18n("W"));
1262 mWeekLabelsW[1]->setFocusPolicy(WheelFocus); 1274 mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus);
1263 1275
1264 1276
1265 int row, col; 1277 int row, col;
@@ -1305,13 +1317,13 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1305 1317
1306 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 1318 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
1307 mContextMenu = eventPopup(); 1319 mContextMenu = eventPopup();
1308 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1320 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1309 i18n("New Event..."),this, 1321 i18n("New Event..."),this,
1310 SLOT(slotNewEvent()),false); 1322 SLOT(slotNewEvent()),false);
1311 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1323 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1312 i18n("New Todo..."),this, 1324 i18n("New Todo..."),this,
1313 SLOT(slotNewTodo()),false); 1325 SLOT(slotNewTodo()),false);
1314 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1326 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1315 i18n("Journal"),this, 1327 i18n("Journal"),this,
1316 SLOT(slotEditJournal()),false); 1328 SLOT(slotEditJournal()),false);
1317 1329
@@ -1325,7 +1337,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1325 pathString += "icons16/"; 1337 pathString += "icons16/";
1326 } else 1338 } else
1327 pathString += "iconsmini/"; 1339 pathString += "iconsmini/";
1328 mNewItemMenu = new QPopupMenu( this ); 1340 mNewItemMenu = new Q3PopupMenu( this );
1329 mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); 1341 mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent()));
1330 mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false); 1342 mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false);
1331 mNewItemMenu->insertItem( SmallIcon( pathString +"journal" ),i18n("Journal"),this,SLOT(slotEditJournal()),false); 1343 mNewItemMenu->insertItem( SmallIcon( pathString +"journal" ),i18n("Journal"),this,SLOT(slotEditJournal()),false);
@@ -1397,7 +1409,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1397 break; 1409 break;
1398 } 1410 }
1399 } 1411 }
1400 QPtrVector<MonthViewCell> *cells; 1412 Q3PtrVector<MonthViewCell> *cells;
1401 if ( weekview ) 1413 if ( weekview )
1402 cells = &mCellsW; 1414 cells = &mCellsW;
1403 else { 1415 else {
@@ -1495,9 +1507,9 @@ int KOMonthView::currentDateCount()
1495 return mNumCells; 1507 return mNumCells;
1496} 1508}
1497 1509
1498QPtrList<Incidence> KOMonthView::selectedIncidences() 1510Q3PtrList<Incidence> KOMonthView::selectedIncidences()
1499{ 1511{
1500 QPtrList<Incidence> selected; 1512 Q3PtrList<Incidence> selected;
1501 1513
1502 if ( mSelectedCell ) { 1514 if ( mSelectedCell ) {
1503 Incidence *incidence = mSelectedCell->selectedIncidence(); 1515 Incidence *incidence = mSelectedCell->selectedIncidence();
@@ -1561,7 +1573,7 @@ void KOMonthView::updateConfig()
1561 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); 1573 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1562 } 1574 }
1563#ifdef DESKTOP_VERSION 1575#ifdef DESKTOP_VERSION
1564 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1576 /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */
1565#endif 1577#endif
1566 updateView(); 1578 updateView();
1567} 1579}
@@ -1569,7 +1581,7 @@ void KOMonthView::updateConfig()
1569void KOMonthView::updateDayLabels() 1581void KOMonthView::updateDayLabels()
1570{ 1582{
1571 1583
1572 QPtrVector<QLabel> *mDayLabelsT; 1584 Q3PtrVector<QLabel> *mDayLabelsT;
1573 1585
1574 mDayLabelsT = &mDayLabelsW; 1586 mDayLabelsT = &mDayLabelsW;
1575 for (int i = 0; i < 7; i++) { 1587 for (int i = 0; i < 7; i++) {
@@ -1610,9 +1622,9 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1610{ 1622{
1611 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; 1623 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
1612 1624
1613 QPtrVector<MonthViewCell> *cells; 1625 Q3PtrVector<MonthViewCell> *cells;
1614 QPtrVector<QLabel> *dayLabels; 1626 Q3PtrVector<QLabel> *dayLabels;
1615 QPtrVector<KOWeekButton> *weekLabels; 1627 Q3PtrVector<KOWeekButton> *weekLabels;
1616 uint weekNum = 6; 1628 uint weekNum = 6;
1617 mStartDate = start; 1629 mStartDate = start;
1618 if ( mShowWeekView ) { 1630 if ( mShowWeekView ) {
@@ -1668,7 +1680,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1668 updateView(); 1680 updateView();
1669} 1681}
1670 1682
1671void KOMonthView::showEvents(QPtrList<Event>) 1683void KOMonthView::showEvents(Q3PtrList<Event>)
1672{ 1684{
1673 qDebug("KOMonthView::selectEvents is not implemented yet. "); 1685 qDebug("KOMonthView::selectEvents is not implemented yet. ");
1674} 1686}
@@ -1690,7 +1702,7 @@ void KOMonthView::updateView()
1690 //QTime ti; 1702 //QTime ti;
1691 //ti.start(); 1703 //ti.start();
1692 clearSelection(); 1704 clearSelection();
1693 QPtrVector<MonthViewCell> *cells; 1705 Q3PtrVector<MonthViewCell> *cells;
1694 if ( mShowWeekView ) { 1706 if ( mShowWeekView ) {
1695 cells = &mCellsW; 1707 cells = &mCellsW;
1696 } else { 1708 } else {
@@ -1705,7 +1717,7 @@ void KOMonthView::updateView()
1705 (*cells)[i]->startUpdateCell(); 1717 (*cells)[i]->startUpdateCell();
1706 } 1718 }
1707 1719
1708 QPtrList<Event> events = calendar()->events(); 1720 Q3PtrList<Event> events = calendar()->events();
1709 Event *event; 1721 Event *event;
1710 QDateTime dt; 1722 QDateTime dt;
1711 QDate endDate = mStartDate.addDays( timeSpan ); 1723 QDate endDate = mStartDate.addDays( timeSpan );
@@ -1769,7 +1781,7 @@ void KOMonthView::updateView()
1769 } 1781 }
1770 } 1782 }
1771 // insert due todos 1783 // insert due todos
1772 QPtrList<Todo> todos = calendar()->todos( ); 1784 Q3PtrList<Todo> todos = calendar()->todos( );
1773 Todo *todo; 1785 Todo *todo;
1774 for(todo = todos.first(); todo; todo = todos.next()) { 1786 for(todo = todos.first(); todo; todo = todos.next()) {
1775 //insertTodo( todo ); 1787 //insertTodo( todo );
@@ -2225,7 +2237,7 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell )
2225 2237
2226void KOMonthView::processSelectionChange() 2238void KOMonthView::processSelectionChange()
2227{ 2239{
2228 QPtrList<Incidence> incidences = selectedIncidences(); 2240 Q3PtrList<Incidence> incidences = selectedIncidences();
2229 if (incidences.count() > 0) { 2241 if (incidences.count() > 0) {
2230 emit incidenceSelected( incidences.first() ); 2242 emit incidenceSelected( incidences.first() );
2231 } else { 2243 } else {
@@ -2261,7 +2273,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2261 if (! e->isAutoRepeat() ) 2273 if (! e->isAutoRepeat() )
2262 mFlagKeyPressed = true; 2274 mFlagKeyPressed = true;
2263 switch(e->key()) { 2275 switch(e->key()) {
2264 case Key_Up: 2276 case Qt::Key_Up:
2265 { 2277 {
2266 if ( mShowWeekView ) { 2278 if ( mShowWeekView ) {
2267 emit selectWeekNum ( currentWeek() - 1 ); 2279 emit selectWeekNum ( currentWeek() - 1 );
@@ -2272,7 +2284,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2272 } 2284 }
2273 e->accept(); 2285 e->accept();
2274 break; 2286 break;
2275 case Key_Down: 2287 case Qt::Key_Down:
2276 { 2288 {
2277 if ( mShowWeekView ) { 2289 if ( mShowWeekView ) {
2278 emit selectWeekNum ( currentWeek() +1); 2290 emit selectWeekNum ( currentWeek() +1);
@@ -2284,14 +2296,14 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2284 } 2296 }
2285 e->accept(); 2297 e->accept();
2286 break; 2298 break;
2287 case Key_Return: 2299 case Qt::Key_Return:
2288 case Key_Enter: 2300 case Qt::Key_Enter:
2289 { 2301 {
2290 selectInternalWeekNum ( currentWeek() ); 2302 selectInternalWeekNum ( currentWeek() );
2291 } 2303 }
2292 e->accept(); 2304 e->accept();
2293 break; 2305 break;
2294 case Key_D: 2306 case Qt::Key_D:
2295 if ( mSelectedCell ) { 2307 if ( mSelectedCell ) {
2296 mSelectedCell->showDay(); 2308 mSelectedCell->showDay();
2297 e->accept(); 2309 e->accept();
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 1a9d16d..bca76e5 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -21,17 +21,24 @@
21#define _KOMONTHVIEW_H 21#define _KOMONTHVIEW_H
22 22
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qframe.h> 24#include <q3frame.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qlistbox.h> 26#include <q3listbox.h>
27#include <qpoint.h> 27#include <qpoint.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qintdict.h> 31#include <q3intdict.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33#include <qvaluelist.h> 33#include <q3valuelist.h>
34#include <qptrvector.h> 34#include <q3ptrvector.h>
35//Added by qt3to4:
36#include <QResizeEvent>
37#include <QFocusEvent>
38#include <QMouseEvent>
39#include <Q3PtrList>
40#include <Q3PopupMenu>
41#include <QKeyEvent>
35 42
36#include <libkcal/calendar.h> 43#include <libkcal/calendar.h>
37#include <libkcal/event.h> 44#include <libkcal/event.h>
@@ -72,7 +79,7 @@ private slots :
72 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } 79 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
73}; 80};
74 81
75class KNoScrollListBox: public QListBox 82class KNoScrollListBox: public Q3ListBox
76{ 83{
77 Q_OBJECT 84 Q_OBJECT
78 public: 85 public:
@@ -103,7 +110,7 @@ class KNoScrollListBox: public QListBox
103}; 110};
104 111
105 112
106class MonthViewItem: public QListBoxItem 113class MonthViewItem: public Q3ListBoxItem
107{ 114{
108 public: 115 public:
109 MonthViewItem( Incidence *,const QString & title ); 116 MonthViewItem( Incidence *,const QString & title );
@@ -126,8 +133,8 @@ class MonthViewItem: public QListBoxItem
126 133
127 protected: 134 protected:
128 virtual void paint(QPainter *); 135 virtual void paint(QPainter *);
129 virtual int height(const QListBox *) const; 136 virtual int height(const Q3ListBox *) const;
130 virtual int width(const QListBox *) const; 137 virtual int width(const Q3ListBox *) const;
131 138
132 private: 139 private:
133 int mdayPos; 140 int mdayPos;
@@ -198,15 +205,15 @@ public slots:
198 void deHighLight(); 205 void deHighLight();
199 void repaintfinishUpdateCell(); 206 void repaintfinishUpdateCell();
200 protected slots: 207 protected slots:
201 void defaultAction( QListBoxItem * ); 208 void defaultAction( Q3ListBoxItem * );
202 void contextMenu( QListBoxItem * ); 209 void contextMenu( Q3ListBoxItem * );
203 void selection( QListBoxItem * ); 210 void selection( Q3ListBoxItem * );
204 void cellClicked( QListBoxItem * ); 211 void cellClicked( Q3ListBoxItem * );
205 void newEvent(); 212 void newEvent();
206 213
207 private: 214 private:
208 int mdayCount; 215 int mdayCount;
209 QPtrList <MonthViewItem> mAvailItemList; 216 Q3PtrList <MonthViewItem> mAvailItemList;
210 KOMonthView *mMonthView; 217 KOMonthView *mMonthView;
211 int currentPalette; 218 int currentPalette;
212 219
@@ -247,7 +254,7 @@ class KOMonthView: public KOEventView
247 virtual int currentDateCount(); 254 virtual int currentDateCount();
248 255
249 /** returns the currently selected events */ 256 /** returns the currently selected events */
250 virtual QPtrList<Incidence> selectedIncidences(); 257 virtual Q3PtrList<Incidence> selectedIncidences();
251 258
252 /** returns dates of the currently selected events */ 259 /** returns dates of the currently selected events */
253 virtual DateList selectedDates(); 260 virtual DateList selectedDates();
@@ -269,7 +276,7 @@ class KOMonthView: public KOEventView
269 virtual void updateView(); 276 virtual void updateView();
270 virtual void updateConfig(); 277 virtual void updateConfig();
271 virtual void showDates(const QDate &start, const QDate &end); 278 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 279 virtual void showEvents(Q3PtrList<Event> eventList);
273 280
274 void changeEventDisplay(Event *, int); 281 void changeEventDisplay(Event *, int);
275 282
@@ -311,7 +318,7 @@ class KOMonthView: public KOEventView
311 NavigatorBar* mNavigatorBar; 318 NavigatorBar* mNavigatorBar;
312 int currentWeek(); 319 int currentWeek();
313 bool clPending; 320 bool clPending;
314 QWidgetStack * mWidStack; 321 Q3WidgetStack * mWidStack;
315 QWidget* mMonthView; 322 QWidget* mMonthView;
316 QWidget* mWeekView; 323 QWidget* mWeekView;
317 bool mShowWeekView; 324 bool mShowWeekView;
@@ -325,12 +332,12 @@ class KOMonthView: public KOEventView
325 void computeLayoutWeek(); 332 void computeLayoutWeek();
326 void doComputeLayoutWeek(); 333 void doComputeLayoutWeek();
327 334
328 QPtrVector<MonthViewCell> mCells; 335 Q3PtrVector<MonthViewCell> mCells;
329 QPtrVector<QLabel> mDayLabels; 336 Q3PtrVector<QLabel> mDayLabels;
330 QPtrVector<KOWeekButton> mWeekLabels; 337 Q3PtrVector<KOWeekButton> mWeekLabels;
331 QPtrVector<MonthViewCell> mCellsW; 338 Q3PtrVector<MonthViewCell> mCellsW;
332 QPtrVector<QLabel> mDayLabelsW; 339 Q3PtrVector<QLabel> mDayLabelsW;
333 QPtrVector<KOWeekButton> mWeekLabelsW; 340 Q3PtrVector<KOWeekButton> mWeekLabelsW;
334 341
335 bool mShortDayLabelsM; 342 bool mShortDayLabelsM;
336 bool mShortDayLabelsW; 343 bool mShortDayLabelsW;
@@ -342,7 +349,7 @@ class KOMonthView: public KOEventView
342 MonthViewCell *mPopupCell; 349 MonthViewCell *mPopupCell;
343 bool mFlagKeyPressed; 350 bool mFlagKeyPressed;
344 KOEventPopupMenu *mContextMenu; 351 KOEventPopupMenu *mContextMenu;
345 QPopupMenu *mNewItemMenu; 352 Q3PopupMenu *mNewItemMenu;
346 void keyPressEvent ( QKeyEvent * ) ; 353 void keyPressEvent ( QKeyEvent * ) ;
347 void keyReleaseEvent ( QKeyEvent * ) ; 354 void keyReleaseEvent ( QKeyEvent * ) ;
348 355
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5078c57..0bd46ea 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -26,7 +26,7 @@
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <q3textstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
@@ -305,13 +305,13 @@ KOPrefs::KOPrefs() :
305 305
306 KPrefs::setCurrentGroup("KOrganizer Plugins"); 306 KPrefs::setCurrentGroup("KOrganizer Plugins");
307 307
308 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 308 addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays"));
309 309
310 KPrefs::setCurrentGroup("Group Scheduling"); 310 KPrefs::setCurrentGroup("Group Scheduling");
311 311
312 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 312 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
313 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 313 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
314 addItemStringList("AdditionalMails",&mAdditionalMails,""); 314 addItemStringList("AdditionalMails",&mAdditionalMails,QStringList());
315 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 315 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
316 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 316 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
317 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 317 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
@@ -566,7 +566,7 @@ void KOPrefs::usrWriteConfig()
566 config()->writeEntry("user_email",mEmail); 566 config()->writeEntry("user_email",mEmail);
567 567
568 config()->setGroup("Category Colors"); 568 config()->setGroup("Category Colors");
569 QDictIterator<QColor> it(mCategoryColors); 569 Q3DictIterator<QColor> it(mCategoryColors);
570 while (it.current()) { 570 while (it.current()) {
571 config()->writeEntry(it.currentKey(),*(it.current())); 571 config()->writeEntry(it.currentKey(),*(it.current()));
572 ++it; 572 ++it;
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 94bdd33..35c6110 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -25,9 +25,12 @@
25 25
26 26
27#include <libkdepim/kpimprefs.h> 27#include <libkdepim/kpimprefs.h>
28#include <qdict.h> 28#include <q3dict.h>
29#include <qdir.h> 29#include <qdir.h>
30#include <qobject.h> 30#include <qobject.h>
31#include <QDateTime>
32//Added by qt3to4:
33#include <Q3PtrList>
31 34
32class KConfig; 35class KConfig;
33class QFont; 36class QFont;
@@ -347,7 +350,7 @@ class KOPrefs : public KPimPrefs
347 bool mWTshowChanged; 350 bool mWTshowChanged;
348 351
349 int mCurrentDisplayedView; 352 int mCurrentDisplayedView;
350 QPtrList<KopiCalendarFile> mCalendars; 353 Q3PtrList<KopiCalendarFile> mCalendars;
351 int mNextAvailableCalendar; 354 int mNextAvailableCalendar;
352 bool mGlobalUpdateDisabled; 355 bool mGlobalUpdateDisabled;
353 356
@@ -362,8 +365,8 @@ class KOPrefs : public KPimPrefs
362 QString mFilterConflictAllItem; 365 QString mFilterConflictAllItem;
363 366
364 private: 367 private:
365 QDict<QColor> mCategoryColors; 368 Q3Dict<QColor> mCategoryColors;
366 QArray<KopiCalendarFile*> mDefCalColors; 369 QVector<KopiCalendarFile*> mDefCalColors;
367 QColor mDefaultCategoryColor; 370 QColor mDefaultCategoryColor;
368 371
369 QFont mDefaultTimeBarFont; 372 QFont mDefaultTimeBarFont;
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()
116void KOPrefsDialog::setupLocaleDateTab() 122void KOPrefsDialog::setupLocaleDateTab()
117{ 123{
118#if 0 124#if 0
119QFrame *topFrame = addPage(i18n("Date Format"),0,0); 125Q3Frame *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);
172void KOPrefsDialog::setupLocaleTab() 178void 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
237void KOPrefsDialog::setupMainTab() 243void 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
403void KOPrefsDialog::setupTimeTab() 409void 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()
482void KOPrefsDialog::setupViewsTab() 488void 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()
1055void KOPrefsDialog::setupFontsTab() 1061void 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
1194void KOPrefsDialog::setupColorsTab() 1200void 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()
1327void KOPrefsDialog::setupGroupSchedulingTab() 1333void 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
1378void KOPrefsDialog::setupGroupAutomationTab() 1384void 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;
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index ee7a7aa..ccc1726 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -23,10 +23,12 @@
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qdict.h> 27#include <q3dict.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qlistview.h> 29#include <q3listview.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31#include <kdialogbase.h> 33#include <kdialogbase.h>
32 34
@@ -94,7 +96,7 @@ class KOPrefsDialog : public KPrefsDialog
94 KPrefsDialogWidBool *mEnableGroupScheduling; 96 KPrefsDialogWidBool *mEnableGroupScheduling;
95 KPrefsDialogWidBool *mEnableProjectView; 97 KPrefsDialogWidBool *mEnableProjectView;
96 98
97 QFrame *mPrinterTab; 99 Q3Frame *mPrinterTab;
98 100
99 QLineEdit *nameEdit; 101 QLineEdit *nameEdit;
100 QLineEdit *emailEdit; 102 QLineEdit *emailEdit;
@@ -121,7 +123,7 @@ class KOPrefsDialog : public KPrefsDialog
121 123
122 QComboBox *mCategoryCombo; 124 QComboBox *mCategoryCombo;
123 KColorButton *mCategoryButton; 125 KColorButton *mCategoryButton;
124 QDict<QColor> mCategoryDict; 126 Q3Dict<QColor> mCategoryDict;
125 127
126 QSlider *mHourSizeSlider; 128 QSlider *mHourSizeSlider;
127 129
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index df8f8d7..0f3b328 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,5 +1,5 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG = qt warn_on 2 CONFIG += qt warn_on
3 TARGET = kopi 3 TARGET = kopi
4OBJECTS_DIR = _obj/ 4OBJECTS_DIR = _obj/
5MOC_DIR = _moc 5MOC_DIR = _moc
@@ -17,27 +17,27 @@ DEFINES += DESKTOP_VERSION
17unix : { 17unix : {
18staticlib: { 18staticlib: {
19 TARGET = kopi_linux 19 TARGET = kopi_linux
20LIBS += ../bin/libmicrokabc_qtopia.a 20LIBS += ../bin/libxmicrokabc_qtopia.a
21LIBS += ../bin/libmicrokabc_file.a 21LIBS += ../bin/libxmicrokabc_file.a
22LIBS += ../bin/libmicrokabc_dir.a 22LIBS += ../bin/libxmicrokabc_dir.a
23LIBS += ../bin/libmicrokdepim.a 23LIBS += ../bin/libxmicrokdepim.a
24LIBS += ../bin/libmicrokcal.a 24LIBS += ../bin/libxmicrokcal.a
25LIBS += ../bin/libmicrokabc.a 25LIBS += ../bin/libxmicrokabc.a
26LIBS += ../bin/libmicrokde.a 26LIBS += ../bin/libxmicrokde.a
27LIBS += ../bin/libmicrokabc_qtopia.a 27LIBS += ../bin/libxmicrokabc_qtopia.a
28LIBS += ../bin/libmicrokabc_file.a 28LIBS += ../bin/libxmicrokabc_file.a
29LIBS += ../bin/libmicrokabc_dir.a 29LIBS += ../bin/libxmicrokabc_dir.a
30LIBS += ../bin/libmicrokdepim.a 30LIBS += ../bin/libxmicrokdepim.a
31LIBS += ../bin/libmicrokcal.a 31LIBS += ../bin/libxmicrokcal.a
32LIBS += ../bin/libmicrokabc.a 32LIBS += ../bin/libxmicrokabc.a
33LIBS += ../bin/libmicrokde.a 33LIBS += ../bin/libxmicrokde.a
34LIBS += ../libical/lib/libical.a 34LIBS += ../libical/lib/libical.a
35LIBS += ../libical/lib/libicalss.a 35LIBS += ../libical/lib/libicalss.a
36} else { 36} else {
37LIBS += ../bin/libmicrokdepim.so 37LIBS += ../bin/libxmicrokdepim.so
38LIBS += ../bin/libmicrokcal.so 38LIBS += ../bin/libxmicrokcal.so
39LIBS += ../bin/libmicrokde.so 39LIBS += ../bin/libxmicrokde.so
40LIBS += ../bin/libmicrokabc.so 40LIBS += ../bin/libxmicrokabc.so
41#LIBS += -lbluetooth 41#LIBS += -lbluetooth
42#LIBS += -lsdp 42#LIBS += -lsdp
43 43
@@ -49,10 +49,10 @@ MOC_DIR = moc/unix
49win32: { 49win32: {
50RC_FILE = winicons.rc 50RC_FILE = winicons.rc
51DEFINES += _WIN32_ 51DEFINES += _WIN32_
52LIBS += ../bin/microkdepim.lib 52LIBS += ../bin/xmicrokdepim.lib
53LIBS += ../bin/microkcal.lib 53LIBS += ../bin/xmicrokcal.lib
54LIBS += ../bin/microkde.lib 54LIBS += ../bin/xmicrokde.lib
55LIBS += ../bin/microkabc.lib 55LIBS += ../bin/xmicrokabc.lib
56LIBS += ../libical/lib/ical.lib 56LIBS += ../libical/lib/ical.lib
57LIBS += ../libical/lib/icalss.lib 57LIBS += ../libical/lib/icalss.lib
58#LIBS += atls.lib 58#LIBS += atls.lib
@@ -85,7 +85,8 @@ TARGET = kopi_me
85} 85}
86 86
87 87
88INTERFACES = kofilterview_base.ui 88#The following line was changed from INTERFACES to FORMS3 by qt3to4
89FORMS3 = kofilterview_base.ui
89#filteredit_base.ui 90#filteredit_base.ui
90 91
91# kdateedit.h \ 92# kdateedit.h \
@@ -210,9 +211,15 @@ filteredit_base.cpp \
210 ../kalarmd/alarmdialog.cpp 211 ../kalarmd/alarmdialog.cpp
211 212
212HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h 213HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h
213INTERFACES += calprintdayconfig_base.ui \ 214#The following line was changed from INTERFACES to FORMS3 by qt3to4
215FORMS3 += calprintdayconfig_base.ui \
214 calprintmonthconfig_base.ui \ 216 calprintmonthconfig_base.ui \
215 calprinttodoconfig_base.ui \ 217 calprinttodoconfig_base.ui \
216 calprintweekconfig_base.ui 218 calprintweekconfig_base.ui
217SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp 219SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp
218 220
221#The following line was inserted by qt3to4
222QT += xml qt3support
223#The following line was inserted by qt3to4
224CONFIG += uic3
225
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 553c265..2c1cd42 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -11,9 +11,9 @@ DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
11DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER 11DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
12DEFINES += KORG_NOLVALTERNATION 12DEFINES += KORG_NOLVALTERNATION
13#KORG_NOKABC 13#KORG_NOKABC
14LIBS += -lmicrokdepim 14LIBS += -lxmicrokdepim
15LIBS += -lmicrokcal 15LIBS += -lxmicrokcal
16LIBS += -lmicrokde 16LIBS += -lxmicrokde
17LIBS += -lmicroqtcompat 17LIBS += -lmicroqtcompat
18 18
19LIBS += $(GCC3EXTRALIB1) 19LIBS += $(GCC3EXTRALIB1)
diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp
index 3265a3a..a214720 100644
--- a/korganizer/kotimespanview.cpp
+++ b/korganizer/kotimespanview.cpp
@@ -1,4 +1,8 @@
1#include <qlayout.h> 1#include <qlayout.h>
2//Added by qt3to4:
3#include <Q3VBoxLayout>
4#include <Q3ValueList>
5#include <Q3PtrList>
2 6
3#include <kconfig.h> 7#include <kconfig.h>
4 8
@@ -11,7 +15,7 @@ KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
11 const char *name) : 15 const char *name) :
12 KOEventView( calendar, parent, name ) 16 KOEventView( calendar, parent, name )
13{ 17{
14 QBoxLayout *topLayout = new QVBoxLayout( this ); 18 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
15 19
16 mTimeSpanView = new TimeSpanView( this ); 20 mTimeSpanView = new TimeSpanView( this );
17 topLayout->addWidget( mTimeSpanView ); 21 topLayout->addWidget( mTimeSpanView );
@@ -34,7 +38,7 @@ void KOTimeSpanView::readSettings(KConfig *config)
34 38
35 config->setGroup("Views"); 39 config->setGroup("Views");
36 40
37 QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); 41 Q3ValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView");
38 if (sizes.count() == 2) { 42 if (sizes.count() == 2) {
39 mTimeSpanView->setSplitterSizes(sizes); 43 mTimeSpanView->setSplitterSizes(sizes);
40 } 44 }
@@ -46,7 +50,7 @@ void KOTimeSpanView::writeSettings(KConfig *config)
46 50
47 config->setGroup("Views"); 51 config->setGroup("Views");
48 52
49 QValueList<int> list = mTimeSpanView->splitterSizes(); 53 Q3ValueList<int> list = mTimeSpanView->splitterSizes();
50 config->writeEntry("Separator TimeSpanView",list); 54 config->writeEntry("Separator TimeSpanView",list);
51} 55}
52 56
@@ -60,9 +64,9 @@ int KOTimeSpanView::currentDateCount()
60 return 0; 64 return 0;
61} 65}
62 66
63QPtrList<Incidence> KOTimeSpanView::selectedIncidences() 67Q3PtrList<Incidence> KOTimeSpanView::selectedIncidences()
64{ 68{
65 QPtrList<Incidence> selected; 69 Q3PtrList<Incidence> selected;
66 70
67 return selected; 71 return selected;
68} 72}
@@ -84,9 +88,9 @@ void KOTimeSpanView::showDates(const QDate &start, const QDate &end)
84void KOTimeSpanView::insertItems(const QDate &start, const QDate &end) 88void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
85{ 89{
86 mTimeSpanView->clear(); 90 mTimeSpanView->clear();
87 mTimeSpanView->setDateRange( start, end ); 91 mTimeSpanView->setDateRange( (QDateTime)start, (QDateTime)end );
88 92
89 QPtrList<Event> events = calendar()->events( start, end ); 93 Q3PtrList<Event> events = calendar()->events( start, end );
90 Event *event = events.first(); 94 Event *event = events.first();
91 while( event ) { 95 while( event ) {
92// kdDebug() << "KOTimeSpanView::showDates() add event: " << event->summary() 96// kdDebug() << "KOTimeSpanView::showDates() add event: " << event->summary()
@@ -100,7 +104,7 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
100 mTimeSpanView->updateView(); 104 mTimeSpanView->updateView();
101} 105}
102 106
103void KOTimeSpanView::showEvents(QPtrList<Event> eventList) 107void KOTimeSpanView::showEvents(Q3PtrList<Event> eventList)
104{ 108{
105} 109}
106 110
diff --git a/korganizer/kotimespanview.h b/korganizer/kotimespanview.h
index c682ed8..c3e4b41 100644
--- a/korganizer/kotimespanview.h
+++ b/korganizer/kotimespanview.h
@@ -2,6 +2,8 @@
2#define KOTIMESPANVIEW_H 2#define KOTIMESPANVIEW_H
3 3
4#include "koeventview.h" 4#include "koeventview.h"
5//Added by qt3to4:
6#include <Q3PtrList>
5 7
6class KConfig; 8class KConfig;
7class TimeSpanView; 9class TimeSpanView;
@@ -16,7 +18,7 @@ class KOTimeSpanView : public KOEventView
16 18
17 virtual int maxDatesHint(); 19 virtual int maxDatesHint();
18 virtual int currentDateCount(); 20 virtual int currentDateCount();
19 virtual QPtrList<Incidence> selectedIncidences(); 21 virtual Q3PtrList<Incidence> selectedIncidences();
20 DateList selectedDates() 22 DateList selectedDates()
21 {DateList q; 23 {DateList q;
22 return q;} 24 return q;}
@@ -28,7 +30,7 @@ class KOTimeSpanView : public KOEventView
28 public slots: 30 public slots:
29 virtual void updateView(); 31 virtual void updateView();
30 virtual void showDates(const QDate &start, const QDate &end); 32 virtual void showDates(const QDate &start, const QDate &end);
31 virtual void showEvents(QPtrList<Event> eventList); 33 virtual void showEvents(Q3PtrList<Event> eventList);
32 34
33 void changeEventDisplay(Event *, int); 35 void changeEventDisplay(Event *, int);
34 36
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 20a35d2..aeab92a 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -23,15 +23,20 @@
23*/ 23*/
24 24
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qframe.h> 26#include <q3frame.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qhbox.h> 29#include <q3hbox.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qapplication.h> 33#include <qapplication.h>
34#include <QDesktopWidget>
34#include <qtabwidget.h> 35#include <qtabwidget.h>
36//Added by qt3to4:
37#include <Q3HBoxLayout>
38#include <Q3PtrList>
39#include <Q3VBoxLayout>
35 40
36#include <kiconloader.h> 41#include <kiconloader.h>
37#include <klocale.h> 42#include <klocale.h>
@@ -81,8 +86,8 @@ void KOTodoEditor::init()
81} 86}
82void KOTodoEditor::setupRecurrence() 87void KOTodoEditor::setupRecurrence()
83{ 88{
84 QFrame *topFrame = addPage( i18n("Recurrence") ); 89 Q3Frame *topFrame = addPage( i18n("Recurrence") );
85 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 90 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
86 91
87 mRecurrence = new KOEditorRecurrence( topFrame ); 92 mRecurrence = new KOEditorRecurrence( topFrame );
88 topLayout->addWidget( mRecurrence ); 93 topLayout->addWidget( mRecurrence );
@@ -111,9 +116,9 @@ void KOTodoEditor::setupGeneral()
111 // mGeneral,SLOT(setCategories(const QString &))); 116 // mGeneral,SLOT(setCategories(const QString &)));
112 117
113 if (KOPrefs::instance()->mCompactDialogs) { 118 if (KOPrefs::instance()->mCompactDialogs) {
114 QFrame *topFrame = addPage(i18n("General")); 119 Q3Frame *topFrame = addPage(i18n("General"));
115 120
116 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 121 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
117 if ( QApplication::desktop()->width() < 480 ) { 122 if ( QApplication::desktop()->width() < 480 ) {
118 topLayout->setMargin(marginHintSmall()); 123 topLayout->setMargin(marginHintSmall());
119 topLayout->setSpacing(spacingHintSmall()); 124 topLayout->setSpacing(spacingHintSmall());
@@ -131,17 +136,17 @@ void KOTodoEditor::setupGeneral()
131 mGeneral->enableAlarm( false ); 136 mGeneral->enableAlarm( false );
132 137
133 138
134 QBoxLayout *priorityLayout; 139 Q3BoxLayout *priorityLayout;
135 if ( QApplication::desktop()->width() < 500 ) 140 if ( QApplication::desktop()->width() < 500 )
136 priorityLayout = new QVBoxLayout( topLayout ); 141 priorityLayout = new Q3VBoxLayout( topLayout );
137 else 142 else
138 priorityLayout = new QHBoxLayout( topLayout ); 143 priorityLayout = new Q3HBoxLayout( topLayout );
139 QWidget* prioWidget = new QWidget (topFrame); 144 QWidget* prioWidget = new QWidget (topFrame);
140 priorityLayout->addWidget( prioWidget ); 145 priorityLayout->addWidget( prioWidget );
141 QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); 146 Q3HBoxLayout* priorityLayout2 = new Q3HBoxLayout( prioWidget);
142 147
143 148
144 QIconSet icon; 149 QIcon icon;
145 if ( QApplication::desktop()->width() < 321 ) 150 if ( QApplication::desktop()->width() < 321 )
146 icon = SmallIcon("fileimport16"); 151 icon = SmallIcon("fileimport16");
147 else 152 else
@@ -164,13 +169,13 @@ void KOTodoEditor::setupGeneral()
164 mGeneral->initCategories( topFrame, priorityLayout ); 169 mGeneral->initCategories( topFrame, priorityLayout );
165 topLayout->addStretch(1); 170 topLayout->addStretch(1);
166 171
167 QFrame *topFrame2 = addPage(i18n("Details")); 172 Q3Frame *topFrame2 = addPage(i18n("Details"));
168 173
169 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 174 Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
170 topLayout2->setMargin(marginHint()); 175 topLayout2->setMargin(marginHint());
171 topLayout2->setSpacing(spacingHint()); 176 topLayout2->setSpacing(spacingHint());
172 177
173 QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); 178 Q3HBoxLayout *completionLayout = new Q3HBoxLayout( topLayout2 );
174 mGeneral->initCompletion(topFrame2,completionLayout); 179 mGeneral->initCompletion(topFrame2,completionLayout);
175 180
176 181
@@ -185,18 +190,18 @@ void KOTodoEditor::setupGeneral()
185 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 190 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
186 191
187 } else { 192 } else {
188 QFrame *topFrame = addPage(i18n("General")); 193 Q3Frame *topFrame = addPage(i18n("General"));
189 194
190 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 195 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
191 topLayout->setSpacing(spacingHint()); 196 topLayout->setSpacing(spacingHint());
192 197
193 mGeneral->initHeader(topFrame,topLayout); 198 mGeneral->initHeader(topFrame,topLayout);
194 mGeneral->initTime(topFrame,topLayout); 199 mGeneral->initTime(topFrame,topLayout);
195 mGeneral->initStatus(topFrame,topLayout); 200 mGeneral->initStatus(topFrame,topLayout);
196 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 201 Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
197 mGeneral->initAlarm(topFrame,alarmLineLayout); 202 mGeneral->initAlarm(topFrame,alarmLineLayout);
198 mGeneral->initDescription(topFrame,topLayout); 203 mGeneral->initDescription(topFrame,topLayout);
199 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 204 Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
200 mGeneral->initCategories( topFrame, detailsLayout ); 205 mGeneral->initCategories( topFrame, detailsLayout );
201 mGeneral->initSecrecy( topFrame, detailsLayout ); 206 mGeneral->initSecrecy( topFrame, detailsLayout );
202 } 207 }
@@ -427,7 +432,7 @@ void KOTodoEditor::slotLoadTemplate()
427 .arg( fileName ) ); 432 .arg( fileName ) );
428 return ; 433 return ;
429 } 434 }
430 QPtrList<Todo> todos = cal.todos(); 435 Q3PtrList<Todo> todos = cal.todos();
431 Todo * todo = todos.first(); 436 Todo * todo = todos.first();
432 if ( !todo ) { 437 if ( !todo ) {
433 KMessageBox::error( this, 438 KMessageBox::error( this,
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index ba94057..2b8fbd3 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -21,17 +21,33 @@
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 23
24#include <QDesktopWidget>
25
24#include <qlayout.h> 26#include <qlayout.h>
25#include <qheader.h> 27#include <q3header.h>
26#include <qcursor.h> 28#include <qcursor.h>
27#include <qwhatsthis.h> 29#include <q3whatsthis.h>
28#include <qdialog.h> 30#include <qdialog.h>
29#include <qlabel.h> 31#include <qlabel.h>
30#include <qpushbutton.h> 32#include <qpushbutton.h>
31 33
32#include <qinputdialog.h> 34#include <qinputdialog.h>
33 35
34#include <qvbox.h> 36#include <q3vbox.h>
37//Added by qt3to4:
38#include <QWheelEvent>
39#include <QFocusEvent>
40#include <QDragLeaveEvent>
41#include <QMouseEvent>
42#include <QDragEnterEvent>
43#include <QKeyEvent>
44#include <Q3HBoxLayout>
45#include <Q3VBoxLayout>
46#include <QDropEvent>
47#include <QDragMoveEvent>
48#include <QPaintEvent>
49#include <Q3PopupMenu>
50#include <Q3PtrList>
35#include <kdebug.h> 51#include <kdebug.h>
36#include "koprefs.h" 52#include "koprefs.h"
37#include <klocale.h> 53#include <klocale.h>
@@ -68,12 +84,12 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na
68{ 84{
69 mStopAll = true; 85 mStopAll = true;
70 setCaption( i18n("Start todo") ); 86 setCaption( i18n("Start todo") );
71 QVBoxLayout* lay = new QVBoxLayout( this ); 87 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
72 lay->setSpacing( 3 ); 88 lay->setSpacing( 3 );
73 lay->setMargin( 3 ); 89 lay->setMargin( 3 );
74 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); 90 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this );
75 lay->addWidget( lab ); 91 lay->addWidget( lab );
76 lab->setAlignment( AlignCenter ); 92 lab->setAlignment( Qt::AlignCenter );
77 93
78 QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); 94 QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this );
79 lay->addWidget( ok ); 95 lay->addWidget( ok );
@@ -98,20 +114,20 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
98{ 114{
99 mTodo = todo; 115 mTodo = todo;
100 setCaption( i18n("Stop todo") ); 116 setCaption( i18n("Stop todo") );
101 QVBoxLayout* lay = new QVBoxLayout( this ); 117 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
102 lay->setSpacing( 3 ); 118 lay->setSpacing( 3 );
103 lay->setMargin( 3 ); 119 lay->setMargin( 3 );
104 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); 120 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this );
105 lay->addWidget( lab ); 121 lay->addWidget( lab );
106 lab->setAlignment( AlignHCenter ); 122 lab->setAlignment( Qt::AlignHCenter );
107 lab = new QLabel( i18n("Additional Comment:"), this ); 123 lab = new QLabel( i18n("Additional Comment:"), this );
108 lay->addWidget( lab ); 124 lay->addWidget( lab );
109 mComment = new QLineEdit( this ); 125 mComment = new QLineEdit( this );
110 lay->addWidget( mComment ); 126 lay->addWidget( mComment );
111 QHBox * start = new QHBox ( this ); 127 Q3HBox * start = new Q3HBox ( this );
112 lay->addWidget( start ); 128 lay->addWidget( start );
113 lab = new QLabel( i18n("Start:"), start ); 129 lab = new QLabel( i18n("Start:"), start );
114 QHBox * end = new QHBox ( this ); 130 Q3HBox * end = new Q3HBox ( this );
115 lay->addWidget( end ); 131 lay->addWidget( end );
116 lab = new QLabel( i18n("End:"), end ); 132 lab = new QLabel( i18n("End:"), end );
117 sde = new KDateEdit( start ); 133 sde = new KDateEdit( start );
@@ -173,10 +189,10 @@ void KOStopTodoPrefs::doNotSave()
173} 189}
174 190
175 191
176class KOTodoViewWhatsThis :public QWhatsThis 192class KOTodoViewWhatsThis :public Q3WhatsThis
177{ 193{
178public: 194public:
179 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 195 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
180 196
181protected: 197protected:
182 virtual QString text( const QPoint& p) 198 virtual QString text( const QPoint& p)
@@ -214,7 +230,7 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
214#ifndef KORG_NODND 230#ifndef KORG_NODND
215// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; 231// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl;
216 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 232 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
217 !QTextDrag::canDecode( e ) ) { 233 !Q3TextDrag::canDecode( e ) ) {
218 e->ignore(); 234 e->ignore();
219 return; 235 return;
220 } 236 }
@@ -230,7 +246,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
230// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; 246// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl;
231 247
232 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 248 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
233 !QTextDrag::canDecode( e ) ) { 249 !Q3TextDrag::canDecode( e ) ) {
234 e->ignore(); 250 e->ignore();
235 return; 251 return;
236 } 252 }
@@ -255,7 +271,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
255// kdDebug() << "KOTodoListView::contentsDropEvent" << endl; 271// kdDebug() << "KOTodoListView::contentsDropEvent" << endl;
256 272
257 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 273 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
258 !QTextDrag::canDecode( e ) ) { 274 !Q3TextDrag::canDecode( e ) ) {
259 e->ignore(); 275 e->ignore();
260 return; 276 return;
261 } 277 }
@@ -300,7 +316,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
300 } 316 }
301 else { 317 else {
302 QString text; 318 QString text;
303 if (QTextDrag::decode(e,text)) { 319 if (Q3TextDrag::decode(e,text)) {
304 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); 320 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
305 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); 321 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
306 qDebug("Dropped : " + text); 322 qDebug("Dropped : " + text);
@@ -323,14 +339,14 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
323} 339}
324void KOTodoListView::wheelEvent (QWheelEvent *e) 340void KOTodoListView::wheelEvent (QWheelEvent *e)
325{ 341{
326 QListView::wheelEvent (e); 342 Q3ListView::wheelEvent (e);
327} 343}
328 344
329void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 345void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
330{ 346{
331 347
332 QPoint p(contentsToViewport(e->pos())); 348 QPoint p(contentsToViewport(e->pos()));
333 QListViewItem *i = itemAt(p); 349 Q3ListViewItem *i = itemAt(p);
334 bool rootClicked = true; 350 bool rootClicked = true;
335 if (i) { 351 if (i) {
336 // if the user clicked into the root decoration of the item, don't 352 // if the user clicked into the root decoration of the item, don't
@@ -348,7 +364,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
348 } 364 }
349#ifndef KORG_NODND 365#ifndef KORG_NODND
350 mMousePressed = false; 366 mMousePressed = false;
351 if (! rootClicked && !( e->button() == RightButton) ) { 367 if (! rootClicked && !( e->button() == Qt::RightButton) ) {
352 mPressPos = e->pos(); 368 mPressPos = e->pos();
353 mMousePressed = true; 369 mMousePressed = true;
354 } else { 370 } else {
@@ -358,15 +374,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
358 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); 374 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
359#ifndef DESKTOP_VERSION 375#ifndef DESKTOP_VERSION
360 if (!( e->button() == RightButton && rootClicked) ) 376 if (!( e->button() == RightButton && rootClicked) )
361 QListView::contentsMousePressEvent(e); 377 Q3ListView::contentsMousePressEvent(e);
362#else 378#else
363 QListView::contentsMousePressEvent(e); 379 Q3ListView::contentsMousePressEvent(e);
364#endif 380#endif
365} 381}
366void KOTodoListView::paintEvent(QPaintEvent* e) 382void KOTodoListView::paintEvent(QPaintEvent* e)
367{ 383{
368 emit paintNeeded(); 384 emit paintNeeded();
369 QListView::paintEvent( e); 385 Q3ListView::paintEvent( e);
370} 386}
371void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) 387void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
372{ 388{
@@ -376,7 +392,7 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
376 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > 392 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
377 QApplication::startDragDistance()*3) { 393 QApplication::startDragDistance()*3) {
378 mMousePressed = false; 394 mMousePressed = false;
379 QListViewItem *item = itemAt(contentsToViewport(mPressPos)); 395 Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos));
380 if (item) { 396 if (item) {
381 DndFactory factory( mCalendar ); 397 DndFactory factory( mCalendar );
382 ICalDrag *vd = factory.createDrag( 398 ICalDrag *vd = factory.createDrag(
@@ -422,13 +438,13 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
422 } 438 }
423 if (! e->isAutoRepeat() ) 439 if (! e->isAutoRepeat() )
424 mFlagKeyPressed = true; 440 mFlagKeyPressed = true;
425 QListViewItem* cn; 441 Q3ListViewItem* cn;
426 if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { 442 if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") {
427 cn = currentItem(); 443 cn = currentItem();
428 if ( cn ) { 444 if ( cn ) {
429 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 445 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
430 if ( ci ){ 446 if ( ci ){
431 if ( e->state() == ShiftButton ) 447 if ( e->state() == Qt::ShiftButton )
432 ci->setOn( false ); 448 ci->setOn( false );
433 else 449 else
434 ci->setOn( true ); 450 ci->setOn( true );
@@ -449,12 +465,12 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
449 switch ( e->key() ) { 465 switch ( e->key() ) {
450 case Qt::Key_Down: 466 case Qt::Key_Down:
451 case Qt::Key_Up: 467 case Qt::Key_Up:
452 QListView::keyPressEvent ( e ); 468 Q3ListView::keyPressEvent ( e );
453 e->accept(); 469 e->accept();
454 break; 470 break;
455 case Qt::Key_Left: 471 case Qt::Key_Left:
456 case Qt::Key_Right: 472 case Qt::Key_Right:
457 QListView::keyPressEvent ( e ); 473 Q3ListView::keyPressEvent ( e );
458 e->accept(); 474 e->accept();
459 return; 475 return;
460 break; 476 break;
@@ -468,7 +484,7 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
468} 484}
469void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) 485void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
470{ 486{
471 QListView::contentsMouseReleaseEvent(e); 487 Q3ListView::contentsMouseReleaseEvent(e);
472 mMousePressed = false; 488 mMousePressed = false;
473} 489}
474 490
@@ -478,7 +494,7 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
478 494
479 QPoint vp = contentsToViewport(e->pos()); 495 QPoint vp = contentsToViewport(e->pos());
480 496
481 QListViewItem *item = itemAt(vp); 497 Q3ListViewItem *item = itemAt(vp);
482 498
483 emit double_Clicked(item); 499 emit double_Clicked(item);
484 if (!item) return; 500 if (!item) return;
@@ -492,7 +508,7 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) :
492 QLineEdit(parent) 508 QLineEdit(parent)
493{ 509{
494 setText(i18n("Click to add new Todo")); 510 setText(i18n("Click to add new Todo"));
495 setFocusPolicy ( QWidget::ClickFocus ); 511 setFocusPolicy ( Qt::ClickFocus );
496} 512}
497 513
498void KOQuickTodo::focusInEvent(QFocusEvent *ev) 514void KOQuickTodo::focusInEvent(QFocusEvent *ev)
@@ -523,14 +539,14 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
523 mPendingUpdateBeforeRepaint = false; 539 mPendingUpdateBeforeRepaint = false;
524 isFlatDisplay = false; 540 isFlatDisplay = false;
525 mNavigator = 0; 541 mNavigator = 0;
526 QBoxLayout *topLayout = new QVBoxLayout(this); 542 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
527 mName = QString ( name ); 543 mName = QString ( name );
528 mBlockUpdate = false; 544 mBlockUpdate = false;
529 mQuickBar = new QWidget( this ); 545 mQuickBar = new QWidget( this );
530 topLayout->addWidget(mQuickBar); 546 topLayout->addWidget(mQuickBar);
531 547
532 mQuickAdd = new KOQuickTodo(mQuickBar); 548 mQuickAdd = new KOQuickTodo(mQuickBar);
533 QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); 549 Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar);
534 quickLayout->addWidget( mQuickAdd ); 550 quickLayout->addWidget( mQuickAdd );
535 mNewSubBut = new QPushButton( "sub",mQuickBar ); 551 mNewSubBut = new QPushButton( "sub",mQuickBar );
536 QPushButton * s_done = new QPushButton( "D",mQuickBar ); 552 QPushButton * s_done = new QPushButton( "D",mQuickBar );
@@ -568,19 +584,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
568 s_run->setFixedHeight(fixhei ); 584 s_run->setFixedHeight(fixhei );
569 mNewSubBut->setFixedHeight(fixhei ); 585 mNewSubBut->setFixedHeight(fixhei );
570 586
571 flat->setFocusPolicy( NoFocus ); 587 flat->setFocusPolicy( Qt::NoFocus );
572 s_done->setFocusPolicy( NoFocus ); 588 s_done->setFocusPolicy( Qt::NoFocus );
573 allopen->setFocusPolicy( NoFocus ); 589 allopen->setFocusPolicy( Qt::NoFocus );
574 allclose->setFocusPolicy( NoFocus ); 590 allclose->setFocusPolicy( Qt::NoFocus );
575 s_run->setFocusPolicy( NoFocus ); 591 s_run->setFocusPolicy( Qt::NoFocus );
576 mNewSubBut->setFocusPolicy( NoFocus ); 592 mNewSubBut->setFocusPolicy( Qt::NoFocus );
577 593
578 QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); 594 Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) );
579 QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); 595 Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) );
580 QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); 596 Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) );
581 QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); 597 Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) );
582 QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); 598 Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) );
583 QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); 599 Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) );
584 600
585 quickLayout->addWidget( mNewSubBut ); 601 quickLayout->addWidget( mNewSubBut );
586 quickLayout->addWidget( s_done ); 602 quickLayout->addWidget( s_done );
@@ -601,19 +617,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
601 617
602 mTodoListView->addColumn(i18n("Todo")); 618 mTodoListView->addColumn(i18n("Todo"));
603 mTodoListView->addColumn(i18n("Prio")); 619 mTodoListView->addColumn(i18n("Prio"));
604 mTodoListView->setColumnAlignment(1,AlignHCenter); 620 mTodoListView->setColumnAlignment(1,Qt::AlignHCenter);
605 mTodoListView->addColumn(i18n("Complete")); 621 mTodoListView->addColumn(i18n("Complete"));
606 mTodoListView->setColumnAlignment(2,AlignCenter); 622 mTodoListView->setColumnAlignment(2,Qt::AlignCenter);
607 623
608 mTodoListView->addColumn(i18n("Due Date")); 624 mTodoListView->addColumn(i18n("Due Date"));
609 mTodoListView->setColumnAlignment(3,AlignLeft); 625 mTodoListView->setColumnAlignment(3,Qt::AlignLeft);
610 mTodoListView->addColumn(i18n("Due Time")); 626 mTodoListView->addColumn(i18n("Due Time"));
611 mTodoListView->setColumnAlignment(4,AlignHCenter); 627 mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
612 628
613 mTodoListView->addColumn(i18n("Start Date")); 629 mTodoListView->addColumn(i18n("Start Date"));
614 mTodoListView->setColumnAlignment(5,AlignLeft); 630 mTodoListView->setColumnAlignment(5,Qt::AlignLeft);
615 mTodoListView->addColumn(i18n("Start Time")); 631 mTodoListView->addColumn(i18n("Start Time"));
616 mTodoListView->setColumnAlignment(6,AlignHCenter); 632 mTodoListView->setColumnAlignment(6,Qt::AlignHCenter);
617 633
618 //mTodoListView->addColumn(i18n("Cancelled")); 634 //mTodoListView->addColumn(i18n("Cancelled"));
619 mTodoListView->addColumn(i18n("Categories")); 635 mTodoListView->addColumn(i18n("Categories"));
@@ -623,7 +639,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
623 mTodoListView->addColumn(i18n("Last Modified Sub")); 639 mTodoListView->addColumn(i18n("Last Modified Sub"));
624#if 0 640#if 0
625 mTodoListView->addColumn(i18n("Sort Id")); 641 mTodoListView->addColumn(i18n("Sort Id"));
626 mTodoListView->setColumnAlignment(4,AlignHCenter); 642 mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
627#endif 643#endif
628 644
629 mTodoListView->setMinimumHeight( 60 ); 645 mTodoListView->setMinimumHeight( 60 );
@@ -632,19 +648,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
632 mTodoListView->setColumnWidth( 0, 120 ); 648 mTodoListView->setColumnWidth( 0, 120 );
633 int iii = 0; 649 int iii = 0;
634 for ( iii = 0; iii< 12 ; ++iii ) 650 for ( iii = 0; iii< 12 ; ++iii )
635 mTodoListView->setColumnWidthMode( iii, QListView::Manual ); 651 mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual );
636 652
637 653
638 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 654 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
639 655
640 mPriorityPopupMenu = new QPopupMenu(this); 656 mPriorityPopupMenu = new Q3PopupMenu(this);
641 for (int i = 1; i <= 5; i++) { 657 for (int i = 1; i <= 5; i++) {
642 QString label = QString ("%1").arg (i); 658 QString label = QString ("%1").arg (i);
643 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 659 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
644 } 660 }
645 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 661 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
646 662
647 mPercentageCompletedPopupMenu = new QPopupMenu(this); 663 mPercentageCompletedPopupMenu = new Q3PopupMenu(this);
648 for (int i = 0; i <= 100; i+=20) { 664 for (int i = 0; i <= 100; i+=20) {
649 QString label = QString ("%1 %").arg (i); 665 QString label = QString ("%1 %").arg (i);
650 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 666 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
@@ -652,12 +668,12 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
652 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 668 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
653 669
654 670
655 mCategoryPopupMenu = new QPopupMenu (this); 671 mCategoryPopupMenu = new Q3PopupMenu (this);
656 mCategoryPopupMenu->setCheckable (true); 672 mCategoryPopupMenu->setCheckable (true);
657 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 673 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
658 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); 674 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ()));
659 675
660 mCalPopupMenu = new QPopupMenu (this); 676 mCalPopupMenu = new Q3PopupMenu (this);
661 mCalPopupMenu->setCheckable (true); 677 mCalPopupMenu->setCheckable (true);
662 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); 678 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int)));
663 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); 679 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ()));
@@ -665,7 +681,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
665 681
666 682
667 683
668 mItemPopupMenu = new QPopupMenu(this); 684 mItemPopupMenu = new Q3PopupMenu(this);
669 mItemPopupMenu->insertItem(i18n("Show"), this, 685 mItemPopupMenu->insertItem(i18n("Show"), this,
670 SLOT (showTodo())); 686 SLOT (showTodo()));
671 mItemPopupMenu->insertItem(i18n("Edit..."), this, 687 mItemPopupMenu->insertItem(i18n("Edit..."), this,
@@ -710,7 +726,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
710 this, SLOT( toggleRunning() ),0, 35 ); 726 this, SLOT( toggleRunning() ),0, 35 );
711 727
712#endif 728#endif
713 mPopupMenu = new QPopupMenu(this); 729 mPopupMenu = new Q3PopupMenu(this);
714 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 730 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
715 SLOT (newTodo()),0,1); 731 SLOT (newTodo()),0,1);
716 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), 732 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."),
@@ -746,38 +762,38 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
746 762
747 763
748 // Double clicking conflicts with opening/closing the subtree 764 // Double clicking conflicts with opening/closing the subtree
749 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), 765 connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ),
750 SLOT( editItem( QListViewItem *) ) ); 766 SLOT( editItem( Q3ListViewItem *) ) );
751 /* 767 /*
752 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, 768 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
753 const QPoint &,int ) ), 769 const QPoint &,int ) ),
754 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 770 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
755 */ 771 */
756 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, 772 connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *,
757 const QPoint &,int ) ), 773 const QPoint &,int ) ),
758 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 774 SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) );
759 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), 775 connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ),
760 SLOT( itemClicked( QListViewItem * ) ) ); 776 SLOT( itemClicked( Q3ListViewItem * ) ) );
761 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), 777 connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ),
762 SLOT( itemDoubleClicked( QListViewItem * ) ) ); 778 SLOT( itemDoubleClicked( Q3ListViewItem * ) ) );
763 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 779 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
764 SLOT( updateView() ) ); 780 SLOT( updateView() ) );
765 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 781 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
766 SLOT( todoModified(Todo *, int) ) ); 782 SLOT( todoModified(Todo *, int) ) );
767 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), 783 connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ),
768 SLOT( itemStateChanged( QListViewItem * ) ) ); 784 SLOT( itemStateChanged( Q3ListViewItem * ) ) );
769 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), 785 connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ),
770 SLOT( itemStateChanged( QListViewItem * ) ) ); 786 SLOT( itemStateChanged( Q3ListViewItem * ) ) );
771 connect( mTodoListView, SIGNAL( paintNeeded() ), 787 connect( mTodoListView, SIGNAL( paintNeeded() ),
772 SLOT( paintNeeded()) ); 788 SLOT( paintNeeded()) );
773 789
774#if 0 790#if 0
775 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 791 connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
776 SLOT(selectionChanged(QListViewItem *))); 792 SLOT(selectionChanged(Q3ListViewItem *)));
777 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 793 connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)),
778 SLOT(selectionChanged(QListViewItem *))); 794 SLOT(selectionChanged(Q3ListViewItem *)));
779 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 795 connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)),
780 SLOT(selectionChanged(QListViewItem *))); 796 SLOT(selectionChanged(Q3ListViewItem *)));
781#endif 797#endif
782 798
783 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 799 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
@@ -881,7 +897,7 @@ void KOTodoView::updateView()
881 mTodoListView->setFont( fo ); 897 mTodoListView->setFont( fo );
882 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); 898 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
883 //mTodoListView->header()->setMaximumHeight(fm.height()); 899 //mTodoListView->header()->setMaximumHeight(fm.height());
884 QPtrList<Todo> todoList = calendar()->todos(); 900 Q3PtrList<Todo> todoList = calendar()->todos();
885 901
886/* 902/*
887 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; 903 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
@@ -1044,7 +1060,7 @@ bool KOTodoView::checkTodo( Todo * todo )
1044 return true; 1060 return true;
1045} 1061}
1046 1062
1047void KOTodoView::restoreItemState( QListViewItem *item ) 1063void KOTodoView::restoreItemState( Q3ListViewItem *item )
1048{ 1064{
1049 pendingSubtodo = 0; 1065 pendingSubtodo = 0;
1050 while( item ) { 1066 while( item ) {
@@ -1096,9 +1112,9 @@ void KOTodoView::updateConfig()
1096 mTodoListView->repaintContents(); 1112 mTodoListView->repaintContents();
1097} 1113}
1098 1114
1099QPtrList<Incidence> KOTodoView::selectedIncidences() 1115Q3PtrList<Incidence> KOTodoView::selectedIncidences()
1100{ 1116{
1101 QPtrList<Incidence> selected; 1117 Q3PtrList<Incidence> selected;
1102 1118
1103 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1119 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
1104// if (!item) item = mActiveItem; 1120// if (!item) item = mActiveItem;
@@ -1107,9 +1123,9 @@ QPtrList<Incidence> KOTodoView::selectedIncidences()
1107 return selected; 1123 return selected;
1108} 1124}
1109 1125
1110QPtrList<Todo> KOTodoView::selectedTodos() 1126Q3PtrList<Todo> KOTodoView::selectedTodos()
1111{ 1127{
1112 QPtrList<Todo> selected; 1128 Q3PtrList<Todo> selected;
1113 1129
1114 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1130 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
1115// if (!item) item = mActiveItem; 1131// if (!item) item = mActiveItem;
@@ -1127,7 +1143,7 @@ void KOTodoView::showDates(const QDate &, const QDate &)
1127{ 1143{
1128} 1144}
1129 1145
1130void KOTodoView::showEvents(QPtrList<Event>) 1146void KOTodoView::showEvents(Q3PtrList<Event>)
1131{ 1147{
1132 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 1148 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
1133} 1149}
@@ -1140,19 +1156,19 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1140#endif 1156#endif
1141} 1157}
1142 1158
1143void KOTodoView::editItem(QListViewItem *item ) 1159void KOTodoView::editItem(Q3ListViewItem *item )
1144{ 1160{
1145 if ( item ) 1161 if ( item )
1146 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 1162 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
1147} 1163}
1148 1164
1149void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 1165void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int)
1150{ 1166{
1151 if ( item ) 1167 if ( item )
1152 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 1168 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
1153} 1169}
1154 1170
1155void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 1171void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column)
1156{ 1172{
1157 pendingSubtodo = 0; 1173 pendingSubtodo = 0;
1158 mActiveItem = (KOTodoViewItem *)item; 1174 mActiveItem = (KOTodoViewItem *)item;
@@ -1361,7 +1377,7 @@ void KOTodoView::toggleRunningItemQuick()
1361 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); 1377 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1362 } 1378 }
1363} 1379}
1364void KOTodoView::itemDoubleClicked(QListViewItem *item) 1380void KOTodoView::itemDoubleClicked(Q3ListViewItem *item)
1365{ 1381{
1366 if ( pendingSubtodo != 0 ) { 1382 if ( pendingSubtodo != 0 ) {
1367 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1383 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
@@ -1428,7 +1444,7 @@ void KOTodoView::toggleRunningItem()
1428 } 1444 }
1429} 1445}
1430 1446
1431void KOTodoView::itemClicked(QListViewItem *item) 1447void KOTodoView::itemClicked(Q3ListViewItem *item)
1432{ 1448{
1433 //qDebug("KOTodoView::itemClicked %d", item); 1449 //qDebug("KOTodoView::itemClicked %d", item);
1434 if (!item) { 1450 if (!item) {
@@ -1441,7 +1457,7 @@ void KOTodoView::itemClicked(QListViewItem *item)
1441 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1457 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1442 if ( pendingSubtodo != 0 ) { 1458 if ( pendingSubtodo != 0 ) {
1443 bool allowReparent = true; 1459 bool allowReparent = true;
1444 QListViewItem *par = item; 1460 Q3ListViewItem *par = item;
1445 while ( par ) { 1461 while ( par ) {
1446 if ( par == pendingSubtodo ) { 1462 if ( par == pendingSubtodo ) {
1447 allowReparent = false; 1463 allowReparent = false;
@@ -1469,7 +1485,7 @@ void KOTodoView::setDocumentId( const QString &id )
1469 mDocPrefs->setDoc( id ); 1485 mDocPrefs->setDoc( id );
1470} 1486}
1471 1487
1472void KOTodoView::itemStateChanged( QListViewItem *item ) 1488void KOTodoView::itemStateChanged( Q3ListViewItem *item )
1473{ 1489{
1474 if (!item) return; 1490 if (!item) return;
1475 1491
@@ -1542,7 +1558,7 @@ void KOTodoView::setAllClose()
1542 setOpen(mTodoListView->firstChild(), false); 1558 setOpen(mTodoListView->firstChild(), false);
1543 resetCurrentItem(); 1559 resetCurrentItem();
1544} 1560}
1545void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1561void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI)
1546{ 1562{
1547 1563
1548 while ( item ) { 1564 while ( item ) {
@@ -1563,7 +1579,7 @@ void KOTodoView::displayAllFlat()
1563 clearList (); 1579 clearList ();
1564 mPopupMenu->setItemChecked( 8,true ); 1580 mPopupMenu->setItemChecked( 8,true );
1565 isFlatDisplay = true; 1581 isFlatDisplay = true;
1566 QPtrList<Todo> todoList = calendar()->todos(); 1582 Q3PtrList<Todo> todoList = calendar()->todos();
1567 Todo *todo; 1583 Todo *todo;
1568 for(todo = todoList.first(); todo; todo = todoList.next()) { 1584 for(todo = todoList.first(); todo; todo = todoList.next()) {
1569 if ( checkTodo( todo ) ) { 1585 if ( checkTodo( todo ) ) {
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 0cbc087..a9e7f30 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -26,15 +26,25 @@
26#include <qfont.h> 26#include <qfont.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30#include <qstrlist.h> 30#include <q3strlist.h>
31#include <qlistbox.h> 31#include <q3listbox.h>
32#include <qpopupmenu.h> 32#include <q3popupmenu.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qmap.h> 34#include <qmap.h>
35#include <qdialog.h> 35#include <qdialog.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlistview.h> 37#include <q3listview.h>
38//Added by qt3to4:
39#include <QDragMoveEvent>
40#include <QDropEvent>
41#include <QDragLeaveEvent>
42#include <QWheelEvent>
43#include <QPaintEvent>
44#include <QFocusEvent>
45#include <QMouseEvent>
46#include <QKeyEvent>
47#include <QDragEnterEvent>
38#include <klistview.h> 48#include <klistview.h>
39 49
40#include <libkcal/calendar.h> 50#include <libkcal/calendar.h>
@@ -101,7 +111,7 @@ class KOTodoListView : public KListView
101 signals: 111 signals:
102 void paintNeeded(); 112 void paintNeeded();
103 void todoDropped(Todo *, int); 113 void todoDropped(Todo *, int);
104 void double_Clicked(QListViewItem *item); 114 void double_Clicked(Q3ListViewItem *item);
105 void reparentTodoSignal( Todo *,Todo * ); 115 void reparentTodoSignal( Todo *,Todo * );
106 void unparentTodoSignal(Todo *); 116 void unparentTodoSignal(Todo *);
107 void deleteTodo( Todo * ); 117 void deleteTodo( Todo * );
@@ -124,7 +134,7 @@ class KOTodoListView : public KListView
124 Calendar *mCalendar; 134 Calendar *mCalendar;
125 QPoint mPressPos; 135 QPoint mPressPos;
126 bool mMousePressed; 136 bool mMousePressed;
127 QListViewItem *mOldCurrent; 137 Q3ListViewItem *mOldCurrent;
128 bool mFlagKeyPressed; 138 bool mFlagKeyPressed;
129 void keyPressEvent ( QKeyEvent * ) ; 139 void keyPressEvent ( QKeyEvent * ) ;
130 void keyReleaseEvent ( QKeyEvent * ) ; 140 void keyReleaseEvent ( QKeyEvent * ) ;
@@ -157,8 +167,8 @@ class KOTodoView : public KOrg::BaseView
157 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 167 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
158 ~KOTodoView(); 168 ~KOTodoView();
159 169
160 QPtrList<Incidence> selectedIncidences(); 170 Q3PtrList<Incidence> selectedIncidences();
161 QPtrList<Todo> selectedTodos(); 171 Q3PtrList<Todo> selectedTodos();
162 172
163 DateList selectedDates() 173 DateList selectedDates()
164 {DateList q; 174 {DateList q;
@@ -184,14 +194,14 @@ class KOTodoView : public KOrg::BaseView
184 void changeEventDisplay(Event *, int); 194 void changeEventDisplay(Event *, int);
185 195
186 void showDates(const QDate &start, const QDate &end); 196 void showDates(const QDate &start, const QDate &end);
187 void showEvents(QPtrList<Event> eventList); 197 void showEvents(Q3PtrList<Event> eventList);
188 198
189 void clearSelection(); 199 void clearSelection();
190 void jumpToDate (); 200 void jumpToDate ();
191 201
192 void editItem(QListViewItem *item); 202 void editItem(Q3ListViewItem *item);
193 void showItem(QListViewItem *item,const QPoint &,int); 203 void showItem(Q3ListViewItem *item,const QPoint &,int);
194 void popupMenu(QListViewItem *item,const QPoint &,int); 204 void popupMenu(Q3ListViewItem *item,const QPoint &,int);
195 void newTodo(); 205 void newTodo();
196 void newSubTodo(); 206 void newSubTodo();
197 void unparentTodo(); 207 void unparentTodo();
@@ -219,10 +229,10 @@ class KOTodoView : public KOrg::BaseView
219 void toggleQuickTodo(); 229 void toggleQuickTodo();
220 void updateTodo( Todo *, int ); 230 void updateTodo( Todo *, int );
221 231
222 void itemClicked(QListViewItem *); 232 void itemClicked(Q3ListViewItem *);
223 void itemStateChanged(QListViewItem *); 233 void itemStateChanged(Q3ListViewItem *);
224 void modified(bool); 234 void modified(bool);
225 void itemDoubleClicked(QListViewItem *item); 235 void itemDoubleClicked(Q3ListViewItem *item);
226 void resetFocusToList(); 236 void resetFocusToList();
227 void fillCategories (); 237 void fillCategories ();
228 void fillCal (); 238 void fillCal ();
@@ -273,18 +283,18 @@ class KOTodoView : public KOrg::BaseView
273 bool mPendingUpdateBeforeRepaint; 283 bool mPendingUpdateBeforeRepaint;
274 friend class KOTodoViewItem; 284 friend class KOTodoViewItem;
275 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 285 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
276 void restoreItemState( QListViewItem * ); 286 void restoreItemState( Q3ListViewItem * );
277 287
278 bool checkTodo( Todo * ); 288 bool checkTodo( Todo * );
279 bool isFlatDisplay; 289 bool isFlatDisplay;
280 void setOpen( QListViewItem*, bool setOpen); 290 void setOpen( Q3ListViewItem*, bool setOpen);
281 KOTodoListView *mTodoListView; 291 KOTodoListView *mTodoListView;
282 QPopupMenu *mItemPopupMenu; 292 Q3PopupMenu *mItemPopupMenu;
283 QPopupMenu *mPopupMenu; 293 Q3PopupMenu *mPopupMenu;
284 QPopupMenu *mPriorityPopupMenu; 294 Q3PopupMenu *mPriorityPopupMenu;
285 QPopupMenu *mPercentageCompletedPopupMenu; 295 Q3PopupMenu *mPercentageCompletedPopupMenu;
286 QPopupMenu *mCategoryPopupMenu; 296 Q3PopupMenu *mCategoryPopupMenu;
287 QPopupMenu *mCalPopupMenu; 297 Q3PopupMenu *mCalPopupMenu;
288 298
289 QMap<int, int> mPercentage; 299 QMap<int, int> mPercentage;
290 QMap<int, int> mPriority; 300 QMap<int, int> mPriority;
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 519bb16..c21816d 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -19,7 +19,11 @@
19 19
20#include <klocale.h> 20#include <klocale.h>
21#include <kdebug.h> 21#include <kdebug.h>
22#include <qapp.h> 22#include <qapplication.h>
23#include <QDesktopWidget>
24//Added by qt3to4:
25#include <Q3PointArray>
26#include <QPixmap>
23#include <kglobal.h> 27#include <kglobal.h>
24 28
25#include <kiconloader.h> 29#include <kiconloader.h>
@@ -27,14 +31,14 @@
27#include "kotodoview.h" 31#include "kotodoview.h"
28#include "koprefs.h" 32#include "koprefs.h"
29 33
30KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) 34KOTodoViewItem::KOTodoViewItem( Q3ListView *parent, Todo *todo, KOTodoView *kotodo)
31 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 35 : Q3CheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
32{ 36{
33 construct(); 37 construct();
34} 38}
35 39
36KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) 40KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
37 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 41 : Q3CheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
38{ 42{
39 construct(); 43 construct();
40} 44}
@@ -80,7 +84,7 @@ void KOTodoViewItem::setSortKey(int column,const QString &key)
80void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, 84void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
81 int y,int h) 85 int y,int h)
82{ 86{
83 QListViewItem::paintBranches(p,cg,w,y,h); 87 Q3ListViewItem::paintBranches(p,cg,w,y,h);
84} 88}
85#else 89#else
86#endif 90#endif
@@ -316,7 +320,7 @@ void KOTodoViewItem::stateChange(bool state)
316 else setSortKey(2,QString::number(99)); 320 else setSortKey(2,QString::number(99));
317 } 321 }
318 if ( state ) { 322 if ( state ) {
319 QListViewItem * myChild = firstChild(); 323 Q3ListViewItem * myChild = firstChild();
320 KOTodoViewItem *item; 324 KOTodoViewItem *item;
321 while( myChild ) { 325 while( myChild ) {
322 //qDebug("stateCH "); 326 //qDebug("stateCH ");
@@ -325,7 +329,7 @@ void KOTodoViewItem::stateChange(bool state)
325 myChild = myChild->nextSibling(); 329 myChild = myChild->nextSibling();
326 } 330 }
327 } else { 331 } else {
328 QListViewItem * myChild = parent(); 332 Q3ListViewItem * myChild = parent();
329 if ( myChild ) 333 if ( myChild )
330 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state); 334 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state);
331 } 335 }
@@ -383,12 +387,12 @@ bool KOTodoViewItem::isAlternate()
383 { 387 {
384 KOTodoViewItem *item; 388 KOTodoViewItem *item;
385 bool previous = true; 389 bool previous = true;
386 if (QListViewItem::parent()) 390 if (Q3ListViewItem::parent())
387 { 391 {
388 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()); 392 item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent());
389 if (item) 393 if (item)
390 previous = item->m_odd; 394 previous = item->m_odd;
391 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); 395 item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent()->firstChild());
392 } 396 }
393 else 397 else
394 { 398 {
@@ -476,13 +480,13 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
476 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling 480 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling
477 QColor fc = KOPrefs::instance()->mHighlightColor; 481 QColor fc = KOPrefs::instance()->mHighlightColor;
478 if ( mTodo->percentComplete() == 100 ) 482 if ( mTodo->percentComplete() == 100 )
479 fc = darkGreen; 483 fc = Qt::darkGreen;
480 p->drawRect( 2, 2, width-4, height()-4); 484 p->drawRect( 2, 2, width-4, height()-4);
481 p->fillRect( 3, 3, progress, height()-6, 485 p->fillRect( 3, 3, progress, height()-6,
482 fc ); 486 fc );
483 p->restore(); 487 p->restore();
484 } else { 488 } else {
485 QCheckListItem::paintCell(p, _cg, column, width, alignment); 489 Q3CheckListItem::paintCell(p, _cg, column, width, alignment);
486 } 490 }
487 return; 491 return;
488 } 492 }
@@ -494,12 +498,12 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
494 498
495 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); 499 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) );
496 500
497 QListView *lv = listView(); 501 Q3ListView *lv = listView();
498 if ( !lv ) 502 if ( !lv )
499 return; 503 return;
500 int marg = 2;//lv->itemMargin(); 504 int marg = 2;//lv->itemMargin();
501 int r = 0; 505 int r = 0;
502 QCheckListItem::Type myType = QCheckListItem::CheckBox; 506 Q3CheckListItem::Type myType = Q3CheckListItem::CheckBox;
503 int BoxSize = 20; 507 int BoxSize = 20;
504 int boxOffset = 2; 508 int boxOffset = 2;
505 int xOffset = 2; 509 int xOffset = 2;
@@ -522,7 +526,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
522 if ( !pixmap( 0 ) ) 526 if ( !pixmap( 0 ) )
523 r += BoxSize + 4; 527 r += BoxSize + 4;
524 } else { 528 } else {
525 ASSERT( lv ); //### 529 Q_ASSERT( lv ); //###
526 //QFontMetrics fm( lv->font() ); 530 //QFontMetrics fm( lv->font() );
527 //int d = fm.height(); 531 //int d = fm.height();
528 int x = 0; 532 int x = 0;
@@ -539,7 +543,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
539 x++; 543 x++;
540 y++; 544 y++;
541 if ( isOn() ) { 545 if ( isOn() ) {
542 QPointArray a( 7*2 ); 546 Q3PointArray a( 7*2 );
543 int i, xx, yy; 547 int i, xx, yy;
544 xx = x+xOffset+marg+(boxOffset/2); 548 xx = x+xOffset+marg+(boxOffset/2);
545 yy = y+5+boxOffset; 549 yy = y+5+boxOffset;
@@ -555,7 +559,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
555 a.setPoint( 2*i+1, xx, yy+2 ); 559 a.setPoint( 2*i+1, xx, yy+2 );
556 xx++; yy--; 560 xx++; yy--;
557 } 561 }
558 p->setPen( darkGreen ); 562 p->setPen( Qt::darkGreen );
559 p->drawLineSegments( a ); 563 p->drawLineSegments( a );
560 } 564 }
561 //////////////////////// 565 ////////////////////////
@@ -565,9 +569,9 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
565 569
566 p->translate( r, 0 ); 570 p->translate( r, 0 );
567 p->setPen( QPen( _cg.text() ) ); 571 p->setPen( QPen( _cg.text() ) );
568 QListViewItem::paintCell( p, _cg, column, width - r, align ); 572 Q3ListViewItem::paintCell( p, _cg, column, width - r, align );
569 if ( mTodo->cancelled () ) { 573 if ( mTodo->cancelled () ) {
570 p->setPen( black ); 574 p->setPen( Qt::black );
571 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() ); 575 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() );
572 int wid = br.width() +lineStart; 576 int wid = br.width() +lineStart;
573 if ( wid > width-3 ) 577 if ( wid > width-3 )
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index bd024c8..62a635c 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -22,13 +22,13 @@
22#include <qfont.h> 22#include <qfont.h>
23#include <qfontmetrics.h> 23#include <qfontmetrics.h>
24#include <qlineedit.h> 24#include <qlineedit.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qstrlist.h> 26#include <q3strlist.h>
27#include <qlistbox.h> 27#include <q3listbox.h>
28#include <qpopupmenu.h> 28#include <q3popupmenu.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qmap.h> 30#include <qmap.h>
31#include <qlistview.h> 31#include <q3listview.h>
32#include <qpainter.h> 32#include <qpainter.h>
33 33
34#include <libkcal/calendar.h> 34#include <libkcal/calendar.h>
@@ -45,7 +45,7 @@ class KOTodoView;
45 @author Cornelius Schumacher <schumacher@kde.org> 45 @author Cornelius Schumacher <schumacher@kde.org>
46 @see KOTodoView 46 @see KOTodoView
47*/ 47*/
48class KOTodoViewItem : public QCheckListItem 48class KOTodoViewItem : public Q3CheckListItem
49{ 49{
50 public: 50 public:
51 /** 51 /**
@@ -54,7 +54,7 @@ class KOTodoViewItem : public QCheckListItem
54 @param parent is the list view to which this item belongs. 54 @param parent is the list view to which this item belongs.
55 @param ev is the event to have the item display information for. 55 @param ev is the event to have the item display information for.
56 */ 56 */
57 KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); 57 KOTodoViewItem(Q3ListView *parent, Todo *todo, KOTodoView *kotodo);
58 KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); 58 KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
59 //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );} 59 //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );}
60 60
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4057ae0..07c4295 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -23,7 +23,9 @@
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <qwidgetstack.h> 26#include <q3widgetstack.h>
27//Added by qt3to4:
28#include <Q3PtrList>
27 29
28#include <kconfig.h> 30#include <kconfig.h>
29#include <kglobal.h> 31#include <kglobal.h>
@@ -457,8 +459,8 @@ void KOViewManager::showListView()
457 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 459 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
458 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 460 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
459 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 461 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
460 connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), 462 connect( mListView, SIGNAL( beamIncidenceList( Q3PtrList<Incidence> ) ),
461 mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); 463 mMainView, SLOT ( beamIncidenceList( Q3PtrList<Incidence> ) ) );
462 } 464 }
463 // bool temp = mFlagShowNextxDays; 465 // bool temp = mFlagShowNextxDays;
464 //globalFlagBlockPainting = true; 466 //globalFlagBlockPainting = true;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -18,14 +18,20 @@
18*/ 18*/
19 19
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qtextbrowser.h> 21#include <q3textbrowser.h>
22#include <qtextcodec.h> 22#include <qtextcodec.h>
23#include <qfileinfo.h> 23#include <qfileinfo.h>
24#include <qlabel.h> 24#include <qlabel.h>
25 25
26#include <qapplication.h> 26#include <qapplication.h>
27#include <QDesktopWidget>
27#ifdef DESKTOP_VERSION 28#ifdef DESKTOP_VERSION
28#include <qpaintdevicemetrics.h> 29#include <q3paintdevicemetrics.h>
30//Added by qt3to4:
31#include <Q3PtrList>
32#include <QHideEvent>
33#include <Q3VBoxLayout>
34#include <QShowEvent>
29#endif 35#endif
30#include <kglobal.h> 36#include <kglobal.h>
31#include <klocale.h> 37#include <klocale.h>
@@ -42,7 +48,7 @@
42#include "koprefs.h" 48#include "koprefs.h"
43#include "koeventviewerdialog.h" 49#include "koeventviewerdialog.h"
44#include "koeventviewer.h" 50#include "koeventviewer.h"
45#include <qstylesheet.h> 51#include <q3stylesheet.h>
46#include "kowhatsnextview.h" 52#include "kowhatsnextview.h"
47using namespace KOrg; 53using namespace KOrg;
48 54
@@ -56,7 +62,7 @@ void WhatsNextTextBrowser::setSource(const QString& n)
56 emit showIncidence(n); 62 emit showIncidence(n);
57 return; 63 return;
58 } else { 64 } else {
59 QTextBrowser::setSource(n); 65 Q3TextBrowser::setSource(n);
60 } 66 }
61} 67}
62void WhatsNextTextBrowser::printMe() 68void WhatsNextTextBrowser::printMe()
@@ -72,7 +78,7 @@ void WhatsNextTextBrowser::printMe()
72 return; 78 return;
73 QPainter p; 79 QPainter p;
74 p.begin ( &printer ); 80 p.begin ( &printer );
75 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 81 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
76 float dx, dy; 82 float dx, dy;
77 int wid = (m.width() * 9)/10; 83 int wid = (m.width() * 9)/10;
78 dx = (float) wid/(float)contentsWidth (); 84 dx = (float) wid/(float)contentsWidth ();
@@ -103,19 +109,19 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
103 setFont( KOPrefs::instance()->mWhatsNextFont ); 109 setFont( KOPrefs::instance()->mWhatsNextFont );
104 mView = new WhatsNextTextBrowser(this); 110 mView = new WhatsNextTextBrowser(this);
105 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); 111 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
106 QStyleSheet* stsh = mView->styleSheet(); 112 Q3StyleSheet* stsh = mView->styleSheet();
107 QStyleSheetItem * style ; 113 Q3StyleSheetItem * style ;
108 style = stsh->item ("h2" ); 114 style = stsh->item ("h2" );
109 if ( style ) { 115 if ( style ) {
110 style->setMargin(QStyleSheetItem::MarginAll,0); 116 style->setMargin(Q3StyleSheetItem::MarginAll,0);
111 } 117 }
112 style = stsh->item ("h3" ); 118 style = stsh->item ("h3" );
113 if ( style ) { 119 if ( style ) {
114 style->setMargin(QStyleSheetItem::MarginAll,0); 120 style->setMargin(Q3StyleSheetItem::MarginAll,0);
115 } 121 }
116 mEventViewer = 0; 122 mEventViewer = 0;
117 123
118 QBoxLayout *topLayout = new QVBoxLayout(this); 124 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
119 // topLayout->addWidget(mDateLabel); 125 // topLayout->addWidget(mDateLabel);
120 topLayout->addWidget(mView); 126 topLayout->addWidget(mView);
121 mTimer = new QTimer( this ); 127 mTimer = new QTimer( this );
@@ -144,9 +150,9 @@ void KOWhatsNextView::clearList()
144 mTimer->stop(); 150 mTimer->stop();
145 mView->setText(" "); 151 mView->setText(" ");
146} 152}
147QPtrList<Incidence> KOWhatsNextView::selectedIncidences() 153Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences()
148{ 154{
149 QPtrList<Incidence> eventList; 155 Q3PtrList<Incidence> eventList;
150 156
151 return eventList; 157 return eventList;
152} 158}
@@ -219,8 +225,8 @@ void KOWhatsNextView::updateView()
219 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>"; 225 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
220 int iii; 226 int iii;
221 mTodos.clear(); 227 mTodos.clear();
222 QPtrList<Event> events; 228 Q3PtrList<Event> events;
223 QPtrList<Todo> todos = calendar()->todos(); 229 Q3PtrList<Todo> todos = calendar()->todos();
224 Todo * todo; 230 Todo * todo;
225 //mText += "<h2>" + i18n("Events: ") + "</h2>\n"; 231 //mText += "<h2>" + i18n("Events: ") + "</h2>\n";
226 int daysToShow = KOPrefs::instance()->mWhatsNextDays ; 232 int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
@@ -454,7 +460,7 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &)
454 updateView(); 460 updateView();
455} 461}
456 462
457void KOWhatsNextView::showEvents(QPtrList<Event>) 463void KOWhatsNextView::showEvents(Q3PtrList<Event>)
458{ 464{
459} 465}
460 466
@@ -741,7 +747,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
741 ind += "-"; 747 ind += "-";
742 mText += "</li>\n"; 748 mText += "</li>\n";
743 } 749 }
744 QPtrList<Incidence> Relations = ev->relations(); 750 Q3PtrList<Incidence> Relations = ev->relations();
745 Incidence *to; 751 Incidence *to;
746 for (to=Relations.first();to;to=Relations.next()) { 752 for (to=Relations.first();to;to=Relations.next()) {
747 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) 753 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio )
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 93574ef..49fc448 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -19,22 +19,28 @@
19#ifndef KOWHATSNEXTVIEW_H 19#ifndef KOWHATSNEXTVIEW_H
20#define KOWHATSNEXTVIEW_H 20#define KOWHATSNEXTVIEW_H
21 21
22#include <qtextbrowser.h> 22#include <q3textbrowser.h>
23#include <qtimer.h> 23#include <qtimer.h>
24//Added by qt3to4:
25#include <QShowEvent>
26#include <QHideEvent>
27#include <QLabel>
28#include <Q3ValueList>
29#include <Q3PtrList>
24 30
25#include <korganizer/baseview.h> 31#include <korganizer/baseview.h>
26 32
27class QListView; 33class Q3ListView;
28class QLabel; 34class QLabel;
29 35
30class KOEventViewerDialog; 36class KOEventViewerDialog;
31 37
32#include <qpainter.h> 38#include <qpainter.h>
33#include <qwidget.h> 39#include <qwidget.h>
34class WhatsNextTextBrowser : public QTextBrowser { 40class WhatsNextTextBrowser : public Q3TextBrowser {
35 Q_OBJECT 41 Q_OBJECT
36 public: 42 public:
37 WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}; 43 WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {};
38 44
39 void setSource(const QString &); 45 void setSource(const QString &);
40 void printMe(); 46 void printMe();
@@ -58,7 +64,7 @@ class KOWhatsNextView : public KOrg::BaseView
58 virtual int maxDatesHint(); 64 virtual int maxDatesHint();
59 virtual int currentDateCount(); 65 virtual int currentDateCount();
60 void setEventViewer(KOEventViewerDialog* v ); 66 void setEventViewer(KOEventViewerDialog* v );
61 virtual QPtrList<Incidence> selectedIncidences(); 67 virtual Q3PtrList<Incidence> selectedIncidences();
62 void clearList(); 68 void clearList();
63 DateList selectedDates() 69 DateList selectedDates()
64 {DateList q; 70 {DateList q;
@@ -70,7 +76,7 @@ class KOWhatsNextView : public KOrg::BaseView
70 virtual void updateView(); 76 virtual void updateView();
71 void printMe(); 77 void printMe();
72 virtual void showDates(const QDate &start, const QDate &end); 78 virtual void showDates(const QDate &start, const QDate &end);
73 virtual void showEvents(QPtrList<Event> eventList); 79 virtual void showEvents(Q3PtrList<Event> eventList);
74 void updateConfig(); 80 void updateConfig();
75 void changeEventDisplay(Event *, int); 81 void changeEventDisplay(Event *, int);
76 82
@@ -96,7 +102,7 @@ class KOWhatsNextView : public KOrg::BaseView
96 // QLabel *mDateLabel; 102 // QLabel *mDateLabel;
97 KOEventViewerDialog *mEventViewer; 103 KOEventViewerDialog *mEventViewer;
98 104
99 QValueList<Incidence *> mTodos; 105 Q3ValueList<Incidence *> mTodos;
100}; 106};
101 107
102#endif 108#endif
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index df9b2fc..e2ae4a6 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -21,12 +21,15 @@
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 23
24#include <qkeycode.h> 24#include <qnamespace.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qlistbox.h> 28#include <q3listbox.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
31//Added by qt3to4:
32#include <QKeyEvent>
30 33
31#include <kmessagebox.h> 34#include <kmessagebox.h>
32#include <kglobal.h> 35#include <kglobal.h>
@@ -45,7 +48,7 @@
45// Difficult to get all in one... 48// Difficult to get all in one...
46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. 49// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) 50KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
48 : QComboBox(TRUE, parent, name) 51 : Q3ComboBox(TRUE, parent, name)
49{ 52{
50 setInsertionPolicy(NoInsertion); 53 setInsertionPolicy(NoInsertion);
51 mFlagKeyPressed = false; 54 mFlagKeyPressed = false;
@@ -64,12 +67,12 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
64 do { 67 do {
65 insertItem(KGlobal::locale()->formatTime(timeEntry)); 68 insertItem(KGlobal::locale()->formatTime(timeEntry));
66 timeEntry = timeEntry.addSecs(60*15); 69 timeEntry = timeEntry.addSecs(60*15);
67 } while (!timeEntry.isNull()); 70 } while ( !( timeEntry.hour() || timeEntry.minute() ) );
68 // Add end of day. 71 // Add end of day.
69 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) ); 72 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
70 73
71 updateText(); 74 updateText();
72 setFocusPolicy(QWidget::StrongFocus); 75 setFocusPolicy(Qt::StrongFocus);
73 76
74 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int))); 77 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int)));
75 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int))); 78 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
@@ -208,8 +211,8 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
208 mFlagKeyPressed = true; 211 mFlagKeyPressed = true;
209 } 212 }
210 // Tap -> Focus Next Widget 213 // Tap -> Focus Next Widget
211 if ( e->key() == Key_Tab ) { 214 if ( e->key() == Qt::Key_Tab ) {
212 QComboBox::keyPressEvent(e); 215 Q3ComboBox::keyPressEvent(e);
213 return; 216 return;
214 } 217 }
215 218
@@ -220,12 +223,12 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
220 223
221 // Switch for arrows, backspace and escape 224 // Switch for arrows, backspace and escape
222 switch(e->key()) { 225 switch(e->key()) {
223 case Key_Escape: 226 case Qt::Key_Escape:
224 lineEdit()->deselect(); 227 lineEdit()->deselect();
225 case Key_Tab: 228 case Qt::Key_Tab:
226 QComboBox::keyPressEvent(e); 229 Q3ComboBox::keyPressEvent(e);
227 break; 230 break;
228 case Key_Up: 231 case Qt::Key_Up:
229 if ( e->state () == Qt::ControlButton ) { 232 if ( e->state () == Qt::ControlButton ) {
230 addTime(QTime(0,15,0), false ); 233 addTime(QTime(0,15,0), false );
231 lineEdit()->setCursorPosition(3); 234 lineEdit()->setCursorPosition(3);
@@ -267,7 +270,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
267 break; 270 break;
268 } 271 }
269 break; 272 break;
270 case Key_Down: 273 case Qt::Key_Down:
271 if ( e->state () == Qt::ControlButton ) { 274 if ( e->state () == Qt::ControlButton ) {
272 subTime(QTime(0,15,0), false ); 275 subTime(QTime(0,15,0), false );
273 lineEdit()->setCursorPosition(3); 276 lineEdit()->setCursorPosition(3);
@@ -310,7 +313,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
310 } 313 }
311 break; 314 break;
312 // set cursor to correct place 315 // set cursor to correct place
313 case Key_Left: 316 case Qt::Key_Left:
314 if ( cpos == 3 ) 317 if ( cpos == 3 )
315 --cpos; 318 --cpos;
316 if ( cpos > 0) { 319 if ( cpos > 0) {
@@ -321,7 +324,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
321 setSelect ( 0 , 1 ); 324 setSelect ( 0 , 1 );
322 break; 325 break;
323 // set cursor to correct place 326 // set cursor to correct place
324 case Key_Right: 327 case Qt::Key_Right:
325 if ( cpos == 1 ) 328 if ( cpos == 1 )
326 ++cpos; 329 ++cpos;
327 if ( cpos < maxpos ) { 330 if ( cpos < maxpos ) {
@@ -330,19 +333,19 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
330 } 333 }
331 break; 334 break;
332 // rest 335 // rest
333 case Key_Prior: 336 case Qt::Key_Prior:
334 subTime(QTime(1,0,0)); 337 subTime(QTime(1,0,0));
335 break; 338 break;
336 case Key_Next: 339 case Qt::Key_Next:
337 addTime(QTime(1,0,0)); 340 addTime(QTime(1,0,0));
338 break; 341 break;
339 case Key_Backspace: 342 case Qt::Key_Backspace:
340 if ( cpos > 0) { 343 if ( cpos > 0) {
341 if ( cpos == 3 ) 344 if ( cpos == 3 )
342 --cpos; 345 --cpos;
343 if ( cpos > 5) 346 if ( cpos > 5)
344 cpos = 5; 347 cpos = 5;
345 text.at( cpos-1 ) = '0'; 348 text[ cpos-1 ] = '0';
346 lineEdit()->setText( text ); 349 lineEdit()->setText( text );
347 lineEdit()->setCursorPosition(--cpos); 350 lineEdit()->setCursorPosition(--cpos);
348 setSelect ( cpos , 1 ); 351 setSelect ( cpos , 1 );
@@ -352,7 +355,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
352 } // switch arrows 355 } // switch arrows
353 356
354 // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos 357 // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos
355 if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) { 358 if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Qt::Key_Left ) {
356 lineEdit()->deselect(); 359 lineEdit()->deselect();
357 cpos = 0; 360 cpos = 0;
358 lineEdit()->setCursorPosition(cpos); 361 lineEdit()->setCursorPosition(cpos);
@@ -367,42 +370,42 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
367 if ( cpos < 5 ) { 370 if ( cpos < 5 ) {
368 // switch another keys 371 // switch another keys
369 switch(e->key()) { 372 switch(e->key()) {
370 case Key_Delete: 373 case Qt::Key_Delete:
371 text.at( cpos ) = '0'; 374 text[ cpos ] = '0';
372 lineEdit()->setText( text ); 375 lineEdit()->setText( text );
373 lineEdit()->setCursorPosition(cpos); 376 lineEdit()->setCursorPosition(cpos);
374 setSelect ( cpos , 1 ); 377 setSelect ( cpos , 1 );
375 changedText(); 378 changedText();
376 break; 379 break;
377 case Key_9: 380 case Qt::Key_9:
378 case Key_8: 381 case Qt::Key_8:
379 case Key_7: 382 case Qt::Key_7:
380 case Key_6: 383 case Qt::Key_6:
381 if ( !(cpos == 1 || cpos == 4) ) 384 if ( !(cpos == 1 || cpos == 4) )
382 return; 385 return;
383 if ( cpos == 1 && text.at( 0 ) > '1') 386 if ( cpos == 1 && text.at( 0 ) > '1')
384 text.at( 0 ) = '1'; 387 text[ 0 ] = '1';
385 case Key_5: 388 case Qt::Key_5:
386 case Key_4: 389 case Qt::Key_4:
387 case Key_3: 390 case Qt::Key_3:
388 if ( cpos < 1 ) 391 if ( cpos < 1 )
389 return; 392 return;
390 if ( hour12Format && cpos == 1 ) 393 if ( hour12Format && cpos == 1 )
391 return; 394 return;
392 case Key_2: 395 case Qt::Key_2:
393 if ( hour12Format && cpos == 0 ) 396 if ( hour12Format && cpos == 0 )
394 return; 397 return;
395 if ( cpos == 0 && text.at( 1 ) > '3') 398 if ( cpos == 0 && text.at( 1 ) > '3')
396 text.at( 1 ) = '3'; 399 text[ 1 ] = '3';
397 case Key_1: 400 case Qt::Key_1:
398 case Key_0: 401 case Qt::Key_0:
399 if ( hour12Format ) { 402 if ( hour12Format ) {
400 if ( e->key() == Key_0 && cpos == 1 && text.at( 0 ) == '0' ) 403 if ( e->key() == Qt::Key_0 && cpos == 1 && text.at( 0 ) == '0' )
401 return; 404 return;
402 if ( e->key() == Key_0 && cpos == 0 && text.at( 1 ) == '0' ) 405 if ( e->key() == Qt::Key_0 && cpos == 0 && text.at( 1 ) == '0' )
403 text.at( 1 ) = '1'; 406 text[ 1 ] = '1';
404 } 407 }
405 text.at( cpos ) = QChar ( e->key() ); 408 text[ cpos ] = QChar ( e->key() );
406 lineEdit()->setText( text ); 409 lineEdit()->setText( text );
407 if ( cpos == 1 ) 410 if ( cpos == 1 )
408 ++cpos; 411 ++cpos;
@@ -411,11 +414,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
411 setSelect( cpos , 1 ); 414 setSelect( cpos , 1 );
412 changedText(); 415 changedText();
413 break; 416 break;
414 case Key_Home: 417 case Qt::Key_Home:
415 lineEdit()->setCursorPosition(0); 418 lineEdit()->setCursorPosition(0);
416 setSelect( cpos , 1 ); 419 setSelect( cpos , 1 );
417 break; 420 break;
418 case Key_End: 421 case Qt::Key_End:
419 lineEdit()->setCursorPosition(5); 422 lineEdit()->setCursorPosition(5);
420 lineEdit()->deselect(); 423 lineEdit()->deselect();
421 break; 424 break;
@@ -425,13 +428,13 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
425 } // switch num keys 428 } // switch num keys
426 } else if ( cpos == 5 ) {// if cpos < 5 429 } else if ( cpos == 5 ) {// if cpos < 5
427 if ( hour12Format ) { 430 if ( hour12Format ) {
428 if ( e->key() == Key_A ) { 431 if ( e->key() == Qt::Key_A ) {
429 text.at( 5 ) = 'a'; 432 text[ 5 ] = 'a';
430 lineEdit()->setText( text ); 433 lineEdit()->setText( text );
431 lineEdit()->setCursorPosition(5); 434 lineEdit()->setCursorPosition(5);
432 435
433 } else if ( e->key() == Key_P ) { 436 } else if ( e->key() == Qt::Key_P ) {
434 text.at( 5 ) = 'p'; 437 text[ 5 ] = 'p';
435 lineEdit()->setText( text ); 438 lineEdit()->setText( text );
436 lineEdit()->setCursorPosition(5); 439 lineEdit()->setCursorPosition(5);
437 440
diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h
index b3d842d..1c7d18d 100644
--- a/korganizer/ktimeedit.h
+++ b/korganizer/ktimeedit.h
@@ -24,10 +24,13 @@
24#define _KTIMEEDIT_H 24#define _KTIMEEDIT_H
25 25
26#include <qevent.h> 26#include <qevent.h>
27#include <qkeycode.h> 27#include <qnamespace.h>
28#include <qstring.h> 28#include <qstring.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <Q3ComboBox>
32//Added by qt3to4:
33#include <QKeyEvent>
31 34
32#include <kapplication.h> 35#include <kapplication.h>
33 36
@@ -38,7 +41,7 @@
38 @short Provides a way to edit times in a user-friendly manner. 41 @short Provides a way to edit times in a user-friendly manner.
39 @author Preston Brown, Ian Dawes 42 @author Preston Brown, Ian Dawes
40*/ 43*/
41class KOTimeEdit : public QComboBox 44class KOTimeEdit : public Q3ComboBox
42{ 45{
43 Q_OBJECT 46 Q_OBJECT
44 public: 47 public:
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp
index e72e41c..012455e 100644
--- a/korganizer/lineview.cpp
+++ b/korganizer/lineview.cpp
@@ -7,7 +7,7 @@
7#include "lineview.h" 7#include "lineview.h"
8 8
9LineView::LineView( QWidget *parent, const char *name ) : 9LineView::LineView( QWidget *parent, const char *name ) :
10 QScrollView( parent, name ) 10 Q3ScrollView( parent, name )
11{ 11{
12 mPixelWidth = 1000; 12 mPixelWidth = 1000;
13 13
diff --git a/korganizer/lineview.h b/korganizer/lineview.h
index aa34dbc..52ae9cf 100644
--- a/korganizer/lineview.h
+++ b/korganizer/lineview.h
@@ -1,10 +1,10 @@
1#ifndef LINEVIEW_H 1#ifndef LINEVIEW_H
2#define LINEVIEW_H 2#define LINEVIEW_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qptrlist.h> 5#include <q3ptrlist.h>
6 6
7class LineView : public QScrollView 7class LineView : public Q3ScrollView
8{ 8{
9 Q_OBJECT 9 Q_OBJECT
10 public: 10 public:
@@ -28,7 +28,7 @@ class LineView : public QScrollView
28 int end; 28 int end;
29 }; 29 };
30 30
31 QPtrList<Line> mLines; 31 Q3PtrList<Line> mLines;
32 int mPixelWidth; 32 int mPixelWidth;
33}; 33};
34 34
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4a0e24f..211fde6 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -4,13 +4,13 @@
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5#include <qcopchannel_qws.h> 5#include <qcopchannel_qws.h>
6#include <qpe/global.h> 6#include <qpe/global.h>
7//Added by qt3to4:
8#include <Q3CString>
7#include <stdlib.h> 9#include <stdlib.h>
8#else 10#else
9#include <qapplication.h> 11#include <qapplication.h>
10#include <qstring.h> 12#include <qstring.h>
11#include <qwindowsstyle.h> 13#include <qwindowsstyle.h>
12#include <qplatinumstyle.h>
13#include <qsgistyle.h>
14#include <stdlib.h> 14#include <stdlib.h>
15#endif 15#endif
16#include <qtextcodec.h> 16#include <qtextcodec.h>
@@ -26,12 +26,12 @@ void dumpMissing();
26 26
27int main( int argc, char **argv ) 27int main( int argc, char **argv )
28{ 28{
29 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
29#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
30 QPEApplication a( argc, argv ); 31 QPEApplication a( argc, argv );
31 a.setKeepRunning (); 32 a.setKeepRunning ();
32#else 33#else
33 QApplication a( argc, argv ); 34 QApplication a( argc, argv );
34 QApplication::setStyle( new QPlatinumStyle ());
35#ifdef _WIN32_ 35#ifdef _WIN32_
36 QString hdir ( getenv( "HOME") ); 36 QString hdir ( getenv( "HOME") );
37 if ( hdir.isEmpty() ) { 37 if ( hdir.isEmpty() ) {
@@ -89,7 +89,7 @@ int main( int argc, char **argv )
89 MainWindow m; 89 MainWindow m;
90#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
91 91
92 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& ))); 92 QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&m, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
93 a.showMainWidget(&m ); 93 a.showMainWidget(&m );
94#else 94#else
95 a.setMainWidget(&m ); 95 a.setMainWidget(&m );
@@ -98,7 +98,7 @@ int main( int argc, char **argv )
98 //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 98 //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
99#endif 99#endif
100 if ( argc > 1 ) { 100 if ( argc > 1 ) {
101 QCString command = argv[1]; 101 Q3CString command = argv[1];
102 if ( argc > 2 ) 102 if ( argc > 2 )
103 command += argv[2]; 103 command += argv[2];
104 m.recieve(command, QByteArray() ); 104 m.recieve(command, QByteArray() );
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 69ccde1..2004939 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,24 +1,25 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qpopupmenu.h> 4#include <Q3Action>
5#include <q3popupmenu.h>
5#include <qpainter.h> 6#include <qpainter.h>
6#include <qwhatsthis.h> 7#include <q3whatsthis.h>
7#include <qpushbutton.h> 8#include <qpushbutton.h>
8#include <qmessagebox.h> 9#include <qmessagebox.h>
9#include <qlineedit.h> 10#include <qlineedit.h>
10#include <qtextcodec.h> 11#include <qtextcodec.h>
11#include <qfile.h> 12#include <qfile.h>
12#include <qdir.h> 13#include <qdir.h>
13#include <qapp.h> 14#include <qapplication.h>
14#include <qfileinfo.h> 15#include <qfileinfo.h>
15#include <qlabel.h> 16#include <qlabel.h>
16#include <qspinbox.h> 17#include <qspinbox.h>
17#include <qcheckbox.h> 18#include <qcheckbox.h>
18#include <qmap.h> 19#include <qmap.h>
19#include <qwmatrix.h> 20#include <qmatrix.h>
20#include <qtextbrowser.h> 21#include <q3textbrowser.h>
21#include <qtextstream.h> 22#include <q3textstream.h>
22#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
23#include <qpe/global.h> 24#include <qpe/global.h>
24#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
@@ -28,8 +29,17 @@
28#include <qtopia/qcopenvelope_qws.h> 29#include <qtopia/qcopenvelope_qws.h>
29//#include <unistd.h> // for sleep 30//#include <unistd.h> // for sleep
30#else 31#else
31#include <qtoolbar.h> 32#include <q3toolbar.h>
32#include <qapplication.h> 33#include <qapplication.h>
34//Added by qt3to4:
35#include <QResizeEvent>
36#include <QPixmap>
37#include <QCloseEvent>
38#include <QKeyEvent>
39#include <Q3VBoxLayout>
40#include <QHideEvent>
41#include <Q3CString>
42#include <Q3PtrList>
33//#include <resource.h> 43//#include <resource.h>
34 44
35#endif 45#endif
@@ -80,35 +90,35 @@ class KOex2phonePrefs : public QDialog
80 QDialog( parent, name, true ) 90 QDialog( parent, name, true )
81 { 91 {
82 setCaption( i18n("Export to phone options") ); 92 setCaption( i18n("Export to phone options") );
83 QVBoxLayout* lay = new QVBoxLayout( this ); 93 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
84 lay->setSpacing( 3 ); 94 lay->setSpacing( 3 );
85 lay->setMargin( 3 ); 95 lay->setMargin( 3 );
86 QLabel *lab; 96 QLabel *lab;
87 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 97 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
88 lab->setAlignment (AlignHCenter ); 98 lab->setAlignment (Qt::AlignHCenter );
89 QHBox* temphb; 99 Q3HBox* temphb;
90 temphb = new QHBox( this ); 100 temphb = new Q3HBox( this );
91 new QLabel( i18n("I/O device: "), temphb ); 101 new QLabel( i18n("I/O device: "), temphb );
92 mPhoneDevice = new QLineEdit( temphb); 102 mPhoneDevice = new QLineEdit( temphb);
93 lay->addWidget( temphb ); 103 lay->addWidget( temphb );
94 temphb = new QHBox( this ); 104 temphb = new Q3HBox( this );
95 new QLabel( i18n("Connection: "), temphb ); 105 new QLabel( i18n("Connection: "), temphb );
96 mPhoneConnection = new QLineEdit( temphb); 106 mPhoneConnection = new QLineEdit( temphb);
97 lay->addWidget( temphb ); 107 lay->addWidget( temphb );
98 temphb = new QHBox( this ); 108 temphb = new Q3HBox( this );
99 new QLabel( i18n("Model(opt.): "), temphb ); 109 new QLabel( i18n("Model(opt.): "), temphb );
100 mPhoneModel = new QLineEdit( temphb); 110 mPhoneModel = new QLineEdit( temphb);
101 lay->addWidget( temphb ); 111 lay->addWidget( temphb );
102 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 112 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
103 mWriteBackFuture->setChecked( true ); 113 mWriteBackFuture->setChecked( true );
104 lay->addWidget( mWriteBackFuture ); 114 lay->addWidget( mWriteBackFuture );
105 temphb = new QHBox( this ); 115 temphb = new Q3HBox( this );
106 new QLabel( i18n("Max. weeks in future: ") , temphb ); 116 new QLabel( i18n("Max. weeks in future: ") , temphb );
107 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 117 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
108 mWriteBackFutureWeeks->setValue( 8 ); 118 mWriteBackFutureWeeks->setValue( 8 );
109 lay->addWidget( temphb ); 119 lay->addWidget( temphb );
110 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 120 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
111 lab->setAlignment (AlignHCenter ); 121 lab->setAlignment (Qt::AlignHCenter );
112 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 122 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
113 lay->addWidget( ok ); 123 lay->addWidget( ok );
114 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 124 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
@@ -134,7 +144,7 @@ QPixmap* sgListViewJournalPix;
134 144
135int globalFlagBlockStartup; 145int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name ) : 146MainWindow::MainWindow( QWidget *parent, const char *name ) :
137 QMainWindow( parent, name ) 147 Q3MainWindow( parent, name )
138{ 148{
139 sgListViewCompletedPix[5] = &listviewPix; 149 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 150 sgListViewCompletedPix[0] = &listviewPix0;
@@ -185,18 +195,18 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
185 p->mCurrentDisplayedView = 0; 195 p->mCurrentDisplayedView = 0;
186 if ( p->mHourSize > 22 ) 196 if ( p->mHourSize > 22 )
187 p->mHourSize = 22; 197 p->mHourSize = 22;
188 QMainWindow::ToolBarDock tbd; 198 Qt::ToolBarDock tbd;
189 if ( p->mToolBarHor ) { 199 if ( p->mToolBarHor ) {
190 if ( p->mToolBarUp ) 200 if ( p->mToolBarUp )
191 tbd = Bottom; 201 tbd = Qt::Bottom;
192 else 202 else
193 tbd = Top; 203 tbd = Qt::Top;
194 } 204 }
195 else { 205 else {
196 if ( p->mToolBarUp ) 206 if ( p->mToolBarUp )
197 tbd = Right; 207 tbd = Qt::Right;
198 else 208 else
199 tbd = Left; 209 tbd = Qt::Left;
200 } 210 }
201 if ( KOPrefs::instance()->mUseAppColors ) 211 if ( KOPrefs::instance()->mUseAppColors )
202 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 212 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
@@ -213,15 +223,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
213{ 223{
214 if ( p->mToolBarHorF ) { 224 if ( p->mToolBarHorF ) {
215 if ( p->mToolBarUpF ) 225 if ( p->mToolBarUpF )
216 tbd = Bottom; 226 tbd = Qt::Bottom;
217 else 227 else
218 tbd = Top; 228 tbd = Qt::Top;
219 } 229 }
220 else { 230 else {
221 if ( p->mToolBarUpF ) 231 if ( p->mToolBarUpF )
222 tbd = Right; 232 tbd = Qt::Right;
223 else 233 else
224 tbd = Left; 234 tbd = Qt::Left;
225 } 235 }
226 filterToolBar = new QPEToolBar ( this ); 236 filterToolBar = new QPEToolBar ( this );
227 filterMenubar = new KMenuBar( 0 ); 237 filterMenubar = new KMenuBar( 0 );
@@ -230,7 +240,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
230 filterToolBar->setFocusPolicy( NoFocus ); 240 filterToolBar->setFocusPolicy( NoFocus );
231 filterMenubar->setFocusPolicy( NoFocus ); 241 filterMenubar->setFocusPolicy( NoFocus );
232#endif 242#endif
233 filterPopupMenu = new QPopupMenu( this ); 243 filterPopupMenu = new Q3PopupMenu( this );
234 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 244 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
235 QString addTest = "A"; 245 QString addTest = "A";
236 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 246 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
@@ -259,29 +269,29 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
259#endif 269#endif
260 if ( p->mToolBarHorV ) { 270 if ( p->mToolBarHorV ) {
261 if ( p->mToolBarUpV ) 271 if ( p->mToolBarUpV )
262 tbd = Bottom; 272 tbd = Qt::Bottom;
263 else 273 else
264 tbd = Top; 274 tbd = Qt::Top;
265 } 275 }
266 else { 276 else {
267 if ( p->mToolBarUpV ) 277 if ( p->mToolBarUpV )
268 tbd = Right; 278 tbd = Qt::Right;
269 else 279 else
270 tbd = Left; 280 tbd = Qt::Left;
271 } 281 }
272 viewToolBar = new QPEToolBar( this ); 282 viewToolBar = new QPEToolBar( this );
273 addToolBar (viewToolBar , tbd ); 283 addToolBar (viewToolBar , tbd );
274 if ( p->mToolBarHorN ) { 284 if ( p->mToolBarHorN ) {
275 if ( p->mToolBarUpN ) 285 if ( p->mToolBarUpN )
276 tbd = Bottom; 286 tbd = Qt::Bottom;
277 else 287 else
278 tbd = Top; 288 tbd = Qt::Top;
279 } 289 }
280 else { 290 else {
281 if ( p->mToolBarUpN ) 291 if ( p->mToolBarUpN )
282 tbd = Right; 292 tbd = Qt::Right;
283 else 293 else
284 tbd = Left; 294 tbd = Qt::Left;
285 } 295 }
286 navigatorToolBar = new QPEToolBar( this ); 296 navigatorToolBar = new QPEToolBar( this );
287 addToolBar (navigatorToolBar , tbd ); 297 addToolBar (navigatorToolBar , tbd );
@@ -440,9 +450,9 @@ void MainWindow::loadDataAfterStart()
440 connect( mView, SIGNAL( modifiedChanged( bool ) ), 450 connect( mView, SIGNAL( modifiedChanged( bool ) ),
441 SLOT( slotModifiedChanged( bool ) ) ); 451 SLOT( slotModifiedChanged( bool ) ) );
442#ifndef DESKTOP_VERSION 452#ifndef DESKTOP_VERSION
443 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 453 connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
444 connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); 454 connect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(recieve( const Q3CString&, const QByteArray& )));
445 disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); 455 disconnect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
446 if ( !mCStringMess.isEmpty() ) 456 if ( !mCStringMess.isEmpty() )
447 recieve( mCStringMess, mByteData ); 457 recieve( mCStringMess, mByteData );
448#endif 458#endif
@@ -509,7 +519,7 @@ void MainWindow::toggleBeamReceive()
509 qDebug("KO: Enable BeamReceive "); 519 qDebug("KO: Enable BeamReceive ");
510 brAction->setOn(true); 520 brAction->setOn(true);
511 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 521 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
512 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 522 QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(recieve( const Q3CString&, const QByteArray& )));
513#endif 523#endif
514} 524}
515void MainWindow::showMaximized () 525void MainWindow::showMaximized ()
@@ -600,22 +610,22 @@ void MainWindow::closeEvent( QCloseEvent* ce )
600 610
601 611
602} 612}
603void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) 613void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data )
604{ 614{
605 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 615 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
606 mCStringMess = cmsg; 616 mCStringMess = cmsg;
607 mByteData = data; 617 mByteData = data;
608} 618}
609void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 619void MainWindow::recieve( const Q3CString& cmsg, const QByteArray& data )
610{ 620{
611 QDataStream stream( data, IO_ReadOnly ); 621 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
612 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 622 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
613 //QString datamess; 623 //QString datamess;
614 //qDebug("message "); 624 //qDebug("message ");
615 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 625 qDebug("KO: QCOP message received: %s ", cmsg.data() );
616 626
617 if ( cmsg == "setDocument(QString)" ) { 627 if ( cmsg == "setDocument(QString)" ) {
618 QDataStream stream( data, IO_ReadOnly ); 628 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
619 QString fileName; 629 QString fileName;
620 stream >> fileName; 630 stream >> fileName;
621 //qDebug("filename %s ", fileName.latin1()); 631 //qDebug("filename %s ", fileName.latin1());
@@ -744,21 +754,21 @@ void MainWindow::initActions()
744 KOPrefs *p = KOPrefs::instance(); 754 KOPrefs *p = KOPrefs::instance();
745 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 755 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
746 756
747 QPopupMenu *viewMenu = new QPopupMenu( this ); 757 Q3PopupMenu *viewMenu = new Q3PopupMenu( this );
748 QPopupMenu *actionMenu = new QPopupMenu( this ); 758 Q3PopupMenu *actionMenu = new Q3PopupMenu( this );
749 mCurrentItemMenu = new QPopupMenu ( this ); 759 mCurrentItemMenu = new Q3PopupMenu ( this );
750 QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); 760 Q3PopupMenu *nextConflictMenu = new Q3PopupMenu ( this );
751 QPopupMenu *importMenu = new QPopupMenu( this ); 761 Q3PopupMenu *importMenu = new Q3PopupMenu( this );
752 QPopupMenu *importMenu_X = new QPopupMenu( this ); 762 Q3PopupMenu *importMenu_X = new Q3PopupMenu( this );
753 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 763 Q3PopupMenu *exportMenu_X = new Q3PopupMenu( this );
754 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 764 Q3PopupMenu *beamMenu_X = new Q3PopupMenu( this );
755 selectFilterMenu = new QPopupMenu( this ); 765 selectFilterMenu = new Q3PopupMenu( this );
756 selectFilterMenu->setCheckable( true ); 766 selectFilterMenu->setCheckable( true );
757 syncMenu = new QPopupMenu( this ); 767 syncMenu = new Q3PopupMenu( this );
758 configureAgendaMenu = new QPopupMenu( this ); 768 configureAgendaMenu = new Q3PopupMenu( this );
759 configureToolBarMenu = new QPopupMenu( this ); 769 configureToolBarMenu = new Q3PopupMenu( this );
760 QPopupMenu *helpMenu = new QPopupMenu( this ); 770 Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
761 QIconSet icon; 771 QIcon icon;
762 int pixWid = 22, pixHei = 22; 772 int pixWid = 22, pixHei = 22;
763 QString pathString = ""; 773 QString pathString = "";
764 if ( !p->mToolBarMiniIcons ) { 774 if ( !p->mToolBarMiniIcons ) {
@@ -791,7 +801,7 @@ void MainWindow::initActions()
791 menuBar1->insertItem( i18n("Help"), helpMenu ); 801 menuBar1->insertItem( i18n("Help"), helpMenu );
792 } else { 802 } else {
793 menuBar1 = new KMenuBar( iconToolBar ); 803 menuBar1 = new KMenuBar( iconToolBar );
794 QPopupMenu *menuBar = new QPopupMenu( this ); 804 Q3PopupMenu *menuBar = new Q3PopupMenu( this );
795 icon = loadPixmap( pathString + "z_menu" ); 805 icon = loadPixmap( pathString + "z_menu" );
796 menuBar1->insertItem( icon.pixmap(), menuBar); 806 menuBar1->insertItem( icon.pixmap(), menuBar);
797 //menuBar1->insertItem( i18n("ME"), menuBar); 807 //menuBar1->insertItem( i18n("ME"), menuBar);
@@ -818,7 +828,7 @@ void MainWindow::initActions()
818 mWeekPixmap.resize( pixWid , pixHei ); 828 mWeekPixmap.resize( pixWid , pixHei );
819 mWeekPixmap.fill( mWeekBgColor ); 829 mWeekPixmap.fill( mWeekBgColor );
820 icon = mWeekPixmap; 830 icon = mWeekPixmap;
821 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 831 mWeekAction = new Q3Action( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
822 if ( p-> mShowIconWeekNum ) 832 if ( p-> mShowIconWeekNum )
823 mWeekAction->addTo( iconToolBar ); 833 mWeekAction->addTo( iconToolBar );
824 mWeekFont = font(); 834 mWeekFont = font();
@@ -840,18 +850,18 @@ void MainWindow::initActions()
840 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 850 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
841 if ( p->mShowIconFilterview ) { 851 if ( p->mShowIconFilterview ) {
842 icon = loadPixmap( pathString + "filter" ); 852 icon = loadPixmap( pathString + "filter" );
843 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 853 actionFilterMenuTB = new Q3Action( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
844 connect( actionFilterMenuTB, SIGNAL( activated() ), 854 connect( actionFilterMenuTB, SIGNAL( activated() ),
845 this, SLOT( fillFilterMenuTB() ) ); 855 this, SLOT( fillFilterMenuTB() ) );
846 actionFilterMenuTB->addTo( iconToolBar ); 856 actionFilterMenuTB->addTo( iconToolBar );
847 selectFilterMenuTB = new QPopupMenu( this ); 857 selectFilterMenuTB = new Q3PopupMenu( this );
848 selectFilterMenuTB->setCheckable( true ); 858 selectFilterMenuTB->setCheckable( true );
849 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 859 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
850 } 860 }
851 861
852 //#endif 862 //#endif
853 // ****************** 863 // ******************
854 QAction *action; 864 Q3Action *action;
855 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 865 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
856 configureToolBarMenu->setCheckable( true ); 866 configureToolBarMenu->setCheckable( true );
857 867
@@ -866,35 +876,35 @@ void MainWindow::initActions()
866 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 876 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
867 this, SLOT( showConfigureAgenda( ) ) ); 877 this, SLOT( showConfigureAgenda( ) ) );
868 icon = loadPixmap( pathString + "today" ); 878 icon = loadPixmap( pathString + "today" );
869 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 879 Q3Action* today_action = new Q3Action( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
870 today_action->addTo( actionMenu ); 880 today_action->addTo( actionMenu );
871 connect( today_action, SIGNAL( activated() ), 881 connect( today_action, SIGNAL( activated() ),
872 mView, SLOT( goToday() ) ); 882 mView, SLOT( goToday() ) );
873 883
874 icon = loadPixmap( pathString + "picker" ); 884 icon = loadPixmap( pathString + "picker" );
875 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 885 Q3Action* dPickerAction = new Q3Action( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
876 dPickerAction->addTo( actionMenu ); 886 dPickerAction->addTo( actionMenu );
877 connect( dPickerAction, SIGNAL( activated() ), 887 connect( dPickerAction, SIGNAL( activated() ),
878 mView, SLOT( showDatePicker() ) ); 888 mView, SLOT( showDatePicker() ) );
879 889
880 icon = loadPixmap( pathString + "search" ); 890 icon = loadPixmap( pathString + "search" );
881 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 891 Q3Action* search_action = new Q3Action( i18n("Search"), icon, i18n("Search..."), 0, this );
882 search_action->addTo( actionMenu ); 892 search_action->addTo( actionMenu );
883 connect( search_action, SIGNAL( activated() ), 893 connect( search_action, SIGNAL( activated() ),
884 mView->dialogManager(), SLOT( showSearchDialog() ) ); 894 mView->dialogManager(), SLOT( showSearchDialog() ) );
885 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); 895 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
886 896
887 action = new QAction( "Undo Delete", i18n("All events"), 0, this ); 897 action = new Q3Action( "Undo Delete", i18n("All events"), 0, this );
888 action->addTo( nextConflictMenu ); 898 action->addTo( nextConflictMenu );
889 connect( action, SIGNAL( activated() ), 899 connect( action, SIGNAL( activated() ),
890 mView, SLOT( conflictAll() ) ); 900 mView, SLOT( conflictAll() ) );
891 901
892 action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); 902 action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this );
893 action->addTo( nextConflictMenu ); 903 action->addTo( nextConflictMenu );
894 connect( action, SIGNAL( activated() ), 904 connect( action, SIGNAL( activated() ),
895 mView, SLOT( conflictAllday() ) ); 905 mView, SLOT( conflictAllday() ) );
896 906
897 action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); 907 action = new Q3Action( "Undo Delete", i18n("Events with time"), 0, this );
898 action->addTo( nextConflictMenu ); 908 action->addTo( nextConflictMenu );
899 connect( action, SIGNAL( activated() ), 909 connect( action, SIGNAL( activated() ),
900 mView, SLOT( conflictNotAll() ) ); 910 mView, SLOT( conflictNotAll() ) );
@@ -902,16 +912,16 @@ void MainWindow::initActions()
902 actionMenu->insertSeparator(); 912 actionMenu->insertSeparator();
903 913
904 icon = loadPixmap( pathString + "newevent" ); 914 icon = loadPixmap( pathString + "newevent" );
905 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 915 Q3Action* ne_action = new Q3Action( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
906 ne_action->addTo( mCurrentItemMenu ); 916 ne_action->addTo( mCurrentItemMenu );
907 connect( ne_action, SIGNAL( activated() ), 917 connect( ne_action, SIGNAL( activated() ),
908 mView, SLOT( newEvent() ) ); 918 mView, SLOT( newEvent() ) );
909 icon = loadPixmap( pathString + "newtodo" ); 919 icon = loadPixmap( pathString + "newtodo" );
910 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 920 Q3Action* nt_action = new Q3Action( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
911 nt_action->addTo( mCurrentItemMenu ); 921 nt_action->addTo( mCurrentItemMenu );
912 connect( nt_action, SIGNAL( activated() ), 922 connect( nt_action, SIGNAL( activated() ),
913 mView, SLOT( newTodo() ) ); 923 mView, SLOT( newTodo() ) );
914 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 924 mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0,
915 this ); 925 this );
916 mNewSubTodoAction->addTo( mCurrentItemMenu ); 926 mNewSubTodoAction->addTo( mCurrentItemMenu );
917 connect( mNewSubTodoAction, SIGNAL( activated() ), 927 connect( mNewSubTodoAction, SIGNAL( activated() ),
@@ -930,44 +940,44 @@ void MainWindow::initActions()
930 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 940 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
931 941
932 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 942 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
933 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); 943 mShowAction = new Q3Action( "show_incidence", i18n("Show"), 0, this );
934 mShowAction->addTo( mCurrentItemMenu ); 944 mShowAction->addTo( mCurrentItemMenu );
935 connect( mShowAction, SIGNAL( activated() ), 945 connect( mShowAction, SIGNAL( activated() ),
936 mView, SLOT( showIncidence() ) ); 946 mView, SLOT( showIncidence() ) );
937 947
938 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 948 mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this );
939 mEditAction->addTo( mCurrentItemMenu ); 949 mEditAction->addTo( mCurrentItemMenu );
940 connect( mEditAction, SIGNAL( activated() ), 950 connect( mEditAction, SIGNAL( activated() ),
941 mView, SLOT( editIncidence() ) ); 951 mView, SLOT( editIncidence() ) );
942 952
943 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 953 mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this );
944 mDeleteAction->addTo( mCurrentItemMenu ); 954 mDeleteAction->addTo( mCurrentItemMenu );
945 connect( mDeleteAction, SIGNAL( activated() ), 955 connect( mDeleteAction, SIGNAL( activated() ),
946 mView, SLOT( deleteIncidence() ) ); 956 mView, SLOT( deleteIncidence() ) );
947 957
948 958
949 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 959 mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this );
950 mCloneAction->addTo( mCurrentItemMenu ); 960 mCloneAction->addTo( mCurrentItemMenu );
951 connect( mCloneAction, SIGNAL( activated() ), 961 connect( mCloneAction, SIGNAL( activated() ),
952 mView, SLOT( cloneIncidence() ) ); 962 mView, SLOT( cloneIncidence() ) );
953 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 963 mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this );
954 mMoveAction->addTo( mCurrentItemMenu ); 964 mMoveAction->addTo( mCurrentItemMenu );
955 connect( mMoveAction, SIGNAL( activated() ), 965 connect( mMoveAction, SIGNAL( activated() ),
956 mView, SLOT( moveIncidence() ) ); 966 mView, SLOT( moveIncidence() ) );
957#ifndef DESKTOP_VERSION 967#ifndef DESKTOP_VERSION
958 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 968 mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this );
959 mBeamAction->addTo(mCurrentItemMenu ); 969 mBeamAction->addTo(mCurrentItemMenu );
960 connect( mBeamAction, SIGNAL( activated() ), 970 connect( mBeamAction, SIGNAL( activated() ),
961 mView, SLOT( beamIncidence() ) ); 971 mView, SLOT( beamIncidence() ) );
962#endif 972#endif
963 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 973 mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
964 mCancelAction->addTo( mCurrentItemMenu ); 974 mCancelAction->addTo( mCurrentItemMenu );
965 connect( mCancelAction, SIGNAL( activated() ), 975 connect( mCancelAction, SIGNAL( activated() ),
966 mView, SLOT( toggleCancelIncidence() ) ); 976 mView, SLOT( toggleCancelIncidence() ) );
967 977
968 978
969 mCurrentItemMenu->insertSeparator(); 979 mCurrentItemMenu->insertSeparator();
970 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 980 action = new Q3Action( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
971 action->addTo( mCurrentItemMenu ); 981 action->addTo( mCurrentItemMenu );
972 connect( action, SIGNAL( activated() ), 982 connect( action, SIGNAL( activated() ),
973 mView, SLOT( undo_delete() ) ); 983 mView, SLOT( undo_delete() ) );
@@ -979,7 +989,7 @@ void MainWindow::initActions()
979 icon = SmallIcon("1leftrightarrow" ); 989 icon = SmallIcon("1leftrightarrow" );
980 } 990 }
981 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 991 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
982 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 992 Q3Action* FSaction = new Q3Action( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
983 FSaction->addTo( viewMenu ); 993 FSaction->addTo( viewMenu );
984 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 994 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
985 995
@@ -987,21 +997,21 @@ void MainWindow::initActions()
987 icon = loadPixmap( pathString + "filter" ); 997 icon = loadPixmap( pathString + "filter" );
988 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 998 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
989 icon = loadPixmap( pathString + "configure" ); 999 icon = loadPixmap( pathString + "configure" );
990 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 1000 action = new Q3Action( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
991 action->addTo( viewMenu ); 1001 action->addTo( viewMenu );
992 connect( action, SIGNAL( activated() ), 1002 connect( action, SIGNAL( activated() ),
993 mView, SLOT( toggleFilter() ) ); 1003 mView, SLOT( toggleFilter() ) );
994 mToggleFilter = action; 1004 mToggleFilter = action;
995 icon = loadPixmap( pathString + "navi" ); 1005 icon = loadPixmap( pathString + "navi" );
996 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 1006 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
997 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 1007 action = new Q3Action( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
998 action->addTo( viewMenu ); 1008 action->addTo( viewMenu );
999 connect( action, SIGNAL( activated() ), 1009 connect( action, SIGNAL( activated() ),
1000 mView, SLOT( toggleDateNavigatorWidget() ) ); 1010 mView, SLOT( toggleDateNavigatorWidget() ) );
1001 mToggleNav = action ; 1011 mToggleNav = action ;
1002 icon = loadPixmap( pathString + "allday" ); 1012 icon = loadPixmap( pathString + "allday" );
1003 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 1013 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
1004 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 1014 action = new Q3Action( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
1005 action->addTo( viewMenu ); 1015 action->addTo( viewMenu );
1006 connect( action, SIGNAL( activated() ), 1016 connect( action, SIGNAL( activated() ),
1007 mView, SLOT( toggleAllDaySize() ) ); 1017 mView, SLOT( toggleAllDaySize() ) );
@@ -1031,14 +1041,14 @@ void MainWindow::initActions()
1031 1041
1032 icon = loadPixmap( pathString + "whatsnext" ); 1042 icon = loadPixmap( pathString + "whatsnext" );
1033 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 1043 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
1034 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 1044 Q3Action* whatsnext_action = new Q3Action( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
1035 whatsnext_action->addTo( viewMenu ); 1045 whatsnext_action->addTo( viewMenu );
1036 connect( whatsnext_action, SIGNAL( activated() ), 1046 connect( whatsnext_action, SIGNAL( activated() ),
1037 mView->viewManager(), SLOT( showWhatsNextView() ) ); 1047 mView->viewManager(), SLOT( showWhatsNextView() ) );
1038 1048
1039 icon = loadPixmap( pathString + "xdays" ); 1049 icon = loadPixmap( pathString + "xdays" );
1040 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 1050 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
1041 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 1051 Q3Action* xdays_action = new Q3Action( i18n("Next days"), icon, i18n("Next days"), 0, this );
1042 xdays_action->addTo( viewMenu ); 1052 xdays_action->addTo( viewMenu );
1043 connect( xdays_action, SIGNAL( activated() ), 1053 connect( xdays_action, SIGNAL( activated() ),
1044 mView->viewManager(), SLOT( showNextXView() ) ); 1054 mView->viewManager(), SLOT( showNextXView() ) );
@@ -1046,7 +1056,7 @@ void MainWindow::initActions()
1046 1056
1047 icon = loadPixmap( pathString + "journal" ); 1057 icon = loadPixmap( pathString + "journal" );
1048 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 1058 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
1049 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 1059 Q3Action* viewjournal_action = new Q3Action( i18n("Journal"), icon, i18n("Journal"), 0, this );
1050 viewjournal_action->addTo( viewMenu ); 1060 viewjournal_action->addTo( viewMenu );
1051 connect( viewjournal_action, SIGNAL( activated() ), 1061 connect( viewjournal_action, SIGNAL( activated() ),
1052 mView->viewManager(), SLOT( showJournalView() ) ); 1062 mView->viewManager(), SLOT( showJournalView() ) );
@@ -1054,7 +1064,7 @@ void MainWindow::initActions()
1054 1064
1055 icon = loadPixmap( pathString + "day" ); 1065 icon = loadPixmap( pathString + "day" );
1056 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 1066 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
1057 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 1067 Q3Action* day1_action = new Q3Action( i18n("Day View"), icon, i18n("Day View"), 0, this );
1058 day1_action->addTo( viewMenu ); 1068 day1_action->addTo( viewMenu );
1059 // action->addTo( toolBar ); 1069 // action->addTo( toolBar );
1060 connect( day1_action, SIGNAL( activated() ), 1070 connect( day1_action, SIGNAL( activated() ),
@@ -1062,42 +1072,42 @@ void MainWindow::initActions()
1062 1072
1063 icon = loadPixmap( pathString + "workweek" ); 1073 icon = loadPixmap( pathString + "workweek" );
1064 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 1074 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
1065 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 1075 Q3Action* day5_action = new Q3Action( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
1066 day5_action->addTo( viewMenu ); 1076 day5_action->addTo( viewMenu );
1067 connect( day5_action, SIGNAL( activated() ), 1077 connect( day5_action, SIGNAL( activated() ),
1068 mView->viewManager(), SLOT( showWorkWeekView() ) ); 1078 mView->viewManager(), SLOT( showWorkWeekView() ) );
1069 1079
1070 icon = loadPixmap( pathString + "week" ); 1080 icon = loadPixmap( pathString + "week" );
1071 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 1081 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
1072 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 1082 Q3Action* day7_action = new Q3Action( i18n("Week"), icon, i18n("Week"), 0, this );
1073 day7_action->addTo( viewMenu ); 1083 day7_action->addTo( viewMenu );
1074 connect( day7_action, SIGNAL( activated() ), 1084 connect( day7_action, SIGNAL( activated() ),
1075 mView->viewManager(), SLOT( showWeekView() ) ); 1085 mView->viewManager(), SLOT( showWeekView() ) );
1076 1086
1077 icon = loadPixmap( pathString + "workweek2" ); 1087 icon = loadPixmap( pathString + "workweek2" );
1078 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 1088 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
1079 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 1089 Q3Action* day6_action = new Q3Action( i18n("List week"), icon, i18n("List week"), 0, this );
1080 day6_action->addTo( viewMenu ); 1090 day6_action->addTo( viewMenu );
1081 connect( day6_action, SIGNAL( activated() ), 1091 connect( day6_action, SIGNAL( activated() ),
1082 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 1092 mView->viewManager(), SLOT( showMonthViewWeek() ) );
1083 1093
1084 icon = loadPixmap( pathString + "month" ); 1094 icon = loadPixmap( pathString + "month" );
1085 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 1095 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
1086 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 1096 Q3Action* month_action = new Q3Action( i18n("Month"), icon, i18n("Month"), 0, this );
1087 month_action->addTo( viewMenu ); 1097 month_action->addTo( viewMenu );
1088 connect( month_action, SIGNAL( activated() ), 1098 connect( month_action, SIGNAL( activated() ),
1089 mView->viewManager(), SLOT( showMonthView() ) ); 1099 mView->viewManager(), SLOT( showMonthView() ) );
1090 1100
1091 icon = loadPixmap( pathString + "list" ); 1101 icon = loadPixmap( pathString + "list" );
1092 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 1102 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
1093 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 1103 Q3Action* showlist_action = new Q3Action( i18n("List View"), icon, i18n("List View"), 0, this );
1094 showlist_action->addTo( viewMenu ); 1104 showlist_action->addTo( viewMenu );
1095 connect( showlist_action, SIGNAL( activated() ), 1105 connect( showlist_action, SIGNAL( activated() ),
1096 mView->viewManager(), SLOT( showListView() ) ); 1106 mView->viewManager(), SLOT( showListView() ) );
1097 1107
1098 icon = loadPixmap( pathString + "todo" ); 1108 icon = loadPixmap( pathString + "todo" );
1099 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 1109 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
1100 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 1110 Q3Action* todoview_action = new Q3Action( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
1101 todoview_action->addTo( viewMenu ); 1111 todoview_action->addTo( viewMenu );
1102 connect( todoview_action, SIGNAL( activated() ), 1112 connect( todoview_action, SIGNAL( activated() ),
1103 mView->viewManager(), SLOT( showTodoView() ) ); 1113 mView->viewManager(), SLOT( showTodoView() ) );
@@ -1105,7 +1115,7 @@ void MainWindow::initActions()
1105 1115
1106 1116
1107#if 0 1117#if 0
1108 action = new QAction( "view_timespan", "Time Span", 0, this ); 1118 action = new Q3Action( "view_timespan", "Time Span", 0, this );
1109 action->addTo( viewMenu ); 1119 action->addTo( viewMenu );
1110 connect( action, SIGNAL( activated() ), 1120 connect( action, SIGNAL( activated() ),
1111 mView->viewManager(), SLOT( showTimeSpanView() ) ); 1121 mView->viewManager(), SLOT( showTimeSpanView() ) );
@@ -1113,7 +1123,7 @@ void MainWindow::initActions()
1113 1123
1114 1124
1115 1125
1116 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, 1126 action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0,
1117 this ); 1127 this );
1118 action->addTo( actionMenu ); 1128 action->addTo( actionMenu );
1119 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1129 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
@@ -1125,12 +1135,12 @@ void MainWindow::initActions()
1125 1135
1126 1136
1127 actionMenu->insertSeparator(); 1137 actionMenu->insertSeparator();
1128 action = new QAction( "manage cat", i18n("Edit category list..."), 0, 1138 action = new Q3Action( "manage cat", i18n("Edit category list..."), 0,
1129 this ); 1139 this );
1130 action->addTo( actionMenu ); 1140 action->addTo( actionMenu );
1131 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); 1141 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
1132 1142
1133 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1143 action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0,
1134 this ); 1144 this );
1135 action->addTo( actionMenu ); 1145 action->addTo( actionMenu );
1136 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1146 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
@@ -1138,15 +1148,15 @@ void MainWindow::initActions()
1138 1148
1139 actionMenu->insertSeparator(); 1149 actionMenu->insertSeparator();
1140 icon = loadPixmap( pathString + "configure" ); 1150 icon = loadPixmap( pathString + "configure" );
1141 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 1151 action = new Q3Action( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
1142 action->addTo( actionMenu ); 1152 action->addTo( actionMenu );
1143 connect( action, SIGNAL( activated() ), 1153 connect( action, SIGNAL( activated() ),
1144 mView, SLOT( edit_options() ) ); 1154 mView, SLOT( edit_options() ) );
1145 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); 1155 action = new Q3Action( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
1146 action->addTo( actionMenu ); 1156 action->addTo( actionMenu );
1147 connect( action, SIGNAL( activated() ), 1157 connect( action, SIGNAL( activated() ),
1148 this, SLOT( calHint() ) ); 1158 this, SLOT( calHint() ) );
1149 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 1159 action = new Q3Action( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
1150 action->addTo( actionMenu ); 1160 action->addTo( actionMenu );
1151 connect( action, SIGNAL( activated() ), 1161 connect( action, SIGNAL( activated() ),
1152 mView, SLOT( edit_global_options() ) ); 1162 mView, SLOT( edit_global_options() ) );
@@ -1155,29 +1165,29 @@ void MainWindow::initActions()
1155 1165
1156 } 1166 }
1157 // actionMenu->insertSeparator(); 1167 // actionMenu->insertSeparator();
1158 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1168 action = new Q3Action( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1159 this ); 1169 this );
1160 action->addTo( importMenu_X ); 1170 action->addTo( importMenu_X );
1161 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1171 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1162 action = new QAction( "import_quick", i18n("Import last file"), 0, 1172 action = new Q3Action( "import_quick", i18n("Import last file"), 0,
1163 this ); 1173 this );
1164 action->addTo( importMenu_X ); 1174 action->addTo( importMenu_X );
1165 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1175 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1166 importMenu_X->insertSeparator(); 1176 importMenu_X->insertSeparator();
1167 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1177 action = new Q3Action( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1168 this ); 1178 this );
1169 action->addTo( importMenu_X ); 1179 action->addTo( importMenu_X );
1170 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1180 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1171 //#ifndef DESKTOP_VERSION 1181 //#ifndef DESKTOP_VERSION
1172 importMenu_X->insertSeparator(); 1182 importMenu_X->insertSeparator();
1173 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1183 action = new Q3Action( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1174 this ); 1184 this );
1175 action->addTo( importMenu_X ); 1185 action->addTo( importMenu_X );
1176 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1186 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1177 //#else 1187 //#else
1178#ifdef _OL_IMPORT_ 1188#ifdef _OL_IMPORT_
1179 importMenu_X->insertSeparator(); 1189 importMenu_X->insertSeparator();
1180 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1190 action = new Q3Action( "import_ol", i18n("Import from OL"), 0,
1181 this ); 1191 this );
1182 action->addTo( importMenu_X ); 1192 action->addTo( importMenu_X );
1183 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1193 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
@@ -1186,30 +1196,30 @@ void MainWindow::initActions()
1186 1196
1187 //importMenu->insertSeparator(); 1197 //importMenu->insertSeparator();
1188#if 0 1198#if 0
1189 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1199 action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0,
1190 this ); 1200 this );
1191 action->addTo( importMenu ); 1201 action->addTo( importMenu );
1192 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1202 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1193#endif 1203#endif
1194 action = new QAction( "save_cal", i18n("Save Backup..."), 0, 1204 action = new Q3Action( "save_cal", i18n("Save Backup..."), 0,
1195 this ); 1205 this );
1196 action->addTo( importMenu ); 1206 action->addTo( importMenu );
1197 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1207 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1198 importMenu->insertSeparator(); 1208 importMenu->insertSeparator();
1199 importMenu->insertItem( i18n("Import"), importMenu_X ); 1209 importMenu->insertItem( i18n("Import"), importMenu_X );
1200 //importMenu->insertSeparator(); 1210 //importMenu->insertSeparator();
1201 action = new QAction( "export ical", i18n("Export All Data"), 0, 1211 action = new Q3Action( "export ical", i18n("Export All Data"), 0,
1202 this ); 1212 this );
1203 action->addTo( exportMenu_X ); 1213 action->addTo( exportMenu_X );
1204 connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); 1214 connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) );
1205 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1215 action = new Q3Action( "import_qtopia", i18n("Export VCalendar"), 0,
1206 this ); 1216 this );
1207 action->addTo( exportMenu_X ); 1217 action->addTo( exportMenu_X );
1208 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1218 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1209 1219
1210 1220
1211 //LR 1221 //LR
1212 QPopupMenu *ex2phone = new QPopupMenu( this ); 1222 Q3PopupMenu *ex2phone = new Q3PopupMenu( this );
1213 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1223 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1214 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1224 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1215 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1225 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
@@ -1219,18 +1229,18 @@ void MainWindow::initActions()
1219 mPrintSelAction = 0; 1229 mPrintSelAction = 0;
1220#ifndef DESKTOP_VERSION 1230#ifndef DESKTOP_VERSION
1221 //importMenu->insertSeparator(); 1231 //importMenu->insertSeparator();
1222 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1232 brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0,
1223 this ); 1233 this );
1224 brAction->addTo( beamMenu_X ); 1234 brAction->addTo( beamMenu_X );
1225 brAction->setToggleAction (true ) ; 1235 brAction->setToggleAction (true ) ;
1226 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1236 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1227 1237
1228 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1238 action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0,
1229 this ); 1239 this );
1230 action->addTo( beamMenu_X ); 1240 action->addTo( beamMenu_X );
1231 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1241 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1232 1242
1233 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1243 action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0,
1234 this ); 1244 this );
1235 action->addTo( beamMenu_X ); 1245 action->addTo( beamMenu_X );
1236 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1246 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
@@ -1238,31 +1248,31 @@ void MainWindow::initActions()
1238#else 1248#else
1239 //importMenu->insertSeparator(); 1249 //importMenu->insertSeparator();
1240 icon = loadPixmap( pathString + "print" ); 1250 icon = loadPixmap( pathString + "print" );
1241 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1251 action = new Q3Action( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1242 action->addTo( beamMenu_X ); 1252 action->addTo( beamMenu_X );
1243 connect( action, SIGNAL( activated() ), 1253 connect( action, SIGNAL( activated() ),
1244 this, SLOT( printCal() ) ); 1254 this, SLOT( printCal() ) );
1245 1255
1246 icon = loadPixmap( pathString + "week" ); 1256 icon = loadPixmap( pathString + "week" );
1247 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1257 action = new Q3Action( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1248 action->addTo( beamMenu_X ); 1258 action->addTo( beamMenu_X );
1249 connect( action, SIGNAL( activated() ), 1259 connect( action, SIGNAL( activated() ),
1250 this, SLOT( printSel() ) ); 1260 this, SLOT( printSel() ) );
1251 icon = loadPixmap( pathString + "whatsnext" ); 1261 icon = loadPixmap( pathString + "whatsnext" );
1252 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1262 action = new Q3Action( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1253 action->addTo( beamMenu_X ); 1263 action->addTo( beamMenu_X );
1254 connect( action, SIGNAL( activated() ), 1264 connect( action, SIGNAL( activated() ),
1255 mView->viewManager(), SLOT( slotprintWNV() ) ); 1265 mView->viewManager(), SLOT( slotprintWNV() ) );
1256 1266
1257 1267
1258 icon = loadPixmap( pathString + "list" ); 1268 icon = loadPixmap( pathString + "list" );
1259 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1269 action = new Q3Action( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1260 action->addTo( beamMenu_X ); 1270 action->addTo( beamMenu_X );
1261 connect( action, SIGNAL( activated() ), 1271 connect( action, SIGNAL( activated() ),
1262 this, SLOT( printListView() ) ); 1272 this, SLOT( printListView() ) );
1263 1273
1264 icon = loadPixmap( pathString + "newevent" ); 1274 icon = loadPixmap( pathString + "newevent" );
1265 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1275 action = new Q3Action( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1266 action->addTo( beamMenu_X ); 1276 action->addTo( beamMenu_X );
1267 connect( action, SIGNAL( activated() ), 1277 connect( action, SIGNAL( activated() ),
1268 mView, SLOT( slotprintSelInc() ) ); 1278 mView, SLOT( slotprintSelInc() ) );
@@ -1271,11 +1281,11 @@ void MainWindow::initActions()
1271#endif 1281#endif
1272 1282
1273 importMenu->insertSeparator(); 1283 importMenu->insertSeparator();
1274 action = new QAction( "beam all", i18n("Save"), 0, 1284 action = new Q3Action( "beam all", i18n("Save"), 0,
1275 this ); 1285 this );
1276 action->addTo( importMenu ); 1286 action->addTo( importMenu );
1277 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1287 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1278 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1288 action = new Q3Action( "beam all", i18n("Exit (+save)"), 0,
1279 this ); 1289 this );
1280 action->addTo( importMenu ); 1290 action->addTo( importMenu );
1281 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1291 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
@@ -1284,59 +1294,59 @@ void MainWindow::initActions()
1284 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1294 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1285 icon = loadPixmap( "korganizer/korganizer" ); 1295 icon = loadPixmap( "korganizer/korganizer" );
1286 1296
1287 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1297 action = new Q3Action( "Whats New", i18n("What's new?"), 0,this );
1288 action->addTo( helpMenu ); 1298 action->addTo( helpMenu );
1289 connect( action, SIGNAL( activated() ), 1299 connect( action, SIGNAL( activated() ),
1290 SLOT( whatsNew() ) ); 1300 SLOT( whatsNew() ) );
1291 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1301 action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this );
1292 action->addTo( helpMenu ); 1302 action->addTo( helpMenu );
1293 connect( action, SIGNAL( activated() ), 1303 connect( action, SIGNAL( activated() ),
1294 SLOT( features() ) ); 1304 SLOT( features() ) );
1295 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1305 action = new Q3Action( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1296 action->addTo( helpMenu ); 1306 action->addTo( helpMenu );
1297 connect( action, SIGNAL( activated() ), 1307 connect( action, SIGNAL( activated() ),
1298 SLOT( keyBindings() ) ); 1308 SLOT( keyBindings() ) );
1299 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1309 action = new Q3Action( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1300 action->addTo( helpMenu ); 1310 action->addTo( helpMenu );
1301 connect( action, SIGNAL( activated() ), 1311 connect( action, SIGNAL( activated() ),
1302 SLOT( storagehowto() ) ); 1312 SLOT( storagehowto() ) );
1303 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1313 action = new Q3Action( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1304 action->addTo( helpMenu ); 1314 action->addTo( helpMenu );
1305 connect( action, SIGNAL( activated() ), 1315 connect( action, SIGNAL( activated() ),
1306 SLOT( timetrackinghowto() ) ); 1316 SLOT( timetrackinghowto() ) );
1307 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1317 action = new Q3Action( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1308 action->addTo( helpMenu ); 1318 action->addTo( helpMenu );
1309 connect( action, SIGNAL( activated() ), 1319 connect( action, SIGNAL( activated() ),
1310 SLOT( synchowto() ) ); 1320 SLOT( synchowto() ) );
1311 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1321 action = new Q3Action( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1312 action->addTo( helpMenu ); 1322 action->addTo( helpMenu );
1313 connect( action, SIGNAL( activated() ), 1323 connect( action, SIGNAL( activated() ),
1314 SLOT( kdesynchowto() ) ); 1324 SLOT( kdesynchowto() ) );
1315 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1325 action = new Q3Action( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1316 action->addTo( helpMenu ); 1326 action->addTo( helpMenu );
1317 connect( action, SIGNAL( activated() ), 1327 connect( action, SIGNAL( activated() ),
1318 SLOT( multisynchowto() ) ); 1328 SLOT( multisynchowto() ) );
1319 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1329 action = new Q3Action( "Auto saving", i18n("Auto saving..."), 0, this );
1320 action->addTo( helpMenu ); 1330 action->addTo( helpMenu );
1321 connect( action, SIGNAL( activated() ), 1331 connect( action, SIGNAL( activated() ),
1322 SLOT( aboutAutoSaving() ) ); 1332 SLOT( aboutAutoSaving() ) );
1323 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1333 action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this );
1324 action->addTo( helpMenu ); 1334 action->addTo( helpMenu );
1325 connect( action, SIGNAL( activated() ), 1335 connect( action, SIGNAL( activated() ),
1326 SLOT( aboutKnownBugs() ) ); 1336 SLOT( aboutKnownBugs() ) );
1327 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1337 action = new Q3Action( "Translate Howto", i18n("User translation..."), 0,this );
1328 action->addTo( helpMenu ); 1338 action->addTo( helpMenu );
1329 connect( action, SIGNAL( activated() ), 1339 connect( action, SIGNAL( activated() ),
1330 SLOT( usertrans() ) ); 1340 SLOT( usertrans() ) );
1331 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1341 action = new Q3Action( "Frequently asked questions", i18n("FAQ..."), 0,this );
1332 action->addTo( helpMenu ); 1342 action->addTo( helpMenu );
1333 connect( action, SIGNAL( activated() ), 1343 connect( action, SIGNAL( activated() ),
1334 SLOT( faq() ) ); 1344 SLOT( faq() ) );
1335 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1345 action = new Q3Action( "licence", i18n("Licence..."), 0, this );
1336 action->addTo( helpMenu ); 1346 action->addTo( helpMenu );
1337 connect( action, SIGNAL( activated() ), 1347 connect( action, SIGNAL( activated() ),
1338 SLOT( licence() ) ); 1348 SLOT( licence() ) );
1339 action = new QAction( "about", i18n("About..."), 0, this ); 1349 action = new Q3Action( "about", i18n("About..."), 0, this );
1340 action->addTo( helpMenu ); 1350 action->addTo( helpMenu );
1341 connect( action, SIGNAL( activated() ), 1351 connect( action, SIGNAL( activated() ),
1342 SLOT( about() ) ); 1352 SLOT( about() ) );
@@ -1356,7 +1366,7 @@ void MainWindow::initActions()
1356 if (p-> mShowIconSearch) 1366 if (p-> mShowIconSearch)
1357 search_action->addTo( iconToolBar ); 1367 search_action->addTo( iconToolBar );
1358 if (p-> mShowIconWhatsThis) 1368 if (p-> mShowIconWhatsThis)
1359 QWhatsThis::whatsThisButton ( iconToolBar ); 1369 Q3WhatsThis::whatsThisButton ( iconToolBar );
1360 if (p-> mShowIconNext) 1370 if (p-> mShowIconNext)
1361 whatsnext_action->addTo( viewToolBar ); 1371 whatsnext_action->addTo( viewToolBar );
1362 if (p-> mShowIconNextDays) 1372 if (p-> mShowIconNextDays)
@@ -1381,7 +1391,7 @@ void MainWindow::initActions()
1381 icon = loadPixmap( pathString + "2leftarrowB" ); 1391 icon = loadPixmap( pathString + "2leftarrowB" );
1382 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1392 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1383 if (p-> mShowIconBackFast) { 1393 if (p-> mShowIconBackFast) {
1384 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1394 action = new Q3Action( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1385 connect( action, SIGNAL( activated() ), 1395 connect( action, SIGNAL( activated() ),
1386 mView, SLOT( goPreviousMonth() ) ); 1396 mView, SLOT( goPreviousMonth() ) );
1387 action->addTo( navigatorToolBar ); 1397 action->addTo( navigatorToolBar );
@@ -1389,7 +1399,7 @@ void MainWindow::initActions()
1389 icon = loadPixmap( pathString + "1leftarrowB" ); 1399 icon = loadPixmap( pathString + "1leftarrowB" );
1390 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1400 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1391 if (p-> mShowIconBack) { 1401 if (p-> mShowIconBack) {
1392 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1402 action = new Q3Action( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1393 connect( action, SIGNAL( activated() ), 1403 connect( action, SIGNAL( activated() ),
1394 mView, SLOT( goPrevious() ) ); 1404 mView, SLOT( goPrevious() ) );
1395 action->addTo( navigatorToolBar ); 1405 action->addTo( navigatorToolBar );
@@ -1401,7 +1411,7 @@ void MainWindow::initActions()
1401 icon = loadPixmap( pathString + "1rightarrowB" ); 1411 icon = loadPixmap( pathString + "1rightarrowB" );
1402 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1412 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1403 if (p-> mShowIconForward) { 1413 if (p-> mShowIconForward) {
1404 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1414 action = new Q3Action( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1405 connect( action, SIGNAL( activated() ), 1415 connect( action, SIGNAL( activated() ),
1406 mView, SLOT( goNext() ) ); 1416 mView, SLOT( goNext() ) );
1407 action->addTo( navigatorToolBar ); 1417 action->addTo( navigatorToolBar );
@@ -1409,7 +1419,7 @@ void MainWindow::initActions()
1409 icon = loadPixmap( pathString + "2rightarrowB" ); 1419 icon = loadPixmap( pathString + "2rightarrowB" );
1410 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1420 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1411 if (p-> mShowIconForwardFast) { 1421 if (p-> mShowIconForwardFast) {
1412 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1422 action = new Q3Action( i18n("Next month"), icon, i18n("Next month"),0 , this );
1413 connect( action, SIGNAL( activated() ), 1423 connect( action, SIGNAL( activated() ),
1414 mView, SLOT( goNextMonth() ) ); 1424 mView, SLOT( goNextMonth() ) );
1415 action->addTo( navigatorToolBar ); 1425 action->addTo( navigatorToolBar );
@@ -1524,7 +1534,7 @@ void MainWindow::exportToPhone( int mode )
1524 int inFuture = 0; 1534 int inFuture = 0;
1525 if ( ex2phone.mWriteBackFuture->isChecked() ) 1535 if ( ex2phone.mWriteBackFuture->isChecked() )
1526 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1536 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1527 QPtrList<Incidence> delSel; 1537 Q3PtrList<Incidence> delSel;
1528 if ( mode == 1 ) 1538 if ( mode == 1 )
1529 delSel = mCalendar->rawIncidences(); 1539 delSel = mCalendar->rawIncidences();
1530 if ( mode == 2 ) 1540 if ( mode == 2 )
@@ -1595,10 +1605,10 @@ void MainWindow::displayText( QString text ,QString cap )
1595{ 1605{
1596 QDialog dia( this, "name", true ); ; 1606 QDialog dia( this, "name", true ); ;
1597 dia.setCaption( cap ); 1607 dia.setCaption( cap );
1598 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1608 Q3VBoxLayout* lay = new Q3VBoxLayout( &dia );
1599 lay->setSpacing( 3 ); 1609 lay->setSpacing( 3 );
1600 lay->setMargin( 3 ); 1610 lay->setMargin( 3 );
1601 QTextBrowser tb ( &dia ); 1611 Q3TextBrowser tb ( &dia );
1602 lay->addWidget( &tb ); 1612 lay->addWidget( &tb );
1603 tb.setText( text ); 1613 tb.setText( text );
1604#ifdef DESKTOP_VERSION 1614#ifdef DESKTOP_VERSION
@@ -1777,9 +1787,9 @@ void MainWindow::updateWeek(QDate seda)
1777 mWeekPixmap.fill( mWeekBgColor ); 1787 mWeekPixmap.fill( mWeekBgColor );
1778 QPainter p ( &mWeekPixmap ); 1788 QPainter p ( &mWeekPixmap );
1779 p.setFont( mWeekFont ); 1789 p.setFont( mWeekFont );
1780 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1790 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),Qt::AlignCenter, QString::number( weekNum) );
1781 p.end(); 1791 p.end();
1782 QIconSet icon3 ( mWeekPixmap ); 1792 QIcon icon3 ( mWeekPixmap );
1783 mWeekAction->setIconSet ( icon3 ); 1793 mWeekAction->setIconSet ( icon3 );
1784 1794
1785} 1795}
@@ -1812,7 +1822,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1812 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1822 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1813 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1823 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1814 bool ok; 1824 bool ok;
1815 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1825 QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok );
1816 if ( ok ) { 1826 if ( ok ) {
1817 int years = noc.date().year() - incidence->dtStart().date().year(); 1827 int years = noc.date().year() - incidence->dtStart().date().year();
1818 startString += i18n(" (%1 y.)"). arg( years ); 1828 startString += i18n(" (%1 y.)"). arg( years );
@@ -1846,13 +1856,13 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1846 static QPixmap jP = SmallIcon( "journal" ); 1856 static QPixmap jP = SmallIcon( "journal" );
1847 static QPixmap eP = SmallIcon( "newevent" ); 1857 static QPixmap eP = SmallIcon( "newevent" );
1848 static QPixmap tP = SmallIcon( "newtodo" ); 1858 static QPixmap tP = SmallIcon( "newtodo" );
1849 QIconSet icon; 1859 QIcon icon;
1850 if ( incidence->typeID() == todoID ) 1860 if ( incidence->typeID() == todoID )
1851 icon = QIconSet ( tP ); 1861 icon = QIcon ( tP );
1852 else if ( incidence->typeID() == eventID ) 1862 else if ( incidence->typeID() == eventID )
1853 icon = QIconSet ( eP ); 1863 icon = QIcon ( eP );
1854 else if ( incidence->typeID() == journalID ) 1864 else if ( incidence->typeID() == journalID )
1855 icon = QIconSet ( jP ); 1865 icon = QIcon ( jP );
1856 mPrintSelAction->setIconSet ( icon ); 1866 mPrintSelAction->setIconSet ( icon );
1857#endif 1867#endif
1858} 1868}
@@ -2045,7 +2055,7 @@ void MainWindow::backupAllFiles()
2045 } else if ( retval == 1 ){ 2055 } else if ( retval == 1 ){
2046 qDebug("KO: Backup created."); 2056 qDebug("KO: Backup created.");
2047 // backup ok 2057 // backup ok
2048 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2058 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2049 KopiCalendarFile * cal = calendars.first(); 2059 KopiCalendarFile * cal = calendars.first();
2050 cal = calendars.next(); 2060 cal = calendars.next();
2051 while ( cal ) { 2061 while ( cal ) {
@@ -2341,7 +2351,7 @@ void MainWindow::fillFilterMenuTB()
2341 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2351 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2342 2352
2343 selectFilterMenuTB->insertSeparator(); 2353 selectFilterMenuTB->insertSeparator();
2344 QPtrList<CalFilter> fili = mView->filters(); 2354 Q3PtrList<CalFilter> fili = mView->filters();
2345 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2355 CalFilter *curfilter = mView->filterView()->selectedFilter();
2346 CalFilter *filter = fili.first(); 2356 CalFilter *filter = fili.first();
2347 int iii = 2; 2357 int iii = 2;
@@ -2386,7 +2396,7 @@ void MainWindow::fillFilterMenu()
2386 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2396 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2387 2397
2388 selectFilterMenu->insertSeparator(); 2398 selectFilterMenu->insertSeparator();
2389 QPtrList<CalFilter> fili = mView->filters(); 2399 Q3PtrList<CalFilter> fili = mView->filters();
2390 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2400 CalFilter *curfilter = mView->filterView()->selectedFilter();
2391 CalFilter *filter = fili.first(); 2401 CalFilter *filter = fili.first();
2392 int iii = 2; 2402 int iii = 2;
@@ -2407,7 +2417,7 @@ void MainWindow::fillFilterMenuPopup()
2407 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 2417 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
2408 2418
2409 filterPopupMenu->insertSeparator(); 2419 filterPopupMenu->insertSeparator();
2410 QPtrList<CalFilter> fili = mView->filters(); 2420 Q3PtrList<CalFilter> fili = mView->filters();
2411 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2421 CalFilter *curfilter = mView->filterView()->selectedFilter();
2412 CalFilter *filter = fili.first(); 2422 CalFilter *filter = fili.first();
2413 int iii = 1; 2423 int iii = 1;
@@ -2819,5 +2829,5 @@ void MainWindow::resizeEvent( QResizeEvent* e)
2819 } 2829 }
2820 } 2830 }
2821#endif 2831#endif
2822 QMainWindow::resizeEvent( e); 2832 Q3MainWindow::resizeEvent( e);
2823} 2833}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index a533d8b..6756216 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,13 +1,21 @@
1#ifndef KORGE_MAINWINDOW_H 1#ifndef KORGE_MAINWINDOW_H
2#define KORGE_MAINWINDOW_H 2#define KORGE_MAINWINDOW_H
3 3
4#include <qmainwindow.h> 4#include <q3mainwindow.h>
5#include <qtimer.h> 5#include <qtimer.h>
6#include <qdict.h> 6#include <q3dict.h>
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <q3textstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11//Added by qt3to4:
12#include <Q3CString>
13#include <QCloseEvent>
14#include <QResizeEvent>
15#include <QPixmap>
16#include <Q3PopupMenu>
17#include <QHideEvent>
18#include <QKeyEvent>
11 19
12#include <libkcal/incidence.h> 20#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 21#include <ksyncmanager.h>
@@ -15,12 +23,12 @@
15#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
16#include <qcopchannel_qws.h> 24#include <qcopchannel_qws.h>
17#endif 25#endif
18class QAction; 26class Q3Action;
19class CalendarView; 27class CalendarView;
20class KSyncProfile; 28class KSyncProfile;
21#ifdef DESKTOP_VERSION 29#ifdef DESKTOP_VERSION
22 30
23#define QPEToolBar QToolBar 31#define QPEToolBar Q3ToolBar
24#endif 32#endif
25class QPEToolBar; 33class QPEToolBar;
26 34
@@ -31,7 +39,7 @@ class CalendarLocal;
31 39
32using namespace KCal; 40using namespace KCal;
33 41
34class MainWindow : public QMainWindow 42class MainWindow : public Q3MainWindow
35{ 43{
36 Q_OBJECT 44 Q_OBJECT
37 public: 45 public:
@@ -49,8 +57,8 @@ class MainWindow : public QMainWindow
49 void updateFilterToolbar(); 57 void updateFilterToolbar();
50 virtual void showMaximized (); 58 virtual void showMaximized ();
51 void configureAgenda( int ); 59 void configureAgenda( int );
52 void recieve( const QCString& msg, const QByteArray& data ); 60 void recieve( const Q3CString& msg, const QByteArray& data );
53 void receiveStart( const QCString& msg, const QByteArray& data ); 61 void receiveStart( const Q3CString& msg, const QByteArray& data );
54 protected slots: 62 protected slots:
55 void autoSaveWarning(); 63 void autoSaveWarning();
56 void loadDataAfterStart(); 64 void loadDataAfterStart();
@@ -124,7 +132,7 @@ class MainWindow : public QMainWindow
124 private: 132 private:
125 bool mAutoSaveDisabled; 133 bool mAutoSaveDisabled;
126 bool checkAutosave(); 134 bool checkAutosave();
127 QCString mCStringMess; 135 Q3CString mCStringMess;
128 QByteArray mByteData; 136 QByteArray mByteData;
129 137
130 //void setMenuBar( QMenuBar * ); 138 //void setMenuBar( QMenuBar * );
@@ -132,7 +140,7 @@ class MainWindow : public QMainWindow
132#ifndef DESKTOP_VERSION 140#ifndef DESKTOP_VERSION
133 QCopChannel* infrared; 141 QCopChannel* infrared;
134#endif 142#endif
135 QAction* brAction; 143 Q3Action* brAction;
136 KSyncManager* mSyncManager; 144 KSyncManager* mSyncManager;
137 bool mClosed; 145 bool mClosed;
138 void saveOnClose(); 146 void saveOnClose();
@@ -144,38 +152,38 @@ class MainWindow : public QMainWindow
144 QPEToolBar *navigatorToolBar; 152 QPEToolBar *navigatorToolBar;
145 QPEToolBar *filterToolBar; 153 QPEToolBar *filterToolBar;
146 KMenuBar *filterMenubar; 154 KMenuBar *filterMenubar;
147 QPopupMenu * filterPopupMenu; 155 Q3PopupMenu * filterPopupMenu;
148 QPopupMenu * mCurrentItemMenu; 156 Q3PopupMenu * mCurrentItemMenu;
149 void initActions(); 157 void initActions();
150 void setDefaultPreferences(); 158 void setDefaultPreferences();
151 void resizeEvent( QResizeEvent* e); 159 void resizeEvent( QResizeEvent* e);
152 void keyPressEvent ( QKeyEvent * ) ; 160 void keyPressEvent ( QKeyEvent * ) ;
153 void keyReleaseEvent ( QKeyEvent * ) ; 161 void keyReleaseEvent ( QKeyEvent * ) ;
154 QPopupMenu *configureToolBarMenu; 162 Q3PopupMenu *configureToolBarMenu;
155 QPopupMenu *selectFilterMenu; 163 Q3PopupMenu *selectFilterMenu;
156 QPopupMenu *selectFilterMenuTB; 164 Q3PopupMenu *selectFilterMenuTB;
157 QPopupMenu *configureAgendaMenu, *syncMenu; 165 Q3PopupMenu *configureAgendaMenu, *syncMenu;
158 CalendarLocal *mCalendar; 166 CalendarLocal *mCalendar;
159 CalendarView *mView; 167 CalendarView *mView;
160 QAction *mNewSubTodoAction; 168 Q3Action *mNewSubTodoAction;
161 QAction *mWeekAction; 169 Q3Action *mWeekAction;
162 QFont mWeekFont; 170 QFont mWeekFont;
163 QPixmap mWeekPixmap; 171 QPixmap mWeekPixmap;
164 QColor mWeekBgColor; 172 QColor mWeekBgColor;
165 173
166 QAction *mShowAction; 174 Q3Action *mShowAction;
167 QAction *mEditAction; 175 Q3Action *mEditAction;
168 QAction *mDeleteAction; 176 Q3Action *mDeleteAction;
169 QAction *mCloneAction; 177 Q3Action *mCloneAction;
170 QAction *mMoveAction; 178 Q3Action *mMoveAction;
171 QAction *mBeamAction; 179 Q3Action *mBeamAction;
172 QAction *mCancelAction; 180 Q3Action *mCancelAction;
173 QAction *mPrintSelAction; 181 Q3Action *mPrintSelAction;
174 182
175 QAction *mToggleNav; 183 Q3Action *mToggleNav;
176 QAction *mToggleFilter; 184 Q3Action *mToggleFilter;
177 QAction *mToggleAllday; 185 Q3Action *mToggleAllday;
178 QAction *actionFilterMenuTB; 186 Q3Action *actionFilterMenuTB;
179 187
180 void closeEvent( QCloseEvent* ce ); 188 void closeEvent( QCloseEvent* ce );
181 QTimer mSaveTimer; 189 QTimer mSaveTimer;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f6a1a6a..59c3e45 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -26,10 +26,13 @@
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qframe.h> 29#include <q3frame.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qpopupmenu.h> 31#include <q3popupmenu.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
33 36
34#include <kdebug.h> 37#include <kdebug.h>
35#include <klocale.h> 38#include <klocale.h>
@@ -53,11 +56,11 @@
53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) 56NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
54 : QWidget( parent, name ) 57 : QWidget( parent, name )
55{ 58{
56 QBoxLayout *topLayout = new QHBoxLayout( this ); 59 Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
57 60
58 // Set up the control buttons and date label 61 // Set up the control buttons and date label
59 mCtrlFrame = new QFrame( this ); 62 mCtrlFrame = new Q3Frame( this );
60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 63 mCtrlFrame->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
61 mCtrlFrame->setLineWidth(1); 64 mCtrlFrame->setLineWidth(1);
62 65
63 topLayout->addWidget( mCtrlFrame ); 66 topLayout->addWidget( mCtrlFrame );
@@ -129,7 +132,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
129 132
130 133
131 // set up control frame layout 134 // set up control frame layout
132 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); 135 Q3BoxLayout *ctrlLayout = new Q3HBoxLayout( mCtrlFrame, 1 );
133 ctrlLayout->addWidget( mPrevYear, 3 ); 136 ctrlLayout->addWidget( mPrevYear, 3 );
134 ctrlLayout->addWidget( mPrevMonth, 3 ); 137 ctrlLayout->addWidget( mPrevMonth, 3 );
135 ctrlLayout->addWidget( mPrevWeek, 3 ); 138 ctrlLayout->addWidget( mPrevWeek, 3 );
@@ -150,13 +153,13 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
150 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) ); 153 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
151 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 154 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
152 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); 155 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
153 mPrevYear->setFocusPolicy(NoFocus); 156 mPrevYear->setFocusPolicy(Qt::NoFocus);
154 mPrevMonth->setFocusPolicy(NoFocus); 157 mPrevMonth->setFocusPolicy(Qt::NoFocus);
155 mNextMonth->setFocusPolicy(NoFocus); 158 mNextMonth->setFocusPolicy(Qt::NoFocus);
156 mPrevWeek->setFocusPolicy(NoFocus); 159 mPrevWeek->setFocusPolicy(Qt::NoFocus);
157 mNextWeek->setFocusPolicy(NoFocus); 160 mNextWeek->setFocusPolicy(Qt::NoFocus);
158 mNextYear->setFocusPolicy(NoFocus); 161 mNextYear->setFocusPolicy(Qt::NoFocus);
159 mSelectMonth->setFocusPolicy(NoFocus); 162 mSelectMonth->setFocusPolicy(Qt::NoFocus);
160 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 163 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
161 164
162} 165}
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 9ccef14..a1880f5 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -27,9 +27,12 @@
27#include <libkcal/incidencebase.h> 27#include <libkcal/incidencebase.h>
28 28
29#include <qwidget.h> 29#include <qwidget.h>
30//Added by qt3to4:
31#include <Q3Frame>
32#include <QLabel>
30 33
31class QPushButton; 34class QPushButton;
32class QFrame; 35class Q3Frame;
33class QLabel; 36class QLabel;
34 37
35class NavigatorBar: public QWidget 38class NavigatorBar: public QWidget
@@ -60,7 +63,7 @@ class NavigatorBar: public QWidget
60 int mCurrentHei; 63 int mCurrentHei;
61 int mCurrentMinWid; 64 int mCurrentMinWid;
62 int mCurrentButtonMinWid; 65 int mCurrentButtonMinWid;
63 QFrame *mCtrlFrame; 66 Q3Frame *mCtrlFrame;
64 67
65 QPushButton *mPrevYear; 68 QPushButton *mPrevYear;
66 QPushButton *mPrevMonth; 69 QPushButton *mPrevMonth;
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 7253c8e..ab31274 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -21,7 +21,7 @@
21 21
22#include <qfile.h> 22#include <qfile.h>
23#include <qdir.h> 23#include <qdir.h>
24#include <qtextstream.h> 24#include <q3textstream.h>
25 25
26#include <kglobal.h> 26#include <kglobal.h>
27#include <klocale.h> 27#include <klocale.h>
@@ -44,10 +44,10 @@
44#include "koeventviewerdialog.h" 44#include "koeventviewerdialog.h"
45#include "docprefs.h" 45#include "docprefs.h"
46 46
47ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev, 47ScheduleItemOut::ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
48 Scheduler::Method method, 48 Scheduler::Method method,
49 const QString &recipients) 49 const QString &recipients)
50 : QListViewItem(parent) 50 : Q3ListViewItem(parent)
51{ 51{
52 mIncidence = ev; 52 mIncidence = ev;
53 mMethod = method; 53 mMethod = method;
@@ -123,7 +123,7 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
123 123
124OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, 124OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
125 const char* name,bool modal, 125 const char* name,bool modal,
126 WFlags fl) 126 Qt::WFlags fl)
127 : OutgoingDialog_base(parent,name,modal,fl) 127 : OutgoingDialog_base(parent,name,modal,fl)
128{ 128{
129 mCalendar = calendar; 129 mCalendar = calendar;
@@ -139,12 +139,12 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
139 mScheduler = new DummyScheduler(mCalendar); 139 mScheduler = new DummyScheduler(mCalendar);
140#endif 140#endif
141 } 141 }
142 mMessageListView->setColumnAlignment(1,AlignHCenter); 142 mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
143 mMessageListView->setColumnAlignment(2,AlignHCenter); 143 mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
144 mMessageListView->setColumnAlignment(3,AlignHCenter); 144 mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
145 mMessageListView->setColumnAlignment(4,AlignHCenter); 145 mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
146 QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), 146 QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
147 this,SLOT(showEvent(QListViewItem *))); 147 this,SLOT(showEvent(Q3ListViewItem *)));
148 mDocPrefs = new DocPrefs("groupschedule"); 148 mDocPrefs = new DocPrefs("groupschedule");
149 loadMessages(); 149 loadMessages();
150} 150}
@@ -236,7 +236,7 @@ void OutgoingDialog::deleteItem()
236 emit numMessagesChanged(mMessageListView->childCount()); 236 emit numMessagesChanged(mMessageListView->childCount());
237} 237}
238 238
239void OutgoingDialog::showEvent(QListViewItem *qitem) 239void OutgoingDialog::showEvent(Q3ListViewItem *qitem)
240{ 240{
241 ScheduleItemOut *item = (ScheduleItemOut *)qitem; 241 ScheduleItemOut *item = (ScheduleItemOut *)qitem;
242 Event *event = 0; 242 Event *event = 0;
@@ -294,7 +294,7 @@ bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method meth
294{ 294{
295 KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics"); 295 KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics");
296 QString messageText = mFormat->createScheduleMessage(incidence,method); 296 QString messageText = mFormat->createScheduleMessage(incidence,method);
297 QTextStream *qts = ktfile.textStream(); 297 Q3TextStream *qts = ktfile.textStream();
298 *qts << messageText; 298 *qts << messageText;
299 *qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl; 299 *qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl;
300 *qts << "RECIPIENTS-BEGIN:" << endl << recipients << endl << ":RECIPIENTS-END" << endl; 300 *qts << "RECIPIENTS-BEGIN:" << endl << recipients << endl << ":RECIPIENTS-END" << endl;
@@ -330,11 +330,11 @@ void OutgoingDialog::loadMessages()
330 if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true; 330 if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true;
331 } 331 }
332 if (!inserted) { 332 if (!inserted) {
333 if (!f.open(IO_ReadOnly)) { 333 if (!f.open(QIODevice::ReadOnly)) {
334 kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'" 334 kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'"
335 << (*it) << "'" << endl; 335 << (*it) << "'" << endl;
336 } else { 336 } else {
337 QTextStream t(&f); 337 Q3TextStream t(&f);
338 QString messageString = t.read(); 338 QString messageString = t.read();
339 ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar, 339 ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar,
340 messageString); 340 messageString);
diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h
index a3d561a..e727087 100644
--- a/korganizer/outgoingdialog.h
+++ b/korganizer/outgoingdialog.h
@@ -23,7 +23,7 @@
23#ifndef OUTGOINGDIALOG_H 23#ifndef OUTGOINGDIALOG_H
24#define OUTGOINGDIALOG_H 24#define OUTGOINGDIALOG_H
25 25
26#include <qlistview.h> 26#include <q3listview.h>
27#include <qmap.h> 27#include <qmap.h>
28#include <qstring.h> 28#include <qstring.h>
29 29
@@ -34,10 +34,10 @@
34 34
35using namespace KCal; 35using namespace KCal;
36 36
37class ScheduleItemOut : public QListViewItem 37class ScheduleItemOut : public Q3ListViewItem
38{ 38{
39 public: 39 public:
40 ScheduleItemOut(QListView *parent,IncidenceBase *ev, 40 ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
41 Scheduler::Method method, const QString &recipients=QString::null); 41 Scheduler::Method method, const QString &recipients=QString::null);
42 virtual ~ScheduleItemOut() {} 42 virtual ~ScheduleItemOut() {}
43 43
@@ -56,7 +56,7 @@ class OutgoingDialog : public OutgoingDialog_base
56 Q_OBJECT 56 Q_OBJECT
57 public: 57 public:
58 OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0, 58 OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0,
59 bool modal=false,WFlags fl=0); 59 bool modal=false,Qt::WFlags fl=0);
60 ~OutgoingDialog(); 60 ~OutgoingDialog();
61 61
62 bool addMessage(IncidenceBase *,Scheduler::Method); 62 bool addMessage(IncidenceBase *,Scheduler::Method);
@@ -72,7 +72,7 @@ class OutgoingDialog : public OutgoingDialog_base
72 protected slots: 72 protected slots:
73 void send(); 73 void send();
74 void deleteItem(); 74 void deleteItem();
75 void showEvent(QListViewItem *); 75 void showEvent(Q3ListViewItem *);
76 76
77 private: 77 private:
78 bool saveMessage(IncidenceBase *,Scheduler::Method,const QString &recipients=0); 78 bool saveMessage(IncidenceBase *,Scheduler::Method,const QString &recipients=0);
diff --git a/korganizer/outgoingdialog_base.cpp b/korganizer/outgoingdialog_base.cpp
index 1873b44..be8a870 100644
--- a/korganizer/outgoingdialog_base.cpp
+++ b/korganizer/outgoingdialog_base.cpp
@@ -11,12 +11,14 @@
11#include "outgoingdialog_base.h" 11#include "outgoingdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3GridLayout>
20 22
21/* 23/*
22 * Constructs a OutgoingDialog_base as a child of 'parent', with the 24 * Constructs a OutgoingDialog_base as a child of 'parent', with the
@@ -25,23 +27,23 @@
25 * The dialog will by default be modeless, unless you set 'modal' to 27 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 28 * TRUE to construct a modal dialog.
27 */ 29 */
28OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 30OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 31 : QDialog( parent, name, modal, fl )
30 32
31{ 33{
32 if ( !name ) 34 if ( !name )
33 setName( "OutgoingDialog_base" ); 35 setName( "OutgoingDialog_base" );
34 OutgoingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout"); 36 OutgoingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout");
35 37
36 mMessageListView = new QListView( this, "mMessageListView" ); 38 mMessageListView = new Q3ListView( this, "mMessageListView" );
37 mMessageListView->addColumn( tr2i18n( "Summary" ) ); 39 mMessageListView->addColumn( tr2i18n( "Summary" ) );
38 mMessageListView->addColumn( tr2i18n( "Start Date" ) ); 40 mMessageListView->addColumn( tr2i18n( "Start Date" ) );
39 mMessageListView->addColumn( tr2i18n( "Start Time" ) ); 41 mMessageListView->addColumn( tr2i18n( "Start Time" ) );
40 mMessageListView->addColumn( tr2i18n( "End Date" ) ); 42 mMessageListView->addColumn( tr2i18n( "End Date" ) );
41 mMessageListView->addColumn( tr2i18n( "End Time" ) ); 43 mMessageListView->addColumn( tr2i18n( "End Time" ) );
42 mMessageListView->addColumn( tr2i18n( "Method" ) ); 44 mMessageListView->addColumn( tr2i18n( "Method" ) );
43 mMessageListView->setFrameShape( QListView::StyledPanel ); 45 mMessageListView->setFrameShape( Q3ListView::StyledPanel );
44 mMessageListView->setFrameShadow( QListView::Sunken ); 46 mMessageListView->setFrameShadow( Q3ListView::Sunken );
45 mMessageListView->setAllColumnsShowFocus( TRUE ); 47 mMessageListView->setAllColumnsShowFocus( TRUE );
46 48
47 OutgoingDialog_baseLayout->addMultiCellWidget( mMessageListView, 0, 3, 0, 0 ); 49 OutgoingDialog_baseLayout->addMultiCellWidget( mMessageListView, 0, 3, 0, 0 );
diff --git a/korganizer/outgoingdialog_base.h b/korganizer/outgoingdialog_base.h
index af71bb1..5e81725 100644
--- a/korganizer/outgoingdialog_base.h
+++ b/korganizer/outgoingdialog_base.h
@@ -12,12 +12,16 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3GridLayout>
17class QHBoxLayout; 17#include <Q3HBoxLayout>
18class QGridLayout; 18#include <Q3VBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class OutgoingDialog_base : public QDialog 27class OutgoingDialog_base : public QDialog
@@ -25,16 +29,16 @@ class OutgoingDialog_base : public QDialog
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~OutgoingDialog_base(); 33 ~OutgoingDialog_base();
30 34
31 QListView* mMessageListView; 35 Q3ListView* mMessageListView;
32 QPushButton* PushButton5; 36 QPushButton* PushButton5;
33 QPushButton* PushButton7; 37 QPushButton* PushButton7;
34 QPushButton* PushButton6; 38 QPushButton* PushButton6;
35 39
36protected: 40protected:
37 QGridLayout* OutgoingDialog_baseLayout; 41 Q3GridLayout* OutgoingDialog_baseLayout;
38 42
39protected slots: 43protected slots:
40 virtual void languageChange(); 44 virtual void languageChange();
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index 2ae6720..ede9840 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -35,13 +35,13 @@
35#include "publishdialog.h" 35#include "publishdialog.h"
36 36
37PublishDialog::PublishDialog(QWidget* parent, const char* name, 37PublishDialog::PublishDialog(QWidget* parent, const char* name,
38 bool modal, WFlags fl) 38 bool modal, Qt::WFlags fl)
39 : PublishDialog_base(parent,name,modal,fl) 39 : PublishDialog_base(parent,name,modal,fl)
40{ 40{
41 setCaption(i18n("Select Addresses")); 41 setCaption(i18n("Select Addresses"));
42 mNameLineEdit->setEnabled(false); 42 mNameLineEdit->setEnabled(false);
43 mEmailLineEdit->setEnabled(false); 43 mEmailLineEdit->setEnabled(false);
44 connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)), 44 connect(mAddressListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
45 SLOT(updateInput())); 45 SLOT(updateInput()));
46} 46}
47 47
@@ -53,7 +53,7 @@ void PublishDialog::addAttendee(Attendee *attendee)
53{ 53{
54 mNameLineEdit->setEnabled(true); 54 mNameLineEdit->setEnabled(true);
55 mEmailLineEdit->setEnabled(true); 55 mEmailLineEdit->setEnabled(true);
56 QListViewItem *item = new QListViewItem(mAddressListView); 56 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
57 item->setText(0,attendee->name()); 57 item->setText(0,attendee->name());
58 item->setText(1,attendee->email()); 58 item->setText(1,attendee->email());
59 mAddressListView->insertItem(item); 59 mAddressListView->insertItem(item);
@@ -62,7 +62,7 @@ void PublishDialog::addAttendee(Attendee *attendee)
62QString PublishDialog::addresses() 62QString PublishDialog::addresses()
63{ 63{
64 QString to = ""; 64 QString to = "";
65 QListViewItem *item; 65 Q3ListViewItem *item;
66 int i, count; 66 int i, count;
67 count = mAddressListView->childCount(); 67 count = mAddressListView->childCount();
68 for (i=0;i<count;i++) { 68 for (i=0;i<count;i++) {
@@ -80,7 +80,7 @@ void PublishDialog::addItem()
80{ 80{
81 mNameLineEdit->setEnabled(true); 81 mNameLineEdit->setEnabled(true);
82 mEmailLineEdit->setEnabled(true); 82 mEmailLineEdit->setEnabled(true);
83 QListViewItem *item = new QListViewItem(mAddressListView); 83 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
84 mAddressListView->insertItem(item); 84 mAddressListView->insertItem(item);
85 mAddressListView->setSelected(item,true); 85 mAddressListView->setSelected(item,true);
86 mNameLineEdit->setText(i18n("(EmptyName)")); 86 mNameLineEdit->setText(i18n("(EmptyName)"));
@@ -89,7 +89,7 @@ void PublishDialog::addItem()
89 89
90void PublishDialog::removeItem() 90void PublishDialog::removeItem()
91{ 91{
92 QListViewItem *item; 92 Q3ListViewItem *item;
93 item = mAddressListView->selectedItem(); 93 item = mAddressListView->selectedItem();
94 if (!item) return; 94 if (!item) return;
95 mAddressListView->takeItem(item); 95 mAddressListView->takeItem(item);
@@ -119,7 +119,7 @@ void PublishDialog::openAddressbook()
119 a = addressList[i]; 119 a = addressList[i];
120 mNameLineEdit->setEnabled(true); 120 mNameLineEdit->setEnabled(true);
121 mEmailLineEdit->setEnabled(true); 121 mEmailLineEdit->setEnabled(true);
122 QListViewItem *item = new QListViewItem(mAddressListView); 122 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
123 mAddressListView->setSelected(item,true); 123 mAddressListView->setSelected(item,true);
124 mNameLineEdit->setText(a.realName()); 124 mNameLineEdit->setText(a.realName());
125 mEmailLineEdit->setText(a.preferredEmail()); 125 mEmailLineEdit->setText(a.preferredEmail());
@@ -131,7 +131,7 @@ void PublishDialog::openAddressbook()
131 131
132void PublishDialog::updateItem() 132void PublishDialog::updateItem()
133{ 133{
134 QListViewItem *item; 134 Q3ListViewItem *item;
135 item = mAddressListView->selectedItem(); 135 item = mAddressListView->selectedItem();
136 if (!item) return; 136 if (!item) return;
137 item->setText(0,mNameLineEdit->text()); 137 item->setText(0,mNameLineEdit->text());
@@ -140,7 +140,7 @@ void PublishDialog::updateItem()
140 140
141void PublishDialog::updateInput() 141void PublishDialog::updateInput()
142{ 142{
143 QListViewItem *item; 143 Q3ListViewItem *item;
144 item = mAddressListView->selectedItem(); 144 item = mAddressListView->selectedItem();
145 if (!item) return; 145 if (!item) return;
146 mNameLineEdit->setEnabled(true); 146 mNameLineEdit->setEnabled(true);
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index 338603c..3ffeec4 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -23,7 +23,7 @@
23#ifndef PUBLISHDIALOG_H 23#ifndef PUBLISHDIALOG_H
24#define PUBLISHDIALOG_H 24#define PUBLISHDIALOG_H
25 25
26#include <qlistview.h> 26#include <q3listview.h>
27#include <libkcal/attendee.h> 27#include <libkcal/attendee.h>
28 28
29#include "publishdialog_base.h" 29#include "publishdialog_base.h"
@@ -35,7 +35,7 @@ class PublishDialog : public PublishDialog_base
35 Q_OBJECT 35 Q_OBJECT
36 public: 36 public:
37 PublishDialog(QWidget* parent=0,const char* name=0, 37 PublishDialog(QWidget* parent=0,const char* name=0,
38 bool modal=true,WFlags fl=0); 38 bool modal=true,Qt::WFlags fl=0);
39 ~PublishDialog(); 39 ~PublishDialog();
40 40
41 void addAttendee(Attendee *attendee); 41 void addAttendee(Attendee *attendee);
diff --git a/korganizer/publishdialog_base.cpp b/korganizer/publishdialog_base.cpp
index 683f7e9..ce5c542 100644
--- a/korganizer/publishdialog_base.cpp
+++ b/korganizer/publishdialog_base.cpp
@@ -11,15 +11,18 @@
11#include "publishdialog_base.h" 11#include "publishdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qframe.h> 14#include <q3frame.h>
15#include <qheader.h> 15#include <q3header.h>
16#include <qlabel.h> 16#include <qlabel.h>
17#include <qlineedit.h> 17#include <qlineedit.h>
18#include <qlistview.h> 18#include <q3listview.h>
19#include <qpushbutton.h> 19#include <qpushbutton.h>
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qtooltip.h> 21#include <qtooltip.h>
22#include <qwhatsthis.h> 22#include <q3whatsthis.h>
23//Added by qt3to4:
24#include <Q3GridLayout>
25#include <Q3HBoxLayout>
23 26
24/* 27/*
25 * Constructs a PublishDialog_base as a child of 'parent', with the 28 * Constructs a PublishDialog_base as a child of 'parent', with the
@@ -28,15 +31,15 @@
28 * The dialog will by default be modeless, unless you set 'modal' to 31 * The dialog will by default be modeless, unless you set 'modal' to
29 * TRUE to construct a modal dialog. 32 * TRUE to construct a modal dialog.
30 */ 33 */
31PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 34PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
32 : QDialog( parent, name, modal, fl ) 35 : QDialog( parent, name, modal, fl )
33 36
34{ 37{
35 if ( !name ) 38 if ( !name )
36 setName( "PublishDialog_base" ); 39 setName( "PublishDialog_base" );
37 PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); 40 PublishDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout");
38 41
39 mAddressListView = new QListView( this, "mAddressListView" ); 42 mAddressListView = new Q3ListView( this, "mAddressListView" );
40 mAddressListView->addColumn( tr2i18n( "Name" ) ); 43 mAddressListView->addColumn( tr2i18n( "Name" ) );
41 mAddressListView->addColumn( tr2i18n( "Email" ) ); 44 mAddressListView->addColumn( tr2i18n( "Email" ) );
42 45
@@ -72,14 +75,14 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool
72 QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding ); 75 QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding );
73 PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 ); 76 PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 );
74 77
75 Line2 = new QFrame( this, "Line2" ); 78 Line2 = new Q3Frame( this, "Line2" );
76 Line2->setFrameShape( QFrame::HLine ); 79 Line2->setFrameShape( Q3Frame::HLine );
77 Line2->setFrameShadow( QFrame::Sunken ); 80 Line2->setFrameShadow( Q3Frame::Sunken );
78 Line2->setFrameShape( QFrame::HLine ); 81 Line2->setFrameShape( Q3Frame::HLine );
79 82
80 PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 ); 83 PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 );
81 84
82 layout95 = new QHBoxLayout( 0, 0, 6, "layout95"); 85 layout95 = new Q3HBoxLayout( 0, 0, 6, "layout95");
83 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 86 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
84 layout95->addItem( spacer_2 ); 87 layout95->addItem( spacer_2 );
85 88
diff --git a/korganizer/publishdialog_base.h b/korganizer/publishdialog_base.h
index 932474e..d1b40ae 100644
--- a/korganizer/publishdialog_base.h
+++ b/korganizer/publishdialog_base.h
@@ -12,15 +12,21 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15//Added by qt3to4:
16#include <Q3VBoxLayout>
17#include <Q3Frame>
18#include <Q3GridLayout>
19#include <Q3HBoxLayout>
20#include <QLabel>
15 21
16class QVBoxLayout; 22class Q3VBoxLayout;
17class QHBoxLayout; 23class Q3HBoxLayout;
18class QGridLayout; 24class Q3GridLayout;
19class QFrame; 25class Q3Frame;
20class QLabel; 26class QLabel;
21class QLineEdit; 27class QLineEdit;
22class QListView; 28class Q3ListView;
23class QListViewItem; 29class Q3ListViewItem;
24class QPushButton; 30class QPushButton;
25 31
26class PublishDialog_base : public QDialog 32class PublishDialog_base : public QDialog
@@ -28,10 +34,10 @@ class PublishDialog_base : public QDialog
28 Q_OBJECT 34 Q_OBJECT
29 35
30public: 36public:
31 PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 37 PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
32 ~PublishDialog_base(); 38 ~PublishDialog_base();
33 39
34 QListView* mAddressListView; 40 Q3ListView* mAddressListView;
35 QLabel* TextLabel1; 41 QLabel* TextLabel1;
36 QLabel* TextLabel2; 42 QLabel* TextLabel2;
37 QLineEdit* mEmailLineEdit; 43 QLineEdit* mEmailLineEdit;
@@ -39,13 +45,13 @@ public:
39 QPushButton* PushButton10; 45 QPushButton* PushButton10;
40 QPushButton* PushButton12; 46 QPushButton* PushButton12;
41 QPushButton* PushButton11; 47 QPushButton* PushButton11;
42 QFrame* Line2; 48 Q3Frame* Line2;
43 QPushButton* PushButton9; 49 QPushButton* PushButton9;
44 QPushButton* PushButton8; 50 QPushButton* PushButton8;
45 51
46protected: 52protected:
47 QGridLayout* PublishDialog_baseLayout; 53 Q3GridLayout* PublishDialog_baseLayout;
48 QHBoxLayout* layout95; 54 Q3HBoxLayout* layout95;
49 55
50protected slots: 56protected slots:
51 virtual void languageChange(); 57 virtual void languageChange();
diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp
index 3544081..35bedba 100644
--- a/korganizer/savetemplatedialog.cpp
+++ b/korganizer/savetemplatedialog.cpp
@@ -22,6 +22,9 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
27#include <Q3Frame>
25 28
26#include <keditlistbox.h> 29#include <keditlistbox.h>
27#include <klocale.h> 30#include <klocale.h>
@@ -35,8 +38,8 @@ SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent )
35 true, false ), 38 true, false ),
36 mType( type ) 39 mType( type )
37{ 40{
38 QFrame *topFrame = plainPage(); 41 Q3Frame *topFrame = plainPage();
39 QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); 42 Q3VBoxLayout *topLayout = new Q3VBoxLayout( topFrame, 0, spacingHint() );
40 43
41 mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame, 44 mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame,
42 0, false, KEditListBox::Add | 45 0, false, KEditListBox::Add |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 9cfdc35..105b844 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -24,14 +24,21 @@
24 24
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qgroupbox.h> 27#include <q3groupbox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qlistview.h> 31#include <q3listview.h>
31#include <qwhatsthis.h> 32#include <q3whatsthis.h>
32#include <qlineedit.h> 33#include <qlineedit.h>
33#include <qpushbutton.h> 34#include <qpushbutton.h>
34#include <qhbuttongroup.h> 35//#include <qhbuttongroup.h>
36//Added by qt3to4:
37#include <Q3HBoxLayout>
38#include <Q3Frame>
39#include <Q3PtrList>
40#include <QKeyEvent>
41#include <Q3VBoxLayout>
35#include <klocale.h> 42#include <klocale.h>
36#include <kmessagebox.h> 43#include <kmessagebox.h>
37 44
@@ -46,15 +53,15 @@
46#include "searchdialog.h" 53#include "searchdialog.h"
47 54
48SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 55SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
49 : QVBox( 0 ) 56 : Q3VBox( 0 )
50 57
51{ 58{
52 mCalendar = calendar; 59 mCalendar = calendar;
53 QFrame *topFrame = new QFrame( this ) ;//plainPage(); 60 Q3Frame *topFrame = new Q3Frame( this ) ;//plainPage();
54 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); 61 Q3VBoxLayout *layout = new Q3VBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
55 62
56 // Search expression 63 // Search expression
57 QHBoxLayout *subLayout = new QHBoxLayout(); 64 Q3HBoxLayout *subLayout = new Q3HBoxLayout();
58 layout->addLayout(subLayout); 65 layout->addLayout(subLayout);
59 /* 66 /*
60 searchLabel = new QLabel(topFrame); 67 searchLabel = new QLabel(topFrame);
@@ -98,7 +105,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
98 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 105 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
99 // topFrame); 106 // topFrame);
100 107
101 incidenceGroup = new QHBox( topFrame ); 108 incidenceGroup = new Q3HBox( topFrame );
102 layout->addWidget(incidenceGroup); 109 layout->addWidget(incidenceGroup);
103 110
104 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 111 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
@@ -106,7 +113,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
106 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 113 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
107 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 114 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
108 115
109 subjectGroup = new QHBox( topFrame ); 116 subjectGroup = new Q3HBox( topFrame );
110 layout->addWidget(subjectGroup); 117 layout->addWidget(subjectGroup);
111 118
112 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 119 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
@@ -114,7 +121,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
114 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); 121 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup);
115 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 122 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
116 123
117 attendeeGroup = new QHBox( topFrame ); 124 attendeeGroup = new Q3HBox( topFrame );
118 layout->addWidget(attendeeGroup ); 125 layout->addWidget(attendeeGroup );
119 new QLabel( i18n("Attendee:"),attendeeGroup ); 126 new QLabel( i18n("Attendee:"),attendeeGroup );
120 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 127 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
@@ -127,7 +134,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
127 QWidget *rangeWidget = new QWidget(topFrame); 134 QWidget *rangeWidget = new QWidget(topFrame);
128 int space = KDialog::spacingHint(); 135 int space = KDialog::spacingHint();
129 if ( QApplication::desktop()->width() <= 240 ) space = 1; 136 if ( QApplication::desktop()->width() <= 240 ) space = 1;
130 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space); 137 Q3HBoxLayout *rangeLayout = new Q3HBoxLayout(rangeWidget,0,space);
131 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 138 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
132 mStartDate = new KDateEdit(rangeWidget); 139 mStartDate = new KDateEdit(rangeWidget);
133 rangeLayout->addWidget(mStartDate); 140 rangeLayout->addWidget(mStartDate);
@@ -135,7 +142,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
135 mEndDate = new KDateEdit(rangeWidget); 142 mEndDate = new KDateEdit(rangeWidget);
136 mEndDate->setDate(QDate::currentDate().addDays(365)); 143 mEndDate->setDate(QDate::currentDate().addDays(365));
137 rangeLayout->addWidget(mEndDate); 144 rangeLayout->addWidget(mEndDate);
138 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); 145 QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget );
139 rangeLayout->addWidget( (QWidget*)wt ); 146 rangeLayout->addWidget( (QWidget*)wt );
140 layout->addWidget(rangeWidget); 147 layout->addWidget(rangeWidget);
141 // Results list view 148 // Results list view
@@ -341,7 +348,7 @@ void SearchDialog::updateView()
341 348
342void SearchDialog::search(const QRegExp &re) 349void SearchDialog::search(const QRegExp &re)
343{ 350{
344 QPtrList<Event> events; 351 Q3PtrList<Event> events;
345 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 352 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
346 if ( mRefineItems->isChecked() ) events = mMatchedEvents; 353 if ( mRefineItems->isChecked() ) events = mMatchedEvents;
347 mMatchedEvents.clear(); 354 mMatchedEvents.clear();
@@ -419,7 +426,7 @@ void SearchDialog::search(const QRegExp &re)
419 } 426 }
420 } 427 }
421 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 428 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
422 QPtrList<Attendee> tmpAList = ev->attendees(); 429 Q3PtrList<Attendee> tmpAList = ev->attendees();
423 Attendee *a; 430 Attendee *a;
424 for (a = tmpAList.first(); a; a = tmpAList.next()) { 431 for (a = tmpAList.first(); a; a = tmpAList.next()) {
425 if (mSearchAName->isChecked()) { 432 if (mSearchAName->isChecked()) {
@@ -458,7 +465,7 @@ void SearchDialog::search(const QRegExp &re)
458 } 465 }
459 } 466 }
460 } 467 }
461 QPtrList<Todo> todos; 468 Q3PtrList<Todo> todos;
462 469
463 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 470 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
464 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ; 471 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ;
@@ -512,7 +519,7 @@ void SearchDialog::search(const QRegExp &re)
512 } 519 }
513 } 520 }
514 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 521 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
515 QPtrList<Attendee> tmpAList = tod->attendees(); 522 Q3PtrList<Attendee> tmpAList = tod->attendees();
516 Attendee *a; 523 Attendee *a;
517 for (a = tmpAList.first(); a; a = tmpAList.next()) { 524 for (a = tmpAList.first(); a; a = tmpAList.next()) {
518 if (mSearchAName->isChecked()) { 525 if (mSearchAName->isChecked()) {
@@ -548,7 +555,7 @@ void SearchDialog::search(const QRegExp &re)
548 } 555 }
549 } 556 }
550 557
551 QPtrList<Journal> journals; 558 Q3PtrList<Journal> journals;
552 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 559 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
553 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; 560 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ;
554 mMatchedJournals.clear(); 561 mMatchedJournals.clear();
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 945ff65..5df6116 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -26,8 +26,12 @@
26 26
27#include <qregexp.h> 27#include <qregexp.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29//Added by qt3to4:
30#include <QLabel>
31#include <QKeyEvent>
32#include <Q3PtrList>
29#include <kdialogbase.h> 33#include <kdialogbase.h>
30#include <qvbox.h> 34#include <q3vbox.h>
31 35
32#include <libkcal/calendar.h> 36#include <libkcal/calendar.h>
33 37
@@ -41,7 +45,7 @@ class QLabel;
41class CalendarView; 45class CalendarView;
42 46
43using namespace KCal; 47using namespace KCal;
44class SearchDialog : public QVBox 48class SearchDialog : public Q3VBox
45{ 49{
46 Q_OBJECT 50 Q_OBJECT
47 public: 51 public:
@@ -72,14 +76,14 @@ class SearchDialog : public QVBox
72 76
73 private: 77 private:
74 78
75 QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; 79 Q3HBox *incidenceGroup ,*subjectGroup ,*attendeeGroup;
76 void search(const QRegExp &); 80 void search(const QRegExp &);
77 81
78 Calendar *mCalendar; 82 Calendar *mCalendar;
79 83
80 QPtrList<Event> mMatchedEvents; 84 Q3PtrList<Event> mMatchedEvents;
81 QPtrList<Todo> mMatchedTodos; 85 Q3PtrList<Todo> mMatchedTodos;
82 QPtrList<Journal> mMatchedJournals; 86 Q3PtrList<Journal> mMatchedJournals;
83 87
84 QLabel *searchLabel; 88 QLabel *searchLabel;
85 KLineEdit *searchEdit; 89 KLineEdit *searchEdit;
diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp
index 7137c49..8186ebb 100644
--- a/korganizer/statusdialog.cpp
+++ b/korganizer/statusdialog.cpp
@@ -21,6 +21,9 @@
21#include <qpushbutton.h> 21#include <qpushbutton.h>
22#include <qstringlist.h> 22#include <qstringlist.h>
23#include <qlayout.h> 23#include <qlayout.h>
24//Added by qt3to4:
25#include <Q3VBoxLayout>
26#include <Q3HBoxLayout>
24 27
25#include <kdebug.h> 28#include <kdebug.h>
26#include <klocale.h> 29#include <klocale.h>
@@ -32,11 +35,11 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
32{ 35{
33 setCaption(i18n("Set Your Status")); 36 setCaption(i18n("Set Your Status"));
34 37
35 QBoxLayout *topLayout = new QVBoxLayout( this ); 38 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
36 topLayout->setSpacing( spacingHint() ); 39 topLayout->setSpacing( spacingHint() );
37 topLayout->setMargin( marginHint() ); 40 topLayout->setMargin( marginHint() );
38 41
39 QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); 42 Q3BoxLayout *statusLayout = new Q3HBoxLayout( topLayout );
40 43
41 QLabel *text = new QLabel(i18n("Set your status"),this); 44 QLabel *text = new QLabel(i18n("Set your status"),this);
42 statusLayout->addWidget( text ); 45 statusLayout->addWidget( text );
@@ -45,7 +48,7 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
45 mStatus->insertStringList(Attendee::statusList()); 48 mStatus->insertStringList(Attendee::statusList());
46 statusLayout->addWidget( mStatus ); 49 statusLayout->addWidget( mStatus );
47 50
48 QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); 51 Q3BoxLayout *buttonLayout = new Q3HBoxLayout( topLayout );
49 52
50 QPushButton *ok = new QPushButton(i18n("&OK"), this); 53 QPushButton *ok = new QPushButton(i18n("&OK"), this);
51 connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) ); 54 connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) );
diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp
index 11be432..a6c3cdc 100644
--- a/korganizer/timeline.cpp
+++ b/korganizer/timeline.cpp
@@ -5,13 +5,13 @@
5#include "timeline.h" 5#include "timeline.h"
6 6
7TimeLine::TimeLine( QWidget *parent, const char *name ) : 7TimeLine::TimeLine( QWidget *parent, const char *name ) :
8 QScrollView( parent, name ) 8 Q3ScrollView( parent, name )
9{ 9{
10 mPixelWidth = 1000; 10 mPixelWidth = 1000;
11 11
12 resizeContents( mPixelWidth, 20 ); 12 resizeContents( mPixelWidth, 20 );
13 13
14 viewport()->setBackgroundMode( PaletteBackground ); 14 viewport()->setBackgroundMode( Qt::PaletteBackground );
15 15
16 setHScrollBarMode(AlwaysOff); 16 setHScrollBarMode(AlwaysOff);
17 setVScrollBarMode(AlwaysOff); 17 setVScrollBarMode(AlwaysOff);
@@ -58,5 +58,5 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
58 58
59void TimeLine::setContentsPos( int pos ) 59void TimeLine::setContentsPos( int pos )
60{ 60{
61 QScrollView::setContentsPos ( pos, 0 ); 61 Q3ScrollView::setContentsPos ( pos, 0 );
62} 62}
diff --git a/korganizer/timeline.h b/korganizer/timeline.h
index ab3e5d3..bf301fa 100644
--- a/korganizer/timeline.h
+++ b/korganizer/timeline.h
@@ -1,10 +1,10 @@
1#ifndef TIMELINE_H 1#ifndef TIMELINE_H
2#define TIMELINE_H 2#define TIMELINE_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qdatetime.h> 5#include <qdatetime.h>
6 6
7class TimeLine : public QScrollView 7class TimeLine : public Q3ScrollView
8{ 8{
9 Q_OBJECT 9 Q_OBJECT
10 public: 10 public:
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index df8ff88..0908056 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -4,10 +4,14 @@
4#else 4#else
5#include <qsplitter.h> 5#include <qsplitter.h>
6#endif 6#endif
7#include <qlistview.h> 7#include <q3listview.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qheader.h> 9#include <q3header.h>
10#include <qpushbutton.h> 10#include <qpushbutton.h>
11//Added by qt3to4:
12#include <Q3HBoxLayout>
13#include <Q3VBoxLayout>
14#include <Q3ValueList>
11 15
12#include <klocale.h> 16#include <klocale.h>
13#include <kdebug.h> 17#include <kdebug.h>
@@ -21,7 +25,7 @@
21TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : 25TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
22 QWidget( parent, name ) 26 QWidget( parent, name )
23{ 27{
24 QBoxLayout *topLayout = new QVBoxLayout( this ); 28 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
25#ifndef DESKTOP_VERSION 29#ifndef DESKTOP_VERSION
26 mSplitter = new QKSplitter( this ); 30 mSplitter = new QKSplitter( this );
27#else 31#else
@@ -29,11 +33,11 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
29#endif 33#endif
30 topLayout->addWidget( mSplitter ); 34 topLayout->addWidget( mSplitter );
31 35
32 mList = new QListView( mSplitter ); 36 mList = new Q3ListView( mSplitter );
33 mList->addColumn( i18n("Summary") ); 37 mList->addColumn( i18n("Summary") );
34 38
35 QWidget *rightPane = new QWidget( mSplitter ); 39 QWidget *rightPane = new QWidget( mSplitter );
36 QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); 40 Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane );
37 41
38 mTimeLine = new TimeLine( rightPane ); 42 mTimeLine = new TimeLine( rightPane );
39 mTimeLine->setFixedHeight( mList->header()->height() ); 43 mTimeLine->setFixedHeight( mList->header()->height() );
@@ -42,7 +46,7 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
42 mLineView = new LineView( rightPane ); 46 mLineView = new LineView( rightPane );
43 rightPaneLayout->addWidget( mLineView ); 47 rightPaneLayout->addWidget( mLineView );
44 48
45 QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); 49 Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout );
46 50
47 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); 51 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
48 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); 52 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
@@ -64,19 +68,19 @@ TimeSpanView::~TimeSpanView()
64{ 68{
65} 69}
66 70
67QValueList<int> TimeSpanView::splitterSizes() 71Q3ValueList<int> TimeSpanView::splitterSizes()
68{ 72{
69 return mSplitter->sizes(); 73 return mSplitter->sizes();
70} 74}
71 75
72void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) 76void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes )
73{ 77{
74 mSplitter->setSizes( sizes ); 78 mSplitter->setSizes( sizes );
75} 79}
76 80
77void TimeSpanView::addItem( KCal::Event *event ) 81void TimeSpanView::addItem( KCal::Event *event )
78{ 82{
79 new QListViewItem( mList, event->summary() ); 83 new Q3ListViewItem( mList, event->summary() );
80 84
81 QDateTime startDt = event->dtStart(); 85 QDateTime startDt = event->dtStart();
82 QDateTime endDt = event->dtEnd(); 86 QDateTime endDt = event->dtEnd();
diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h
index 34cb1f7..f652374 100644
--- a/korganizer/timespanview.h
+++ b/korganizer/timespanview.h
@@ -2,6 +2,8 @@
2#define TIMESPANVIEW_H 2#define TIMESPANVIEW_H
3 3
4#include <qwidget.h> 4#include <qwidget.h>
5//Added by qt3to4:
6#include <Q3ValueList>
5 7
6#include <libkcal/event.h> 8#include <libkcal/event.h>
7 9
@@ -12,7 +14,7 @@ class QKSplitter;
12class QSplitter; 14class QSplitter;
13#define QKSplitter QSplitter 15#define QKSplitter QSplitter
14#endif 16#endif
15class QListView; 17class Q3ListView;
16class LineView; 18class LineView;
17class TimeLine; 19class TimeLine;
18 20
@@ -26,8 +28,8 @@ class TimeSpanView : public QWidget
26 28
27 void addItem( KCal::Event * ); 29 void addItem( KCal::Event * );
28 30
29 QValueList<int> splitterSizes(); 31 Q3ValueList<int> splitterSizes();
30 void setSplitterSizes( QValueList<int> ); 32 void setSplitterSizes( Q3ValueList<int> );
31 33
32 void clear(); 34 void clear();
33 35
@@ -48,7 +50,7 @@ class TimeSpanView : public QWidget
48 50
49 private: 51 private:
50 QKSplitter *mSplitter; 52 QKSplitter *mSplitter;
51 QListView *mList; 53 Q3ListView *mList;
52 TimeLine *mTimeLine; 54 TimeLine *mTimeLine;
53 LineView *mLineView; 55 LineView *mLineView;
54 56