korganizer

eventarchiver.h
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (c) 2004 David Faure <faure@kde.org>
5  Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 #ifndef EVENTARCHIVER_H
26 #define EVENTARCHIVER_H
27 
28 #include <tqobject.h>
29 #include <tqdatetime.h>
30 #include <libkcal/event.h>
31 
32 namespace KCal {
33 class Calendar;
34 class Event;
35 }
36 using namespace KCal;
37 
47 class EventArchiver : public TQObject
48 {
49  TQ_OBJECT
50 
51 
52  public:
53  EventArchiver( TQObject* parent = 0, const char* name = 0 );
54  virtual ~EventArchiver();
55 
63  void runOnce( Calendar* calendar, const TQDate& limitDate, TQWidget* widget );
64 
73  void runAuto( Calendar* calendar, TQWidget* widget, bool withGUI );
74 
75  signals:
76  void eventsDeleted();
77 
78  private:
79  void run( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, bool withGUI, bool errorIfNone );
80 
81  void deleteIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget,
82  const Incidence::List& incidences, bool withGUI );
83  void archiveIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget,
84  const Incidence::List& incidences, bool withGUI );
85 
93  bool isSubTreeComplete( const Todo *todo, const TQDate &limitDate,
94  TQStringList checkedUids = TQStringList() ) const;
95 };
96 
97 #endif /* EVENTARCHIVER_H */
This class handles expiring and archiving of events.
Definition: eventarchiver.h:48