summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
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
@@ -33,20 +33,26 @@
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
@@ -129,5 +135,5 @@
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
@@ -141,5 +147,5 @@ extern 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{
@@ -278,11 +284,11 @@ class KOBeamPrefs : public QDialog
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 );
@@ -313,10 +319,10 @@ class KOCatPrefs : public QDialog
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 ) ;
@@ -374,5 +380,5 @@ void CalendarView::init()
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;
@@ -395,5 +401,5 @@ void CalendarView::init()
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.
@@ -426,7 +432,7 @@ void CalendarView::init()
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
@@ -455,5 +461,5 @@ void CalendarView::init()
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 )) );
@@ -502,6 +508,6 @@ void CalendarView::init()
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
@@ -617,7 +623,7 @@ void CalendarView::init()
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();
@@ -670,5 +676,5 @@ void CalendarView::nextConflict( bool all, bool allday )
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 ) {
@@ -686,5 +692,5 @@ void CalendarView::nextConflict( bool all, bool allday )
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;
@@ -836,5 +842,5 @@ void 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 ) {
@@ -858,5 +864,5 @@ void CalendarView::checkAlarms()
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 );
@@ -868,6 +874,6 @@ void CalendarView::checkAlarms()
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);
@@ -887,7 +893,7 @@ void CalendarView::checkAlarms()
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 );
@@ -1217,5 +1223,5 @@ void CalendarView::computeAlarm( QString msg )
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();
@@ -1267,8 +1273,8 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
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();
@@ -1295,8 +1301,8 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
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();
@@ -1571,5 +1577,5 @@ Event* CalendarView::getLastSyncEvent()
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 ) {
@@ -1601,5 +1607,5 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t
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
@@ -1625,6 +1631,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
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();
@@ -1685,8 +1691,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
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
@@ -1832,5 +1838,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
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;
@@ -2049,5 +2055,5 @@ void CalendarView::syncExternal( int mode )
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 ) {
@@ -2116,5 +2122,5 @@ bool CalendarView::importBday()
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 )
@@ -2187,5 +2193,5 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd
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 )
@@ -2351,5 +2357,5 @@ void CalendarView::setSyncEventsReadOnly()
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 );
@@ -2365,5 +2371,5 @@ bool CalendarView::loadCalendars()
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 ) {
@@ -2530,5 +2536,5 @@ void CalendarView::watchSavedFile()
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 );
@@ -2592,5 +2598,5 @@ bool CalendarView::checkFileVersion(QString fn)
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 );
@@ -2696,5 +2702,5 @@ void CalendarView::readSettings()
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();
@@ -2764,5 +2770,5 @@ void CalendarView::readSettings()
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;
@@ -2843,5 +2849,5 @@ void CalendarView::writeSettings()
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() );
@@ -2870,7 +2876,7 @@ void CalendarView::writeSettings()
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
@@ -3167,5 +3173,5 @@ void CalendarView::checkConflictForEvent()
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;
@@ -3429,5 +3435,5 @@ void CalendarView::slotSelectPickerDate( QDate d)
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;
@@ -3450,5 +3456,5 @@ void CalendarView::removeCategories()
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;
@@ -3508,5 +3514,5 @@ void CalendarView::manageCategories()
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 );
@@ -3514,5 +3520,5 @@ void CalendarView::beamIncidence(Incidence * Inc)
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 );
@@ -3520,9 +3526,9 @@ void CalendarView::beamCalendar()
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
@@ -4316,5 +4322,5 @@ void CalendarView::schedule_publish(Incidence *incidence)
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 ) {
@@ -4725,5 +4731,5 @@ void CalendarView::showDates(const DateList &selectedDates)
4725} 4731}
4726 4732
4727QPtrList<CalFilter> CalendarView::filters() 4733Q3PtrList<CalFilter> CalendarView::filters()
4728{ 4734{
4729 return mFilters; 4735 return mFilters;
@@ -4766,5 +4772,5 @@ void CalendarView::showFilter(bool 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 ) {
@@ -4847,5 +4853,5 @@ void CalendarView::takeOverCalendar()
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());
@@ -4854,5 +4860,5 @@ void CalendarView::takeOverCalendar()
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());
@@ -4861,5 +4867,5 @@ void CalendarView::takeOverCalendar()
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());
@@ -4876,5 +4882,5 @@ void CalendarView::showIntro()
4876} 4882}
4877 4883
4878QWidgetStack *CalendarView::viewStack() 4884Q3WidgetStack *CalendarView::viewStack()
4879{ 4885{
4880 return mRightFrame; 4886 return mRightFrame;
@@ -5061,5 +5067,5 @@ bool 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();
@@ -5087,6 +5093,6 @@ void CalendarView::purgeCompleted()
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;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 60b1276..b4eada7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -25,11 +25,13 @@
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>
@@ -48,5 +50,5 @@
48//#include <koprefs.h> 50//#include <koprefs.h>
49 51
50class QWidgetStack; 52class Q3WidgetStack;
51class QSplitter; 53class QSplitter;
52class KopiCalendarFile; 54class KopiCalendarFile;
@@ -85,11 +87,11 @@ using namespace KCal;
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);
@@ -97,5 +99,5 @@ class MissedAlarmTextBrowser : public QTextBrowser {
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);
@@ -128,5 +130,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
128 QDate endDate(); 130 QDate endDate();
129 131
130 QWidgetStack *viewStack(); 132 Q3WidgetStack *viewStack();
131 QWidget *leftFrame(); 133 QWidget *leftFrame();
132 134
@@ -442,5 +444,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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);
@@ -496,5 +498,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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();
@@ -576,5 +578,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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;
@@ -594,8 +596,8 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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.
@@ -619,5 +621,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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.
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp
index 7b7d54c..ecb9e03 100644
--- a/korganizer/calprintbase.cpp
+++ b/korganizer/calprintbase.cpp
@@ -26,9 +26,11 @@
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>
@@ -146,6 +148,6 @@ CalPrintBase::~CalPrintBase()
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 );
@@ -286,5 +288,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
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;
@@ -302,5 +304,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
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 }
@@ -319,5 +321,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
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);
@@ -359,5 +361,5 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
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}
@@ -402,8 +404,8 @@ void CalPrintBase::drawTimeLine(QPainter &p,
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 );
@@ -411,5 +413,5 @@ void CalPrintBase::drawTimeLine(QPainter &p,
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;
@@ -473,5 +475,5 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
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
@@ -494,5 +496,5 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
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 }
@@ -561,5 +563,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
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
@@ -569,5 +571,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
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();
@@ -594,5 +596,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
594 } 596 }
595 597
596 p.setBrush( QBrush( NoBrush ) ); 598 p.setBrush( QBrush( Qt::NoBrush ) );
597} 599}
598 600
@@ -636,5 +638,5 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
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();
@@ -671,5 +673,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
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 }
@@ -681,5 +683,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
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;
@@ -725,5 +727,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
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 }
@@ -744,5 +746,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
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 }
@@ -850,5 +852,5 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers,
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 }
@@ -898,5 +900,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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();
@@ -911,10 +913,10 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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 );
@@ -934,6 +936,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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 }
@@ -952,10 +953,10 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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
@@ -965,5 +966,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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 );
@@ -982,7 +983,6 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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
@@ -1000,7 +1000,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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);
@@ -1017,6 +1017,6 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
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
@@ -1139,6 +1139,6 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
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();
@@ -1162,5 +1162,5 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
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);
@@ -1172,5 +1172,5 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
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}
@@ -1198,5 +1198,5 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
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
@@ -1255,8 +1255,8 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
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}
@@ -1275,10 +1275,10 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
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() ) {
@@ -1290,8 +1290,8 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
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 );
@@ -1299,5 +1299,5 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
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 ;
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 0cdf28e..d4bf988 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -22,6 +22,6 @@
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>
@@ -29,6 +29,9 @@
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>
@@ -175,12 +178,12 @@ void CalPrinter::updateConfig()
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 );
@@ -192,7 +195,7 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
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,
@@ -201,9 +204,9 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
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
diff --git a/korganizer/calprinter.h b/korganizer/calprinter.h
index 7b58f4f..e065779 100644
--- a/korganizer/calprinter.h
+++ b/korganizer/calprinter.h
@@ -1,2 +1,4 @@
1//Added by qt3to4:
2#include <QLabel>
1/* 3/*
2 This file is part of KOrganizer. 4 This file is part of KOrganizer.
@@ -29,5 +31,5 @@
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>
@@ -39,6 +41,6 @@
39using namespace KCal; 41using namespace KCal;
40 42
41class QVButtonGroup; 43class Q3VButtonGroup;
42class QWidgetStack; 44class Q3WidgetStack;
43class KPrinter; 45class KPrinter;
44class CalPrintDialog; 46class CalPrintDialog;
@@ -95,5 +97,5 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase
95 97
96 protected: 98 protected:
97 QPtrList<CalPrintBase> mPrintPlugins; 99 Q3PtrList<CalPrintBase> mPrintPlugins;
98 100
99 private: 101 private:
@@ -110,5 +112,5 @@ class CalPrintDialog : public KDialogBase
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();
@@ -128,7 +130,7 @@ signals:
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;
diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp
index bc35ca4..9b6dc6e 100644
--- a/korganizer/calprintplugins.cpp
+++ b/korganizer/calprintplugins.cpp
@@ -26,9 +26,9 @@
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>
diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp
index 61d06ac..1fd703c 100644
--- a/korganizer/cellitem.cpp
+++ b/korganizer/cellitem.cpp
@@ -28,5 +28,7 @@
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;
@@ -37,15 +39,15 @@ QString CellItem::label() const
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();
@@ -84,5 +86,5 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
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 );
diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h
index 72773d0..b917bd5 100644
--- a/korganizer/cellitem.h
+++ b/korganizer/cellitem.h
@@ -26,5 +26,5 @@
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30namespace KOrg { 30namespace KOrg {
@@ -54,5 +54,5 @@ class CellItem
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
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index ea510f1..53507d3 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -35,4 +35,6 @@
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,
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 87cc59f..75d387c 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -1,2 +1,5 @@
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.
@@ -101,5 +104,5 @@ class DateNavigatorContainer: public QWidget
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;
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
@@ -12,14 +12,19 @@
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
@@ -28,24 +33,24 @@
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" );
@@ -60,10 +65,10 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
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" );
@@ -77,5 +82,5 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
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" );
@@ -92,5 +97,5 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
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" );
@@ -110,5 +115,4 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
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
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
@@ -13,15 +13,21 @@
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;
@@ -32,13 +38,13 @@ class FilterEdit_base : public QWidget
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;
@@ -54,11 +60,11 @@ public:
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:
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index df84911..a3cff49 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -27,6 +27,11 @@
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>
@@ -54,5 +59,5 @@ public:
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"),
@@ -81,5 +86,5 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent,
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);
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index 42aa3da..c1a52ed 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -24,5 +24,5 @@
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>
@@ -47,5 +47,5 @@ class FilterEditDialog : public KDialogBase
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
@@ -75,5 +75,5 @@ class FilterEditDialog : public KDialogBase
75 75
76 private: 76 private:
77 QPtrList<CalFilter> *mFilters; 77 Q3PtrList<CalFilter> *mFilters;
78 78
79 ComboFilterBox *mSelectionCombo; 79 ComboFilterBox *mSelectionCombo;
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index fe78356..c2402d4 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -18,8 +18,10 @@
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>
@@ -57,7 +59,7 @@
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;
@@ -136,5 +138,5 @@ bool ScheduleItemVisitor::visit(Journal *)
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{
@@ -146,10 +148,10 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
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}
@@ -170,5 +172,5 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing)
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;
@@ -253,5 +255,5 @@ void IncomingDialog::rejectMessage()
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();
@@ -270,5 +272,5 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
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);
@@ -515,5 +517,5 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
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();
diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h
index 413ce6a..e002b25 100644
--- a/korganizer/incomingdialog.h
+++ b/korganizer/incomingdialog.h
@@ -20,5 +20,5 @@
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>
@@ -30,8 +30,8 @@
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() {}
@@ -73,5 +73,5 @@ class IncomingDialog : public IncomingDialog_base
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
@@ -88,5 +88,5 @@ class IncomingDialog : public IncomingDialog_base
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:
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
@@ -12,10 +12,12 @@
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/*
@@ -26,5 +28,5 @@
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
@@ -32,5 +34,5 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo
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" );
@@ -43,5 +45,5 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo
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" ) );
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
@@ -13,10 +13,14 @@
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
@@ -26,10 +30,10 @@ class IncomingDialog_base : public QDialog
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;
@@ -37,5 +41,5 @@ public:
37 41
38protected: 42protected:
39 QGridLayout* IncomingDialog_baseLayout; 43 Q3GridLayout* IncomingDialog_baseLayout;
40 44
41protected slots: 45protected slots:
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
@@ -25,6 +25,6 @@
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>
@@ -89,5 +89,5 @@ class BaseView : public QWidget
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 /**
@@ -154,5 +154,5 @@ class BaseView : public QWidget
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 /**
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
@@ -24,4 +24,6 @@
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
@@ -41,5 +43,5 @@ class CalendarViewBase : public QWidget
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
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 5269af7..2814c61 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -27,12 +27,19 @@
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>
@@ -58,5 +65,5 @@
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
@@ -71,5 +78,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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 );
@@ -130,5 +137,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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);
@@ -136,5 +143,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
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() ) );
@@ -169,5 +176,5 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
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
@@ -187,5 +194,5 @@ void JournalEntry::slotSaveTemplate()
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 ) );
@@ -193,5 +200,5 @@ void JournalEntry::slotSaveTemplate()
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();
@@ -209,10 +216,10 @@ void JournalEntry::slotLoadTemplate()
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();
@@ -317,9 +324,9 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
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 ) {
@@ -336,5 +343,5 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
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
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index ee17da8..0adebe9 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -26,5 +26,10 @@
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>
@@ -38,5 +43,5 @@ class KOLocationBox;
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:
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 6697602..ecc7a2f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -23,10 +23,14 @@
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>
@@ -47,10 +51,10 @@
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()) {
@@ -82,5 +86,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
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
@@ -91,5 +95,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
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) {
@@ -102,5 +106,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
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
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 780ebb8..2cbca76 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -24,7 +24,10 @@
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>
@@ -39,5 +42,5 @@ class KCalendarSystem;
39class NavigatorBar; 42class NavigatorBar;
40 43
41class KDateNavigator: public QFrame 44class KDateNavigator: public Q3Frame
42{ 45{
43 Q_OBJECT 46 Q_OBJECT
@@ -134,6 +137,6 @@ class KDateNavigator: public QFrame
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];
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 1d4d6de..fe59787 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -30,10 +30,21 @@
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>
@@ -64,5 +75,5 @@ extern int globalFlagBlockStartup;
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);
@@ -170,6 +181,6 @@ void MarcusBains::updateLocation(bool recalculate)
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
@@ -191,6 +202,6 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
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;
@@ -232,5 +243,5 @@ void KOAgenda::init()
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 = "";
@@ -241,16 +252,16 @@ void KOAgenda::init()
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;
@@ -264,5 +275,5 @@ void KOAgenda::init()
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()));
@@ -396,9 +407,9 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
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}
@@ -506,9 +517,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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;
@@ -579,8 +590,8 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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) {
@@ -601,5 +612,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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);
@@ -612,6 +623,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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 }
@@ -620,9 +631,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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));
@@ -634,5 +645,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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;
@@ -646,9 +657,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
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
@@ -851,13 +862,13 @@ void KOAgenda::startItemAction(QPoint viewportPos)
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 {
@@ -867,14 +878,14 @@ void KOAgenda::startItemAction(QPoint viewportPos)
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 }
@@ -907,5 +918,5 @@ void KOAgenda::performItemAction(QPoint viewportPos)
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;
@@ -916,16 +927,16 @@ void KOAgenda::performItemAction(QPoint viewportPos)
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 }
@@ -972,5 +983,5 @@ void KOAgenda::performItemAction(QPoint viewportPos)
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) {
@@ -1020,5 +1031,5 @@ void KOAgenda::endItemAction()
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
@@ -1111,5 +1122,5 @@ void KOAgenda::endItemAction()
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;
@@ -1137,10 +1148,10 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
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 {
@@ -1149,11 +1160,11 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
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 }
@@ -1174,7 +1185,7 @@ void 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;
@@ -1241,5 +1252,5 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
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() ) {
@@ -1326,7 +1337,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
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 }
@@ -1343,5 +1354,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
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 }
@@ -1366,5 +1377,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
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 ) {
@@ -1380,5 +1391,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
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 }
@@ -1577,12 +1588,12 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
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() ;
@@ -1718,5 +1729,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
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;
@@ -1748,5 +1759,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
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() )
@@ -1780,5 +1791,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
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;
@@ -1868,5 +1879,5 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd,
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;
@@ -1928,5 +1939,5 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
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
@@ -2017,5 +2028,5 @@ void KOAgenda::popupAlarm()
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();
@@ -2108,14 +2119,14 @@ void 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;
@@ -2147,5 +2158,5 @@ void KOAgenda::setDateList(const DateList &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;
@@ -2163,5 +2174,5 @@ void KOAgenda::contentsMousePressEvent ( QMouseEvent *event )
2163{ 2174{
2164 2175
2165 QScrollView::contentsMousePressEvent(event); 2176 Q3ScrollView::contentsMousePressEvent(event);
2166} 2177}
2167 2178
@@ -2197,5 +2208,5 @@ void 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>
@@ -2203,5 +2214,5 @@ void KOAgenda::moveChild( QWidget *w, int x , int y )
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
@@ -2232,5 +2243,5 @@ void KOAgenda::printSelection()
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 );
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 380ce62..0708341 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -24,18 +24,27 @@
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;
@@ -44,5 +53,5 @@ class KCal::Todo;
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:
@@ -64,5 +73,5 @@ class MarcusBains : public QFrame {
64 73
65 74
66class KOAgenda : public QScrollView 75class KOAgenda : public Q3ScrollView
67{ 76{
68 Q_OBJECT 77 Q_OBJECT
@@ -72,7 +81,7 @@ class KOAgenda : public QScrollView
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;
@@ -118,5 +127,5 @@ class KOAgenda : public QScrollView
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;
@@ -278,8 +287,8 @@ class KOAgenda : public QScrollView
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.
@@ -292,14 +301,14 @@ class KOAgenda : public QScrollView
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;
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 407424d..0f9a38f 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -20,11 +20,21 @@
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>
@@ -58,8 +68,8 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
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:
@@ -73,5 +83,5 @@ private:
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{
@@ -80,6 +90,6 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
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 );
@@ -104,5 +114,5 @@ void KOAgendaItem::initColor ()
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
@@ -133,5 +143,5 @@ void KOAgendaItem::initColor ()
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);
@@ -229,5 +239,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -236,5 +246,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -243,5 +253,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -250,5 +260,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -260,5 +270,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -271,5 +281,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -278,5 +288,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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;
@@ -421,7 +431,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
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 ) {
@@ -436,5 +446,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
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;
@@ -445,7 +455,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
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
@@ -562,5 +572,5 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
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()
@@ -629,5 +639,5 @@ void KOAgendaItem::computeText()
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}
@@ -796,5 +806,5 @@ void KOAgendaItem::expandRight(int dx)
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}
@@ -804,5 +814,5 @@ void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e )
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;
@@ -816,5 +826,5 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
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;
@@ -834,10 +844,10 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
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;
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 27ee720..17cf975 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -20,9 +20,16 @@
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>
@@ -46,5 +53,5 @@ class KOAgendaItem : public QWidget
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();
@@ -97,6 +104,6 @@ class KOAgendaItem : public QWidget
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 );
@@ -162,5 +169,5 @@ class KOAgendaItem : public QWidget
162 QString mDisplayedText; 169 QString mDisplayedText;
163 bool mSelected; 170 bool mSelected;
164 QPtrList<KOAgendaItem> mConflictItems; 171 Q3PtrList<KOAgendaItem> mConflictItems;
165}; 172};
166 173
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6e65a03..87993ae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -22,8 +22,8 @@
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
@@ -32,9 +32,21 @@
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>
@@ -79,6 +91,6 @@ using namespace KOrg;
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 );
@@ -96,5 +108,5 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
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
@@ -284,5 +296,5 @@ void TimeLabels::paintEvent(QPaintEvent*)
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;
@@ -394,5 +406,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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
@@ -402,11 +414,11 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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);
@@ -421,7 +433,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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
@@ -430,5 +442,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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
@@ -438,8 +450,8 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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);
@@ -461,10 +473,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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);
@@ -919,7 +931,7 @@ int KOAgendaView::currentDateCount()
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
@@ -988,6 +1000,6 @@ void KOAgendaView::updateConfig()
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();
@@ -1118,5 +1130,5 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
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;
@@ -1166,9 +1178,9 @@ void KOAgendaView::fillAgenda()
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);
@@ -1301,5 +1313,5 @@ void KOAgendaView::fillAgenda()
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 )
@@ -1504,5 +1516,5 @@ void KOAgendaView::readSettings(KConfig *config)
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 ) {
@@ -1525,5 +1537,5 @@ void KOAgendaView::writeSettings(KConfig *config)
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] );
@@ -1542,5 +1554,5 @@ void KOAgendaView::setHolidayMasks()
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() ) {
@@ -1664,5 +1676,5 @@ void KOAgendaView::updateTodo( Todo * t, int )
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() &&
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 5e68146..3b871d9 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -24,8 +24,9 @@
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>
@@ -33,10 +34,19 @@
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;
@@ -56,5 +66,5 @@ class KOAgendaButton : public QPushButton
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() ) );
@@ -71,8 +81,8 @@ private:
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);
@@ -114,5 +124,5 @@ class TimeLabels : public QScrollView {
114}; 124};
115 125
116class EventIndicator : public QFrame { 126class EventIndicator : public Q3Frame {
117 Q_OBJECT 127 Q_OBJECT
118 public: 128 public:
@@ -133,9 +143,9 @@ class EventIndicator : public QFrame {
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
@@ -160,5 +170,5 @@ class KOAgendaView : public KOEventView {
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 */
@@ -186,5 +196,5 @@ class KOAgendaView : public KOEventView {
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 );
@@ -261,8 +271,8 @@ class KOAgendaView : public KOEventView {
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;
@@ -285,10 +295,10 @@ class KOAgendaView : public KOEventView {
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;
diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h
index c8dcf45..493d9e1 100644
--- a/korganizer/kocounterdialog.h
+++ b/korganizer/kocounterdialog.h
@@ -23,5 +23,5 @@
23// 23//
24 24
25#include <qtextview.h> 25#include <q3textview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 52fd1e8..4f681b3 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -25,7 +25,16 @@
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>
@@ -55,13 +64,13 @@
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
@@ -92,5 +101,5 @@ void DynamicTip::maybeTip( const QPoint &pos )
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
@@ -104,5 +113,5 @@ const 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
@@ -152,5 +161,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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;
@@ -206,5 +215,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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()) {
@@ -221,5 +230,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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 ) {
@@ -442,5 +451,5 @@ void KODayMatrix::updateViewTimed()
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;
@@ -527,5 +536,5 @@ void KODayMatrix::updateViewTimed()
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()) {
@@ -552,5 +561,5 @@ void KODayMatrix::updateViewTimed()
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()) {
@@ -576,5 +585,5 @@ void 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();
@@ -676,5 +685,5 @@ void KODayMatrix::updateEvents()
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;
@@ -740,5 +749,5 @@ void 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());
@@ -753,5 +762,5 @@ void 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;
@@ -1196,5 +1205,5 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
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}
@@ -1209,5 +1218,5 @@ void KODayMatrix::resizeEvent(QResizeEvent * e)
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
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index b96e08f..6edf7cd 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -27,5 +27,5 @@
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>
@@ -35,4 +35,12 @@
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;
@@ -52,5 +60,5 @@ using namespace KCal;
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:
@@ -104,5 +112,5 @@ private:
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
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index ea30fac..deb1e46 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -42,4 +42,6 @@
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 ) :
@@ -189,6 +191,6 @@ void KODialogManager::showSearchDialog()
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()));
@@ -247,5 +249,5 @@ void KODialogManager::showArchiveDialog()
247} 249}
248 250
249void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) 251void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters)
250{ 252{
251 if (!mFilterEditDialog) { 253 if (!mFilterEditDialog) {
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index b68ddc2..00ad1df 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -26,5 +26,5 @@
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>
@@ -79,5 +79,5 @@ class KODialogManager : public QObject
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();
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 9a4b4ec..a01c838 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -23,12 +23,18 @@
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>
@@ -81,5 +87,5 @@ KOEditorDetails::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);
@@ -102,9 +108,9 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
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);
@@ -141,5 +147,5 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
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);
@@ -366,5 +372,5 @@ void KOEditorDetails::readEvent(Incidence *event)
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())
@@ -378,5 +384,5 @@ void 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;
@@ -405,5 +411,5 @@ bool KOEditorDetails::validateInput()
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) {
@@ -452,5 +458,5 @@ void KOEditorDetails::setEnabledAttendeeInput( bool 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 ) {
@@ -463,5 +469,5 @@ void KOEditorDetails::updateAttendeeItem()
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;
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 5f8f6f2..40e896c 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -25,15 +25,15 @@
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>
@@ -84,5 +84,5 @@ class KOEditorDetails : public QWidget
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);
@@ -104,5 +104,5 @@ class KOEditorDetails : public QWidget
104 QPushButton* mAddressBookButton; 104 QPushButton* mAddressBookButton;
105 105
106 QPtrList<Attendee> mdelAttendees; 106 Q3PtrList<Attendee> mdelAttendees;
107}; 107};
108 108
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 21f220c..8105432 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -25,13 +25,20 @@
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>
@@ -70,7 +77,7 @@ KOEditorGeneral::~KOEditorGeneral()
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
@@ -196,8 +203,8 @@ void KOEditorGeneral::selectedCatPopup( int index )
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()));
@@ -215,7 +222,7 @@ void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
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);
@@ -229,5 +236,5 @@ void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
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);
@@ -244,7 +251,7 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
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);
@@ -529,5 +536,5 @@ void KOEditorGeneral::readIncidence(Incidence *event)
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);
@@ -591,5 +598,5 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
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() ) {
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b10a5d4..45f26fd 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -24,17 +24,18 @@
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>
@@ -56,9 +57,9 @@ class KOEditorGeneral : public QObject
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 */
@@ -116,5 +117,5 @@ class KOEditorGeneral : public QObject
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;
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2c6ed9f..73a4139 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -24,9 +24,15 @@
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>
@@ -85,9 +91,9 @@ void KOEditorGeneralEvent::finishSetup()
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);
@@ -95,7 +101,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
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
@@ -119,5 +125,5 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
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);
@@ -130,5 +136,5 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
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
@@ -148,7 +154,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
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);
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index d798905..5d97a5c 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -24,13 +24,13 @@
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
@@ -52,6 +52,6 @@ class KOEditorGeneralEvent : public KOEditorGeneral
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();
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index d32d5a5..baee9fc 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -23,12 +23,19 @@
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>
@@ -83,16 +90,16 @@ void KOEditorGeneralTodo::finishSetup()
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 );
@@ -134,5 +141,5 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
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);
@@ -174,8 +181,8 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
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);
@@ -190,7 +197,7 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
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 );
@@ -397,5 +404,5 @@ void 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)
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index 2e56a7a..2e97ff5 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -24,13 +24,13 @@
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
@@ -51,8 +51,8 @@ class KOEditorGeneralTodo : public KOEditorGeneral
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();
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index e0380c4..e0ae3a0 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -23,15 +23,23 @@
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>
@@ -82,5 +90,5 @@ RecurDaily::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() );
@@ -101,5 +109,5 @@ RecurWeekly::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() );
@@ -107,5 +115,5 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
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 );
@@ -117,6 +125,6 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
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 ) {
@@ -157,10 +165,10 @@ RecurMonthly::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 );
@@ -173,9 +181,9 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
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() );
@@ -190,5 +198,5 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
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") );
@@ -294,10 +302,10 @@ RecurYearly::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 );
@@ -310,9 +318,9 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
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);
@@ -321,5 +329,5 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
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") );
@@ -384,7 +392,7 @@ ExceptionsWidget::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 );
@@ -392,5 +400,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
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 );
@@ -404,5 +412,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
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
@@ -507,12 +515,12 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
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() );
@@ -521,5 +529,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
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 );
@@ -527,5 +535,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
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
@@ -540,5 +548,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
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
@@ -667,5 +675,5 @@ RecurrenceChooser::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 );
@@ -726,5 +734,5 @@ KOEditorRecurrence::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() );
@@ -736,5 +744,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
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 );
@@ -753,5 +761,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
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 );
@@ -760,5 +768,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
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 );
@@ -897,6 +905,6 @@ void KOEditorRecurrence::readEvent(Incidence *event)
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;
@@ -969,5 +977,5 @@ void KOEditorRecurrence::readEvent(Incidence *event)
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() ) {
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 75e0c73..6c012bd 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -24,15 +24,17 @@
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>
@@ -42,5 +44,5 @@
42#include "ktimeedit.h" 44#include "ktimeedit.h"
43 45
44class QWidgetStack; 46class Q3WidgetStack;
45class QSpinBox; 47class QSpinBox;
46 48
@@ -99,5 +101,5 @@ class RecurMonthly : public RecurBase
99 private: 101 private:
100 QRadioButton *mByDayRadio; 102 QRadioButton *mByDayRadio;
101 QComboBox *mByDayCombo; 103 Q3ComboBox *mByDayCombo;
102 104
103 QRadioButton *mByPosRadio; 105 QRadioButton *mByPosRadio;
@@ -123,5 +125,5 @@ class RecurYearly : public RecurBase
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;
@@ -181,5 +183,5 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase
181 private: 183 private:
182 KDateEdit *mExceptionDateEdit; 184 KDateEdit *mExceptionDateEdit;
183 QListBox *mExceptionList; 185 Q3ListBox *mExceptionList;
184 DateList mExceptionDates; 186 DateList mExceptionDates;
185}; 187};
@@ -236,6 +238,6 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
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;
@@ -301,9 +303,9 @@ class KOEditorRecurrence : public QWidget
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
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 3e87197..62ad250 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -23,12 +23,17 @@
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>
@@ -106,6 +111,6 @@ void KOEventEditor::setupGeneral()
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);
@@ -120,11 +125,11 @@ void KOEventEditor::setupGeneral()
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");
@@ -147,7 +152,7 @@ void KOEventEditor::setupGeneral()
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);
@@ -161,16 +166,16 @@ void KOEventEditor::setupGeneral()
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 );
@@ -183,6 +188,6 @@ void KOEventEditor::setupGeneral()
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 );
@@ -357,5 +362,5 @@ void KOEventEditor::slotLoadTemplate()
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 ) {
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index fc4d9a4..81047c1 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -23,4 +23,7 @@
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>
@@ -33,5 +36,5 @@
33#include "koprefs.h" 36#include "koprefs.h"
34 37
35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() 38KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu()
36{ 39{
37 mCurrentIncidence = 0; 40 mCurrentIncidence = 0;
@@ -54,9 +57,9 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
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()));
@@ -66,5 +69,5 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
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);
@@ -75,5 +78,5 @@ void 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);
@@ -147,5 +150,5 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
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());
@@ -156,5 +159,5 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
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)
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h
index e28745b..de5220b 100644
--- a/korganizer/koeventpopupmenu.h
+++ b/korganizer/koeventpopupmenu.h
@@ -27,5 +27,7 @@
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>
@@ -33,10 +35,10 @@
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);
@@ -74,9 +76,9 @@ class KOEventPopupMenu : public QPopupMenu {
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
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1d26930..a4ba85e 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -22,5 +22,5 @@
22*/ 22*/
23 23
24#include <qpopupmenu.h> 24#include <q3popupmenu.h>
25#include <qcursor.h> 25#include <qcursor.h>
26 26
@@ -74,5 +74,5 @@ KOEventPopupMenu *KOEventView::eventPopup()
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;
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index 77ec111..f28e68b 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -31,4 +31,6 @@
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;
@@ -88,5 +90,5 @@ class KOEventView : public KOrg::BaseView
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 /**
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index c0acf34..4df26a9 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -18,10 +18,15 @@
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>
@@ -56,5 +61,5 @@
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>
@@ -63,5 +68,5 @@
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;
@@ -87,5 +92,5 @@ void KOEventViewer::printMe()
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;
@@ -135,5 +140,5 @@ void KOEventViewer::setSource(const QString& n)
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) );
@@ -156,5 +161,5 @@ void KOEventViewer::setSource(const QString& n)
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;
@@ -201,5 +206,5 @@ void KOEventViewer::setSource(const QString& n)
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;
@@ -208,5 +213,5 @@ void KOEventViewer::setSource(const QString& n)
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);
@@ -232,5 +237,5 @@ void KOEventViewer::setSource(const QString& n)
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;
@@ -261,5 +266,5 @@ void KOEventViewer::mailToAttendees( bool all )
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;
@@ -588,5 +593,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
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() )
@@ -622,5 +627,5 @@ void KOEventViewer::formatCategories(Incidence *event)
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
@@ -655,5 +660,5 @@ void KOEventViewer::formatAttendees(Incidence *event)
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 + "\">";
@@ -705,5 +710,5 @@ void KOEventViewer::formatAttendees(Incidence *event)
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() ) {
@@ -863,5 +868,5 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e )
863 break; 868 break;
864 default: 869 default:
865 QTextBrowser::keyPressEvent ( e ); 870 Q3TextBrowser::keyPressEvent ( e );
866 break; 871 break;
867 } 872 }
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 64eb4ff..3df667f 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -23,5 +23,8 @@
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>
@@ -38,5 +41,5 @@ using namespace KCal;
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
@@ -48,11 +51,11 @@ class KOPrintPrefs : public QDialog
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 ) ;
@@ -84,5 +87,5 @@ private:
84#endif 87#endif
85 88
86class KOEventViewer : public QTextBrowser { 89class KOEventViewer : public Q3TextBrowser {
87 Q_OBJECT 90 Q_OBJECT
88 public: 91 public:
@@ -118,5 +121,5 @@ class KOEventViewer : public QTextBrowser {
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);
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 2e936f3..3a37852 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -23,4 +23,7 @@
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"
@@ -28,5 +31,5 @@
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"
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 71696f4..947c10b 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -23,5 +23,8 @@
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>
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ee9c9f6..8335ba9 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -28,8 +28,12 @@
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
@@ -48,6 +52,6 @@
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{
@@ -115,12 +119,12 @@ void KOFilterView::setSelectedFilter( int fil )
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
@@ -248,19 +252,19 @@ void KOCalEditView::readConfig()
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();
@@ -269,21 +273,21 @@ void KOCalEditView::readConfig()
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() );
@@ -292,9 +296,9 @@ void KOCalEditView::readConfig()
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 );
@@ -432,9 +436,9 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask )
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";
@@ -476,5 +480,5 @@ void KOCalEditView::disableRO()
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;
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 0dd423a..f1bbab4 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -27,10 +27,16 @@
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"
@@ -43,5 +49,5 @@
43#include <kmessagebox.h> 49#include <kmessagebox.h>
44 50
45class QGridLayout; 51class Q3GridLayout;
46 52
47using namespace KCal; 53using namespace KCal;
@@ -55,5 +61,5 @@ class KONewCalPrefs : public QDialog
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 );
@@ -111,5 +117,5 @@ class KOCalButton : public QPushButton
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; }
@@ -136,5 +142,5 @@ class KOCalCheckButton : public QCheckBox
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
@@ -164,5 +170,5 @@ class KOCalRadioButton : public QRadioButton
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
@@ -189,5 +195,5 @@ class KOFilterView : public KOFilterView_base
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
@@ -205,8 +211,8 @@ class KOFilterView : public KOFilterView_base
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
@@ -245,10 +251,10 @@ class KOCalEditView : public QScrollView
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
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 79b97e8..63d044c 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -23,18 +23,18 @@
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>
@@ -71,11 +71,11 @@ QDateTime mDdate2Qdtr( DATE dt)
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; };
@@ -90,7 +90,7 @@ KOImportOLdialog::KOImportOLdialog( const QString &caption,
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"));
@@ -213,5 +213,5 @@ void KOImportOLdialog::readCalendarData( DWORD folder )
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() ;
diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h
index c8847c5..d66f099 100644
--- a/korganizer/koimportoldialog.h
+++ b/korganizer/koimportoldialog.h
@@ -32,5 +32,5 @@
32 32
33class QDateTime; 33class QDateTime;
34class QListView; 34class Q3ListView;
35class OLEListViewItem; 35class OLEListViewItem;
36class _AppointmentItem; 36class _AppointmentItem;
@@ -73,5 +73,5 @@ class KOImportOLdialog : public KDialogBase
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
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 236f6f9..2060ea1 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -23,10 +23,12 @@
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>
@@ -83,7 +85,7 @@ KOIncidenceEditor::~KOIncidenceEditor()
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);
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 406df5a..51594ff 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -26,11 +26,17 @@
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>
@@ -52,5 +58,5 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
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;
@@ -64,13 +70,13 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
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();
@@ -97,7 +103,7 @@ JournalEntry* KOJournalView::getNewEntry()
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;
@@ -163,5 +169,5 @@ void KOJournalView::showOnly ( Journal* j )
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 );
@@ -169,5 +175,5 @@ void KOJournalView::showOnly ( Journal* j )
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;
@@ -226,9 +232,9 @@ void KOJournalView::showDates(const QDate &start, const QDate &)
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.
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 7fa94ae..22f26cd 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -26,4 +26,9 @@
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;
@@ -47,5 +52,5 @@ class KOJournalView : public KOrg::BaseView
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;
@@ -61,15 +66,15 @@ class KOJournalView : public KOrg::BaseView
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;
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 192f8c0..0ea1d50 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -23,18 +23,27 @@
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>
@@ -71,8 +80,8 @@ extern 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:
@@ -275,27 +284,27 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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
@@ -307,18 +316,18 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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
@@ -328,8 +337,8 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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);
@@ -357,5 +366,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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);
@@ -376,11 +385,11 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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 *)) );
@@ -429,5 +438,5 @@ void KOListView::setCalendar( int c )
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 ) {
@@ -443,5 +452,5 @@ void KOListView::setCalendar( int c )
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 ) {
@@ -498,5 +507,5 @@ void KOListView::setAlarm()
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;
@@ -523,5 +532,5 @@ void KOListView::setAlarm()
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() ) {
@@ -553,5 +562,5 @@ void KOListView::setCategories( bool removeOld )
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 ) {
@@ -573,5 +582,5 @@ void KOListView::setCategories( bool removeOld )
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 );
@@ -588,5 +597,5 @@ void KOListView::saveDescriptionToFile()
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 ) {
@@ -646,9 +655,9 @@ void KOListView::saveDescriptionToFile()
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();
@@ -668,10 +677,10 @@ void KOListView::saveToFile()
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() ) {
@@ -707,5 +716,5 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
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();
@@ -731,5 +740,5 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
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;
@@ -804,6 +813,6 @@ void KOListView::writeToFile( bool iCal )
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() ) {
@@ -814,5 +823,5 @@ void KOListView::hideAll()
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;
@@ -825,5 +834,5 @@ void KOListView::printList()
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();
@@ -839,9 +848,9 @@ void KOListView::deleteAll()
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;
@@ -885,8 +894,8 @@ int KOListView::currentDateCount()
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() ) {
@@ -988,5 +997,5 @@ void KOListView::showDates(const QDate &start, const QDate &end)
988} 997}
989 998
990void KOListView::addEvents(QPtrList<Event> eventList) 999void KOListView::addEvents(Q3PtrList<Event> eventList)
991{ 1000{
992 1001
@@ -1000,5 +1009,5 @@ void KOListView::addEvents(QPtrList<Event> eventList)
1000} 1009}
1001 1010
1002void KOListView::addTodos(QPtrList<Todo> eventList) 1011void KOListView::addTodos(Q3PtrList<Todo> eventList)
1003{ 1012{
1004 Todo *ev; 1013 Todo *ev;
@@ -1010,5 +1019,5 @@ void KOListView::addTodos(QPtrList<Todo> eventList)
1010 } 1019 }
1011} 1020}
1012void KOListView::addJournals(QPtrList<Journal> eventList) 1021void KOListView::addJournals(Q3PtrList<Journal> eventList)
1013{ 1022{
1014 Journal *ev; 1023 Journal *ev;
@@ -1045,5 +1054,5 @@ void KOListView::addIncidence(Incidence *incidence)
1045} 1054}
1046 1055
1047void KOListView::showEvents(QPtrList<Event> eventList) 1056void KOListView::showEvents(Q3PtrList<Event> eventList)
1048{ 1057{
1049 clear(); 1058 clear();
@@ -1096,5 +1105,5 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event)
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 );
@@ -1103,5 +1112,5 @@ void KOListView::defaultItemAction(QListViewItem *i)
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;
@@ -1132,5 +1141,5 @@ void KOListView::writeSettings(KConfig *config, QString setting)
1132} 1141}
1133 1142
1134void KOListView::processSelectionChange(QListViewItem *) 1143void KOListView::processSelectionChange(Q3ListViewItem *)
1135{ 1144{
1136 1145
@@ -1181,6 +1190,6 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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();
@@ -1195,8 +1204,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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 )
@@ -1212,11 +1221,11 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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 );
@@ -1226,8 +1235,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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 )
@@ -1242,9 +1251,9 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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 ) {
@@ -1266,10 +1275,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
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
@@ -1301,10 +1310,10 @@ KOListViewListView::KOListViewListView(KOListView * lv )
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 )
@@ -1318,5 +1327,5 @@ void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
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();
@@ -1330,6 +1339,6 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
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 )
@@ -1349,5 +1358,5 @@ void 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
@@ -1357,5 +1366,5 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
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());
@@ -1363,6 +1372,6 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
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 )
@@ -1391,5 +1400,5 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
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()
@@ -1408,5 +1417,5 @@ void KOListViewListView::printList()
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;
@@ -1444,5 +1453,5 @@ void KOListViewListView::printList()
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();
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 99d0561..9fb0b00 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -25,7 +25,13 @@
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>
@@ -48,5 +54,5 @@ class KOListViewWhatsThis;
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>
@@ -61,5 +67,5 @@ class KOAlarmPrefs : public QDialog
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 );
@@ -75,5 +81,5 @@ class KOAlarmPrefs : public QDialog
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);
@@ -211,5 +217,5 @@ class KOListViewListView : public KListView
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:
@@ -241,11 +247,11 @@ class KOListView : public KOEventView
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 &);
@@ -258,9 +264,9 @@ class KOListView : public KOEventView
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:
@@ -270,5 +276,5 @@ class KOListView : public KOEventView
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();
@@ -288,16 +294,16 @@ class KOListView : public KOEventView
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);
@@ -305,10 +311,10 @@ class KOListView : public KOEventView
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 * ) ;
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 85e9166..ca55c43 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -18,20 +18,32 @@
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
@@ -60,8 +72,8 @@
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
@@ -78,5 +90,5 @@ private:
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
@@ -86,6 +98,6 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
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()
@@ -101,5 +113,5 @@ KNoScrollListBox::~KNoScrollListBox()
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();
@@ -113,22 +125,22 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
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 }
@@ -142,8 +154,8 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
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 );
@@ -153,5 +165,5 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
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!");
@@ -166,5 +178,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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 {
@@ -174,5 +186,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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 {
@@ -182,5 +194,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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();
@@ -202,5 +214,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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();
@@ -222,10 +234,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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 ) {
@@ -237,5 +249,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
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;
@@ -267,5 +279,5 @@ void 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;
@@ -277,7 +289,7 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
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 }
@@ -285,5 +297,5 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
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;
@@ -396,5 +408,5 @@ void MonthViewItem::paint(QPainter *p)
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 );
@@ -403,5 +415,5 @@ void MonthViewItem::paint(QPainter *p)
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 );
@@ -463,5 +475,5 @@ void MonthViewItem::paint(QPainter *p)
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;
@@ -471,5 +483,5 @@ int MonthViewItem::height(const QListBox *lb) const
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 ) {
@@ -515,8 +527,8 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
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 );
@@ -530,11 +542,11 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
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 /*
@@ -546,5 +558,5 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
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}
@@ -638,5 +650,5 @@ void MonthViewCell::startUpdateCell()
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;
@@ -693,5 +705,5 @@ int MonthViewCell::insertEvent(Event *event)
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 )
@@ -835,5 +847,5 @@ int MonthViewCell::insertEvent(Event *event)
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;
@@ -851,5 +863,5 @@ int MonthViewCell::insertEvent(Event *event)
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()) {
@@ -923,5 +935,5 @@ void MonthViewCell::finishUpdateCell()
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
@@ -939,5 +951,5 @@ void MonthViewCell::updateCell()
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
@@ -945,5 +957,5 @@ void MonthViewCell::updateCell()
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()) {
@@ -993,26 +1005,26 @@ void MonthViewCell::enableScrollBars( bool enabled )
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}
@@ -1084,5 +1096,5 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e )
1084} 1096}
1085 1097
1086void MonthViewCell::defaultAction( QListBoxItem *item ) 1098void MonthViewCell::defaultAction( Q3ListBoxItem *item )
1087{ 1099{
1088 1100
@@ -1106,5 +1118,5 @@ void MonthViewCell::newEvent()
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 );
@@ -1117,5 +1129,5 @@ void MonthViewCell::cellClicked( QListBoxItem *item )
1117} 1129}
1118 1130
1119void MonthViewCell::contextMenu( QListBoxItem *item ) 1131void MonthViewCell::contextMenu( Q3ListBoxItem *item )
1120{ 1132{
1121 mMonthView->setPopupCell( this ); 1133 mMonthView->setPopupCell( this );
@@ -1134,5 +1146,5 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
1134} 1146}
1135 1147
1136void MonthViewCell::selection( QListBoxItem *item ) 1148void MonthViewCell::selection( Q3ListBoxItem *item )
1137{ 1149{
1138 if ( !item ) { 1150 if ( !item ) {
@@ -1186,6 +1198,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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 );
@@ -1216,13 +1228,13 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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 }
@@ -1233,9 +1245,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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);
@@ -1244,14 +1256,14 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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);
@@ -1260,5 +1272,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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
@@ -1306,11 +1318,11 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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);
@@ -1326,5 +1338,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
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);
@@ -1398,5 +1410,5 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1398 } 1410 }
1399 } 1411 }
1400 QPtrVector<MonthViewCell> *cells; 1412 Q3PtrVector<MonthViewCell> *cells;
1401 if ( weekview ) 1413 if ( weekview )
1402 cells = &mCellsW; 1414 cells = &mCellsW;
@@ -1496,7 +1508,7 @@ int KOMonthView::currentDateCount()
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 ) {
@@ -1562,5 +1574,5 @@ void KOMonthView::updateConfig()
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();
@@ -1570,5 +1582,5 @@ void KOMonthView::updateDayLabels()
1570{ 1582{
1571 1583
1572 QPtrVector<QLabel> *mDayLabelsT; 1584 Q3PtrVector<QLabel> *mDayLabelsT;
1573 1585
1574 mDayLabelsT = &mDayLabelsW; 1586 mDayLabelsT = &mDayLabelsW;
@@ -1611,7 +1623,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
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;
@@ -1669,5 +1681,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
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. ");
@@ -1691,5 +1703,5 @@ void KOMonthView::updateView()
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;
@@ -1706,5 +1718,5 @@ void KOMonthView::updateView()
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;
@@ -1770,5 +1782,5 @@ void KOMonthView::updateView()
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()) {
@@ -2226,5 +2238,5 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell )
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() );
@@ -2262,5 +2274,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
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 ) {
@@ -2273,5 +2285,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
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 ) {
@@ -2285,6 +2297,6 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
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() );
@@ -2292,5 +2304,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
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();
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 1a9d16d..bca76e5 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -22,15 +22,22 @@
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>
@@ -73,5 +80,5 @@ private slots :
73}; 80};
74 81
75class KNoScrollListBox: public QListBox 82class KNoScrollListBox: public Q3ListBox
76{ 83{
77 Q_OBJECT 84 Q_OBJECT
@@ -104,5 +111,5 @@ class KNoScrollListBox: public QListBox
104 111
105 112
106class MonthViewItem: public QListBoxItem 113class MonthViewItem: public Q3ListBoxItem
107{ 114{
108 public: 115 public:
@@ -127,6 +134,6 @@ class MonthViewItem: public QListBoxItem
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:
@@ -199,13 +206,13 @@ public slots:
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;
@@ -248,5 +255,5 @@ class KOMonthView: public KOEventView
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 */
@@ -270,5 +277,5 @@ class KOMonthView: public KOEventView
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);
@@ -312,5 +319,5 @@ class KOMonthView: public KOEventView
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;
@@ -326,10 +333,10 @@ class KOMonthView: public KOEventView
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;
@@ -343,5 +350,5 @@ class KOMonthView: public KOEventView
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 * ) ;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5078c57..0bd46ea 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -27,5 +27,5 @@
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>
@@ -306,5 +306,5 @@ KOPrefs::KOPrefs() :
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");
@@ -312,5 +312,5 @@ KOPrefs::KOPrefs() :
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);
@@ -567,5 +567,5 @@ void KOPrefs::usrWriteConfig()
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()));
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 94bdd33..35c6110 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -26,7 +26,10 @@
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;
@@ -348,5 +351,5 @@ class KOPrefs : public KPimPrefs
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;
@@ -363,6 +366,6 @@ class KOPrefs : public KPimPrefs
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
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index f1a6c3d..43c488f 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -24,14 +24,14 @@
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>
@@ -40,6 +40,12 @@
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>
@@ -117,6 +123,6 @@ void 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);
@@ -173,6 +179,6 @@ void KOPrefsDialog::setupLocaleTab()
173{ 179{
174#if 0 180#if 0
175 QFrame *topFrame = addPage(i18n("Locale"),0,0); 181 Q3Frame *topFrame = addPage(i18n("Locale"),0,0);
176 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 182 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
177 topLayout->setSpacing(mSpacingHint); 183 topLayout->setSpacing(mSpacingHint);
178 topLayout->setMargin(mMarginHint); 184 topLayout->setMargin(mMarginHint);
@@ -212,5 +218,5 @@ void KOPrefsDialog::setupLocaleTab()
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"),
@@ -237,8 +243,8 @@ void KOPrefsDialog::setupLocaleTab()
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);
@@ -288,10 +294,10 @@ void KOPrefsDialog::setupMainTab()
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);
@@ -314,5 +320,5 @@ void KOPrefsDialog::setupMainTab()
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);
@@ -403,12 +409,12 @@ void KOPrefsDialog::setupMainTab()
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),
@@ -442,5 +448,5 @@ void KOPrefsDialog::setupTimeTab()
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);
@@ -448,5 +454,5 @@ void KOPrefsDialog::setupTimeTab()
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);
@@ -454,14 +460,14 @@ void KOPrefsDialog::setupTimeTab()
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"),
@@ -483,8 +489,8 @@ void KOPrefsDialog::setupViewsTab()
483{ 489{
484 490
485 QFrame *topFrame = addPage(i18n("Views"),0,0); 491 Q3Frame *topFrame = addPage(i18n("Views"),0,0);
486 // DesktopIcon("viewmag",KIcon::SizeMedium)); 492 // DesktopIcon("viewmag",KIcon::SizeMedium));
487 493
488 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 494 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1);
489 topLayout->setSpacing(mSpacingHint); 495 topLayout->setSpacing(mSpacingHint);
490 topLayout->setMargin(mMarginHint); 496 topLayout->setMargin(mMarginHint);
@@ -531,5 +537,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -595,5 +601,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -653,10 +659,10 @@ void KOPrefsDialog::setupViewsTab()
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 );
@@ -678,5 +684,5 @@ void KOPrefsDialog::setupViewsTab()
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 );
@@ -731,5 +737,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -765,5 +771,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -771,5 +777,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -777,5 +783,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -819,5 +825,5 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -856,5 +862,5 @@ dummy =
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() );
@@ -866,5 +872,5 @@ dummy =
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() );
@@ -874,5 +880,5 @@ dummy =
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:"),
@@ -891,5 +897,5 @@ dummy =
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);
@@ -930,5 +936,5 @@ dummy =
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);
@@ -937,7 +943,7 @@ dummy =
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\""),
@@ -971,5 +977,5 @@ dummy =
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);
@@ -990,24 +996,24 @@ dummy =
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);
@@ -1016,5 +1022,5 @@ dummy =
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);
@@ -1056,8 +1062,8 @@ void KOPrefsDialog::setupFontsTab()
1056{ 1062{
1057 1063
1058 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1064 Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
1059 // DesktopIcon("fonts",KIcon::SizeMedium)); 1065 // DesktopIcon("fonts",KIcon::SizeMedium));
1060 1066
1061 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1067 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
1062 topLayout->setSpacing(1); 1068 topLayout->setSpacing(1);
1063 topLayout->setMargin(3); 1069 topLayout->setMargin(3);
@@ -1126,5 +1132,5 @@ void KOPrefsDialog::setupFontsTab()
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);
@@ -1194,8 +1200,8 @@ void KOPrefsDialog::setupFontsTab()
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);
@@ -1205,7 +1211,7 @@ void KOPrefsDialog::setupColorsTab()
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);
@@ -1251,5 +1257,5 @@ void KOPrefsDialog::setupColorsTab()
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);
@@ -1318,5 +1324,5 @@ void KOPrefsDialog::setupPrinterTab()
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);
@@ -1328,8 +1334,8 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1328{ 1334{
1329#if 0 1335#if 0
1330 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1336 Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0,
1331 DesktopIcon("personal",KIcon::SizeMedium)); 1337 DesktopIcon("personal",KIcon::SizeMedium));
1332 1338
1333 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1339 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
1334 topLayout->setSpacing(mSpacingHint); 1340 topLayout->setSpacing(mSpacingHint);
1335 topLayout->setMargin(mMarginHint); 1341 topLayout->setMargin(mMarginHint);
@@ -1354,5 +1360,5 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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);
@@ -1372,5 +1378,5 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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}
@@ -1379,8 +1385,8 @@ void KOPrefsDialog::setupGroupAutomationTab()
1379{ 1385{
1380 return; 1386 return;
1381 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1387 Q3Frame *topFrame = addPage(i18n("Group Automation"),0,
1382 DesktopIcon("personal",KIcon::SizeMedium)); 1388 DesktopIcon("personal",KIcon::SizeMedium));
1383 1389
1384 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1390 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1);
1385 topLayout->setSpacing(mSpacingHint); 1391 topLayout->setSpacing(mSpacingHint);
1386 topLayout->setMargin(mMarginHint); 1392 topLayout->setMargin(mMarginHint);
@@ -1516,5 +1522,5 @@ void KOPrefsDialog::usrWriteConfig()
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());
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index ee7a7aa..ccc1726 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -24,8 +24,10 @@
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>
@@ -95,5 +97,5 @@ class KOPrefsDialog : public KPrefsDialog
95 KPrefsDialogWidBool *mEnableProjectView; 97 KPrefsDialogWidBool *mEnableProjectView;
96 98
97 QFrame *mPrinterTab; 99 Q3Frame *mPrinterTab;
98 100
99 QLineEdit *nameEdit; 101 QLineEdit *nameEdit;
@@ -122,5 +124,5 @@ class KOPrefsDialog : public KPrefsDialog
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;
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index df8f8d7..0f3b328 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,4 +1,4 @@
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/
@@ -18,25 +18,25 @@ unix : {
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
@@ -50,8 +50,8 @@ win32: {
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
@@ -86,5 +86,6 @@ TARGET = kopi_me
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
@@ -211,5 +212,6 @@ filteredit_base.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 \
@@ -217,2 +219,7 @@ INTERFACES += calprintdayconfig_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
@@ -12,7 +12,7 @@ DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_N
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
diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp
index 3265a3a..a214720 100644
--- a/korganizer/kotimespanview.cpp
+++ b/korganizer/kotimespanview.cpp
@@ -1,3 +1,7 @@
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>
@@ -12,5 +16,5 @@ KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
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 );
@@ -35,5 +39,5 @@ void KOTimeSpanView::readSettings(KConfig *config)
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);
@@ -47,5 +51,5 @@ void KOTimeSpanView::writeSettings(KConfig *config)
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}
@@ -61,7 +65,7 @@ int KOTimeSpanView::currentDateCount()
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;
@@ -85,7 +89,7 @@ void 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 ) {
@@ -101,5 +105,5 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
101} 105}
102 106
103void KOTimeSpanView::showEvents(QPtrList<Event> eventList) 107void KOTimeSpanView::showEvents(Q3PtrList<Event> eventList)
104{ 108{
105} 109}
diff --git a/korganizer/kotimespanview.h b/korganizer/kotimespanview.h
index c682ed8..c3e4b41 100644
--- a/korganizer/kotimespanview.h
+++ b/korganizer/kotimespanview.h
@@ -3,4 +3,6 @@
3 3
4#include "koeventview.h" 4#include "koeventview.h"
5//Added by qt3to4:
6#include <Q3PtrList>
5 7
6class KConfig; 8class KConfig;
@@ -17,5 +19,5 @@ class KOTimeSpanView : public KOEventView
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;
@@ -29,5 +31,5 @@ class KOTimeSpanView : public KOEventView
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);
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 20a35d2..aeab92a 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -24,13 +24,18 @@
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>
@@ -82,6 +87,6 @@ void KOTodoEditor::init()
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 );
@@ -112,7 +117,7 @@ void KOTodoEditor::setupGeneral()
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());
@@ -132,15 +137,15 @@ void KOTodoEditor::setupGeneral()
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");
@@ -165,11 +170,11 @@ void KOTodoEditor::setupGeneral()
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
@@ -186,7 +191,7 @@ void KOTodoEditor::setupGeneral()
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
@@ -194,8 +199,8 @@ void KOTodoEditor::setupGeneral()
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 );
@@ -428,5 +433,5 @@ void KOTodoEditor::slotLoadTemplate()
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 ) {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index ba94057..2b8fbd3 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -22,8 +22,10 @@
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>
@@ -32,5 +34,19 @@
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"
@@ -69,10 +85,10 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na
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 );
@@ -99,18 +115,18 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
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 );
@@ -174,8 +190,8 @@ void KOStopTodoPrefs::doNotSave()
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:
@@ -215,5 +231,5 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
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;
@@ -231,5 +247,5 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
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;
@@ -256,5 +272,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
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;
@@ -301,5 +317,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
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()) ));
@@ -324,5 +340,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
324void KOTodoListView::wheelEvent (QWheelEvent *e) 340void KOTodoListView::wheelEvent (QWheelEvent *e)
325{ 341{
326 QListView::wheelEvent (e); 342 Q3ListView::wheelEvent (e);
327} 343}
328 344
@@ -331,5 +347,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
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) {
@@ -349,5 +365,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
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;
@@ -359,7 +375,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
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}
@@ -367,5 +383,5 @@ void 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)
@@ -377,5 +393,5 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
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 );
@@ -423,5 +439,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
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();
@@ -429,5 +445,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
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
@@ -450,10 +466,10 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
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;
@@ -469,5 +485,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
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}
@@ -479,5 +495,5 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
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);
@@ -493,5 +509,5 @@ KOQuickTodo::KOQuickTodo(QWidget *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
@@ -524,5 +540,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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;
@@ -531,5 +547,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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 );
@@ -569,17 +585,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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 );
@@ -602,17 +618,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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"));
@@ -624,5 +640,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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
@@ -633,10 +649,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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);
@@ -645,5 +661,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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);
@@ -653,10 +669,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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)));
@@ -666,5 +682,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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()));
@@ -711,5 +727,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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);
@@ -747,6 +763,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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 *,
@@ -754,29 +770,29 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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
@@ -882,5 +898,5 @@ void KOTodoView::updateView()
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/*
@@ -1045,5 +1061,5 @@ bool KOTodoView::checkTodo( Todo * todo )
1045} 1061}
1046 1062
1047void KOTodoView::restoreItemState( QListViewItem *item ) 1063void KOTodoView::restoreItemState( Q3ListViewItem *item )
1048{ 1064{
1049 pendingSubtodo = 0; 1065 pendingSubtodo = 0;
@@ -1097,7 +1113,7 @@ void KOTodoView::updateConfig()
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());
@@ -1108,7 +1124,7 @@ QPtrList<Incidence> KOTodoView::selectedIncidences()
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());
@@ -1128,5 +1144,5 @@ void KOTodoView::showDates(const QDate &, const QDate &)
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;
@@ -1141,5 +1157,5 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1141} 1157}
1142 1158
1143void KOTodoView::editItem(QListViewItem *item ) 1159void KOTodoView::editItem(Q3ListViewItem *item )
1144{ 1160{
1145 if ( item ) 1161 if ( item )
@@ -1147,5 +1163,5 @@ void KOTodoView::editItem(QListViewItem *item )
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 )
@@ -1153,5 +1169,5 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
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;
@@ -1362,5 +1378,5 @@ void KOTodoView::toggleRunningItemQuick()
1362 } 1378 }
1363} 1379}
1364void KOTodoView::itemDoubleClicked(QListViewItem *item) 1380void KOTodoView::itemDoubleClicked(Q3ListViewItem *item)
1365{ 1381{
1366 if ( pendingSubtodo != 0 ) { 1382 if ( pendingSubtodo != 0 ) {
@@ -1429,5 +1445,5 @@ void KOTodoView::toggleRunningItem()
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);
@@ -1442,5 +1458,5 @@ void KOTodoView::itemClicked(QListViewItem *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 ) {
@@ -1470,5 +1486,5 @@ void KOTodoView::setDocumentId( const QString &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;
@@ -1543,5 +1559,5 @@ void KOTodoView::setAllClose()
1543 resetCurrentItem(); 1559 resetCurrentItem();
1544} 1560}
1545void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1561void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI)
1546{ 1562{
1547 1563
@@ -1564,5 +1580,5 @@ void KOTodoView::displayAllFlat()
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()) {
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 0cbc087..a9e7f30 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -27,13 +27,23 @@
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
@@ -102,5 +112,5 @@ class KOTodoListView : public KListView
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 *);
@@ -125,5 +135,5 @@ class KOTodoListView : public KListView
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 * ) ;
@@ -158,6 +168,6 @@ class KOTodoView : public KOrg::BaseView
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()
@@ -185,12 +195,12 @@ class KOTodoView : public KOrg::BaseView
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();
@@ -220,8 +230,8 @@ class KOTodoView : public KOrg::BaseView
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 ();
@@ -274,16 +284,16 @@ class KOTodoView : public KOrg::BaseView
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;
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 519bb16..c21816d 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -20,5 +20,9 @@
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
@@ -28,6 +32,6 @@
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();
@@ -35,5 +39,5 @@ KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotod
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();
@@ -81,5 +85,5 @@ void 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
@@ -317,5 +321,5 @@ void KOTodoViewItem::stateChange(bool state)
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 ) {
@@ -326,5 +330,5 @@ void KOTodoViewItem::stateChange(bool state)
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);
@@ -384,10 +388,10 @@ bool KOTodoViewItem::isAlternate()
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
@@ -477,5 +481,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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,
@@ -483,5 +487,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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;
@@ -495,10 +499,10 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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;
@@ -523,5 +527,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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();
@@ -540,5 +544,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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);
@@ -556,5 +560,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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 }
@@ -566,7 +570,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
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;
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index bd024c8..62a635c 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -23,11 +23,11 @@
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
@@ -46,5 +46,5 @@ class KOTodoView;
46 @see KOTodoView 46 @see KOTodoView
47*/ 47*/
48class KOTodoViewItem : public QCheckListItem 48class KOTodoViewItem : public Q3CheckListItem
49{ 49{
50 public: 50 public:
@@ -55,5 +55,5 @@ class KOTodoViewItem : public QCheckListItem
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() );}
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4057ae0..07c4295 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -24,5 +24,7 @@
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>
@@ -458,6 +460,6 @@ void KOViewManager::showListView()
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;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -19,5 +19,5 @@
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>
@@ -25,6 +25,12 @@
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>
@@ -43,5 +49,5 @@
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;
@@ -57,5 +63,5 @@ void WhatsNextTextBrowser::setSource(const QString& n)
57 return; 63 return;
58 } else { 64 } else {
59 QTextBrowser::setSource(n); 65 Q3TextBrowser::setSource(n);
60 } 66 }
61} 67}
@@ -73,5 +79,5 @@ void WhatsNextTextBrowser::printMe()
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;
@@ -104,17 +110,17 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
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);
@@ -145,7 +151,7 @@ void KOWhatsNextView::clearList()
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;
@@ -220,6 +226,6 @@ void KOWhatsNextView::updateView()
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";
@@ -455,5 +461,5 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &)
455} 461}
456 462
457void KOWhatsNextView::showEvents(QPtrList<Event>) 463void KOWhatsNextView::showEvents(Q3PtrList<Event>)
458{ 464{
459} 465}
@@ -742,5 +748,5 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
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()) {
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 93574ef..49fc448 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -20,10 +20,16 @@
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
@@ -32,8 +38,8 @@ class KOEventViewerDialog;
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 &);
@@ -59,5 +65,5 @@ class KOWhatsNextView : public KOrg::BaseView
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()
@@ -71,5 +77,5 @@ class KOWhatsNextView : public KOrg::BaseView
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);
@@ -97,5 +103,5 @@ class KOWhatsNextView : public KOrg::BaseView
97 KOEventViewerDialog *mEventViewer; 103 KOEventViewerDialog *mEventViewer;
98 104
99 QValueList<Incidence *> mTodos; 105 Q3ValueList<Incidence *> mTodos;
100}; 106};
101 107
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index df9b2fc..e2ae4a6 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -22,10 +22,13 @@
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>
@@ -46,5 +49,5 @@
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);
@@ -65,10 +68,10 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
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)));
@@ -209,6 +212,6 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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 }
@@ -221,10 +224,10 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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 );
@@ -268,5 +271,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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 );
@@ -311,5 +314,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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;
@@ -322,5 +325,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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;
@@ -331,11 +334,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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 )
@@ -343,5 +346,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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);
@@ -353,5 +356,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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;
@@ -368,6 +371,6 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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);
@@ -375,33 +378,33 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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 )
@@ -412,9 +415,9 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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();
@@ -426,11 +429,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
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);
diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h
index b3d842d..1c7d18d 100644
--- a/korganizer/ktimeedit.h
+++ b/korganizer/ktimeedit.h
@@ -25,8 +25,11 @@
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>
@@ -39,5 +42,5 @@
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
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp
index e72e41c..012455e 100644
--- a/korganizer/lineview.cpp
+++ b/korganizer/lineview.cpp
@@ -8,5 +8,5 @@
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;
diff --git a/korganizer/lineview.h b/korganizer/lineview.h
index aa34dbc..52ae9cf 100644
--- a/korganizer/lineview.h
+++ b/korganizer/lineview.h
@@ -2,8 +2,8 @@
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
@@ -29,5 +29,5 @@ class LineView : public QScrollView
29 }; 29 };
30 30
31 QPtrList<Line> mLines; 31 Q3PtrList<Line> mLines;
32 int mPixelWidth; 32 int mPixelWidth;
33}; 33};
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4a0e24f..211fde6 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -5,4 +5,6 @@
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
@@ -10,6 +12,4 @@
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
@@ -27,4 +27,5 @@ void dumpMissing();
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 );
@@ -32,5 +33,4 @@ int main( int argc, char **argv )
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") );
@@ -90,5 +90,5 @@ int main( int argc, char **argv )
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
@@ -99,5 +99,5 @@ int main( int argc, char **argv )
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];
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 69ccde1..2004939 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2,7 +2,8 @@
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>
@@ -11,5 +12,5 @@
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>
@@ -17,7 +18,7 @@
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>
@@ -29,6 +30,15 @@
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
@@ -81,20 +91,20 @@ class KOex2phonePrefs : public QDialog
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);
@@ -103,5 +113,5 @@ class KOex2phonePrefs : public QDialog
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);
@@ -109,5 +119,5 @@ class KOex2phonePrefs : public QDialog
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 );
@@ -135,5 +145,5 @@ QPixmap* sgListViewJournalPix;
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;
@@ -186,16 +196,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
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 )
@@ -214,13 +224,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
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 );
@@ -231,5 +241,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
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";
@@ -260,13 +270,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
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 );
@@ -274,13 +284,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
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 );
@@ -441,7 +451,7 @@ void MainWindow::loadDataAfterStart()
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 );
@@ -510,5 +520,5 @@ void MainWindow::toggleBeamReceive()
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}
@@ -601,5 +611,5 @@ void MainWindow::closeEvent( QCloseEvent* ce )
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() );
@@ -607,7 +617,7 @@ void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data )
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;
@@ -616,5 +626,5 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& 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;
@@ -745,19 +755,19 @@ void MainWindow::initActions()
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 = "";
@@ -792,5 +802,5 @@ void MainWindow::initActions()
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);
@@ -819,5 +829,5 @@ void MainWindow::initActions()
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 );
@@ -841,9 +851,9 @@ void MainWindow::initActions()
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 ) ) );
@@ -852,5 +862,5 @@ void MainWindow::initActions()
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 );
@@ -867,5 +877,5 @@ void MainWindow::initActions()
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() ),
@@ -873,5 +883,5 @@ void MainWindow::initActions()
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() ),
@@ -879,5 +889,5 @@ void MainWindow::initActions()
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() ),
@@ -885,15 +895,15 @@ void MainWindow::initActions()
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() ),
@@ -903,14 +913,14 @@ void MainWindow::initActions()
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 );
@@ -931,15 +941,15 @@ void MainWindow::initActions()
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() ),
@@ -947,19 +957,19 @@ void MainWindow::initActions()
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() ),
@@ -968,5 +978,5 @@ void MainWindow::initActions()
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() ),
@@ -980,5 +990,5 @@ void MainWindow::initActions()
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() ));
@@ -988,5 +998,5 @@ void MainWindow::initActions()
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() ),
@@ -995,5 +1005,5 @@ void MainWindow::initActions()
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() ),
@@ -1002,5 +1012,5 @@ void MainWindow::initActions()
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() ),
@@ -1032,5 +1042,5 @@ void MainWindow::initActions()
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() ),
@@ -1039,5 +1049,5 @@ void MainWindow::initActions()
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() ),
@@ -1047,5 +1057,5 @@ void MainWindow::initActions()
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() ),
@@ -1055,5 +1065,5 @@ void MainWindow::initActions()
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 );
@@ -1063,5 +1073,5 @@ void MainWindow::initActions()
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() ),
@@ -1070,5 +1080,5 @@ void MainWindow::initActions()
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() ),
@@ -1077,5 +1087,5 @@ void MainWindow::initActions()
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() ),
@@ -1084,5 +1094,5 @@ void MainWindow::initActions()
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() ),
@@ -1091,5 +1101,5 @@ void MainWindow::initActions()
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() ),
@@ -1098,5 +1108,5 @@ void MainWindow::initActions()
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() ),
@@ -1106,5 +1116,5 @@ void MainWindow::initActions()
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() ),
@@ -1114,5 +1124,5 @@ void MainWindow::initActions()
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 );
@@ -1126,10 +1136,10 @@ void MainWindow::initActions()
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 );
@@ -1139,13 +1149,13 @@ void MainWindow::initActions()
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() ),
@@ -1156,14 +1166,14 @@ void MainWindow::initActions()
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 );
@@ -1171,5 +1181,5 @@ void MainWindow::initActions()
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 );
@@ -1178,5 +1188,5 @@ void MainWindow::initActions()
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 );
@@ -1187,10 +1197,10 @@ void MainWindow::initActions()
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 );
@@ -1199,9 +1209,9 @@ void MainWindow::initActions()
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 );
@@ -1210,5 +1220,5 @@ void MainWindow::initActions()
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 );
@@ -1220,5 +1230,5 @@ void MainWindow::initActions()
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 );
@@ -1226,10 +1236,10 @@ void MainWindow::initActions()
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 );
@@ -1239,5 +1249,5 @@ void MainWindow::initActions()
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() ),
@@ -1245,10 +1255,10 @@ void MainWindow::initActions()
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() ),
@@ -1257,5 +1267,5 @@ void MainWindow::initActions()
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() ),
@@ -1263,5 +1273,5 @@ void MainWindow::initActions()
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() ),
@@ -1272,9 +1282,9 @@ void MainWindow::initActions()
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 );
@@ -1285,57 +1295,57 @@ void MainWindow::initActions()
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() ),
@@ -1357,5 +1367,5 @@ void MainWindow::initActions()
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 );
@@ -1382,5 +1392,5 @@ void MainWindow::initActions()
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() ) );
@@ -1390,5 +1400,5 @@ void MainWindow::initActions()
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() ) );
@@ -1402,5 +1412,5 @@ void MainWindow::initActions()
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() ) );
@@ -1410,5 +1420,5 @@ void MainWindow::initActions()
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() ) );
@@ -1525,5 +1535,5 @@ void MainWindow::exportToPhone( int mode )
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();
@@ -1596,8 +1606,8 @@ void MainWindow::displayText( QString text ,QString cap )
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 );
@@ -1778,7 +1788,7 @@ void MainWindow::updateWeek(QDate seda)
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
@@ -1813,5 +1823,5 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
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();
@@ -1847,11 +1857,11 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
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
@@ -2046,5 +2056,5 @@ void MainWindow::backupAllFiles()
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();
@@ -2342,5 +2352,5 @@ void MainWindow::fillFilterMenuTB()
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();
@@ -2387,5 +2397,5 @@ void MainWindow::fillFilterMenu()
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();
@@ -2408,5 +2418,5 @@ void MainWindow::fillFilterMenuPopup()
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();
@@ -2820,4 +2830,4 @@ void MainWindow::resizeEvent( QResizeEvent* e)
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
@@ -2,11 +2,19 @@
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>
@@ -16,10 +24,10 @@
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;
@@ -32,5 +40,5 @@ class CalendarLocal;
32using namespace KCal; 40using namespace KCal;
33 41
34class MainWindow : public QMainWindow 42class MainWindow : public Q3MainWindow
35{ 43{
36 Q_OBJECT 44 Q_OBJECT
@@ -50,6 +58,6 @@ class MainWindow : public QMainWindow
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();
@@ -125,5 +133,5 @@ class MainWindow : public QMainWindow
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
@@ -133,5 +141,5 @@ class MainWindow : public QMainWindow
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;
@@ -145,6 +153,6 @@ class MainWindow : public QMainWindow
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();
@@ -152,29 +160,29 @@ class MainWindow : public QMainWindow
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 );
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f6a1a6a..59c3e45 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -27,8 +27,11 @@
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>
@@ -54,9 +57,9 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
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
@@ -130,5 +133,5 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
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 );
@@ -151,11 +154,11 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
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
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 9ccef14..a1880f5 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -28,7 +28,10 @@
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
@@ -61,5 +64,5 @@ class NavigatorBar: public QWidget
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;
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 7253c8e..ab31274 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -22,5 +22,5 @@
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>
@@ -45,8 +45,8 @@
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;
@@ -124,5 +124,5 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
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{
@@ -140,10 +140,10 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
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();
@@ -237,5 +237,5 @@ void OutgoingDialog::deleteItem()
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;
@@ -295,5 +295,5 @@ bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method meth
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;
@@ -331,9 +331,9 @@ void OutgoingDialog::loadMessages()
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,
diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h
index a3d561a..e727087 100644
--- a/korganizer/outgoingdialog.h
+++ b/korganizer/outgoingdialog.h
@@ -24,5 +24,5 @@
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>
@@ -35,8 +35,8 @@
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() {}
@@ -57,5 +57,5 @@ class OutgoingDialog : public OutgoingDialog_base
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
@@ -73,5 +73,5 @@ class OutgoingDialog : public OutgoingDialog_base
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:
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
@@ -12,10 +12,12 @@
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/*
@@ -26,5 +28,5 @@
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
@@ -32,7 +34,7 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo
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" ) );
@@ -41,6 +43,6 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo
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
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
@@ -13,10 +13,14 @@
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
@@ -26,8 +30,8 @@ class OutgoingDialog_base : public QDialog
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;
@@ -35,5 +39,5 @@ public:
35 39
36protected: 40protected:
37 QGridLayout* OutgoingDialog_baseLayout; 41 Q3GridLayout* OutgoingDialog_baseLayout;
38 42
39protected slots: 43protected slots:
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index 2ae6720..ede9840 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -36,5 +36,5 @@
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{
@@ -42,5 +42,5 @@ PublishDialog::PublishDialog(QWidget* parent, const char* name,
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}
@@ -54,5 +54,5 @@ void PublishDialog::addAttendee(Attendee *attendee)
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());
@@ -63,5 +63,5 @@ QString 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();
@@ -81,5 +81,5 @@ void PublishDialog::addItem()
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);
@@ -90,5 +90,5 @@ void PublishDialog::addItem()
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;
@@ -120,5 +120,5 @@ void PublishDialog::openAddressbook()
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());
@@ -132,5 +132,5 @@ void PublishDialog::openAddressbook()
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;
@@ -141,5 +141,5 @@ void PublishDialog::updateItem()
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;
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index 338603c..3ffeec4 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -24,5 +24,5 @@
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
@@ -36,5 +36,5 @@ class PublishDialog : public PublishDialog_base
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
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
@@ -12,13 +12,16 @@
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/*
@@ -29,5 +32,5 @@
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
@@ -35,7 +38,7 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool
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" ) );
@@ -73,12 +76,12 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool
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 );
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
@@ -13,13 +13,19 @@
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
@@ -29,8 +35,8 @@ class PublishDialog_base : public QDialog
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;
@@ -40,11 +46,11 @@ public:
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:
diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp
index 3544081..35bedba 100644
--- a/korganizer/savetemplatedialog.cpp
+++ b/korganizer/savetemplatedialog.cpp
@@ -23,4 +23,7 @@
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>
@@ -36,6 +39,6 @@ SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent )
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,
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 9cfdc35..105b844 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -25,12 +25,19 @@
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>
@@ -47,13 +54,13 @@
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 /*
@@ -99,5 +106,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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
@@ -107,5 +114,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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
@@ -115,5 +122,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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 );
@@ -128,5 +135,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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);
@@ -136,5 +143,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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);
@@ -342,5 +349,5 @@ void SearchDialog::updateView()
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;
@@ -420,5 +427,5 @@ void SearchDialog::search(const QRegExp &re)
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()) {
@@ -459,5 +466,5 @@ void SearchDialog::search(const QRegExp &re)
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() ) {
@@ -513,5 +520,5 @@ void SearchDialog::search(const QRegExp &re)
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()) {
@@ -549,5 +556,5 @@ void SearchDialog::search(const QRegExp &re)
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 ;
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 945ff65..5df6116 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -27,6 +27,10 @@
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>
@@ -42,5 +46,5 @@ class 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
@@ -73,12 +77,12 @@ class SearchDialog : public QVBox
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;
diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp
index 7137c49..8186ebb 100644
--- a/korganizer/statusdialog.cpp
+++ b/korganizer/statusdialog.cpp
@@ -22,4 +22,7 @@
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>
@@ -33,9 +36,9 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
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);
@@ -46,5 +49,5 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
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);
diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp
index 11be432..a6c3cdc 100644
--- a/korganizer/timeline.cpp
+++ b/korganizer/timeline.cpp
@@ -6,5 +6,5 @@
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;
@@ -12,5 +12,5 @@ TimeLine::TimeLine( QWidget *parent, const char *name ) :
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);
@@ -59,4 +59,4 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
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
@@ -2,8 +2,8 @@
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
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index df8ff88..0908056 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -5,8 +5,12 @@
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>
@@ -22,5 +26,5 @@ TimeSpanView::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 );
@@ -30,9 +34,9 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
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 );
@@ -43,5 +47,5 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
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 );
@@ -65,10 +69,10 @@ TimeSpanView::~TimeSpanView()
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 );
@@ -77,5 +81,5 @@ void TimeSpanView::setSplitterSizes( QValueList<int> sizes )
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();
diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h
index 34cb1f7..f652374 100644
--- a/korganizer/timespanview.h
+++ b/korganizer/timespanview.h
@@ -3,4 +3,6 @@
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>
@@ -13,5 +15,5 @@ class 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;
@@ -27,6 +29,6 @@ class TimeSpanView : public QWidget
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();
@@ -49,5 +51,5 @@ class TimeSpanView : public QWidget
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;