-rw-r--r-- | libopie/todoevent.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libopie/todoevent.h b/libopie/todoevent.h index ac996a1..0d477fd 100644 --- a/libopie/todoevent.h +++ b/libopie/todoevent.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #ifndef todoevent_h | 2 | #ifndef todoevent_h |
3 | #define todoevent_h | 3 | #define todoevent_h |
4 | 4 | ||
5 | #include <qstringlist.h> | ||
5 | #include <qdatetime.h> | 6 | #include <qdatetime.h> |
6 | 7 | ||
7 | class ToDoEvent { | 8 | class ToDoEvent { |
@@ -9,14 +10,14 @@ class ToDoEvent { | |||
9 | public: | 10 | public: |
10 | enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW }; | 11 | enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW }; |
11 | ToDoEvent( bool completed = false, int priority = NORMAL, | 12 | ToDoEvent( bool completed = false, int priority = NORMAL, |
12 | const QString &category = QString::null, | 13 | const QStringList &category = QStringList(), |
13 | const QString &description = QString::null , | 14 | const QString &description = QString::null , |
14 | bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); | 15 | bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); |
15 | ToDoEvent(const ToDoEvent & ); | 16 | ToDoEvent(const ToDoEvent & ); |
16 | bool isCompleted() const; | 17 | bool isCompleted() const; |
17 | bool hasDate() const; | 18 | bool hasDate() const; |
18 | int priority()const ; | 19 | int priority()const ; |
19 | QString category()const; | 20 | QStringList allCategories()const; |
20 | QArray<int> categories() const; | 21 | QArray<int> categories() const; |
21 | QDate date()const; | 22 | QDate date()const; |
22 | QString description()const; | 23 | QString description()const; |
@@ -24,8 +25,14 @@ class ToDoEvent { | |||
24 | int uid()const { return m_uid;}; | 25 | int uid()const { return m_uid;}; |
25 | void setCompleted(bool completed ); | 26 | void setCompleted(bool completed ); |
26 | void setHasDate( bool hasDate ); | 27 | void setHasDate( bool hasDate ); |
27 | // if the category doesn't exist we will create it | 28 | // if the category doesn't exist we will create it |
29 | // this sets the the Category after this call category will be the only category | ||
28 | void setCategory( const QString &category ); | 30 | void setCategory( const QString &category ); |
31 | // adds a category to the Categories of this event | ||
32 | void insertCategory(const QString &category ); | ||
33 | void clearCategories(); | ||
34 | void setCategories(const QStringList& ); | ||
35 | |||
29 | void setPriority(int priority ); | 36 | void setPriority(int priority ); |
30 | void setDate( QDate date ); | 37 | void setDate( QDate date ); |
31 | void setDescription(const QString& ); | 38 | void setDescription(const QString& ); |
@@ -48,7 +55,7 @@ class ToDoEvent { | |||
48 | bool m_isCompleted:1; | 55 | bool m_isCompleted:1; |
49 | bool m_hasDate:1; | 56 | bool m_hasDate:1; |
50 | int m_priority; | 57 | int m_priority; |
51 | QString m_category; | 58 | QStringList m_category; |
52 | QString m_desc; | 59 | QString m_desc; |
53 | int m_uid; | 60 | int m_uid; |
54 | }; | 61 | }; |