summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/otodo.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/otodo.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/otodo.h147
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,34 +1,40 @@
/*
- 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
:`=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 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>
#include <qmap.h>
@@ -38,11 +44,6 @@
#include <qvaluelist.h>
-#include <qpe/recordfields.h>
-#include <qpe/palmtopuidgen.h>
-
-#include <opie2/opimrecord.h>
-
-
-namespace Opie {
+namespace Opie
+{
class OPimState;
@@ -50,6 +51,7 @@ class ORecur;
class OPimMaintainer;
class OPimNotifyManager;
-class OTodo : public OPimRecord {
-public:
+class OTodo : public OPimRecord
+{
+ public:
typedef QValueList<OTodo> ValueList;
enum RecordFields {
@@ -75,7 +77,7 @@ public:
CompletedDate
};
- 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 };
/* Constructs a new ToDoEvent
@@ -102,5 +104,5 @@ public:
const QString& description = QString::null,
ushort progress = 0,
- bool hasDate = false, QDate date = QDate::currentDate(),
+ bool hasDate = false, QDate date = QDate::currentDate(),
int uid = 0 /* empty */ );
@@ -108,5 +110,5 @@ public:
*
*/
- OTodo(const OTodo & );
+ OTodo( const OTodo & );
/**
@@ -124,11 +126,11 @@ public:
*/
bool hasDueDate() const;
- bool hasStartDate()const;
- bool hasCompletedDate()const;
+ bool hasStartDate() const;
+ bool hasCompletedDate() const;
/**
* What is the priority?
*/
- int priority()const ;
+ int priority() const ;
/**
@@ -140,50 +142,50 @@ public:
* The due Date
*/
- QDate dueDate()const;
+ QDate dueDate() const;
/**
* When did it start?
*/
- QDate startDate()const;
+ QDate startDate() const;
/**
* When was it completed?
*/
- QDate completedDate()const;
+ QDate completedDate() const;
/**
* does it have a state?
*/
- bool hasState()const;
+ bool hasState() const;
/**
* What is the state of this OTodo?
*/
- OPimState state()const;
+ OPimState state() const;
/**
* has recurrence?
*/
- bool hasRecurrence()const;
+ bool hasRecurrence() const;
/**
* the recurrance of this
*/
- ORecur recurrence()const;
+ ORecur recurrence() const;
/**
* does this OTodo have a maintainer?
*/
- bool hasMaintainer()const;
+ bool hasMaintainer() const;
/**
* the Maintainer of this OTodo
*/
- OPimMaintainer maintainer()const;
+ OPimMaintainer maintainer() const;
/**
* The description of the todo
*/
- QString description()const;
+ QString description() const;
/**
@@ -198,5 +200,5 @@ public:
QString toRichText() const;
- bool hasNotifiers()const;
+ bool hasNotifiers() const;
/*
* FIXME check if the sharing is still fine!! -zecke
@@ -211,12 +213,12 @@ public:
*
*/
- const OPimNotifyManager &notifiers()const;
+ const OPimNotifyManager &notifiers() const;
/**
* reimplementations
*/
- QString type()const;
- QString toShortText()const;
- QString recordField(int id )const;
+ QString type() const;
+ QString toShortText() const;
+ QString recordField( int id ) const;
/**
@@ -224,10 +226,10 @@ public:
* to ToDoEvent RecordFields enum
*/
- QMap<int, QString> toMap()const;
+ QMap<int, QString> toMap() const;
/**
* Set if this Todo is completed
*/
- void setCompleted(bool completed );
+ void setCompleted( bool completed );
/**
@@ -243,5 +245,5 @@ public:
* Set the priority of the Todo
*/
- void setPriority(int priority );
+ void setPriority( int priority );
/**
@@ -267,6 +269,6 @@ public:
void setRecurrence( const ORecur& );
- void setDescription(const QString& );
- void setSummary(const QString& );
+ void setDescription( const QString& );
+ void setSummary( const QString& );
/**
@@ -274,5 +276,5 @@ public:
* @param state State what the todo should take
*/
- void setState( const OPimState& state);
+ void setState( const OPimState& state );
/**
@@ -284,17 +286,17 @@ 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 );
static int rtti();
- private:
+ private:
class OTodoPrivate;
struct OTodoData;
@@ -307,6 +309,9 @@ public:
};
-inline bool OTodo::operator!=(const OTodo &toDoEvent )const {
- return !(*this == toDoEvent);
+
+
+inline bool OTodo::operator!=( const OTodo &toDoEvent ) const
+{
+ return !( *this == toDoEvent );
}