summaryrefslogtreecommitdiff
path: root/libopie/todoevent.cpp
Unidiff
Diffstat (limited to 'libopie/todoevent.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todoevent.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index 5fa4472..daa25f4 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -1,22 +1,27 @@
1 1
2#include <opie/todoevent.h> 2#include <opie/todoevent.h>
3#include <qpe/palmtopuidgen.h> 3#include <qpe/palmtopuidgen.h>
4#include <qpe/stringutil.h> 4#include <qpe/stringutil.h>
5//#include <qpe/palmtoprecord.h> 5//#include <qpe/palmtoprecord.h>
6 6
7ToDoEvent::ToDoEvent(const ToDoEvent &event )
8{
9 *this = event;
10}
11
7ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category, 12ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category,
8 const QString &description, bool hasDate, QDate date, int uid ) 13 const QString &description, bool hasDate, QDate date, int uid )
9{ 14{
10 qWarning("todoEvent c'tor" ); 15 qWarning("todoEvent c'tor" );
11 m_date = date; 16 m_date = date;
12 m_isCompleted = completed; 17 m_isCompleted = completed;
13 m_hasDate = hasDate; 18 m_hasDate = hasDate;
14 m_priority = priority; 19 m_priority = priority;
15 m_category = category; 20 m_category = category;
16 m_desc = Qtopia::simplifyMultiLineSpace(description ); 21 m_desc = Qtopia::simplifyMultiLineSpace(description );
17 if (uid == -1 ) { 22 if (uid == -1 ) {
18 Qtopia::UidGen *uidgen = new Qtopia::UidGen(); 23 Qtopia::UidGen *uidgen = new Qtopia::UidGen();
19 uid = uidgen->generate(); 24 uid = uidgen->generate();
20 delete uidgen; 25 delete uidgen;
21 }// generate the ids 26 }// generate the ids
22 m_uid = uid; 27 m_uid = uid;
@@ -127,26 +132,27 @@ bool ToDoEvent::operator>=(const ToDoEvent &toDoEvent )const
127 return true; 132 return true;
128} 133}
129bool ToDoEvent::operator==(const ToDoEvent &toDoEvent )const 134bool ToDoEvent::operator==(const ToDoEvent &toDoEvent )const
130{ 135{
131 if( m_date == toDoEvent.m_date && m_isCompleted == toDoEvent.m_isCompleted && m_hasDate == toDoEvent.m_hasDate && m_priority == toDoEvent.m_priority && m_category == toDoEvent.m_category && m_desc == toDoEvent.m_category ) 136 if( m_date == toDoEvent.m_date && m_isCompleted == toDoEvent.m_isCompleted && m_hasDate == toDoEvent.m_hasDate && m_priority == toDoEvent.m_priority && m_category == toDoEvent.m_category && m_desc == toDoEvent.m_category )
132 return true; 137 return true;
133 return false; 138 return false;
134} 139}
135ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item ) 140ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
136{ 141{
137 m_date = item.m_date; 142 m_date = item.m_date;
138 m_isCompleted = item.m_isCompleted; 143 m_isCompleted = item.m_isCompleted;
139 m_hasDate = item.m_hasDate; 144 m_hasDate = item.m_hasDate;
140 m_priority = item.m_priority; 145 m_priority = item.m_priority;
141 m_category = item.m_category; 146 m_category = item.m_category;
142 m_desc = item.m_desc; 147 m_desc = item.m_desc;
148 m_uid = item.m_uid;
143 return *this; 149 return *this;
144} 150}
145 151
146 152
147 153
148 154
149 155
150 156
151 157
152 158