summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (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
@@ -28,8 +28,8 @@ class ToDoDB
28 void setFileName(const QString & ); 28 void setFileName(const QString & );
29 QString fileName()const; 29 QString fileName()const;
30 bool save(); 30 bool save();
31 ToDoResource *resource(); 31 ToDoResource *resource();
32 void setResource(ToDoResource* res); 32 void setResource(ToDoResource* res);
33 33
34 private: 34 private:
35 class ToDoDBPrivate; 35 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 @@
4#include <qpe/stringutil.h> 4#include <qpe/stringutil.h>
5//#include <qpe/palmtoprecord.h> 5//#include <qpe/palmtoprecord.h>
6 6
7ToDoEvent::ToDoEvent(const ToDoEvent &event )
8{
9 *this = event;
10}
11
7ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category, 12ToDoEvent::ToDoEvent(bool completed, int priority, const QString &category,
8 const QString &description, bool hasDate, QDate date, int uid ) 13 const QString &description, bool hasDate, QDate date, int uid )
9{ 14{
@@ -140,6 +145,7 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
140 m_priority = item.m_priority; 145 m_priority = item.m_priority;
141 m_category = item.m_category; 146 m_category = item.m_category;
142 m_desc = item.m_desc; 147 m_desc = item.m_desc;
148 m_uid = item.m_uid;
143 return *this; 149 return *this;
144} 150}
145 151
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 {
12 const QString &category = QString::null, 12 const QString &category = QString::null,
13 const QString &description = QString::null , 13 const QString &description = QString::null ,
14 bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 ); 14 bool hasDate = false, QDate date = QDate::currentDate(), int uid = -1 );
15 ToDoEvent(const ToDoEvent & );
15 bool isCompleted() const; 16 bool isCompleted() const;
16 bool hasDate() const; 17 bool hasDate() const;
17 int priority()const ; 18 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 @@
1/*
2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Holger Freyther <freyther@kde.org>
4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details.
19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with
22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29#ifndef opievcaltodoresource_h
30#define opievcaltodoresource_h
31
32#include <opie/todoresource.h>
33
34class ToDoVCalResource : public ToDoResource {
35 public:
36 ToDoVCalResource() { };
37 QValueList<ToDoEvent> load(const QString &file );
38 bool save( const QString &filename, const QValueList<ToDoEvent> & );
39
40};
41
42#endif