-rw-r--r-- | kaddressbook/kabcore.cpp | 33 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 3 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 19 |
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 | |||
@@ -68,4 +68,6 @@ | |||
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> |
@@ -212,4 +214,8 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
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& ) ), |
@@ -219,4 +225,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
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 | ||
@@ -1966,4 +1973,30 @@ void KABCore::configureResources() | |||
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 |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index d4d28f1..fe778af 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -329,4 +329,7 @@ class KABCore : public QWidget | |||
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 ); |
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 7f368eb..850e5b2 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | #else | 4 | #else |
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 |
10 | 10 | ||
@@ -14,4 +14,5 @@ | |||
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 ) |
@@ -21,8 +22,8 @@ int main( int argc, char **argv ) | |||
21 | a.setKeepRunning (); | 22 | a.setKeepRunning (); |
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; |
28 | if ( argc > 1 ) { | 29 | if ( argc > 1 ) { |
@@ -31,5 +32,5 @@ int main( int argc, char **argv ) | |||
31 | printf("KA/E command line commands:\n"); | 32 | printf("KA/E command line commands:\n"); |
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"); |
35 | exitHelp = true; | 36 | exitHelp = true; |
@@ -50,9 +51,9 @@ int main( int argc, char **argv ) | |||
50 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); | 51 | QApplication::addLibraryPath ( qApp->applicationDirPath () ); |
51 | 52 | ||
52 | #endif | 53 | #endif |
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 |
@@ -64,5 +65,5 @@ int main( int argc, char **argv ) | |||
64 | #endif | 65 | #endif |
65 | a.exec(); | 66 | a.exec(); |
66 | 67 | ||
67 | } | 68 | } |
68 | qDebug("KA: Bye! "); | 69 | qDebug("KA: Bye! "); |