Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-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 @@ | |||
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 | ||
64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 69 | KOEventViewer::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) | |||
232 | void KOEventViewer::mailToAttendees( bool all ) | 237 | void 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 ) | |||
261 | void KOEventViewer::addTag(const QString & tag,const QString & text) | 266 | void 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) | |||
622 | void KOEventViewer::formatAttendees(Incidence *event) | 627 | void 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 | } |