00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _KOTODOEDITOR_H
00027 #define _KOTODOEDITOR_H
00028
00029 #include "koincidenceeditor.h"
00030
00031 class TQDateTime;
00032 class KOEditorGeneralTodo;
00033 class KOEditorRecurrence;
00037 class KOTodoEditor : public KOIncidenceEditor
00038 {
00039 Q_OBJECT
00040 TQ_OBJECT
00041 public:
00045 KOTodoEditor( Calendar *calendar, TQWidget *parent );
00046 virtual ~KOTodoEditor();
00047
00048 void init();
00049
00050 void reload();
00051
00055 void newTodo();
00056
00062 void setTexts( const TQString &summary, const TQString &description = TQString() );
00064 void editIncidence(Incidence *incidence, const TQDate &date, Calendar* calendar);
00065
00067 void setDates( const TQDateTime &due, bool allDay = true, Todo *relatedTodo = 0 );
00069 void readTodo(Todo *todo, Calendar *calendar, const TQDate &date);
00071 void writeTodo(Todo *);
00072
00074 bool validateInput();
00077 bool processInput();
00078
00080 void modified();
00081
00082 protected slots:
00083 void loadDefaults();
00084 void deleteTodo();
00085
00086 void slotSaveTemplate( const TQString & );
00087 void updateRecurrenceSummary();
00088
00089 protected:
00090 void loadTemplate( CalendarLocal& );
00091 TQStringList& templates() const;
00092 TQString type() { return "Todo"; }
00093 void setupGeneral();
00094 void setupRecurrence();
00095 int msgItemDelete();
00096
00097 private:
00098 Todo *mTodo;
00099 Calendar *mCalendar;
00100
00101 Todo *mRelatedTodo;
00102
00103 KOEditorGeneralTodo *mGeneral;
00104 KOEditorRecurrenceDialog *mRecurrenceDialog;
00105 KOEditorRecurrence *mRecurrence;
00106 };
00107
00108 #endif