korganizer

incidencechanger.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program 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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef INCIDENCECHANGER_H
25 #define INCIDENCECHANGER_H
26 
27 #include "korganizer/incidencechangerbase.h"
28 
29 namespace KCal {
30  class ResourceCalendar;
31 }
32 
33 class IncidenceChanger : public KOrg::IncidenceChangerBase
34 {
35  TQ_OBJECT
36 
37  public:
38  IncidenceChanger( Calendar *cal, TQObject *parent )
39  : IncidenceChangerBase( cal, parent ) {}
40  ~IncidenceChanger() {}
41 
42  bool beginChange( Incidence *incidence,
43  ResourceCalendar *res, const TQString &subRes );
44 
45  bool sendGroupwareMessage( Incidence *incidence,
47  KOGlobals::HowChanged action,
48  TQWidget *parent );
49 
50  bool endChange( Incidence *incidence,
51  ResourceCalendar *res, const TQString &subRes );
52 
53  bool addIncidence( Incidence *incidence,
54  ResourceCalendar *res, const TQString &subRes,
55  TQWidget *parent );
56  bool addIncidence( Incidence *incidence,
57  ResourceCalendar *res, const TQString &subRes,
58  TQWidget *parent, int dontAskForGroupware );
59 
60  bool changeIncidence( Incidence *oldinc, Incidence *newinc,
61  KOGlobals::WhatChanged, TQWidget *parent );
62  bool changeIncidence( Incidence *oldinc, Incidence *newinc,
63  KOGlobals::WhatChanged, TQWidget *parent, int dontAskForGroupware );
64 
65  bool deleteIncidence( Incidence *incidence, TQWidget *parent );
66 
67  bool cutIncidences( const Incidence::List &incidences, TQWidget *parent );
68  bool cutIncidence( Incidence *incidence, TQWidget *parent );
69 
70  static bool incidencesEqual( Incidence *inc1, Incidence *inc2 );
71  static bool assignIncidence( Incidence *inc1, Incidence *inc2 );
72 
73  public slots:
74  void cancelAttendees( Incidence *incidence );
75 
76  protected:
77  bool myAttendeeStatusChanged( Incidence *oldInc, Incidence *newInc );
78 
79  private:
80  class ComparisonVisitor;
81  class AssignmentVisitor;
82 };
83 
84 #endif