korganizer Library API Documentation

koincidenceeditor.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program 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
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef KOINCIDENCEEDITOR_H
00025 #define KOINCIDENCEEDITOR_H
00026 
00027 #include <kdialogbase.h>
00028 
00029 class QDateTime;
00030 
00031 namespace KPIM { class CategorySelectDialog; }
00032 
00033 class KOEditorDetails;
00034 class KOEditorAttachments;
00035 
00036 namespace KCal {
00037 class Calendar;
00038 class CalendarLocal;
00039 class Incidence;
00040 }
00041 using namespace KCal;
00042 
00046 class KOIncidenceEditor : public KDialogBase
00047 {
00048     Q_OBJECT
00049   public:
00053     KOIncidenceEditor( const QString &caption, Calendar *calendar,
00054                        QWidget *parent );
00055     virtual ~KOIncidenceEditor();
00056 
00058     virtual void init() = 0;
00060     virtual void modified (int /*change*/=0) {}
00061 
00062     virtual void reload() = 0;
00063 
00064   public slots:
00065     void updateCategoryConfig();
00067     virtual void editIncidence(Incidence *) = 0;
00068 
00069 
00070   signals:
00071     void deleteAttendee( Incidence * );
00072 
00073     void editCategories();
00074     void dialogClose( Incidence * );
00075     void editCanceled( Incidence * );
00076 
00077     void incidenceAdded( Incidence * );
00078     void incidenceChanged( Incidence *oldTodo, Incidence *newTodo );
00079     void incidenceToBeDeleted( Incidence * );
00080     void incidenceDeleted( Incidence * );
00081 
00082   protected slots:
00083     void slotApply();
00084     void slotOk();
00085     void slotCancel();
00086 
00087     virtual void slotManageTemplates();
00088 
00089     virtual void slotSaveTemplate( const QString & ) = 0;
00090     virtual void slotLoadTemplate( const QString& );
00091     virtual void slotTemplatesChanged( const QStringList& );
00092 
00093   protected:
00094     virtual QString type() { return QString::null; }
00095     virtual QStringList& templates() const = 0;
00096     virtual void loadTemplate( /*const*/ CalendarLocal& ) = 0;
00097 
00098     void setupAttendeesTab();
00099     void setupAttachmentsTab();
00100 
00101     void saveAsTemplate( Incidence *, const QString &name );
00102 
00106     virtual bool processInput() { return false; }
00107 
00108     virtual void processCancel() {}
00109     
00110     void cancelRemovedAttendees( Incidence *incidence );
00111 
00112     Calendar *mCalendar;
00113 
00114     KPIM::CategorySelectDialog *mCategoryDialog;
00115 
00116     KOEditorDetails *mDetails;
00117     KOEditorAttachments *mAttachments;
00118 };
00119 
00120 #endif
00121 
00122 
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 2 09:56:05 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003