korganizer

incidencechangerbase.h

00001 /*
00002     This file is part of the KOrganizer interfaces.
00003 
00004     Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KORG_INCIDENCECHANGERBASE_H
00022 #define KORG_INCIDENCECHANGERBASE_H
00023 
00024 #include <libkcal/scheduler.h>
00025 #include <qobject.h>
00026 
00027 namespace KCal {
00028 class Calendar;
00029 class Incidence;
00030 }
00031 using namespace KCal;
00032 
00033 namespace KOrg {
00034 
00035 class IncidenceChangerBase : public QObject
00036 {
00037 Q_OBJECT
00038 public:
00039   IncidenceChangerBase( Calendar*cal, QObject *parent = 0 ) : 
00040         QObject( parent ), mCalendar( cal ) {}
00041   virtual ~IncidenceChangerBase() {}
00042 
00043   virtual bool sendGroupwareMessage( Incidence *incidence, 
00044           KCal::Scheduler::Method method, bool deleting = false ) = 0;
00045 
00046   virtual bool beginChange( Incidence * incidence ) = 0;
00047   virtual bool endChange( Incidence *incidence ) = 0;
00048 
00049   virtual bool addIncidence( Incidence *incidence ) = 0;
00050   virtual bool changeIncidence( Incidence *newinc, Incidence *oldinc, 
00051                                 int action = -1 ) = 0;
00052   virtual bool deleteIncidence( Incidence *incidence ) = 0;
00053   virtual bool cutIncidence( Incidence *incidence ) = 0;
00054 
00055 /*
00056   static bool incidencesEqual( Incidence *inc1, Incidence *inc2 );
00057   static bool assignIncidence( Incidence *inc1, Incidence *inc2 );
00058 */
00059 signals:
00060   void incidenceAdded( Incidence * );
00061   void incidenceChanged( Incidence *oldInc, Incidence *newInc, int );
00062   void incidenceChanged( Incidence *oldInc, Incidence *newInc );
00063   void incidenceToBeDeleted( Incidence * );
00064   void incidenceDeleted( Incidence * );
00065   
00066   void schedule( Scheduler::Method method, Incidence *incidence );
00067 protected:
00068   Calendar *mCalendar;
00069 };
00070 
00071 
00072 
00073 
00074 }
00075 
00076 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys