summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorulf69 <ulf69>2004-08-17 00:09:26 (UTC)
committer ulf69 <ulf69>2004-08-17 00:09:26 (UTC)
commitab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb (patch) (unidiff)
treea9f62469297dda2981807b5235e7812cac72f44c /kaddressbook
parent0e46d151bca931ff5c69a637d91cfcc381094e0b (diff)
downloadkdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.zip
kdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.tar.gz
kdepimpi-ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb.tar.bz2
QCop implementation for KOrganizer to access Ka/pi directly
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp33
-rw-r--r--kaddressbook/kabcore.h3
-rw-r--r--kaddressbook/mainembedded.cpp19
3 files changed, 46 insertions, 9 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 6807bed..e7c815e 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -69,2 +69,4 @@
69#include "kactioncollection.h" 69#include "kactioncollection.h"
70#include "addresseedialog.h"
71
70#include <qapp.h> 72#include <qapp.h>
@@ -213,2 +215,6 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
213 215
216
217 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&, const QString&)));
218
219
214#ifndef KAB_EMBEDDED 220#ifndef KAB_EMBEDDED
@@ -220,2 +226,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
220 226
227
221 mAddressBookService = new KAddressBookService( this ); 228 mAddressBookService = new KAddressBookService( this );
@@ -1967,2 +1974,28 @@ void KABCore::configureResources()
1967 1974
1975/* this method will be called through the QCop interface from Ko/Pi to select addresses
1976 * for the attendees list of an event.
1977 */
1978void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1)
1979{
1980 //param1 is usually empty for this kind of request
1981
1982 QStringList nameList;
1983 QStringList emailList;
1984 QStringList uidList;
1985
1986 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
1987 uint i=0;
1988 for (i=0; i < list.count(); i++)
1989 {
1990 nameList.append(list[i].realName());
1991 emailList.append(list[i].preferredEmail());
1992 uidList.append(list[i].uid());
1993 }
1994
1995 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
1996
1997}
1998
1999
2000
1968 2001
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index d4d28f1..fe778af 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -330,2 +330,5 @@ class KABCore : public QWidget
330 330
331 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1);
332
333
331 signals: 334 signals:
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 7f368eb..850e5b2 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -5,5 +5,5 @@
5#include <qapplication.h> 5#include <qapplication.h>
6#include <qwindowsstyle.h> 6#include <qwindowsstyle.h>
7#include <qplatinumstyle.h> 7#include <qplatinumstyle.h>
8#include <qmainwindow.h> 8#include <qmainwindow.h>
9#endif 9#endif
@@ -15,2 +15,3 @@
15#include "kaddressbookmain.h" 15#include "kaddressbookmain.h"
16#include "externalapphandler.h"
16 17
@@ -22,6 +23,6 @@ int main( int argc, char **argv )
22#else 23#else
23 QApplication a( argc, argv ); 24 QApplication a( argc, argv );
24 QApplication::setStyle( new QPlatinumStyle ()); 25 QApplication::setStyle( new QPlatinumStyle ());
25#endif 26#endif
26 27
27 bool exitHelp = false; 28 bool exitHelp = false;
@@ -32,3 +33,3 @@ int main( int argc, char **argv )
32 printf(" no command: Start KA/E in usual way\n"); 33 printf(" no command: Start KA/E in usual way\n");
33 printf(" -help: This output\n"); 34 printf(" -help: This output\n");
34 printf(" KA/E is exiting now. Bye!\n"); 35 printf(" KA/E is exiting now. Bye!\n");
@@ -51,3 +52,3 @@ int main( int argc, char **argv )
51 52
52#endif 53#endif
53 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 54 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
@@ -55,3 +56,3 @@ int main( int argc, char **argv )
55//US MainWindow m; 56//US MainWindow m;
56//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 57 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
57 58
@@ -65,3 +66,3 @@ int main( int argc, char **argv )
65 a.exec(); 66 a.exec();
66 67
67 } 68 }