Diffstat (limited to 'kaddressbook/kaddressbookmain.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/kaddressbookmain.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index f48f214..8c4ca09 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -71,49 +71,59 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW //mCore->restoreSettings(); initActions(); setCentralWidget( mCore ); //US statusBar()->show(); #ifndef KAB_EMBEDDED setStandardToolBarMenuEnabled(true); createGUI( "kaddressbookui.rc", false ); #endif //KAB_EMBEDDED setAutoSaveSettings(); qApp->processEvents(); mCore->restoreSettings(); } KAddressBookMain::~KAddressBookMain() { // mCore->saveSettings(); } - +void KAddressBookMain::recieve( const QCString& cmsg, const QByteArray& data ) +{ + qDebug("KA: QCOP message received: %s ", cmsg.data() ); + if ( cmsg == "setDocument(QString)" ) { + QDataStream stream( data, IO_ReadOnly ); + QString fileName; + stream >> fileName; + mCore->recieve( fileName ); + return; + } +} void KAddressBookMain::showMinimized () { QWidget::showMinimized () ; } void KAddressBookMain::addEmail( QString addr ) { mCore->addEmail( addr ); } #ifndef KAB_EMBEDDED ASYNC KAddressBookMain::showContactEditor( QString uid ) { mCore->editContact( uid ); } #endif //KAB_EMBEDDED void KAddressBookMain::newContact() { mCore->newContact(); } QString KAddressBookMain::getNameByPhone( QString phone ) { return mCore->getNameByPhone( phone ); } |