-rw-r--r-- | libopie2/opiepim/otodo.h | 59 |
1 files changed, 43 insertions, 16 deletions
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 70b0253..2f66f55 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h @@ -16,12 +16,13 @@ #include <opie/opimrecord.h> class OPimState; class ORecur; class OPimMaintainer; +class OPimNotifyManager; class OTodo : public OPimRecord { public: typedef QValueList<OTodo> ValueList; enum RecordFields { Uid = Qtopia::UID_ID, Category = Qtopia::CATEGORY_ID, @@ -32,19 +33,20 @@ public: Priority, DateDay, DateMonth, DateYear, Progress, CrossReference, - HasAlarmDateTime, - AlarmDateTime, State, - Recurrance, + Recurrence, Alarms, Reminders, - Notifiers + Notifiers, + Maintainer, + StartDate, + CompletedDate }; public: // priorities from Very low to very high enum TaskPriority { VeryHigh=1, High, Normal, Low, VeryLow }; /* Constructs a new ToDoEvent @@ -70,15 +72,15 @@ public: const QString& summary = QString::null, const QString& description = QString::null, ushort progress = 0, bool hasDate = false, QDate date = QDate::currentDate(), int uid = 0 /* empty */ ); - /* Copy c'tor - - **/ + /** Copy c'tor + * + */ OTodo(const OTodo & ); /** *destructor */ ~OTodo(); @@ -89,12 +91,14 @@ public: bool isCompleted() const; /** * Does this Event have a deadline */ bool hasDueDate() const; + bool hasStartDate()const; + bool hasCompletedDate()const; /** * Does this Event has an alarm time ? */ bool hasAlarmDateTime() const; @@ -111,15 +115,20 @@ public: /** * The due Date */ QDate dueDate()const; /** - * Alarm Date and Time + * When did it start? + */ + QDate startDate()const; + + /** + * When was it completed? */ - QDateTime alarmDateTime()const; + QDate completedDate()const; /** * What is the state of this OTodo? */ OPimState state()const; @@ -146,14 +155,22 @@ public: /** * @reimplemented * Return this todoevent in a RichText formatted QString */ QString toRichText() const; + /* + * check if the sharing is still fine!! -zecke + */ + /** + * return a reference to our notifiers... + */ + OPimNotifyManager ¬ifiers(); + /** - * reimplementation + * reimplementations */ QString type()const; QString toShortText()const; QMap<QString, QString> toExtraMap()const; QString recordField(int id )const; @@ -169,17 +186,16 @@ public: void setCompleted(bool completed ); /** * set if this todo got an end data */ void setHasDueDate( bool hasDate ); - - /** - * set if this todo has an alarm time and date - */ - void setHasAlarmDateTime ( bool hasAlarm ); + // FIXME we do not have these for start, completed + // cause we'll use the isNull() of QDate for figuring + // out if it's has a date... + // decide what to do here? -zecke /** * Set the priority of the Todo */ void setPriority(int priority ); @@ -188,14 +204,23 @@ public: */ void setProgress( ushort progress ); /** * set the end date */ - void setDueDate( QDate date ); + void setDueDate( const QDate& date ); + /** + * set the start date + */ + void setStartDate( const QDate& date ); + + /** + * set the completed date + */ + void setCompletedDate( const QDate& date ); void setRecurrence( const ORecur& ); /** * set the alarm time */ void setAlarmDateTime ( const QDateTime& alarm ); @@ -224,12 +249,14 @@ public: bool operator!=(const OTodo &toDoEvent )const; bool operator>(const OTodo &toDoEvent )const; bool operator>=(const OTodo &toDoEvent)const; bool operator==(const OTodo &toDoEvent )const; OTodo &operator=(const OTodo &toDoEvent ); + static int rtti(); + private: class OTodoPrivate; struct OTodoData; void deref(); inline void changeOrModify(); |