author | zecke <zecke> | 2002-03-20 21:55:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-20 21:55:54 (UTC) |
commit | c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344 (patch) (side-by-side diff) | |
tree | f68d6a7c899e1ffe297af30002a3dc8b4f3762c6 | |
parent | 0d759d6e9c84a8597b6594bb7c5ad5d17621b966 (diff) | |
download | opie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.zip opie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.tar.gz opie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.tar.bz2 |
tododb vCal support
-rw-r--r-- | libopie/tododb.h | 4 | ||||
-rw-r--r-- | libopie/todoevent.cpp | 6 | ||||
-rw-r--r-- | libopie/todoevent.h | 1 | ||||
-rw-r--r-- | libopie/todovcalresource.h | 42 |
4 files changed, 51 insertions, 2 deletions
diff --git a/libopie/tododb.h b/libopie/tododb.h index 945f343..e77a0f4 100644 --- a/libopie/tododb.h +++ b/libopie/tododb.h @@ -28,8 +28,8 @@ class ToDoDB void setFileName(const QString & ); QString fileName()const; bool save(); - ToDoResource *resource(); - void setResource(ToDoResource* res); + ToDoResource *resource(); + void setResource(ToDoResource* res); private: class ToDoDBPrivate; diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp index 5fa4472..daa25f4 100644 --- a/libopie/todoevent.cpp +++ b/libopie/todoevent.cpp @@ -4,6 +4,11 @@ #include <qpe/stringutil.h> //#include <qpe/palmtoprecord.h> +ToDoEvent::ToDoEvent(const ToDoEvent &event ) +{ + *this = event; +} + ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category, const QString &description, bool hasDate, QDate date, int uid ) { @@ -140,6 +145,7 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item ) m_priority = item.m_priority; m_category = item.m_category; m_desc = item.m_desc; + m_uid = item.m_uid; return *this; } diff --git a/libopie/todoevent.h b/libopie/todoevent.h index 79522b2..bca7f6e 100644 --- a/libopie/todoevent.h +++ b/libopie/todoevent.h @@ -12,6 +12,7 @@ class ToDoEvent { const QString &category = QString::null, const QString &description = QString::null , bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); + ToDoEvent(const ToDoEvent & ); bool isCompleted() const; bool hasDate() const; int priority()const ; diff --git a/libopie/todovcalresource.h b/libopie/todovcalresource.h new file mode 100644 index 0000000..0663bc2 --- a/dev/null +++ b/libopie/todovcalresource.h @@ -0,0 +1,42 @@ +/* + =. This file is part of the OPIE Project + .=l. Copyright (c) 2002 Holger Freyther <freyther@kde.org> + .>+-= + _;:, .> :=|. This library is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This library is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +#ifndef opievcaltodoresource_h +#define opievcaltodoresource_h + +#include <opie/todoresource.h> + +class ToDoVCalResource : public ToDoResource { + public: + ToDoVCalResource() { }; + QValueList<ToDoEvent> load(const QString &file ); + bool save( const QString &filename, const QValueList<ToDoEvent> & ); + +}; + +#endif |