korganizer
eventarchiver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef EVENTARCHIVER_H
00027 #define EVENTARCHIVER_H
00028
00029 #include <kcal/event.h>
00030
00031 #include <QObject>
00032
00033 class QDate;
00034
00035 namespace KCal {
00036 class Calendar;
00037 class Event;
00038 }
00039 using namespace KCal;
00040
00050 class EventArchiver : public QObject
00051 {
00052 Q_OBJECT
00053 public:
00054 explicit EventArchiver( QObject *parent = 0 );
00055 virtual ~EventArchiver();
00056
00064 void runOnce( Calendar *calendar, const QDate &limitDate, QWidget *widget );
00065
00075 void runAuto( Calendar *calendar, QWidget *widget, bool withGUI );
00076
00077 signals:
00078 void eventsDeleted();
00079
00080 private:
00081 void run( Calendar *calendar, const QDate &limitDate, QWidget *widget,
00082 bool withGUI, bool errorIfNone );
00083
00084 void deleteIncidences( Calendar *calendar, const QDate &limitDate, QWidget *widget,
00085 const Incidence::List &incidences, bool withGUI );
00086 void archiveIncidences( Calendar *calendar, const QDate &limitDate, QWidget *widget,
00087 const Incidence::List &incidences, bool withGUI );
00088 };
00089
00090 #endif