-rw-r--r-- | kaddressbook/kabcore.cpp | 33 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 3 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 3 |
3 files changed, 38 insertions, 1 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 @@ #include "kactioncollection.h" +#include "addresseedialog.h" + #include <qapp.h> @@ -213,2 +215,6 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const + + connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&, const QString&))); + + #ifndef KAB_EMBEDDED @@ -220,2 +226,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const + mAddressBookService = new KAddressBookService( this ); @@ -1967,2 +1974,28 @@ void KABCore::configureResources() +/* this method will be called through the QCop interface from Ko/Pi to select addresses + * for the attendees list of an event. + */ +void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1) +{ + //param1 is usually empty for this kind of request + + QStringList nameList; + QStringList emailList; + QStringList uidList; + + KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); + uint i=0; + for (i=0; i < list.count(); i++) + { + nameList.append(list[i].realName()); + emailList.append(list[i].preferredEmail()); + uidList.append(list[i].uid()); + } + + bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); + +} + + + 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 + void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1); + + signals: diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 7f368eb..850e5b2 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -15,2 +15,3 @@ #include "kaddressbookmain.h" +#include "externalapphandler.h" @@ -55,3 +56,3 @@ int main( int argc, char **argv ) //US MainWindow m; -//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); + QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |