-rw-r--r-- | libopie2/opiepim/otodo.h | 147 |
1 files changed, 76 insertions, 71 deletions
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 61add04..04dd269 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h @@ -1,8 +1,8 @@ /* - This file is part of the Opie Project - Copyright (C) The Main Author <main-author@whereever.org> - =. Copyright (C) The Opie Team <opie-devel@handhelds.org> - .=l. - .>+-= - _;:, .> :=|. This program is free software; you can + This file is part of the Opie Project + Copyright (C) The Main Author <main-author@whereever.org> + =. Copyright (C) The Opie Team <opie-devel@handhelds.org> + .=l. + .>+-= +_;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under @@ -10,24 +10,30 @@ .="- .-=="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 program 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 +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program 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. +: = ...= . :.=- +-. .:....=;==+<; 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 OPIE_TODO_EVENT_H -#define OPIE_TODO_EVENT_H +#ifndef OTODOEVENT_H +#define OTODOEVENT_H +/* OPIE */ +#include <opie2/opimrecord.h> +#include <qpe/recordfields.h> +#include <qpe/palmtopuidgen.h> + +/* QT */ #include <qarray.h> @@ -39,9 +45,4 @@ -#include <qpe/recordfields.h> -#include <qpe/palmtopuidgen.h> - -#include <opie2/opimrecord.h> - - -namespace Opie { +namespace Opie +{ @@ -51,4 +52,5 @@ class OPimMaintainer; class OPimNotifyManager; -class OTodo : public OPimRecord { -public: +class OTodo : public OPimRecord +{ + public: typedef QValueList<OTodo> ValueList; @@ -76,5 +78,5 @@ public: }; - public: + public: // priorities from Very low to very high - enum TaskPriority { VeryHigh=1, High, Normal, Low, VeryLow }; + enum TaskPriority { VeryHigh = 1, High, Normal, Low, VeryLow }; @@ -103,3 +105,3 @@ public: ushort progress = 0, - bool hasDate = false, QDate date = QDate::currentDate(), + bool hasDate = false, QDate date = QDate::currentDate(), int uid = 0 /* empty */ ); @@ -109,3 +111,3 @@ public: */ - OTodo(const OTodo & ); + OTodo( const OTodo & ); @@ -125,4 +127,4 @@ public: bool hasDueDate() const; - bool hasStartDate()const; - bool hasCompletedDate()const; + bool hasStartDate() const; + bool hasCompletedDate() const; @@ -131,3 +133,3 @@ public: */ - int priority()const ; + int priority() const ; @@ -141,3 +143,3 @@ public: */ - QDate dueDate()const; + QDate dueDate() const; @@ -146,3 +148,3 @@ public: */ - QDate startDate()const; + QDate startDate() const; @@ -151,3 +153,3 @@ public: */ - QDate completedDate()const; + QDate completedDate() const; @@ -156,3 +158,3 @@ public: */ - bool hasState()const; + bool hasState() const; @@ -161,3 +163,3 @@ public: */ - OPimState state()const; + OPimState state() const; @@ -166,3 +168,3 @@ public: */ - bool hasRecurrence()const; + bool hasRecurrence() const; @@ -171,3 +173,3 @@ public: */ - ORecur recurrence()const; + ORecur recurrence() const; @@ -176,3 +178,3 @@ public: */ - bool hasMaintainer()const; + bool hasMaintainer() const; @@ -181,3 +183,3 @@ public: */ - OPimMaintainer maintainer()const; + OPimMaintainer maintainer() const; @@ -186,3 +188,3 @@ public: */ - QString description()const; + QString description() const; @@ -199,3 +201,3 @@ public: - bool hasNotifiers()const; + bool hasNotifiers() const; /* @@ -212,3 +214,3 @@ public: */ - const OPimNotifyManager ¬ifiers()const; + const OPimNotifyManager ¬ifiers() const; @@ -217,5 +219,5 @@ public: */ - QString type()const; - QString toShortText()const; - QString recordField(int id )const; + QString type() const; + QString toShortText() const; + QString recordField( int id ) const; @@ -225,3 +227,3 @@ public: */ - QMap<int, QString> toMap()const; + QMap<int, QString> toMap() const; @@ -230,3 +232,3 @@ public: */ - void setCompleted(bool completed ); + void setCompleted( bool completed ); @@ -244,3 +246,3 @@ public: */ - void setPriority(int priority ); + void setPriority( int priority ); @@ -268,4 +270,4 @@ public: - void setDescription(const QString& ); - void setSummary(const QString& ); + void setDescription( const QString& ); + void setSummary( const QString& ); @@ -275,3 +277,3 @@ public: */ - void setState( const OPimState& state); + void setState( const OPimState& state ); @@ -285,11 +287,11 @@ public: - virtual bool match( const QRegExp &r )const; + virtual bool match( const QRegExp &r ) const; - bool operator<(const OTodo &toDoEvent )const; - bool operator<=(const OTodo &toDoEvent )const; - bool operator!=(const OTodo &toDoEvent )const; - bool operator>(const OTodo &toDoEvent )const; - bool operator>=(const OTodo &toDoEvent)const; - bool operator==(const OTodo &toDoEvent )const; - OTodo &operator=(const OTodo &toDoEvent ); + bool operator<( const OTodo &toDoEvent ) const; + bool operator<=( const OTodo &toDoEvent ) const; + bool operator!=( const OTodo &toDoEvent ) const; + bool operator>( const OTodo &toDoEvent ) const; + bool operator>=( const OTodo &toDoEvent ) const; + bool operator==( const OTodo &toDoEvent ) const; + OTodo &operator=( const OTodo &toDoEvent ); @@ -297,3 +299,3 @@ public: - private: + private: class OTodoPrivate; @@ -308,4 +310,7 @@ public: }; -inline bool OTodo::operator!=(const OTodo &toDoEvent )const { - return !(*this == toDoEvent); + + +inline bool OTodo::operator!=( const OTodo &toDoEvent ) const +{ + return !( *this == toDoEvent ); } |