-rw-r--r-- | libkdepim/ksyncmanager.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 389a005..9761107 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -26,16 +26,17 @@ $Id$ #include <qstring.h> class QPopupMenu; class KSyncProfile; class KPimPrefs; class QWidget; class KSyncManager; class KSyncInterface; +class QProgressBar; class KSyncManager : public QObject { Q_OBJECT public: enum TargetApp { KOPI = 0, @@ -49,16 +50,21 @@ class KSyncManager : public QObject bool blockSave() { return mBlockSaveFlag; } void setBlockSave(bool sa) { mBlockSaveFlag = sa; } void fillSyncMenu(); 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 ); private: // LR ******************************* // sync stuff! QString mCurrentSyncDevice; QString mCurrentSyncName; @@ -84,31 +90,35 @@ class KSyncManager : public QObject QWidget* mParent; KSyncInterface* mImplementation; TargetApp mTargetApp; KPimPrefs* mPrefs; QPopupMenu* mSyncMenu; - + QProgressBar* bar; }; 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; //called by the syncmanager to ask if the dirty flag is set. virtual bool sync_isModified() = 0; //called by the syncmanager to indicate that the work has to be saved. |