korganizer Library API Documentation

koeventeditor.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 #ifndef _KOEVENTEDITOR_H
00024 #define _KOEVENTEDITOR_H
00025 
00026 #include <kdialogbase.h>
00027 
00028 #include <qdatetime.h>
00029 
00030 #include <libkcal/calendar.h>
00031 
00032 #include "koeditorgeneralevent.h"
00033 #include "koeditordetails.h"
00034 #include "koeditorrecurrence.h"
00035 #include "koincidenceeditor.h"
00036 
00037 class QWidgetStack;
00038 class SaveTemplateDialog;
00039 
00040 using namespace KCal;
00041 
00045 class KOEventEditor : public KOIncidenceEditor
00046 {
00047     Q_OBJECT
00048   public:
00052     KOEventEditor( Calendar *calendar, QWidget *parent );
00053     virtual ~KOEventEditor(void);
00054 
00055     void init();
00056 
00057     void reload();
00058 
00062     void newEvent( QDateTime from, QDateTime to, bool allDay = false );
00066     void editEvent( Event * );
00067 
00071     void setDefaults( QDateTime from, QDateTime to, bool allDay );
00072 
00077     void readEvent( Event *, bool tmpl = false );
00081     void writeEvent( Event * );
00082 
00083   signals:
00084     void eventAdded(Event *);
00085     void eventChanged(Event *);
00086     void eventToBeDeleted(Event *);
00087     void eventDeleted();
00088     void deleteAttendee(Incidence *);
00089 
00090   protected slots:
00091     void loadDefaults();
00092     void deleteEvent();
00093     void enableRecurrence(bool);
00094 
00095     void slotLoadTemplate();
00096     void slotSaveTemplate();
00097 
00098     void saveTemplate( const QString & );
00099 
00100   protected:
00101     void setupGeneral();
00102     void setupRecurrence();
00103 
00105     bool validateInput();
00108     bool processInput();
00109     int msgItemDelete();
00110     
00111   private:
00112     Event *mEvent;
00113 
00114     KOEditorGeneralEvent *mGeneral;
00115     KOEditorRecurrence   *mRecurrence;
00116 
00117     QWidgetStack *mRecurrenceStack;
00118     QLabel *mRecurrenceDisabled;
00119 };
00120 
00121 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:09 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001