summaryrefslogtreecommitdiff
path: root/libopie/todoevent.h
authorzecke <zecke>2002-03-21 00:26:39 (UTC)
committer zecke <zecke>2002-03-21 00:26:39 (UTC)
commit8bfe366ce8667addc539f11fc560250c306340ae (patch) (unidiff)
tree4b890a47d86621d3e1f0aacde2485457862f02c8 /libopie/todoevent.h
parente8f15a98c611b0c6030e8210672b249b42107526 (diff)
downloadopie-8bfe366ce8667addc539f11fc560250c306340ae.zip
opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.gz
opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.bz2
Move todolist to tododb
Please test todolist
Diffstat (limited to 'libopie/todoevent.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todoevent.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libopie/todoevent.h b/libopie/todoevent.h
index bca7f6e..ac996a1 100644
--- a/libopie/todoevent.h
+++ b/libopie/todoevent.h
@@ -1,54 +1,57 @@
1 1
2#ifndef todoevent_h 2#ifndef todoevent_h
3#define todoevent_h 3#define todoevent_h
4 4
5#include <qdatetime.h> 5#include <qdatetime.h>
6 6
7class ToDoEvent { 7class ToDoEvent {
8 friend class ToDoDB; 8 friend class ToDoDB;
9 public: 9 public:
10 enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW }; 10 enum Priority { VERYHIGH=1, HIGH, NORMAL, LOW, VERYLOW };
11 ToDoEvent( bool completed = false, int priority = NORMAL, 11 ToDoEvent( bool completed = false, int priority = NORMAL,
12 const QString &category = QString::null, 12 const QString &category = QString::null,
13 const QString &description = QString::null , 13 const QString &description = QString::null ,
14 bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); 14 bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 );
15 ToDoEvent(const ToDoEvent & ); 15 ToDoEvent(const ToDoEvent & );
16 bool isCompleted() const; 16 bool isCompleted() const;
17 bool hasDate() const; 17 bool hasDate() const;
18 int priority()const ; 18 int priority()const ;
19 QString category()const; 19 QString category()const;
20 QArray<int> categories() const;
20 QDate date()const; 21 QDate date()const;
21 QString description()const; 22 QString description()const;
22 23
23 int uid()const { return m_uid;}; 24 int uid()const { return m_uid;};
24 void setCompleted(bool completed ); 25 void setCompleted(bool completed );
25 void setHasDate( bool hasDate ); 26 void setHasDate( bool hasDate );
26 // if the category doesn't exist we will create it 27 // if the category doesn't exist we will create it
27 void setCategory( const QString &category ); 28 void setCategory( const QString &category );
28 void setPriority(int priority ); 29 void setPriority(int priority );
29 void setDate( QDate date ); 30 void setDate( QDate date );
30 void setDescription(const QString& ); 31 void setDescription(const QString& );
31 bool isOverdue(); 32 bool isOverdue();
32 33
34 bool match( const QRegExp &r )const;
35
33 void setUid(int id) {m_uid = id; }; 36 void setUid(int id) {m_uid = id; };
34 bool operator<(const ToDoEvent &toDoEvent )const; 37 bool operator<(const ToDoEvent &toDoEvent )const;
35 bool operator<=(const ToDoEvent &toDoEvent )const; 38 bool operator<=(const ToDoEvent &toDoEvent )const;
36 bool operator!=(const ToDoEvent &toDoEvent )const { return !(*this == toDoEvent); }; 39 bool operator!=(const ToDoEvent &toDoEvent )const { return !(*this == toDoEvent); };
37 bool operator>(const ToDoEvent &toDoEvent )const; 40 bool operator>(const ToDoEvent &toDoEvent )const;
38 bool operator>=(const ToDoEvent &toDoEvent)const; 41 bool operator>=(const ToDoEvent &toDoEvent)const;
39 bool operator==(const ToDoEvent &toDoEvent )const; 42 bool operator==(const ToDoEvent &toDoEvent )const;
40 ToDoEvent &operator=(const ToDoEvent &toDoEvent ); 43 ToDoEvent &operator=(const ToDoEvent &toDoEvent );
41 private: 44 private:
42 class ToDoEventPrivate; 45 class ToDoEventPrivate;
43 ToDoEventPrivate *d; 46 ToDoEventPrivate *d;
44 QDate m_date; 47 QDate m_date;
45 bool m_isCompleted:1; 48 bool m_isCompleted:1;
46 bool m_hasDate:1; 49 bool m_hasDate:1;
47 int m_priority; 50 int m_priority;
48 QString m_category; 51 QString m_category;
49 QString m_desc; 52 QString m_desc;
50 int m_uid; 53 int m_uid;
51}; 54};
52 55
53 56
54#endif 57#endif