From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'korganizer/koeventviewer.cpp') diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index c0acf34..4df26a9 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -17,12 +17,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include +#include +#include #include #include +#include #include #include +//Added by qt3to4: +#include +#include +#include #include #include @@ -55,14 +60,14 @@ #include #include #include -#include +#include #else //DESKTOP_VERSION #include #endif //DESKTOP_VERSION #include KOEventViewer::KOEventViewer(QWidget *parent,const char *name) - : QTextBrowser(parent,name) + : Q3TextBrowser(parent,name) { mSyncMode = false; mColorMode = 0; @@ -86,7 +91,7 @@ void KOEventViewer::printMe() return; QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; dx = (float) wid/(float)contentsWidth (); @@ -134,7 +139,7 @@ void KOEventViewer::setSource(const QString& n) //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); QDialog dia( this,"dia123", true ); dia.setCaption( i18n("Details of attendee") ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); KABC::AddresseeView av ( &dia ); av.setAddressee( (*it) ); lay.addWidget( &av ); @@ -155,7 +160,7 @@ void KOEventViewer::setSource(const QString& n) ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); return; } - QPtrList attendees = mCurrentIncidence->attendees(); + Q3PtrList attendees = mCurrentIncidence->attendees(); if (attendees.count()) { Attendee *a; for(a=attendees.first();a;a=attendees.next()) { @@ -200,14 +205,14 @@ void KOEventViewer::setSource(const QString& n) const QByteArray noParamData; const QByteArray paramData; QByteArray replyData; - QCString replyTypeStr; + Q3CString replyTypeStr; #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) bool foundAbbrowser = PING_ABBROWSER; if (foundAbbrowser) { //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); return; @@ -231,7 +236,7 @@ void KOEventViewer::setSource(const QString& n) } void KOEventViewer::mailToAttendees( bool all ) { - QPtrList attendees = mCurrentIncidence->attendees(); + Q3PtrList attendees = mCurrentIncidence->attendees(); if (attendees.count() == 0) return; QStringList nameList; QStringList emailList; @@ -260,7 +265,7 @@ 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; QString tmpStr=str; @@ -587,7 +592,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"
"); } - QPtrList Relations = event->relations(); + Q3PtrList Relations = event->relations(); Incidence *to; if ( Relations.first() ) addTag("b",i18n("Sub todos:
")); @@ -621,7 +626,7 @@ void KOEventViewer::formatCategories(Incidence *event) } void KOEventViewer::formatAttendees(Incidence *event) { - QPtrList attendees = event->attendees(); + Q3PtrList attendees = event->attendees(); if (attendees.count()) { @@ -654,7 +659,7 @@ void KOEventViewer::formatAttendees(Incidence *event) mText.append(event->organizer()); #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " organizer() + "\">"; mText += ""; mText += "\n"; @@ -704,7 +709,7 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; if ( a->RSVP() ) { ++a_count_nr; @@ -862,7 +867,7 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e ) e->ignore(); break; default: - QTextBrowser::keyPressEvent ( e ); + Q3TextBrowser::keyPressEvent ( e ); break; } } -- cgit v0.9.0.2