summaryrefslogtreecommitdiffstats
path: root/kresources/caldav/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/caldav/resource.h')
-rw-r--r--kresources/caldav/resource.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/kresources/caldav/resource.h b/kresources/caldav/resource.h
index 6b28c3507..a93bf05b3 100644
--- a/kresources/caldav/resource.h
+++ b/kresources/caldav/resource.h
@@ -22,6 +22,7 @@
#include <qptrqueue.h>
#include <libkcal/resourcecached.h>
+#include <libkdepim/progressmanager.h>
#include <kabc/locknull.h>
@@ -72,8 +73,12 @@ protected slots:
void loadFinished();
+ virtual bool doSave();
+
void writingFinished();
+ void releaseReadLockout();
+
protected:
struct LoadingTask {
@@ -92,7 +97,7 @@ protected:
// virtual bool doSave( bool syncCache );
virtual bool doLoad();
- virtual bool doSave();
+// virtual bool doSave();
virtual bool doSave( bool syncCache, Incidence *incidence );
@@ -112,6 +117,11 @@ protected:
void init();
/**
+ * Updates the progress bar
+ */
+ void updateProgressBar(int direction);
+
+ /**
* Initiates calendar loading process.
* @param url URL to load calendar data from.
*/
@@ -134,8 +144,9 @@ protected:
/**
* Initiates calendar writing process.
* @param url URL to save calendar data to.
+ * @return true if write was queued successfully, false if not
*/
- void startWriting(const QString& url);
+ bool startWriting(const QString& url);
/**
* Returns a list of incidences as a valid iCalendar string.
@@ -180,6 +191,8 @@ protected:
*/
void writingQueuePush(const WritingTask *task);
+ virtual bool event ( QEvent * e );
+
private:
// constants: =============================================================
@@ -197,12 +210,15 @@ private:
static const int DEFAULT_RELOAD_POLICY;
static const int DEFAULT_SAVE_POLICY;
+ bool readLockout;
+
// members: ===============================================================
KABC::LockNull mLock;
CalDavPrefs* mPrefs;
CalDavReader* mLoader;
CalDavWriter* mWriter;
+ KPIM::ProgressItem *mProgress;
bool mLoadingQueueReady;
QPtrQueue<LoadingTask> mLoadingQueue;