From aaea91151fe9a747e9eddfb8ba7d5896744faf30 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Sun, 03 Oct 2004 23:29:56 +0000 Subject: moved sync related progressbar management to ksyncmanager, and proceeded with the sync implementation of pwmanager --- (limited to 'libkdepim/ksyncmanager.h') diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 389a005..9761107 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -31,6 +31,7 @@ class KPimPrefs; class QWidget; class KSyncManager; class KSyncInterface; +class QProgressBar; class KSyncManager : public QObject { @@ -54,6 +55,11 @@ class KSyncManager : public QObject QString getCurrentSyncDevice() { return mCurrentSyncDevice; } QString getCurrentSyncName() { return mCurrentSyncName; } + void showProgressBar(int percentage, QString caption = QString::null, int total=100); + void hideProgressBar(); + bool isProgressBarCanceled(); + + public slots: void slotSyncMenu( int ); @@ -89,7 +95,7 @@ class KSyncManager : public QObject KPimPrefs* mPrefs; QPopupMenu* mSyncMenu; - + QProgressBar* bar; @@ -102,8 +108,12 @@ class KSyncInterface { public: virtual bool sync(KSyncManager* manager, QString filename, int mode) = 0; - virtual bool syncExternal(KSyncManager* manager, QString resource) = 0; + virtual bool syncExternal(KSyncManager* manager, QString resource) + { + // empty implementation, because some syncable applications do not have an external(sharpdtm) syncmode, like pwmanager. + return false; + } //called by the syncmanager to indicate that the work has to be marked as dirty. virtual void sync_setModified() = 0; -- cgit v0.9.0.2