korganizer

eventarchiver.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00004     Copyright (c) 2004 David Faure <faure@kde.org>
00005     Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 #ifndef EVENTARCHIVER_H
00026 #define EVENTARCHIVER_H
00027 
00028 #include <qobject.h>
00029 #include <qdatetime.h>
00030 #include <libkcal/event.h>
00031 
00032 namespace KCal {
00033 class Calendar;
00034 class Event;
00035 }
00036 using namespace KCal;
00037 
00047 class EventArchiver : public QObject
00048 {
00049     Q_OBJECT
00050 
00051   public:
00052     EventArchiver( QObject* parent = 0, const char* name = 0 );
00053     virtual ~EventArchiver();
00054 
00062     void runOnce( Calendar* calendar, const QDate& limitDate, QWidget* widget  );
00063 
00072     void runAuto( Calendar* calendar, QWidget* widget, bool withGUI );
00073 
00074   signals:
00075     void eventsDeleted();
00076 
00077   private:
00078     void run( Calendar* calendar, const QDate& limitDate, QWidget* widget, bool withGUI, bool errorIfNone );
00079 
00080     void deleteIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI );
00081     void archiveIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI );
00082 };
00083 
00084 #endif /* EVENTARCHIVER_H */
KDE Home | KDE Accessibility Home | Description of Access Keys