incidencechangerbase.h
1/*
2 This file is part of the KOrganizer interfaces.
3
4 Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#ifndef KORG_INCIDENCECHANGERBASE_H
22#define KORG_INCIDENCECHANGERBASE_H
23
24#include "korganizer/koglobals.h"
25#include <libkcal/scheduler.h>
26#include <libkcal/incidence.h>
27#include <tqobject.h>
28
29class TQWidget;
30namespace KCal {
31 class Calendar;
32 class Incidence;
33 class ResourceCalendar;
34}
35using namespace KCal;
36
37namespace KOrg {
38
39class IncidenceChangerBase : public TQObject
40{
41TQ_OBJECT
42
43public:
44 IncidenceChangerBase( Calendar*cal, TQObject *parent = 0 ) :
45 TQObject( parent ), mCalendar( cal ) {}
46 virtual ~IncidenceChangerBase() {}
47
48 virtual bool sendGroupwareMessage( Incidence *incidence,
50 KOGlobals::HowChanged action,
51 TQWidget *parent ) = 0;
52
53 virtual bool beginChange( Incidence *incidence,
54 ResourceCalendar *res, const TQString &subRes ) = 0;
55 virtual bool endChange( Incidence *incidence,
56 ResourceCalendar *res, const TQString &subRes ) = 0;
57
58 virtual bool addIncidence( Incidence *incidence,
59 ResourceCalendar *res, const TQString &subRes,
60 TQWidget *parent ) = 0;
61 virtual bool addIncidence( Incidence *incidence,
62 ResourceCalendar *res, const TQString &subRes,
63 TQWidget *parent, int dontAskForGroupware) = 0;
64
65 virtual bool changeIncidence( Incidence *oldinc, Incidence *newinc,
66 KOGlobals::WhatChanged, TQWidget *parent ) = 0;
67 virtual bool changeIncidence( Incidence *oldinc, Incidence *newinc,
68 KOGlobals::WhatChanged, TQWidget *parent, int dontAskForGroupware ) = 0;
69
70 virtual bool deleteIncidence( Incidence *incidence, TQWidget *parent ) = 0;
71
72 virtual bool cutIncidences( const Incidence::List &incidences, TQWidget *parent ) = 0;
73 virtual bool cutIncidence( Incidence *incidence, TQWidget *parent ) = 0;
74
75signals:
76 void incidenceAdded( Incidence * );
77 void incidenceChanged( Incidence *oldInc, Incidence *newInc, KOGlobals::WhatChanged );
78 void incidenceToBeDeleted( Incidence * );
79 void incidenceDeleted( Incidence * );
80
81 void schedule( Scheduler::Method method, Incidence *incidence );
82protected:
83 Calendar *mCalendar;
84};
85
86
87
88
89}
90
91#endif