-rw-r--r-- | library/backend/task.h | 21 |
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,8 +1,8 @@ | |||
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 |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
@@ -19,10 +19,10 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
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> |
28 | 28 | ||
@@ -39,8 +39,10 @@ public: | |||
39 | static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks); | 39 | static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks); |
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 | ||
46 | // void setCategory( const QString& category ) | 48 | // void setCategory( const QString& category ) |
@@ -50,12 +52,18 @@ public: | |||
50 | void setDescription( const QString& description ) | 52 | void setDescription( const QString& description ) |
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; } |
61 | 69 | ||
@@ -77,5 +85,8 @@ private: | |||
77 | int recordInfo; | 85 | int recordInfo; |
78 | // | 86 | // |
79 | }; | 87 | }; |
80 | 88 | ||
89 | // MUST be inline. (forwards compatability). | ||
90 | inline void Task::setDueDate( const QDate &date) { setDueDate(date, date.isValid()); } | ||
91 | inline void Task::clearDueDate() { setHasDueDate( FALSE ); } | ||
81 | #endif | 92 | #endif |