korganizer
koeventeditor.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KOEVENTEDITOR_H
00026 #define KOEVENTEDITOR_H
00027
00028 #include "koincidenceeditor.h"
00029
00030 class KOEditorGeneralEvent;
00031 class KOEditorRecurrence;
00032 class KOEditorRecurrenceDialog;
00033 class KOEditorFreeBusy;
00034
00035 class SaveTemplateDialog;
00036
00037 class KOEditorFreeBusy;
00038
00039 namespace KCal {
00040 class Calendar;
00041 class Event;
00042 }
00043 using namespace KCal;
00044
00048 class KOEventEditor : public KOIncidenceEditor
00049 {
00050 Q_OBJECT
00051 public:
00055 KOEventEditor( Calendar *calendar, QWidget *parent );
00056 virtual ~KOEventEditor(void);
00057
00058 void init();
00060 void modified (int change=0);
00061 void reload();
00062
00066 void newEvent();
00067
00073 void setTexts( const QString &summary, const QString &description = QString::null );
00077 void editIncidence( Incidence *incidence, Calendar *calendar );
00078
00082 void setDates( const QDateTime &from, const QDateTime &to, bool allDay );
00083
00088 void readEvent( Event *event, Calendar *calendar, bool tmpl = false );
00092 void writeEvent( Event * );
00093
00094 QObject *typeAheadReceiver() const;
00095
00096 signals:
00097 void focusReceivedSignal();
00098
00099 protected slots:
00100 void loadDefaults();
00101 void deleteEvent();
00102
00103 void slotSaveTemplate( const QString & );
00104 void updateRecurrenceSummary();
00105
00106 protected:
00107 QString type() { return "Event"; }
00108 void setupGeneral();
00109 void setupRecurrence();
00110 void setupFreeBusy();
00111
00113 bool validateInput();
00116 bool processInput();
00117 void processCancel();
00118 int msgItemDelete();
00119 void loadTemplate( CalendarLocal& );
00120 QStringList& templates() const;
00121
00122 private:
00123 Event *mEvent;
00124 Calendar* mCalendar;
00125
00126 KOEditorGeneralEvent *mGeneral;
00127 KOEditorRecurrenceDialog *mRecurrenceDialog;
00128 KOEditorRecurrence *mRecurrence;
00129 KOEditorFreeBusy *mFreeBusy;
00130 };
00131
00132 #endif
|