author | ulf69 <ulf69> | 2004-10-01 05:22:45 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-01 05:22:45 (UTC) |
commit | ae6aaaf2ec81317d275ebaabba2de188279b58cd (patch) (side-by-side diff) | |
tree | f773df13a4e4f9fa5c6c54d01786e2de561ae661 /kaddressbook/kabcore.h | |
parent | 11c2acda0533e579512cf416de870328a79e66e8 (diff) | |
download | kdepimpi-ae6aaaf2ec81317d275ebaabba2de188279b58cd.zip kdepimpi-ae6aaaf2ec81317d275ebaabba2de188279b58cd.tar.gz kdepimpi-ae6aaaf2ec81317d275ebaabba2de188279b58cd.tar.bz2 |
moved the global sync stuff from kabcore into a new class ksyncmanaager which
can be used from all types of applications, like kapi, kopi and pwmpi
-rw-r--r-- | kaddressbook/kabcore.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index e89bf41..ef61d6d 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -32,6 +32,7 @@ #include <qwidget.h> #include <qpopupmenu.h> +#include <ksyncmanager.h> namespace KABC { class AddressBook; @@ -67,7 +68,7 @@ class ViewManager; class AddresseeEditorDialog; class Ir; -class KABCore : public QWidget +class KABCore : public QWidget, public KSyncInterface { Q_OBJECT @@ -341,7 +342,7 @@ class KABCore : public QWidget public slots: void setDetailsVisible( bool visible ); void setDetailsToState(); - void slotSyncMenu( int ); + // void slotSyncMenu( int ); private slots: void setJumpButtonBarVisible( bool visible ); void importFromOL(); @@ -447,37 +448,32 @@ class KABCore : public QWidget class KABCorePrivate; KABCorePrivate *d; - bool mBlockSaveFlag; + //US bool mBlockSaveFlag; #ifdef KAB_EMBEDDED KAddressBookMain *mMainWindow; // should be the same like mGUIClient #endif //KAB_EMBEDDED + + //this are the overwritten callbackmethods from the syncinterface + virtual bool sync(KSyncManager* manager, QString filename, int mode); + virtual bool syncExternal(KSyncManager* manager, QString resource); + + //called by the syncmanager to indicate that the work has to marked as dirty. + virtual void sync_setModified(); + //called by the syncmanager to ask if the dirty flag is set. + virtual bool KABCore::sync_isModified(); + //called by the syncmanager to indicate that the work has to be saved. + virtual void sync_save(); + // LR ******************************* // sync stuff! QPopupMenu *syncMenu; - void fillSyncMenu(); - QString mCurrentSyncDevice; - QString mCurrentSyncName; - void quickSyncLocalFile(); - bool syncWithFile( QString fn , bool quick ); - void syncLocalFile(); - void syncPhone(); - void syncSharp(); - bool syncExternal(QString); - void multiSync( bool askforPrefs ); - int mCurrentSyncProfile ; - void syncRemote( KSyncProfile* prof, bool ask = true); - void edit_sync_options(); - bool syncAB(QString filename, int mode); - int ringSync(); - QString getPassword( ); + KSyncManager* syncManager; int mGlobalSyncMode; bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); KABC::Addressee getLastSyncAddressee(); QDateTime mLastAddressbookSync; int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); - public slots: - void confSync(); // ********************* }; |