Diffstat (limited to 'korganizer/koeditordetails.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditordetails.cpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index c0e7bdd..8e2fabe 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -39,3 +39,9 @@ #ifndef KORG_NOKABC + +#ifdef DESKTOP_VERSION #include <kabc/addresseedialog.h> +#else //DESKTOP_VERSION +#include <externalapphandler.h> +#endif //DESKTOP_VERSION + #endif @@ -86,3 +92,3 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) } - + connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), @@ -197,2 +203,7 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) updateAttendeeInput(); + +//US listen for arriving address resultsets + connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), + this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); + } @@ -223,2 +234,3 @@ void KOEditorDetails::openAddressBook() +#ifdef DESKTOP_VERSION KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); @@ -228,3 +240,8 @@ void KOEditorDetails::openAddressBook() } - +#else + bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); + // the result should now arrive through method insertAttendees +#endif + + #if 0 @@ -265,2 +282,20 @@ void KOEditorDetails::addNewAttendee() +//the map includes name/email pairs, that comes from Ka/Pi +void KOEditorDetails::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) +{ + if (uid == this->name()) + { + for ( int i = 0; i < nameList.count(); i++) + { + QString _name = nameList[i]; + QString _email = emailList[i]; + QString _uid = uidList[i]; + + Attendee *a = new Attendee(_name,_email,false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant, _uid); + insertAttendee(a); + } + } + +} + |