author | zecke <zecke> | 2002-03-21 00:26:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-21 00:26:39 (UTC) |
commit | 8bfe366ce8667addc539f11fc560250c306340ae (patch) (side-by-side diff) | |
tree | 4b890a47d86621d3e1f0aacde2485457862f02c8 /libopie | |
parent | e8f15a98c611b0c6030e8210672b249b42107526 (diff) | |
download | opie-8bfe366ce8667addc539f11fc560250c306340ae.zip opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.gz opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.bz2 |
Move todolist to tododb
Please test todolist
-rw-r--r-- | libopie/todoevent.cpp | 22 | ||||
-rw-r--r-- | libopie/todoevent.h | 3 |
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 @@ #include <qpe/stringutil.h> -//#include <qpe/palmtoprecord.h> +#include <qpe/palmtoprecord.h> @@ -28,2 +28,19 @@ ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category, } +QArray<int> ToDoEvent::categories()const +{ + QArray<int> array(1); // currently the datebook can be only in one category + array = Qtopia::Record::idsFromString( category() ); + return array; +} +bool ToDoEvent::match( const QRegExp ®Exp )const +{ + if( QString::number( m_priority ).find( regExp ) != -1 ){ + return true; + }else if( m_hasDate && m_date.toString().find( regExp) != -1 ){ + return true; + }else if(m_desc.find( regExp ) != -1 ){ + return true; + } + return false; +} bool ToDoEvent::isCompleted() const @@ -66,3 +83,4 @@ void ToDoEvent::setCategory( const QString &cat ) { - m_category = cat; + qWarning("setCategory %s", cat.latin1() ); + m_category = cat; } 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 { QString category()const; + QArray<int> categories() const; QDate date()const; @@ -32,2 +33,4 @@ class ToDoEvent { + bool match( const QRegExp &r )const; + void setUid(int id) {m_uid = id; }; |