korganizer Library API Documentation

koeventeditor.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 KOEVENTEDITOR_H
00025 #define KOEVENTEDITOR_H
00026 
00027 #include "koincidenceeditor.h"
00028 
00029 class KOEditorGeneralEvent;
00030 class KOEditorRecurrence;
00031 class KOEditorFreeBusy;
00032 
00033 class SaveTemplateDialog;
00034 
00035 class KOEditorFreeBusy;
00036 
00037 namespace KCal {
00038 class Calendar;
00039 class CalendarLocal;
00040 class Event;
00041 }
00042 using namespace KCal;
00043 
00047 class KOEventEditor : public KOIncidenceEditor
00048 {
00049     Q_OBJECT
00050   public:
00054     KOEventEditor( Calendar *calendar, QWidget *parent );
00055     virtual ~KOEventEditor(void);
00056 
00057     void init();
00059     void modified (int change=0);
00060     void reload();
00061 
00065     void newEvent( QDateTime from, QDateTime to, bool allDay = false );
00069     void newEvent( const QString & );
00073     void newEvent( const QString &summary, const QString &description,
00074                    const QString &attachment );
00078     void newEvent( const QString &summary, const QString &description,
00079                    const QString &attachment, const QStringList &attendees );
00083     void editIncidence( Incidence * );
00084 
00088     void setDefaults( QDateTime from, QDateTime to, bool allDay );
00089 
00094     void readEvent( Event *, bool tmpl = false );
00098     void writeEvent( Event * );
00099 
00100     QObject *typeAheadReceiver() const;
00101 
00102   signals:
00103     void focusReceivedSignal();
00104 
00105   protected slots:
00106     void loadDefaults();
00107     void deleteEvent();
00108 
00109     void slotSaveTemplate( const QString & );
00110 
00111   protected:
00112     QString type() { return "Event"; }
00113     void setupGeneral();
00114     void setupRecurrence();
00115     void setupFreeBusy();
00116 
00118     bool validateInput();
00121     bool processInput();
00122 
00125     static bool myAttendeeStatusChanged( Event *oldVersion, Event *newVersion );
00126     void processCancel();
00127     int msgItemDelete();
00128     void loadTemplate( /*const*/ CalendarLocal& );
00129     QStringList& templates() const;
00130 
00131   private:
00132     Event *mEvent;
00133 
00134     KOEditorGeneralEvent *mGeneral;
00135     KOEditorRecurrence   *mRecurrence;
00136     KOEditorFreeBusy     *mFreeBusy;
00137 };
00138 
00139 #endif
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 Fri Dec 21 14:25:44 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003