author | zecke <zecke> | 2002-06-16 16:34:10 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-16 16:34:10 (UTC) |
commit | 3b8192d0f5a41c40092af48df8abc39aa3d1c355 (patch) (unidiff) | |
tree | c1f5e0211a16bb4ceb2d78ec7a76e1bffdae088b /libopie/todoevent.h | |
parent | 23c2d100ed9070d82f956cdcb7364f5627aa0600 (diff) | |
download | opie-3b8192d0f5a41c40092af48df8abc39aa3d1c355.zip opie-3b8192d0f5a41c40092af48df8abc39aa3d1c355.tar.gz opie-3b8192d0f5a41c40092af48df8abc39aa3d1c355.tar.bz2 |
implement progress
-rw-r--r-- | libopie/todoevent.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libopie/todoevent.h b/libopie/todoevent.h index 7454241..de4623f 100644 --- a/libopie/todoevent.h +++ b/libopie/todoevent.h | |||
@@ -13,53 +13,58 @@ class ToDoEvent { | |||
13 | // priorities from Very low to very high | 13 | // priorities from Very low to very high |
14 | enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW }; | 14 | enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW }; |
15 | /* Constructs a new ToDoEvent | 15 | /* Constructs a new ToDoEvent |
16 | @param completed Is the TodoEvent completed | 16 | @param completed Is the TodoEvent completed |
17 | @param priority What is the priority of this ToDoEvent | 17 | @param priority What is the priority of this ToDoEvent |
18 | @param category Which category does it belong( uid ) | 18 | @param category Which category does it belong( uid ) |
19 | @param summary A small summary of the todo | 19 | @param summary A small summary of the todo |
20 | @param description What is this ToDoEvent about | 20 | @param description What is this ToDoEvent about |
21 | @param hasDate Does this Event got a deadline | 21 | @param hasDate Does this Event got a deadline |
22 | @param date what is the deadline? | 22 | @param date what is the deadline? |
23 | @param uid what is the UUID of this Event | 23 | @param uid what is the UUID of this Event |
24 | **/ | 24 | **/ |
25 | ToDoEvent( bool completed = false, int priority = NORMAL, | 25 | ToDoEvent( bool completed = false, int priority = NORMAL, |
26 | const QStringList &category = QStringList(), | 26 | const QStringList &category = QStringList(), |
27 | const QString &summary = QString::null , | 27 | const QString &summary = QString::null , |
28 | const QString &description = QString::null, | 28 | const QString &description = QString::null, |
29 | ushort progress = 0, | ||
29 | bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); | 30 | bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); |
30 | /* Copy c'tor | 31 | /* Copy c'tor |
31 | 32 | ||
32 | **/ | 33 | **/ |
33 | ToDoEvent(const ToDoEvent & ); | 34 | ToDoEvent(const ToDoEvent & ); |
34 | 35 | ||
35 | /* | 36 | /* |
36 | Is this event completed? | 37 | Is this event completed? |
37 | **/ | 38 | **/ |
38 | bool isCompleted() const; | 39 | bool isCompleted() const; |
39 | 40 | ||
40 | /* | 41 | /* |
41 | Does this Event have a deadline | 42 | Does this Event have a deadline |
42 | **/ | 43 | **/ |
43 | bool hasDate() const; | 44 | bool hasDate() const; |
44 | 45 | ||
45 | /* | 46 | /* |
46 | What is the priority? | 47 | What is the priority? |
47 | **/ | 48 | **/ |
48 | int priority()const ; | 49 | int priority()const ; |
49 | 50 | ||
51 | /** | ||
52 | * progress as ushort 0, 20, 40, 60, 80 or 100% | ||
53 | */ | ||
54 | ushort progress() const; | ||
50 | /* | 55 | /* |
51 | All category numbers as QString in a List | 56 | All category numbers as QString in a List |
52 | **/ | 57 | **/ |
53 | QStringList allCategories()const; | 58 | QStringList allCategories()const; |
54 | 59 | ||
55 | /* | 60 | /* |
56 | * Same as above but with QArray<int> | 61 | * Same as above but with QArray<int> |
57 | */ | 62 | */ |
58 | QArray<int> categories() const; | 63 | QArray<int> categories() const; |
59 | 64 | ||
60 | /** | 65 | /** |
61 | * The end Date | 66 | * The end Date |
62 | */ | 67 | */ |
63 | QDate date()const; | 68 | QDate date()const; |
64 | 69 | ||
65 | /** | 70 | /** |
@@ -102,50 +107,56 @@ class ToDoEvent { | |||
102 | /** | 107 | /** |
103 | * Removes this event from all categories | 108 | * Removes this event from all categories |
104 | */ | 109 | */ |
105 | void clearCategories(); | 110 | void clearCategories(); |
106 | 111 | ||
107 | /** | 112 | /** |
108 | * This todo belongs to xxx categories | 113 | * This todo belongs to xxx categories |
109 | */ | 114 | */ |
110 | void setCategories(const QStringList& ); | 115 | void setCategories(const QStringList& ); |
111 | 116 | ||
112 | /** | 117 | /** |
113 | * Set the priority of the Todo | 118 | * Set the priority of the Todo |
114 | */ | 119 | */ |
115 | void setPriority(int priority ); | 120 | void setPriority(int priority ); |
116 | 121 | ||
117 | /** | 122 | /** |
123 | * Set the progress. | ||
124 | */ | ||
125 | void setProgress( ushort progress ); | ||
126 | |||
127 | /** | ||
118 | * set the end date | 128 | * set the end date |
119 | */ | 129 | */ |
120 | void setDate( QDate date ); | 130 | void setDate( QDate date ); |
121 | void setDescription(const QString& ); | 131 | void setDescription(const QString& ); |
122 | void setSummary(const QString& ); | 132 | void setSummary(const QString& ); |
123 | void setExtra( const QString&, const QString& ); | 133 | void setExtra( const QString&, const QString& ); |
124 | bool isOverdue(); | 134 | bool isOverdue(); |
125 | 135 | ||
126 | bool match( const QRegExp &r )const; | 136 | bool match( const QRegExp &r )const; |
127 | 137 | ||
128 | void setUid(int id) {m_uid = id; }; | 138 | void setUid(int id) {m_uid = id; }; |
129 | bool operator<(const ToDoEvent &toDoEvent )const; | 139 | bool operator<(const ToDoEvent &toDoEvent )const; |
130 | bool operator<=(const ToDoEvent &toDoEvent )const; | 140 | bool operator<=(const ToDoEvent &toDoEvent )const; |
131 | bool operator!=(const ToDoEvent &toDoEvent )const { return !(*this == toDoEvent); }; | 141 | bool operator!=(const ToDoEvent &toDoEvent )const { return !(*this == toDoEvent); }; |
132 | bool operator>(const ToDoEvent &toDoEvent )const; | 142 | bool operator>(const ToDoEvent &toDoEvent )const; |
133 | bool operator>=(const ToDoEvent &toDoEvent)const; | 143 | bool operator>=(const ToDoEvent &toDoEvent)const; |
134 | bool operator==(const ToDoEvent &toDoEvent )const; | 144 | bool operator==(const ToDoEvent &toDoEvent )const; |
135 | ToDoEvent &operator=(const ToDoEvent &toDoEvent ); | 145 | ToDoEvent &operator=(const ToDoEvent &toDoEvent ); |
136 | private: | 146 | private: |
137 | class ToDoEventPrivate; | 147 | class ToDoEventPrivate; |
138 | ToDoEventPrivate *d; | 148 | ToDoEventPrivate *d; |
139 | QDate m_date; | 149 | QDate m_date; |
140 | bool m_isCompleted:1; | 150 | bool m_isCompleted:1; |
141 | bool m_hasDate:1; | 151 | bool m_hasDate:1; |
142 | int m_priority; | 152 | int m_priority; |
143 | QStringList m_category; | 153 | QStringList m_category; |
144 | QString m_desc; | 154 | QString m_desc; |
145 | QString m_sum; | 155 | QString m_sum; |
146 | QMap<QString, QString> m_extra; | 156 | QMap<QString, QString> m_extra; |
147 | int m_uid; | 157 | int m_uid; |
158 | ushort m_prog; | ||
148 | }; | 159 | }; |
149 | 160 | ||
150 | 161 | ||
151 | #endif | 162 | #endif |