summaryrefslogtreecommitdiff
path: root/libopie/todoevent.cpp
Side-by-side diff
Diffstat (limited to 'libopie/todoevent.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/todoevent.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index fb7073c..b35ac9d 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -23,2 +23,3 @@ ToDoEvent::ToDoEvent(bool completed, int priority,
const QString &description,
+ ushort progress,
bool hasDate, QDate date, int uid )
@@ -31,2 +32,3 @@ ToDoEvent::ToDoEvent(bool completed, int priority,
m_sum = summary;
+ m_prog = progress;
m_desc = Qtopia::simplifyMultiLineSpace(description );
@@ -80,2 +82,6 @@ QString ToDoEvent::summary() const
}
+ushort ToDoEvent::progress() const
+{
+ return m_prog;
+}
void ToDoEvent::insertCategory(const QString &str )
@@ -141,3 +147,6 @@ bool ToDoEvent::isOverdue( )
}
-
+void ToDoEvent::setProgress(ushort progress )
+{
+ m_prog = progress;
+}
/*!
@@ -155,6 +164,8 @@ QString ToDoEvent::richText() const
text += "<b>" + QObject::tr( "Description:" ) + "</b><br>";
- text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
+ text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br><br><br>";
}
text += "<b>" + QObject::tr( "Priority:") +" </b>"
- + QString::number( priority() ) + "<br>";
+ + QString::number( priority() ) + " <br>";
+ text += "<b>" + QObject::tr( "Progress:") + " </b>"
+ + QString::number( progress() ) + " %<br>";
if (hasDate() ){
@@ -188,3 +199,3 @@ bool ToDoEvent::operator<( const ToDoEvent &toDoEvent )const{
if( !hasDate() && !toDoEvent.hasDate() ) return true;
- if( !hasDate() && toDoEvent.hasDate() ) return true;
+ if( !hasDate() && toDoEvent.hasDate() ) return false;
if( hasDate() && toDoEvent.hasDate() ){
@@ -240,2 +251,3 @@ bool ToDoEvent::operator==(const ToDoEvent &toDoEvent )const
if( m_priority == toDoEvent.m_priority &&
+ m_priority == toDoEvent.m_prog &&
m_isCompleted == toDoEvent.m_isCompleted &&
@@ -259,2 +271,3 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
m_sum = item.m_sum;
+ m_prog = item.m_prog;
return *this;