summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -29,6 +29,6 @@ class ToDoDB
QString fileName()const;
bool save();
- ToDoResource *resource();
- void setResource(ToDoResource* res);
+ ToDoResource *resource();
+ void setResource(ToDoResource* res);
private:
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index 5fa4472..daa25f4 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -5,4 +5,9 @@
//#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 )
@@ -141,4 +146,5 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
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
@@ -13,4 +13,5 @@ class ToDoEvent {
const QString &description = QString::null ,
bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 );
+ ToDoEvent(const ToDoEvent & );
bool isCompleted() const;
bool hasDate() 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