Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewer.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 9f8bd9b..bac66d3 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -1,97 +1,96 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qcstring.h> | 20 | #include <qcstring.h> |
21 | #include <qwhatsthis.h> | 21 | #include <qwhatsthis.h> |
22 | #include <qdialog.h> | 22 | #include <qdialog.h> |
23 | #include <qapplication.h> | 23 | #include <qapplication.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | 26 | ||
27 | #include <klocale.h> | 27 | #include <klocale.h> |
28 | #include <kapplication.h> | 28 | #include <kapplication.h> |
29 | #include <libkcal/event.h> | 29 | #include <libkcal/event.h> |
30 | #include <libkcal/todo.h> | 30 | #include <libkcal/todo.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <kiconloader.h> | 32 | #include <kiconloader.h> |
33 | #include <krun.h> | 33 | #include <krun.h> |
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <kprocess.h> | 35 | #include <kprocess.h> |
36 | #include "koprefs.h" | 36 | #include "koprefs.h" |
37 | 37 | ||
38 | #include <libkdepim/addresseeview.h> | 38 | #include <libkdepim/addresseeview.h> |
39 | #include <kabc/stdaddressbook.h> | 39 | #include <kabc/stdaddressbook.h> |
40 | 40 | ||
41 | #ifndef KORG_NODCOP | 41 | #ifndef KORG_NODCOP |
42 | #include <dcopclient.h> | 42 | #include <dcopclient.h> |
43 | #include "korganizer.h" | 43 | #include "korganizer.h" |
44 | #include "koprefs.h" | 44 | #include "koprefs.h" |
45 | #include "actionmanager.h" | 45 | #include "actionmanager.h" |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #include "koeventviewer.h" | 48 | #include "koeventviewer.h" |
49 | #include "koeventviewer.moc" | ||
50 | #ifndef KORG_NOKABC | 49 | #ifndef KORG_NOKABC |
51 | #include <kabc/stdaddressbook.h> | 50 | #include <kabc/stdaddressbook.h> |
52 | #define size count | 51 | #define size count |
53 | #endif | 52 | #endif |
54 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 53 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) |
55 | : QTextBrowser(parent,name) | 54 | : QTextBrowser(parent,name) |
56 | { | 55 | { |
57 | mSyncMode = false; | 56 | mSyncMode = false; |
58 | mColorMode = 0; | 57 | mColorMode = 0; |
59 | } | 58 | } |
60 | 59 | ||
61 | KOEventViewer::~KOEventViewer() | 60 | KOEventViewer::~KOEventViewer() |
62 | { | 61 | { |
63 | } | 62 | } |
64 | 63 | ||
65 | void KOEventViewer::setSource(const QString& n) | 64 | void KOEventViewer::setSource(const QString& n) |
66 | { | 65 | { |
67 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 66 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
68 | KABC::AddressBook::Iterator it; | 67 | KABC::AddressBook::Iterator it; |
69 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 68 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
70 | // LR I do not understand, why the uid string is different on zaurus and desktop | 69 | // LR I do not understand, why the uid string is different on zaurus and desktop |
71 | #ifdef DESKTOP_VERSION | 70 | #ifdef DESKTOP_VERSION |
72 | QString uid = "uid://"+(*it).uid(); | 71 | QString uid = "uid://"+(*it).uid(); |
73 | #else | 72 | #else |
74 | QString uid = "uid:"+(*it).uid(); | 73 | QString uid = "uid:"+(*it).uid(); |
75 | #endif | 74 | #endif |
76 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); | 75 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); |
77 | if (n == uid ) { | 76 | if (n == uid ) { |
78 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); | 77 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); |
79 | QDialog dia( this,"dia123", true ); | 78 | QDialog dia( this,"dia123", true ); |
80 | dia.setCaption( i18n("Details of attendee") ); | 79 | dia.setCaption( i18n("Details of attendee") ); |
81 | QVBoxLayout lay ( &dia ); | 80 | QVBoxLayout lay ( &dia ); |
82 | KPIM::AddresseeView av ( &dia ); | 81 | KPIM::AddresseeView av ( &dia ); |
83 | av.setAddressee( (*it) ); | 82 | av.setAddressee( (*it) ); |
84 | lay.addWidget( &av ); | 83 | lay.addWidget( &av ); |
85 | if ( QApplication::desktop()->width() < 480 ) | 84 | if ( QApplication::desktop()->width() < 480 ) |
86 | dia.resize( 220, 240); | 85 | dia.resize( 220, 240); |
87 | else { | 86 | else { |
88 | dia.resize( 400,400); | 87 | dia.resize( 400,400); |
89 | 88 | ||
90 | } | 89 | } |
91 | dia.exec(); | 90 | dia.exec(); |
92 | break; | 91 | break; |
93 | } | 92 | } |
94 | } | 93 | } |
95 | 94 | ||
96 | 95 | ||
97 | #ifndef KORG_NODCOP | 96 | #ifndef KORG_NODCOP |