summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koeventviewer.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp37
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
@@ -17,12 +17,17 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#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>
#include <kapplication.h>
@@ -55,14 +60,14 @@
#include <kabc/addresseeview.h>
#include <qprinter.h>
#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#else //DESKTOP_VERSION
#include <qtopia/qcopenvelope_qws.h>
#endif //DESKTOP_VERSION
#include <externalapphandler.h>
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<Attendee> attendees = mCurrentIncidence->attendees();
+ Q3PtrList<Attendee> 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<Attendee> attendees = mCurrentIncidence->attendees();
+ Q3PtrList<Attendee> 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()) +"<br>");
}
- QPtrList<Incidence> Relations = event->relations();
+ Q3PtrList<Incidence> Relations = event->relations();
Incidence *to;
if ( Relations.first() )
addTag("b",i18n("Sub todos:<br>"));
@@ -621,7 +626,7 @@ void KOEventViewer::formatCategories(Incidence *event)
}
void KOEventViewer::formatAttendees(Incidence *event)
{
- QPtrList<Attendee> attendees = event->attendees();
+ Q3PtrList<Attendee> 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 += " <a href=\"mailto:" + event->organizer() + "\">";
mText += "<IMG src=\"" + iconPath + "\">";
mText += "</a>\n";
@@ -704,7 +709,7 @@ 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() ) {
++a_count_nr;
@@ -862,7 +867,7 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e )
e->ignore();
break;
default:
- QTextBrowser::keyPressEvent ( e );
+ Q3TextBrowser::keyPressEvent ( e );
break;
}
}