summaryrefslogtreecommitdiff
path: root/library/backend/task.h
Unidiff
Diffstat (limited to 'library/backend/task.h') (more/less context) (show whitespace changes)
-rw-r--r--library/backend/task.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/library/backend/task.h b/library/backend/task.h
index 6f383b8..091f2e9 100644
--- a/library/backend/task.h
+++ b/library/backend/task.h
@@ -1,7 +1,7 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
@@ -20,8 +20,8 @@
20#ifndef __TASK_H__ 20#ifndef __TASK_H__
21#define __TASK_H__ 21#define __TASK_H__
22 22
23#include <qpe/palmtoprecord.h> 23#include <qtopia/private/palmtoprecord.h>
24#include <qpe/stringutil.h> 24#include <qtopia/stringutil.h>
25 25
26#include <qvaluelist.h> 26#include <qvaluelist.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
@@ -40,6 +40,8 @@ public:
40 static void writeVCalendar( const QString &filename, const Task &task); 40 static void writeVCalendar( const QString &filename, const Task &task);
41 static QValueList<Task> readVCalendar( const QString &filename ); 41 static QValueList<Task> readVCalendar( const QString &filename );
42 42
43 enum PriorityValue { VeryHigh=1, High, Normal, Low, VeryLow };
44
43 void setPriority( int priority ) { mPriority = priority; } 45 void setPriority( int priority ) { mPriority = priority; }
44 int priority() const { return mPriority; } 46 int priority() const { return mPriority; }
45 47
@@ -51,10 +53,16 @@ public:
51 { mDesc = Qtopia::simplifyMultiLineSpace(description); } 53 { mDesc = Qtopia::simplifyMultiLineSpace(description); }
52 const QString &description() const { return mDesc; } 54 const QString &description() const { return mDesc; }
53 55
56 // Use THESE functions
57 void setDueDate( const QDate &date);
58 void clearDueDate();
59
60 // Instead of these functions.
54 void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; } 61 void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; }
62 void setHasDueDate( bool b ) { mDue = b; }
63
55 const QDate &dueDate() const { return mDueDate; } 64 const QDate &dueDate() const { return mDueDate; }
56 bool hasDueDate() const { return mDue; } 65 bool hasDueDate() const { return mDue; }
57 void setHasDueDate( bool b ) { mDue = b; }
58 66
59 void setCompleted( bool b ) { mCompleted = b; } 67 void setCompleted( bool b ) { mCompleted = b; }
60 bool isCompleted() const { return mCompleted; } 68 bool isCompleted() const { return mCompleted; }
@@ -78,4 +86,7 @@ private:
78 // 86 //
79}; 87};
80 88
89// MUST be inline. (forwards compatability).
90inline void Task::setDueDate( const QDate &date) { setDueDate(date, date.isValid()); }
91inline void Task::clearDueDate() { setHasDueDate( FALSE ); }
81#endif 92#endif