summaryrefslogtreecommitdiff
path: root/saltoqd/agendamanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'saltoqd/agendamanager.h')
-rw-r--r--saltoqd/agendamanager.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/saltoqd/agendamanager.h b/saltoqd/agendamanager.h
new file mode 100644
index 0000000..e70edb6
--- /dev/null
+++ b/saltoqd/agendamanager.h
@@ -0,0 +1,35 @@
+#ifndef AGENDAMANAGER_H
+#define AGENDAMANAGER_H
+
+#include "storagemanager.h"
+#include <extendedstorage.h>
+
+class AgendaManager : public QObject, public mKCal::ExtendedStorageObserver
+{
+ Q_OBJECT
+public:
+ explicit AgendaManager(StorageManager *storage, ToqManager *toq);
+ ~AgendaManager();
+
+public slots:
+ void scheduleRefresh();
+
+protected:
+ void storageModified(mKCal::ExtendedStorage *storage, const QString &info) Q_DECL_OVERRIDE;
+ void storageProgress(mKCal::ExtendedStorage *storage, const QString &info) Q_DECL_OVERRIDE;
+ void storageFinished(mKCal::ExtendedStorage *storage, bool error, const QString &info) Q_DECL_OVERRIDE;
+
+private slots:
+ void refresh();
+
+private:
+ ToqManager *_toq;
+ StorageManager *_storage;
+
+ mKCal::ExtendedCalendar::Ptr _calendar;
+ mKCal::ExtendedStorage::Ptr _calendarStorage;
+
+ QTimer *_refreshTimer;
+};
+
+#endif // AGENDAMANAGER_H