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 "korganizer/koglobals.h"
00025 #include <libkcal/scheduler.h>
00026 #include <qobject.h>
00027 
00028 class QWidget;
00029 namespace KCal {
00030   class Calendar;
00031   class Incidence;
00032   class ResourceCalendar;
00033 }
00034 using namespace KCal;
00035 
00036 namespace KOrg {
00037 
00038 class IncidenceChangerBase : public QObject
00039 {
00040 Q_OBJECT
00041 public:
00042   IncidenceChangerBase( Calendar*cal, QObject *parent = 0 ) :
00043         QObject( parent ), mCalendar( cal ) {}
00044   virtual ~IncidenceChangerBase() {}
00045 
00046   virtual bool sendGroupwareMessage( Incidence *incidence,
00047                                      KCal::Scheduler::Method method,
00048                                      KOGlobals::HowChanged action,
00049                                      QWidget *parent ) = 0;
00050 
00051   virtual bool beginChange( Incidence * incidence ) = 0;
00052   virtual bool endChange( Incidence *incidence ) = 0;
00053 
00054   virtual bool addIncidence( Incidence *incidence,
00055                              ResourceCalendar *res, const QString &subRes,
00056                              QWidget *parent ) = 0;
00057 
00058   virtual bool changeIncidence( Incidence *oldinc, Incidence *newinc,
00059                                 KOGlobals::WhatChanged, QWidget *parent ) = 0;
00060   virtual bool deleteIncidence( Incidence *incidence, QWidget *parent ) = 0;
00061   virtual bool cutIncidence( Incidence *incidence, QWidget *parent ) = 0;
00062 
00063 signals:
00064   void incidenceAdded( Incidence * );
00065   void incidenceChanged( Incidence *oldInc, Incidence *newInc, KOGlobals::WhatChanged );
00066   void incidenceToBeDeleted( Incidence * );
00067   void incidenceDeleted( Incidence * );
00068 
00069   void schedule( Scheduler::Method method, Incidence *incidence );
00070 protected:
00071   Calendar *mCalendar;
00072 };
00073 
00074 
00075 
00076 
00077 }
00078 
00079 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys