summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp58
1 files changed, 35 insertions, 23 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 7a2d0c9..bed3a74 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -28,2 +28,3 @@
#include <qpe/qprocess.h>
+#include <qpe/resource.h>
@@ -38,2 +39,3 @@
#include <qtimer.h>
+#include <qpixmap.h>
@@ -60,8 +62,3 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) );
- QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
-
- QDate date = QDate::currentDate();
- QString time = (date.toString());
- TextLabel1->setText(time);
- db = new DateBookDB;
+ QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
@@ -78,3 +75,3 @@ void Today::draw()
// how often refresh
- QTimer::singleShot( 30*1000, this, SLOT(draw()) );
+ QTimer::singleShot( 5*1000, this, SLOT(draw()) );
@@ -84,2 +81,8 @@ void Today::init()
{
+ QDate date = QDate::currentDate();
+ QString time = (date.toString());
+
+ TextLabel1->setText("<qt><font color=white>" +time + "<font></qt>");
+ db = new DateBookDB;
+
// read config
@@ -149,2 +152,3 @@ void Today::startConfig()
+
/*
@@ -160,3 +164,3 @@ void Today::getDates()
// if 24 h format
- // bool ampm = config.readBoolEntry( "AMPM", TRUE );
+ //bool ampm = config.readBoolEntry( "AMPM", TRUE );
@@ -182,16 +186,20 @@ void Today::getDates()
{
- msg += "<B>" + (*it).description() + "</B>";
- // include location or not
- if (SHOW_LOCATION == 1)
- {
+ msg += "<B>" + (*it).description() + "</B>";
+ if ( (*it).event().hasAlarm() )
+ {
+ msg += " <b>[with alarm]</b>";
+ }
+ // include location or not
+ if (SHOW_LOCATION == 1)
+ {
msg+= "<BR>" + (*it).location();
- }
- msg += "<BR>"
- // start time of event
- + TimeString::timeString(QTime((*it).event().start().time()) )
- // end time of event
- + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) )
- + "<BR>";
- // include possible note or not
- if (SHOW_NOTES == 1)
+ }
+ msg += "<BR>"
+ // start time of event
+ + TimeString::timeString(QTime((*it).event().start().time()) )
+ // end time of event
+ + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) )
+ + "<BR>";
+ // include possible note or not
+ if (SHOW_NOTES == 1)
{
@@ -203,2 +211,6 @@ void Today::getDates()
msg += "<B>" + (*it).description() + "</B>";
+ if ( (*it).event().hasAlarm() )
+ {
+ msg += " <b>[with alarm]</b>";
+ }
// include location or not
@@ -232,3 +244,2 @@ void Today::getDates()
* Parse in the todolist.xml
- *
*/
@@ -264,3 +275,4 @@ QList<TodoItem> Today::loadTodo(const char *filename)
{
- if(!attlist[i]->name) continue;
+ // SEGFAULT HERE WITH MORE THAN 7 ENTRIES
+ if(!attlist[j]->name) continue;
if(!strcmp(attlist[j]->name, "Description"))