summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 381ae6b..00a8842 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -12,38 +12,38 @@
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "today.h"
#include "minidom.h"
#include "TodoItem.h"
-#include <qpushbutton.h>
-#include <qlabel.h>
-
#include <qpe/datebookdb.h>
#include <qpe/timestring.h>
#include <qpe/config.h>
-
+#include <qpe/qcopenvelope_qws.h>
#include <qpe/qprocess.h>
+
#include <qdir.h>
#include <qfile.h>
#include <qdatetime.h>
#include <qtextstream.h>
#include <qcheckbox.h>
#include <qspinbox.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
//#include <iostream.h>
//#include <unistd.h>
#include <stdlib.h>
int MAX_LINES_TASK;
int MAX_CHAR_CLIP;
int MAX_LINES_MEET;
int SHOW_LOCATION;
int SHOW_NOTES;
// show only later dates
int ONLY_LATER = 1;
@@ -180,26 +180,26 @@ void Today::getDates()
if (SHOW_NOTES == 1)
{
msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>";
}
}
}
}
DatesField->setText(msg);
}
}
/*
- *
- *
+ * Parse in the todolist.xml
+ *
*/
QList<TodoItem> Today::loadTodo(const char *filename)
{
DOM *todo;
ELE *tasks;
ELE **tasklist;
ATT **attlist;
int i, j;
char *description;
int completed;
int priority;
TodoItem *tmp;
@@ -302,34 +302,33 @@ void Today::getTodo()
else
{
output = ("No active tasks");
}
TodoField->setText(output);
}
/*
* lanches datebook
*/
void Today::startDatebook()
-{
- //ugly but working
- system("/opt/QtPalmtop/bin/datebook");
+{
+ QCopEnvelope e("QPE/System", "execute(QString)");
+ e << QString("datebook");
}
/*
* lanches todolist
*/
void Today::startTodo()
{
- // QProcess *datelanch = new QProcess( this, "datebook");
- //datelanch->start();
- system("/opt/QtPalmtop/bin/todolist");
+ QCopEnvelope e("QPE/System", "execute(QString)");
+ e << QString("todolist");
}
/*
* Destroys the object and frees any allocated resources
*/
Today::~Today()
{
// no need to delete child widgets, Qt does it all for us
}