From c6e7f6e2ab8556064ec79fc9bbaa9e0398a7b344 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 20 Mar 2002 21:55:54 +0000 Subject: tododb vCal support --- (limited to 'libopie') 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 //#include +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 +           .>+-= + _;:,     .>    :=|. 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_,=:_.      -`: 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 + +class ToDoVCalResource : public ToDoResource { + public: + ToDoVCalResource() { }; + QValueList load(const QString &file ); + bool save( const QString &filename, const QValueList & ); + +}; + +#endif -- cgit v0.9.0.2