summaryrefslogtreecommitdiff
path: root/libopie/todoevent.cpp
Unidiff
Diffstat (limited to 'libopie/todoevent.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todoevent.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index 7dbf907..28b2e98 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -11,3 +11,3 @@ ToDoEvent::ToDoEvent(const ToDoEvent &event )
11 11
12ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category, 12ToDoEvent::ToDoEvent(bool completed, int priority, const QStringList &category,
13 const QString &description, bool hasDate, QDate date, int uid ) 13 const QString &description, bool hasDate, QDate date, int uid )
@@ -30,4 +30,4 @@ QArray<int> ToDoEvent::categories()const
30{ 30{
31 QArray<int> array(1); // currently the datebook can be only in one category 31 QArray<int> array(m_category.count() ); // currently the datebook can be only in one category
32 array = Qtopia::Record::idsFromString( category() ); 32 array = Qtopia::Record::idsFromString( m_category.join(";") );
33 return array; 33 return array;
@@ -57,3 +57,3 @@ int ToDoEvent::priority()const
57} 57}
58QString ToDoEvent::category()const 58QStringList ToDoEvent::allCategories()const
59{ 59{
@@ -61,2 +61,15 @@ QString ToDoEvent::category()const
61} 61}
62void ToDoEvent::insertCategory(const QString &str )
63{
64 m_category.append( str );
65}
66void ToDoEvent::clearCategories()
67{
68 m_category.clear();
69}
70void ToDoEvent::setCategories(const QStringList &list )
71{
72 m_category = list;
73 qWarning("todoevent: %s", list.join(";" ).latin1() );
74}
62QDate ToDoEvent::date()const 75QDate ToDoEvent::date()const
@@ -65,2 +78,3 @@ QDate ToDoEvent::date()const
65} 78}
79
66QString ToDoEvent::description()const 80QString ToDoEvent::description()const
@@ -84,3 +98,4 @@ void ToDoEvent::setCategory( const QString &cat )
84 qWarning("setCategory %s", cat.latin1() ); 98 qWarning("setCategory %s", cat.latin1() );
85 m_category = cat; 99 m_category.clear();
100 m_category << cat;
86} 101}
@@ -153,3 +168,3 @@ bool ToDoEvent::operator==(const ToDoEvent &toDoEvent )const
153{ 168{
154 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 ) 169 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_desc )
155 return true; 170 return true;