summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp40
-rw-r--r--kaddressbook/kabcore.h4
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
@@ -373,8 +373,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
373 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 373 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 375 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 376 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
377 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
377 378
378 379
379#ifndef KAB_EMBEDDED 380#ifndef KAB_EMBEDDED
380 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 381 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
@@ -834,8 +835,9 @@ void KABCore::resizeEvent(QResizeEvent* e )
834 mMiniSplitter->setOrientation( Qt::Horizontal); 835 mMiniSplitter->setOrientation( Qt::Horizontal);
835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 836 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
836 } 837 }
837 if ( QApplication::desktop()->width() <= 640 ) { 838 if ( QApplication::desktop()->width() <= 640 ) {
839 mMainWindow->showMinimized();
838 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 840 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
839 mViewManager->getFilterAction()->setComboWidth( 150 ); 841 mViewManager->getFilterAction()->setComboWidth( 150 );
840 if ( mIncSearchWidget ) 842 if ( mIncSearchWidget )
841 mIncSearchWidget->setSize(); 843 mIncSearchWidget->setSize();
@@ -860,8 +862,9 @@ void KABCore::resizeEvent(QResizeEvent* e )
860 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 862 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
861 } 863 }
862 } 864 }
863 } 865 }
866 QWidget::resizeEvent( e );
864 867
865} 868}
866void KABCore::export2phone() 869void KABCore::export2phone()
867{ 870{
@@ -2504,38 +2507,59 @@ void KABCore::configureResources()
2504 * for the attendees list of an event. 2507 * for the attendees list of an event.
2505 */ 2508 */
2506void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2509void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2507{ 2510{
2508 QStringList nameList; 2511
2509 QStringList emailList;
2510 QStringList uidList;
2511 bool ok = false; 2512 bool ok = false;
2513 mEmailSourceChannel = sourceChannel;
2512 int wid = uid.toInt( &ok ); 2514 int wid = uid.toInt( &ok );
2515 qDebug("UID %s ", uid.latin1());
2513 if ( ok ) { 2516 if ( ok ) {
2514 if ( wid != QApplication::desktop()->width() ) { 2517 if ( wid != QApplication::desktop()->width() ) {
2515 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2518 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2516 message( i18n("Resizing, please wait...") ); 2519 message( i18n("Resizing, please wait...") );
2517 raise(); 2520 mMainWindow->showMinimized();
2518 qApp->processEvents(); 2521 /*
2522 {
2523 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2524 }
2525 */
2526 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2527 return;
2519 } 2528 }
2520 2529
2521 } else { 2530 } else {
2522 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2531 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2523 } 2532 }
2524 2533 callContactdialog();
2534 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2535
2536}
2537void KABCore::resizeAndCallContactdialog()
2538{
2539 updateMainWindow();
2540 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
2541}
2542
2543void KABCore::callContactdialog()
2544{
2545 QStringList nameList;
2546 QStringList emailList;
2547 QStringList uidList;
2548 qDebug("WIDTH %d ", QApplication::desktop()->width() );
2525 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2549 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2526 uint i=0; 2550 uint i=0;
2527 for (i=0; i < list.count(); i++) 2551 for (i=0; i < list.count(); i++)
2528 { 2552 {
2529 nameList.append(list[i].realName()); 2553 nameList.append(list[i].realName());
2530 emailList.append(list[i].preferredEmail()); 2554 emailList.append(list[i].preferredEmail());
2531 uidList.append(list[i].uid()); 2555 uidList.append(list[i].uid());
2532 } 2556 }
2557 QString uid = "unnamed";
2533 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2558 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2534 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); 2559 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2535 2560
2536} 2561}
2537
2538/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2562/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2539 * to put them into the calendar. 2563 * to put them into the calendar.
2540 */ 2564 */
2541void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2565void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c185117..47ea152 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -367,8 +367,11 @@ class KABCore : public QWidget, public KSyncInterface
367 void disableBR(bool); 367 void disableBR(bool);
368 void setJumpButtonBarVisible( bool visible ); 368 void setJumpButtonBarVisible( bool visible );
369 void setJumpButtonBar( bool visible ); 369 void setJumpButtonBar( bool visible );
370 void setCaptionBack(); 370 void setCaptionBack();
371 void resizeAndCallContactdialog();
372 void callContactdialog();
373
371 void importFromOL(); 374 void importFromOL();
372 void extensionModified( const KABC::Addressee::List &list ); 375 void extensionModified( const KABC::Addressee::List &list );
373 void extensionChanged( int id ); 376 void extensionChanged( int id );
374 void clipboardDataChanged(); 377 void clipboardDataChanged();
@@ -384,8 +387,9 @@ class KABCore : public QWidget, public KSyncInterface
384 void configurationChanged(); 387 void configurationChanged();
385 void addressBookChanged(); 388 void addressBookChanged();
386 389
387 private: 390 private:
391 QString mEmailSourceChannel;
388 void resizeEvent(QResizeEvent* e ); 392 void resizeEvent(QResizeEvent* e );
389 bool mBRdisabled; 393 bool mBRdisabled;
390#ifndef DESKTOP_VERSION 394#ifndef DESKTOP_VERSION
391 QCopChannel* infrared; 395 QCopChannel* infrared;