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