-rw-r--r-- | korganizer/koeventviewer.cpp | 37 |
1 files changed, 21 insertions, 16 deletions
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 @@ */ -#include <qcstring.h> -#include <qwhatsthis.h> +#include <q3cstring.h> +#include <q3whatsthis.h> #include <qdialog.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <Q3VBoxLayout> #include <klocale.h> @@ -56,5 +61,5 @@ #include <qprinter.h> #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #else //DESKTOP_VERSION #include <qtopia/qcopenvelope_qws.h> @@ -63,5 +68,5 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name) - : QTextBrowser(parent,name) + : Q3TextBrowser(parent,name) { mSyncMode = false; @@ -87,5 +92,5 @@ void KOEventViewer::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -135,5 +140,5 @@ void KOEventViewer::setSource(const QString& n) QDialog dia( this,"dia123", true ); dia.setCaption( i18n("Details of attendee") ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); KABC::AddresseeView av ( &dia ); av.setAddressee( (*it) ); @@ -156,5 +161,5 @@ void KOEventViewer::setSource(const QString& n) return; } - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count()) { Attendee *a; @@ -201,5 +206,5 @@ void KOEventViewer::setSource(const QString& n) const QByteArray paramData; QByteArray replyData; - QCString replyTypeStr; + Q3CString replyTypeStr; #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) bool foundAbbrowser = PING_ABBROWSER; @@ -208,5 +213,5 @@ void KOEventViewer::setSource(const QString& n) //KAddressbook is already running, so just DCOP to it to bring up the contact editor //client->send("kaddressbook","KAddressBookIface", - QDataStream arg(paramData, IO_WriteOnly); + QDataStream arg(paramData, QIODevice::WriteOnly); arg << n.mid(6); client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); @@ -232,5 +237,5 @@ void KOEventViewer::setSource(const QString& n) void KOEventViewer::mailToAttendees( bool all ) { - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count() == 0) return; QStringList nameList; @@ -261,5 +266,5 @@ void KOEventViewer::mailToAttendees( bool all ) void KOEventViewer::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; QString tmpText=text; @@ -588,5 +593,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); } - QPtrList<Incidence> Relations = event->relations(); + Q3PtrList<Incidence> Relations = event->relations(); Incidence *to; if ( Relations.first() ) @@ -622,5 +627,5 @@ void KOEventViewer::formatCategories(Incidence *event) void KOEventViewer::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { @@ -655,5 +660,5 @@ void KOEventViewer::formatAttendees(Incidence *event) #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; mText += "<IMG src=\"" + iconPath + "\">"; @@ -705,5 +710,5 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; if ( a->RSVP() ) { @@ -863,5 +868,5 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e ) break; default: - QTextBrowser::keyPressEvent ( e ); + Q3TextBrowser::keyPressEvent ( e ); break; } |