summaryrefslogtreecommitdiff
path: root/saltoqd/agendamanager.h
blob: e70edb601bf2b871e68a5e6caa8ba2911215efdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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