author | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
commit | 77280f6a176a15b60004f312e6cacdfbbd3909c1 (patch) (unidiff) | |
tree | e074d4abedc2f4cc575e5655575e038b9d460106 /kaddressbook | |
parent | f1eb5b74c962909851607c4b4cb05ee18a347d37 (diff) | |
download | kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.zip kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.gz kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.bz2 |
sync changes
-rw-r--r-- | kaddressbook/kabcore.cpp | 31 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 7 |
2 files changed, 14 insertions, 24 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index d9eb391..83fede4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1638,96 +1638,100 @@ void KABCore::initGUI() | |||
1638 | 1638 | ||
1639 | 1639 | ||
1640 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); | 1640 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); |
1641 | #endif | 1641 | #endif |
1642 | //eh->hide(); | 1642 | //eh->hide(); |
1643 | // topLayout->addWidget(mExtensionManager ); | 1643 | // topLayout->addWidget(mExtensionManager ); |
1644 | 1644 | ||
1645 | 1645 | ||
1646 | /*US | 1646 | /*US |
1647 | #ifndef KAB_NOSPLITTER | 1647 | #ifndef KAB_NOSPLITTER |
1648 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1648 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1649 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1649 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1650 | topLayout->setSpacing( 10 ); | 1650 | topLayout->setSpacing( 10 ); |
1651 | 1651 | ||
1652 | mDetailsSplitter = new QSplitter( this ); | 1652 | mDetailsSplitter = new QSplitter( this ); |
1653 | 1653 | ||
1654 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1654 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1655 | 1655 | ||
1656 | mViewManager = new ViewManager( this, viewSpace ); | 1656 | mViewManager = new ViewManager( this, viewSpace ); |
1657 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1657 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1658 | 1658 | ||
1659 | mDetails = new ViewContainer( mDetailsSplitter ); | 1659 | mDetails = new ViewContainer( mDetailsSplitter ); |
1660 | 1660 | ||
1661 | topLayout->addWidget( mDetailsSplitter ); | 1661 | topLayout->addWidget( mDetailsSplitter ); |
1662 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1662 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1663 | #else //KAB_NOSPLITTER | 1663 | #else //KAB_NOSPLITTER |
1664 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1664 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1665 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1665 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1666 | topLayout->setSpacing( 10 ); | 1666 | topLayout->setSpacing( 10 ); |
1667 | 1667 | ||
1668 | // mDetailsSplitter = new QSplitter( this ); | 1668 | // mDetailsSplitter = new QSplitter( this ); |
1669 | 1669 | ||
1670 | QVBox *viewSpace = new QVBox( this ); | 1670 | QVBox *viewSpace = new QVBox( this ); |
1671 | 1671 | ||
1672 | mViewManager = new ViewManager( this, viewSpace ); | 1672 | mViewManager = new ViewManager( this, viewSpace ); |
1673 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1673 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1674 | 1674 | ||
1675 | mDetails = new ViewContainer( this ); | 1675 | mDetails = new ViewContainer( this ); |
1676 | 1676 | ||
1677 | topLayout->addWidget( viewSpace ); | 1677 | topLayout->addWidget( viewSpace ); |
1678 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1678 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1679 | topLayout->addWidget( mDetails ); | 1679 | topLayout->addWidget( mDetails ); |
1680 | #endif //KAB_NOSPLITTER | 1680 | #endif //KAB_NOSPLITTER |
1681 | */ | 1681 | */ |
1682 | 1682 | ||
1683 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 1683 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
1684 | syncManager->setBlockSave(false); | 1684 | syncManager->setBlockSave(false); |
1685 | 1685 | ||
1686 | connect(syncManager , SIGNAL( save() ), this, SLOT( save() ) ); | ||
1687 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | ||
1688 | syncManager->setDefaultFileName(locateLocal( "apps","kabc/std.vcf") ); | ||
1689 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); | ||
1686 | 1690 | ||
1687 | #endif //KAB_EMBEDDED | 1691 | #endif //KAB_EMBEDDED |
1688 | initActions(); | 1692 | initActions(); |
1689 | 1693 | ||
1690 | #ifdef KAB_EMBEDDED | 1694 | #ifdef KAB_EMBEDDED |
1691 | addActionsManually(); | 1695 | addActionsManually(); |
1692 | //US make sure the export and import menues are initialized before creating the xxPortManager. | 1696 | //US make sure the export and import menues are initialized before creating the xxPortManager. |
1693 | mXXPortManager = new XXPortManager( this, this ); | 1697 | mXXPortManager = new XXPortManager( this, this ); |
1694 | 1698 | ||
1695 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); | 1699 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); |
1696 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); | 1700 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); |
1697 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1701 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1698 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); | 1702 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); |
1699 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); | 1703 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); |
1700 | // mIncSearchWidget->hide(); | 1704 | // mIncSearchWidget->hide(); |
1701 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1705 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1702 | SLOT( incrementalSearch( const QString& ) ) ); | 1706 | SLOT( incrementalSearch( const QString& ) ) ); |
1703 | 1707 | ||
1704 | 1708 | ||
1705 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1709 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1706 | 1710 | ||
1707 | topLayout->addWidget( mJumpButtonBar ); | 1711 | topLayout->addWidget( mJumpButtonBar ); |
1708 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); | 1712 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); |
1709 | 1713 | ||
1710 | // mMainWindow->getIconToolBar()->raise(); | 1714 | // mMainWindow->getIconToolBar()->raise(); |
1711 | 1715 | ||
1712 | #endif //KAB_EMBEDDED | 1716 | #endif //KAB_EMBEDDED |
1713 | 1717 | ||
1714 | } | 1718 | } |
1715 | void KABCore::initActions() | 1719 | void KABCore::initActions() |
1716 | { | 1720 | { |
1717 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1721 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1718 | 1722 | ||
1719 | #ifndef KAB_EMBEDDED | 1723 | #ifndef KAB_EMBEDDED |
1720 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1724 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1721 | SLOT( clipboardDataChanged() ) ); | 1725 | SLOT( clipboardDataChanged() ) ); |
1722 | #endif //KAB_EMBEDDED | 1726 | #endif //KAB_EMBEDDED |
1723 | 1727 | ||
1724 | // file menu | 1728 | // file menu |
1725 | if ( mIsPart ) { | 1729 | if ( mIsPart ) { |
1726 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, | 1730 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, |
1727 | SLOT( sendMail() ), actionCollection(), | 1731 | SLOT( sendMail() ), actionCollection(), |
1728 | "kaddressbook_mail" ); | 1732 | "kaddressbook_mail" ); |
1729 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, | 1733 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, |
1730 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); | 1734 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); |
1731 | 1735 | ||
1732 | } else { | 1736 | } else { |
1733 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1737 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
@@ -2792,85 +2796,76 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | |||
2792 | { | 2796 | { |
2793 | if ( external ) | 2797 | if ( external ) |
2794 | abLocal.removeSyncAddressees( !isXML); | 2798 | abLocal.removeSyncAddressees( !isXML); |
2795 | qDebug("Saving remote AB "); | 2799 | qDebug("Saving remote AB "); |
2796 | abLocal.saveAB(); | 2800 | abLocal.saveAB(); |
2797 | if ( isXML ) { | 2801 | if ( isXML ) { |
2798 | // afterwrite processing | 2802 | // afterwrite processing |
2799 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2803 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2800 | } | 2804 | } |
2801 | } | 2805 | } |
2802 | } | 2806 | } |
2803 | setModified(); | 2807 | setModified(); |
2804 | 2808 | ||
2805 | } | 2809 | } |
2806 | if ( syncOK ) | 2810 | if ( syncOK ) |
2807 | mViewManager->refreshView(); | 2811 | mViewManager->refreshView(); |
2808 | return syncOK; | 2812 | return syncOK; |
2809 | #if 0 | 2813 | #if 0 |
2810 | 2814 | ||
2811 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { | 2815 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { |
2812 | getEventViewerDialog()->setSyncMode( true ); | 2816 | getEventViewerDialog()->setSyncMode( true ); |
2813 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 2817 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
2814 | getEventViewerDialog()->setSyncMode( false ); | 2818 | getEventViewerDialog()->setSyncMode( false ); |
2815 | if ( syncOK ) { | 2819 | if ( syncOK ) { |
2816 | if ( KOPrefs::instance()->mWriteBackFile ) | 2820 | if ( KOPrefs::instance()->mWriteBackFile ) |
2817 | { | 2821 | { |
2818 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); | 2822 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); |
2819 | storage->save(); | 2823 | storage->save(); |
2820 | } | 2824 | } |
2821 | } | 2825 | } |
2822 | setModified(); | 2826 | setModified(); |
2823 | } | 2827 | } |
2824 | 2828 | ||
2825 | #endif | 2829 | #endif |
2826 | } | 2830 | } |
2827 | 2831 | ||
2828 | 2832 | ||
2829 | //this is a overwritten callbackmethods from the syncinterface | 2833 | //this is a overwritten callbackmethods from the syncinterface |
2830 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 2834 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
2831 | { | 2835 | { |
2832 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2836 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2833 | 2837 | ||
2834 | AddressBook abLocal( resource,"syncContact"); | 2838 | AddressBook abLocal( resource,"syncContact"); |
2835 | bool syncOK = false; | 2839 | bool syncOK = false; |
2836 | if ( abLocal.load() ) { | 2840 | if ( abLocal.load() ) { |
2837 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2841 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2838 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2842 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2839 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2843 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2840 | qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? "); | ||
2841 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2844 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2842 | if ( syncOK ) { | 2845 | if ( syncOK ) { |
2843 | if ( syncManager->mWriteBackFile ) { | 2846 | if ( syncManager->mWriteBackFile ) { |
2844 | abLocal.saveAB(); | 2847 | abLocal.saveAB(); |
2845 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2848 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2846 | } | 2849 | } |
2847 | } | 2850 | } |
2848 | setModified(); | 2851 | setModified(); |
2849 | } | 2852 | } |
2850 | if ( syncOK ) | 2853 | if ( syncOK ) |
2851 | mViewManager->refreshView(); | 2854 | mViewManager->refreshView(); |
2852 | return syncOK; | 2855 | return syncOK; |
2853 | 2856 | ||
2854 | } | 2857 | } |
2855 | 2858 | ||
2856 | //called by the syncmanager to indicate that the work has to marked as dirty. | 2859 | void KABCore::getFile( bool success ) |
2857 | void KABCore::sync_setModified() | ||
2858 | { | 2860 | { |
2859 | setModified(); | 2861 | if ( ! success ) { |
2860 | } | 2862 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2861 | 2863 | return; | |
2862 | //called by the syncmanager to ask if the dirty flag is set. | 2864 | } |
2863 | bool KABCore::sync_isModified() | 2865 | //mView->watchSavedFile(); |
2864 | { | 2866 | //mView->openCalendar( defaultFileName() ); |
2865 | return mModified; | 2867 | // pending: reload received file! |
2866 | } | 2868 | setCaption( i18n("Pi-Sync successful!") ); |
2867 | |||
2868 | |||
2869 | //called by the syncmanager to indicate that the work has to be saved. | ||
2870 | void KABCore::sync_save() | ||
2871 | { | ||
2872 | save(); | ||
2873 | } | 2869 | } |
2874 | 2870 | ||
2875 | 2871 | ||
2876 | |||
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c9c0d38..355e828 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -297,96 +297,97 @@ class KABCore : public QWidget, public KSyncInterface | |||
297 | Redos the last command that was undone, using the redo stack. | 297 | Redos the last command that was undone, using the redo stack. |
298 | */ | 298 | */ |
299 | void redo(); | 299 | void redo(); |
300 | 300 | ||
301 | /** | 301 | /** |
302 | Shows the edit dialog for the given uid. If the uid is QString::null, | 302 | Shows the edit dialog for the given uid. If the uid is QString::null, |
303 | the method will try to find a selected addressee in the view. | 303 | the method will try to find a selected addressee in the view. |
304 | */ | 304 | */ |
305 | void editContact( const QString &uid /*US = QString::null*/ ); | 305 | void editContact( const QString &uid /*US = QString::null*/ ); |
306 | //US added a second method without defaultparameter | 306 | //US added a second method without defaultparameter |
307 | void editContact2(); | 307 | void editContact2(); |
308 | 308 | ||
309 | /** | 309 | /** |
310 | Shows or edits the detail view for the given uid. If the uid is QString::null, | 310 | Shows or edits the detail view for the given uid. If the uid is QString::null, |
311 | the method will try to find a selected addressee in the view. | 311 | the method will try to find a selected addressee in the view. |
312 | */ | 312 | */ |
313 | void executeContact( const QString &uid /*US = QString::null*/ ); | 313 | void executeContact( const QString &uid /*US = QString::null*/ ); |
314 | 314 | ||
315 | /** | 315 | /** |
316 | Launches the configuration dialog. | 316 | Launches the configuration dialog. |
317 | */ | 317 | */ |
318 | void openConfigDialog(); | 318 | void openConfigDialog(); |
319 | 319 | ||
320 | /** | 320 | /** |
321 | Launches the ldap search dialog. | 321 | Launches the ldap search dialog. |
322 | */ | 322 | */ |
323 | void openLDAPDialog(); | 323 | void openLDAPDialog(); |
324 | 324 | ||
325 | /** | 325 | /** |
326 | Creates a KAddressBookPrinter, which will display the print | 326 | Creates a KAddressBookPrinter, which will display the print |
327 | dialog and do the printing. | 327 | dialog and do the printing. |
328 | */ | 328 | */ |
329 | void print(); | 329 | void print(); |
330 | 330 | ||
331 | /** | 331 | /** |
332 | Registers a new GUI client, so plugins can register its actions. | 332 | Registers a new GUI client, so plugins can register its actions. |
333 | */ | 333 | */ |
334 | void addGUIClient( KXMLGUIClient *client ); | 334 | void addGUIClient( KXMLGUIClient *client ); |
335 | 335 | ||
336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); | 336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); |
337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); | 338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); |
339 | 339 | ||
340 | 340 | ||
341 | signals: | 341 | signals: |
342 | void contactSelected( const QString &name ); | 342 | void contactSelected( const QString &name ); |
343 | void contactSelected( const QPixmap &pixmap ); | 343 | void contactSelected( const QPixmap &pixmap ); |
344 | public slots: | 344 | public slots: |
345 | void getFile( bool success ); | ||
345 | void setDetailsVisible( bool visible ); | 346 | void setDetailsVisible( bool visible ); |
346 | void setDetailsToState(); | 347 | void setDetailsToState(); |
347 | // void slotSyncMenu( int ); | 348 | // void slotSyncMenu( int ); |
348 | private slots: | 349 | private slots: |
349 | void setJumpButtonBarVisible( bool visible ); | 350 | void setJumpButtonBarVisible( bool visible ); |
350 | void importFromOL(); | 351 | void importFromOL(); |
351 | void extensionModified( const KABC::Addressee::List &list ); | 352 | void extensionModified( const KABC::Addressee::List &list ); |
352 | void extensionChanged( int id ); | 353 | void extensionChanged( int id ); |
353 | void clipboardDataChanged(); | 354 | void clipboardDataChanged(); |
354 | void updateActionMenu(); | 355 | void updateActionMenu(); |
355 | void configureKeyBindings(); | 356 | void configureKeyBindings(); |
356 | void removeVoice(); | 357 | void removeVoice(); |
357 | #ifdef KAB_EMBEDDED | 358 | #ifdef KAB_EMBEDDED |
358 | void configureResources(); | 359 | void configureResources(); |
359 | #endif //KAB_EMBEDDED | 360 | #endif //KAB_EMBEDDED |
360 | 361 | ||
361 | void slotEditorDestroyed( const QString &uid ); | 362 | void slotEditorDestroyed( const QString &uid ); |
362 | void configurationChanged(); | 363 | void configurationChanged(); |
363 | void addressBookChanged(); | 364 | void addressBookChanged(); |
364 | 365 | ||
365 | private: | 366 | private: |
366 | void initGUI(); | 367 | void initGUI(); |
367 | void initActions(); | 368 | void initActions(); |
368 | 369 | ||
369 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, | 370 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, |
370 | const char *name = 0 ); | 371 | const char *name = 0 ); |
371 | 372 | ||
372 | KXMLGUIClient *mGUIClient; | 373 | KXMLGUIClient *mGUIClient; |
373 | 374 | ||
374 | KABC::AddressBook *mAddressBook; | 375 | KABC::AddressBook *mAddressBook; |
375 | 376 | ||
376 | ViewManager *mViewManager; | 377 | ViewManager *mViewManager; |
377 | // QSplitter *mDetailsSplitter; | 378 | // QSplitter *mDetailsSplitter; |
378 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 379 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
379 | ViewContainer *mDetails; | 380 | ViewContainer *mDetails; |
380 | KDGanttMinimizeSplitter* mMiniSplitter; | 381 | KDGanttMinimizeSplitter* mMiniSplitter; |
381 | XXPortManager *mXXPortManager; | 382 | XXPortManager *mXXPortManager; |
382 | JumpButtonBar *mJumpButtonBar; | 383 | JumpButtonBar *mJumpButtonBar; |
383 | IncSearchWidget *mIncSearchWidget; | 384 | IncSearchWidget *mIncSearchWidget; |
384 | ExtensionManager *mExtensionManager; | 385 | ExtensionManager *mExtensionManager; |
385 | 386 | ||
386 | KCMultiDialog *mConfigureDialog; | 387 | KCMultiDialog *mConfigureDialog; |
387 | 388 | ||
388 | #ifndef KAB_EMBEDDED | 389 | #ifndef KAB_EMBEDDED |
389 | LDAPSearchDialog *mLdapSearchDialog; | 390 | LDAPSearchDialog *mLdapSearchDialog; |
390 | #endif //KAB_EMBEDDED | 391 | #endif //KAB_EMBEDDED |
391 | // QDict<AddresseeEditorDialog> mEditorDict; | 392 | // QDict<AddresseeEditorDialog> mEditorDict; |
392 | AddresseeEditorDialog *mEditorDialog; | 393 | AddresseeEditorDialog *mEditorDialog; |
@@ -416,69 +417,63 @@ class KABCore : public QWidget, public KSyncInterface | |||
416 | KAction *mActionSelectAll; | 417 | KAction *mActionSelectAll; |
417 | KAction *mActionUndo; | 418 | KAction *mActionUndo; |
418 | KAction *mActionRedo; | 419 | KAction *mActionRedo; |
419 | KAction *mActionDelete; | 420 | KAction *mActionDelete; |
420 | 421 | ||
421 | //US settings menu | 422 | //US settings menu |
422 | KAction *mActionConfigResources; | 423 | KAction *mActionConfigResources; |
423 | KAction *mActionConfigKAddressbook; | 424 | KAction *mActionConfigKAddressbook; |
424 | KAction *mActionConfigShortcuts; | 425 | KAction *mActionConfigShortcuts; |
425 | KAction *mActionConfigureToolbars; | 426 | KAction *mActionConfigureToolbars; |
426 | KAction *mActionKeyBindings; | 427 | KAction *mActionKeyBindings; |
427 | KToggleAction *mActionJumpBar; | 428 | KToggleAction *mActionJumpBar; |
428 | KToggleAction *mActionDetails; | 429 | KToggleAction *mActionDetails; |
429 | KAction *mActionWhoAmI; | 430 | KAction *mActionWhoAmI; |
430 | KAction *mActionCategories; | 431 | KAction *mActionCategories; |
431 | KAction *mActionAboutKAddressbook; | 432 | KAction *mActionAboutKAddressbook; |
432 | KAction *mActionLicence; | 433 | KAction *mActionLicence; |
433 | KAction *mActionFaq; | 434 | KAction *mActionFaq; |
434 | 435 | ||
435 | KAction *mActionDeleteView; | 436 | KAction *mActionDeleteView; |
436 | 437 | ||
437 | QPopupMenu *viewMenu; | 438 | QPopupMenu *viewMenu; |
438 | QPopupMenu *filterMenu; | 439 | QPopupMenu *filterMenu; |
439 | QPopupMenu *settingsMenu; | 440 | QPopupMenu *settingsMenu; |
440 | QPopupMenu *changeMenu; | 441 | QPopupMenu *changeMenu; |
441 | //US QAction *mActionSave; | 442 | //US QAction *mActionSave; |
442 | QPopupMenu *ImportMenu; | 443 | QPopupMenu *ImportMenu; |
443 | QPopupMenu *ExportMenu; | 444 | QPopupMenu *ExportMenu; |
444 | //LR additional methods | 445 | //LR additional methods |
445 | KAction *mActionRemoveVoice; | 446 | KAction *mActionRemoveVoice; |
446 | KAction * mActionImportOL; | 447 | KAction * mActionImportOL; |
447 | 448 | ||
448 | #ifndef KAB_EMBEDDED | 449 | #ifndef KAB_EMBEDDED |
449 | KAddressBookService *mAddressBookService; | 450 | KAddressBookService *mAddressBookService; |
450 | #endif //KAB_EMBEDDED | 451 | #endif //KAB_EMBEDDED |
451 | 452 | ||
452 | class KABCorePrivate; | 453 | class KABCorePrivate; |
453 | KABCorePrivate *d; | 454 | KABCorePrivate *d; |
454 | //US bool mBlockSaveFlag; | 455 | //US bool mBlockSaveFlag; |
455 | 456 | ||
456 | #ifdef KAB_EMBEDDED | 457 | #ifdef KAB_EMBEDDED |
457 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 458 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
458 | #endif //KAB_EMBEDDED | 459 | #endif //KAB_EMBEDDED |
459 | 460 | ||
460 | //this are the overwritten callbackmethods from the syncinterface | 461 | //this are the overwritten callbackmethods from the syncinterface |
461 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 462 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
462 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 463 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
463 | 464 | ||
464 | //called by the syncmanager to indicate that the work has to marked as dirty. | ||
465 | virtual void sync_setModified(); | ||
466 | //called by the syncmanager to ask if the dirty flag is set. | ||
467 | virtual bool sync_isModified(); | ||
468 | //called by the syncmanager to indicate that the work has to be saved. | ||
469 | virtual void sync_save(); | ||
470 | 465 | ||
471 | // LR ******************************* | 466 | // LR ******************************* |
472 | // sync stuff! | 467 | // sync stuff! |
473 | QPopupMenu *syncMenu; | 468 | QPopupMenu *syncMenu; |
474 | KSyncManager* syncManager; | 469 | KSyncManager* syncManager; |
475 | int mGlobalSyncMode; | 470 | int mGlobalSyncMode; |
476 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 471 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
477 | KABC::Addressee getLastSyncAddressee(); | 472 | KABC::Addressee getLastSyncAddressee(); |
478 | QDateTime mLastAddressbookSync; | 473 | QDateTime mLastAddressbookSync; |
479 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); | 474 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); |
480 | // ********************* | 475 | // ********************* |
481 | 476 | ||
482 | }; | 477 | }; |
483 | 478 | ||
484 | #endif | 479 | #endif |