korganizer
incidencechangerbase.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KORG_INCIDENCECHANGERBASE_H
00022 #define KORG_INCIDENCECHANGERBASE_H
00023
00024 #include "korganizer/koglobals.h"
00025 #include <libkcal/scheduler.h>
00026 #include <libkcal/incidence.h>
00027 #include <qobject.h>
00028
00029 class QWidget;
00030 namespace KCal {
00031 class Calendar;
00032 class Incidence;
00033 class ResourceCalendar;
00034 }
00035 using namespace KCal;
00036
00037 namespace KOrg {
00038
00039 class IncidenceChangerBase : public QObject
00040 {
00041 Q_OBJECT
00042 public:
00043 IncidenceChangerBase( Calendar*cal, QObject *parent = 0 ) :
00044 QObject( parent ), mCalendar( cal ) {}
00045 virtual ~IncidenceChangerBase() {}
00046
00047 virtual bool sendGroupwareMessage( Incidence *incidence,
00048 KCal::Scheduler::Method method,
00049 KOGlobals::HowChanged action,
00050 QWidget *parent ) = 0;
00051
00052 virtual bool beginChange( Incidence *incidence,
00053 ResourceCalendar *res, const QString &subRes ) = 0;
00054 virtual bool endChange( Incidence *incidence,
00055 ResourceCalendar *res, const QString &subRes ) = 0;
00056
00057 virtual bool addIncidence( Incidence *incidence,
00058 ResourceCalendar *res, const QString &subRes,
00059 QWidget *parent ) = 0;
00060
00061 virtual bool changeIncidence( Incidence *oldinc, Incidence *newinc,
00062 KOGlobals::WhatChanged, QWidget *parent ) = 0;
00063 virtual bool deleteIncidence( Incidence *incidence, QWidget *parent ) = 0;
00064
00065 virtual bool cutIncidences( const Incidence::List &incidences, QWidget *parent ) = 0;
00066 virtual bool cutIncidence( Incidence *incidence, QWidget *parent ) = 0;
00067
00068 signals:
00069 void incidenceAdded( Incidence * );
00070 void incidenceChanged( Incidence *oldInc, Incidence *newInc, KOGlobals::WhatChanged );
00071 void incidenceToBeDeleted( Incidence * );
00072 void incidenceDeleted( Incidence * );
00073
00074 void schedule( Scheduler::Method method, Incidence *incidence );
00075 protected:
00076 Calendar *mCalendar;
00077 };
00078
00079
00080
00081
00082 }
00083
00084 #endif
|