-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 | |||
@@ -67,6 +67,8 @@ | |||
67 | #include "KDGanttMinimizeSplitter.h" | 67 | #include "KDGanttMinimizeSplitter.h" |
68 | #include "kaddressbookmain.h" | 68 | #include "kaddressbookmain.h" |
69 | #include "kactioncollection.h" | 69 | #include "kactioncollection.h" |
70 | #include "addresseedialog.h" | ||
71 | |||
70 | #include <qapp.h> | 72 | #include <qapp.h> |
71 | #include <qmenubar.h> | 73 | #include <qmenubar.h> |
72 | //#include <qtoolbar.h> | 74 | //#include <qtoolbar.h> |
@@ -211,6 +213,10 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
211 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), | 213 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), |
212 | SLOT( sendMail( const QString& ) ) ); | 214 | SLOT( sendMail( const QString& ) ) ); |
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 |
215 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 221 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
216 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 222 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
@@ -218,6 +224,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
218 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 224 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
219 | SLOT( browse( const QString& ) ) ); | 225 | SLOT( browse( const QString& ) ) ); |
220 | 226 | ||
227 | |||
221 | mAddressBookService = new KAddressBookService( this ); | 228 | mAddressBookService = new KAddressBookService( this ); |
222 | 229 | ||
223 | #endif //KAB_EMBEDDED | 230 | #endif //KAB_EMBEDDED |
@@ -1965,6 +1972,32 @@ void KABCore::configureResources() | |||
1965 | #endif //KAB_EMBEDDED | 1972 | #endif //KAB_EMBEDDED |
1966 | 1973 | ||
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 | */ | ||
1978 | void 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 | ||
1969 | #ifndef KAB_EMBEDDED | 2002 | #ifndef KAB_EMBEDDED |
1970 | #include "kabcore.moc" | 2003 | #include "kabcore.moc" |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index d4d28f1..fe778af 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -328,6 +328,9 @@ class KABCore : public QWidget | |||
328 | */ | 328 | */ |
329 | void addGUIClient( KXMLGUIClient *client ); | 329 | void addGUIClient( KXMLGUIClient *client ); |
330 | 330 | ||
331 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid, const QString& param1); | ||
332 | |||
333 | |||
331 | signals: | 334 | signals: |
332 | void contactSelected( const QString &name ); | 335 | void contactSelected( const QString &name ); |
333 | void contactSelected( const QPixmap &pixmap ); | 336 | void contactSelected( const QPixmap &pixmap ); |
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 7f368eb..850e5b2 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <stdio.h> | 13 | #include <stdio.h> |
14 | #include <qdir.h> | 14 | #include <qdir.h> |
15 | #include "kaddressbookmain.h" | 15 | #include "kaddressbookmain.h" |
16 | #include "externalapphandler.h" | ||
16 | 17 | ||
17 | int main( int argc, char **argv ) | 18 | int main( int argc, char **argv ) |
18 | { | 19 | { |
@@ -53,7 +54,7 @@ int main( int argc, char **argv ) | |||
53 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 54 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
54 | KAddressBookMain m ; | 55 | KAddressBookMain m ; |
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 | ||
58 | #ifndef DESKTOP_VERSION | 59 | #ifndef DESKTOP_VERSION |
59 | a.showMainWidget( &m ); | 60 | a.showMainWidget( &m ); |