Diffstat (limited to 'libopie2/opiepim/core/orecur.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/orecur.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h index d24d72d..8713d97 100644 --- a/libopie2/opiepim/core/orecur.h +++ b/libopie2/opiepim/core/orecur.h @@ -10,3 +10,3 @@ #include <qdatetime.h> - +#include <qvaluelist.h> @@ -15,2 +15,3 @@ class ORecur { public: + typedef QValueList<QDate> ExceptionList; enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, @@ -25,2 +26,6 @@ public: bool operator==(const ORecur& )const; + + bool doesRecur()const; + /* if it recurrs on that day */ + bool doesRecur( const QDate& ); RepeatType type()const; @@ -30,2 +35,3 @@ public: bool hasEndDate()const; + QDate start()const; QDate endDate()const; @@ -33,2 +39,20 @@ public: time_t createTime()const; + + /** + * FromWhereToStart is not included!!! + */ + bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); + /** + * The module this ORecur belongs to + */ + QString service()const; + + /* + * reference to the exception list + */ + ExceptionList &exceptions(); + + /** + * the current repetition + */ int repetition()const; @@ -40,2 +64,3 @@ public: void setEndDate( const QDate& dt ); + void setStart( const QDate& dt ); void setEndDateUTC( time_t ); @@ -44,2 +69,4 @@ public: void setRepitition(int ); + + void setService( const QString& ser ); private: |