-rw-r--r-- | kaddressbook/kabcore.cpp | 40 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 4 |
2 files changed, 36 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 27aca2d..3f9b546 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -376,2 +376,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); + connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); @@ -837,2 +838,3 @@ void KABCore::resizeEvent(QResizeEvent* e ) if ( QApplication::desktop()->width() <= 640 ) { + mMainWindow->showMinimized(); //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); @@ -863,2 +865,3 @@ void KABCore::resizeEvent(QResizeEvent* e ) } + QWidget::resizeEvent( e ); @@ -2507,7 +2510,7 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt { - QStringList nameList; - QStringList emailList; - QStringList uidList; + bool ok = false; + mEmailSourceChannel = sourceChannel; int wid = uid.toInt( &ok ); + qDebug("UID %s ", uid.latin1()); if ( ok ) { @@ -2516,4 +2519,10 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt message( i18n("Resizing, please wait...") ); - raise(); - qApp->processEvents(); + mMainWindow->showMinimized(); + /* + { + QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); + } + */ + QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); + return; } @@ -2523,3 +2532,18 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt } - + callContactdialog(); + //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); + +} +void KABCore::resizeAndCallContactdialog() +{ + updateMainWindow(); + QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); +} + +void KABCore::callContactdialog() +{ + QStringList nameList; + QStringList emailList; + QStringList uidList; + qDebug("WIDTH %d ", QApplication::desktop()->width() ); KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); @@ -2532,7 +2556,7 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt } + QString uid = "unnamed"; //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); - bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); + bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); } - /* this method will be called through the QCop interface from Ko/Pi to select birthdays diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c185117..47ea152 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -370,2 +370,5 @@ class KABCore : public QWidget, public KSyncInterface void setCaptionBack(); + void resizeAndCallContactdialog(); + void callContactdialog(); + void importFromOL(); @@ -387,2 +390,3 @@ class KABCore : public QWidget, public KSyncInterface private: + QString mEmailSourceChannel; void resizeEvent(QResizeEvent* e ); |