summaryrefslogtreecommitdiff
authorzecke <zecke>2002-03-20 21:55:54 (UTC)
committer zecke <zecke>2002-03-20 21:55:54 (UTC)
commitc6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344 (patch) (side-by-side diff)
treef68d6a7c899e1ffe297af30002a3dc8b4f3762c6
parent0d759d6e9c84a8597b6594bb7c5ad5d17621b966 (diff)
downloadopie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.zip
opie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.tar.gz
opie-c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344.tar.bz2
tododb vCal support
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/tododb.h4
-rw-r--r--libopie/todoevent.cpp6
-rw-r--r--libopie/todoevent.h1
-rw-r--r--libopie/todovcalresource.h42
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
@@ -30,4 +30,4 @@ class ToDoDB
bool save();
- ToDoResource *resource();
- void setResource(ToDoResource* res);
+ ToDoResource *resource();
+ void setResource(ToDoResource* res);
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index 5fa4472..daa25f4 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -6,2 +6,7 @@
+ToDoEvent::ToDoEvent(const ToDoEvent &event )
+{
+ *this = event;
+}
+
ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category,
@@ -142,2 +147,3 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
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
@@ -14,2 +14,3 @@ class ToDoEvent {
bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 );
+ ToDoEvent(const ToDoEvent & );
bool isCompleted() 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