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.cpp43
1 files changed, 36 insertions, 7 deletions
diff --git a/libopie/todoevent.cpp b/libopie/todoevent.cpp
index aa348a2..fb7073c 100644
--- a/libopie/todoevent.cpp
+++ b/libopie/todoevent.cpp
@@ -19,4 +19,7 @@ ToDoEvent::ToDoEvent(const ToDoEvent &event )
-ToDoEvent::ToDoEvent(bool completed, int priority, const QStringList &category,
- const QString &description, bool hasDate, QDate date, int uid )
+ToDoEvent::ToDoEvent(bool completed, int priority,
+ const QStringList &category,
+ const QString& summary,
+ const QString &description,
+ bool hasDate, QDate date, int uid )
{
@@ -27,2 +30,3 @@ ToDoEvent::ToDoEvent(bool completed, int priority, const QStringList &category,
m_category = category;
+ m_sum = summary;
m_desc = Qtopia::simplifyMultiLineSpace(description );
@@ -33,3 +37,3 @@ ToDoEvent::ToDoEvent(bool completed, int priority, const QStringList &category,
}// generate the ids
- m_uid = uid;
+ m_uid = uid;
}
@@ -68,2 +72,10 @@ QStringList ToDoEvent::allCategories()const
}
+QString ToDoEvent::extra(const QString& )const
+{
+ return QString::null;
+}
+QString ToDoEvent::summary() const
+{
+ return m_sum;
+}
void ToDoEvent::insertCategory(const QString &str )
@@ -101,2 +113,10 @@ void ToDoEvent::setDescription(const QString &desc )
}
+void ToDoEvent::setExtra( const QString&, const QString& )
+{
+
+}
+void ToDoEvent::setSummary( const QString& sum )
+{
+ m_sum = sum;
+}
void ToDoEvent::setCategory( const QString &cat )
@@ -129,5 +149,7 @@ QString ToDoEvent::richText() const
QStringList catlist;
-
+
// Description of the todo
if ( !description().isEmpty() ){
+ text += "<b>" + QObject::tr( "Summary:") + "</b><br>";
+ text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
text += "<b>" + QObject::tr( "Description:" ) + "</b><br>";
@@ -142,3 +164,3 @@ QString ToDoEvent::richText() const
}
-
+
// Open database of all categories and get the list of
@@ -151,3 +173,3 @@ QString ToDoEvent::richText() const
catlist = allCategories();
-
+
text += "<b>" + QObject::tr( "Category:") + "</b> ";
@@ -217,3 +239,9 @@ bool ToDoEvent::operator==(const ToDoEvent &toDoEvent )const
{
- if( m_date == toDoEvent.m_date && m_isCompleted == toDoEvent.m_isCompleted && m_hasDate == toDoEvent.m_hasDate && m_priority == toDoEvent.m_priority && m_category == toDoEvent.m_category && m_desc == toDoEvent.m_desc )
+ if( m_priority == toDoEvent.m_priority &&
+ m_isCompleted == toDoEvent.m_isCompleted &&
+ m_hasDate == toDoEvent.m_hasDate &&
+ m_date == toDoEvent.m_date &&
+ m_category == toDoEvent.m_category &&
+ m_sum == toDoEvent.m_sum &&
+ m_desc == toDoEvent.m_desc )
return true;
@@ -230,2 +258,3 @@ ToDoEvent &ToDoEvent::operator=(const ToDoEvent &item )
m_uid = item.m_uid;
+ m_sum = item.m_sum;
return *this;