summaryrefslogtreecommitdiff
path: root/libopie
authorzecke <zecke>2002-03-21 00:26:39 (UTC)
committer zecke <zecke>2002-03-21 00:26:39 (UTC)
commit8bfe366ce8667addc539f11fc560250c306340ae (patch) (unidiff)
tree4b890a47d86621d3e1f0aacde2485457862f02c8 /libopie
parente8f15a98c611b0c6030e8210672b249b42107526 (diff)
downloadopie-8bfe366ce8667addc539f11fc560250c306340ae.zip
opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.gz
opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.bz2
Move todolist to tododb
Please test todolist
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todoevent.cpp22
-rw-r--r--libopie/todoevent.h3
2 files changed, 23 insertions, 2 deletions
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index daa25f4..7dbf907 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -4,3 +4,3 @@
4#include <qpe/stringutil.h> 4#include <qpe/stringutil.h>
5//#include <qpe/palmtoprecord.h> 5#include <qpe/palmtoprecord.h>
6 6
@@ -28,2 +28,19 @@ ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category,
28} 28}
29QArray<int> ToDoEvent::categories()const
30{
31 QArray<int> array(1); // currently the datebook can be only in one category
32 array = Qtopia::Record::idsFromString( category() );
33 return array;
34}
35bool ToDoEvent::match( const QRegExp &regExp )const
36{
37 if( QString::number( m_priority ).find( regExp ) != -1 ){
38 return true;
39 }else if( m_hasDate && m_date.toString().find( regExp) != -1 ){
40 return true;
41 }else if(m_desc.find( regExp ) != -1 ){
42 return true;
43 }
44 return false;
45}
29bool ToDoEvent::isCompleted() const 46bool ToDoEvent::isCompleted() const
@@ -66,3 +83,4 @@ void ToDoEvent::setCategory( const QString &cat )
66{ 83{
67 m_category = cat; 84 qWarning("setCategory %s", cat.latin1() );
85 m_category = cat;
68} 86}
diff --git a/libopie/todoevent.h b/libopie/todoevent.h
index bca7f6e..ac996a1 100644
--- a/libopie/todoevent.h
+++ b/libopie/todoevent.h
@@ -19,2 +19,3 @@ class ToDoEvent {
19 QString category()const; 19 QString category()const;
20 QArray<int> categories() const;
20 QDate date()const; 21 QDate date()const;
@@ -32,2 +33,4 @@ class ToDoEvent {
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; };