00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _KOEDITORGENERALTODO_H
00025 #define _KOEDITORGENERALTODO_H
00026
00027 #include "koeditorgeneral.h"
00028 #include "koglobals.h"
00029
00030 #include <tqdatetime.h>
00031
00032 class KRestrictedLine;
00033
00034 class KDateEdit;
00035 class KTimeEdit;
00036
00037 namespace KCal {
00038 class Todo;
00039 }
00040 using namespace KCal;
00041
00042 class KOEditorGeneralTodo : public KOEditorGeneral
00043 {
00044 Q_OBJECT
00045
00046 public:
00047 KOEditorGeneralTodo (TQObject* parent=0,const char* name=0);
00048 virtual ~KOEditorGeneralTodo();
00049
00050 void initTime(TQWidget *, TQBoxLayout *);
00051 void iniStatus(TQWidget *, TQBoxLayout *);
00052 void initCompletion(TQWidget *, TQBoxLayout *);
00053 void initPriority(TQWidget *, TQBoxLayout *);
00054
00055 void finishSetup();
00056
00058 void setDefaults( const TQDateTime &due, bool allDay );
00060 void readTodo( Todo *todo, Calendar *calendar, const TQDate &date );
00062 void writeTodo(Todo *);
00063
00065 bool validateInput();
00066
00067 void updateRecurrenceSummary( Todo *todo );
00068
00070 void modified( Todo *todo, KOGlobals::HowChanged modification );
00071
00072 signals:
00073 void dueDateEditToggle( bool );
00074 void dateTimeStrChanged( const TQString & );
00075 void signalDateTimeChanged( const TQDateTime &, const TQDateTime & );
00076 void editRecurrence();
00077
00078 protected slots:
00079 void completedChanged( int );
00080 void completedChanged();
00081 void dateChanged();
00082 void startDateModified();
00083
00084 void enableDueEdit( bool enable );
00085 void enableStartEdit( bool enable );
00086 void enableTimeEdits( bool enable );
00087
00088 protected:
00089 void setCompletedDate();
00090
00091 private:
00092 bool mAlreadyComplete;
00093 bool mStartDateModified;
00094
00095 KDateEdit *mStartDateEdit;
00096 KTimeEdit *mStartTimeEdit;
00097 TQCheckBox *mTimeButton;
00098 TQCheckBox *mDueCheck;
00099 KDateEdit *mDueDateEdit;
00100 KTimeEdit *mDueTimeEdit;
00101 TQCheckBox *mCompletedToggle;
00102 TQComboBox *mCompletedCombo;
00103 TQLabel *mCompletedLabel;
00104 TQLabel *mPriorityLabel;
00105 TQComboBox *mPriorityCombo;
00106
00107 KDateEdit *mCompletionDateEdit;
00108 KTimeEdit *mCompletionTimeEdit;
00109
00110 TQCheckBox *mStartCheck;
00111
00112 TQDateTime mCompletedDateTime;
00113 };
00114
00115
00116 #endif