summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-02-21 22:43:28 (UTC)
committer harlekin <harlekin>2002-02-21 22:43:28 (UTC)
commit7fd3f2ce443a136079bb9230b90b31c8d172b16a (patch) (unidiff)
tree8786464c785def9cc0eaa874dcc10871bde11a64
parentec52599a5a9ca3397e6375b7aeb4ee391c614bfb (diff)
downloadopie-7fd3f2ce443a136079bb9230b90b31c8d172b16a.zip
opie-7fd3f2ce443a136079bb9230b90b31c8d172b16a.tar.gz
opie-7fd3f2ce443a136079bb9230b90b31c8d172b16a.tar.bz2
fixed some layout glitches
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 1f6f34e..c63a9ef 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,424 +1,424 @@
1/* 1/*
2 * today.cpp : main class 2 * today.cpp : main class
3 * 3 *
4 * --------------------- 4 * ---------------------
5 * 5 *
6 * begin : Sun 10 17:20:00 CEST 2002 6 * begin : Sun 10 17:20:00 CEST 2002
7 * copyright : (c) 2002 by Maximilian Reiß 7 * copyright : (c) 2002 by Maximilian Reiß
8 * email : max.reiss@gmx.de 8 * email : max.reiss@gmx.de
9 * 9 *
10 */ 10 */
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by * 14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include "today.h" 20#include "today.h"
21#include "minidom.h" 21#include "minidom.h"
22#include "TodoItem.h" 22#include "TodoItem.h"
23 23
24#include <qpe/datebookdb.h> 24#include <qpe/datebookdb.h>
25#include <qpe/timestring.h> 25#include <qpe/timestring.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27#include <qpe/qcopenvelope_qws.h> 27#include <qpe/qcopenvelope_qws.h>
28#include <qpe/qprocess.h> 28#include <qpe/qprocess.h>
29#include <qpe/resource.h> 29#include <qpe/resource.h>
30 30
31#include <qdir.h> 31#include <qdir.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qdatetime.h> 33#include <qdatetime.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35#include <qcheckbox.h> 35#include <qcheckbox.h>
36#include <qspinbox.h> 36#include <qspinbox.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qtimer.h> 39#include <qtimer.h>
40#include <qpixmap.h> 40#include <qpixmap.h>
41 41
42//#include <iostream.h> 42//#include <iostream.h>
43//#include <unistd.h> 43//#include <unistd.h>
44#include <stdlib.h> 44#include <stdlib.h>
45 45
46int MAX_LINES_TASK; 46int MAX_LINES_TASK;
47int MAX_CHAR_CLIP; 47int MAX_CHAR_CLIP;
48int MAX_LINES_MEET; 48int MAX_LINES_MEET;
49int SHOW_LOCATION; 49int SHOW_LOCATION;
50int SHOW_NOTES; 50int SHOW_NOTES;
51// show only later dates 51// show only later dates
52int ONLY_LATER; 52int ONLY_LATER;
53/* 53/*
54 * Constructs a Example which is a child of 'parent', with the 54 * Constructs a Example which is a child of 'parent', with the
55 * name 'name' and widget flags set to 'f' 55 * name 'name' and widget flags set to 'f'
56 */ 56 */
57Today::Today( QWidget* parent, const char* name, WFlags fl ) 57Today::Today( QWidget* parent, const char* name, WFlags fl )
58 : TodayBase( parent, name, fl ) 58 : TodayBase( parent, name, fl )
59{ 59{
60 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); 60 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) );
61 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); 61 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) );
62 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); 62 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) );
63 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); 63 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
64 64
65 draw(); 65 draw();
66} 66}
67 67
68 68
69void Today::draw() 69void Today::draw()
70{ 70{
71 init(); 71 init();
72 getDates(); 72 getDates();
73 getMail(); 73 getMail();
74 getTodo(); 74 getTodo();
75 // how often refresh 75 // how often refresh
76 QTimer::singleShot( 5*1000, this, SLOT(draw()) ); 76 QTimer::singleShot( 5*1000, this, SLOT(draw()) );
77 77
78} 78}
79 79
80void Today::init() 80void Today::init()
81{ 81{
82 QDate date = QDate::currentDate(); 82 QDate date = QDate::currentDate();
83 QString time = (date.toString()); 83 QString time = (date.toString());
84 84
85 TextLabel1->setText("<qt><font color=white>" +time + "<font></qt>"); 85 TextLabel1->setText("<qt><font color=white>" +time + "<font></qt>");
86 db = new DateBookDB; 86 db = new DateBookDB;
87 87
88 // read config 88 // read config
89 Config cfg("today"); 89 Config cfg("today");
90 cfg.setGroup("BaseConfig"); 90 cfg.setGroup("BaseConfig");
91 91
92 // how many lines should be showed in the task section 92 // how many lines should be showed in the task section
93 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5); 93 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5);
94 // after how many chars should the be cut off on tasks and notes 94 // after how many chars should the be cut off on tasks and notes
95 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30); 95 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30);
96 // how many lines should be showed in the datebook section 96 // how many lines should be showed in the datebook section
97 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5); 97 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5);
98 // If location is to be showed too, 1 to activate it. 98 // If location is to be showed too, 1 to activate it.
99 SHOW_LOCATION = cfg.readNumEntry("showlocation",1); 99 SHOW_LOCATION = cfg.readNumEntry("showlocation",1);
100 // if notes should be shown 100 // if notes should be shown
101 SHOW_NOTES = cfg.readNumEntry("shownotes",0); 101 SHOW_NOTES = cfg.readNumEntry("shownotes",0);
102 ONLY_LATER = cfg.readNumEntry("onlylater",1); 102 ONLY_LATER = cfg.readNumEntry("onlylater",1);
103 103
104} 104}
105 105
106void Today::startConfig() 106void Today::startConfig()
107{ 107{
108 conf = new todayconfig ( this, "", true ); 108 conf = new todayconfig ( this, "", true );
109 109
110 110
111 //Config cfg = new Config("today"); 111 //Config cfg = new Config("today");
112 112
113 // read the config 113 // read the config
114 Config cfg("today"); 114 Config cfg("today");
115 cfg.setGroup("BaseConfig"); 115 cfg.setGroup("BaseConfig");
116 116
117 //init(); 117 //init();
118 118
119 conf->SpinBox1->setValue(MAX_LINES_MEET); 119 conf->SpinBox1->setValue(MAX_LINES_MEET);
120 // location show box 120 // location show box
121 conf->CheckBox1->setChecked(SHOW_LOCATION); 121 conf->CheckBox1->setChecked(SHOW_LOCATION);
122 // notes show box 122 // notes show box
123 conf->CheckBox2->setChecked(SHOW_NOTES); 123 conf->CheckBox2->setChecked(SHOW_NOTES);
124 // task lines 124 // task lines
125 conf->SpinBox2->setValue(MAX_LINES_TASK); 125 conf->SpinBox2->setValue(MAX_LINES_TASK);
126 // clip when? 126 // clip when?
127 conf->SpinBox7->setValue(MAX_CHAR_CLIP); 127 conf->SpinBox7->setValue(MAX_CHAR_CLIP);
128 // only later 128 // only later
129 conf->CheckBox3->setChecked(ONLY_LATER); 129 conf->CheckBox3->setChecked(ONLY_LATER);
130 130
131 conf->exec(); 131 conf->exec();
132 132
133 int maxlinestask = conf->SpinBox2->value(); 133 int maxlinestask = conf->SpinBox2->value();
134 int maxmeet = conf->SpinBox1->value(); 134 int maxmeet = conf->SpinBox1->value();
135 int location = conf->CheckBox1->isChecked(); 135 int location = conf->CheckBox1->isChecked();
136 int notes = conf->CheckBox2->isChecked(); 136 int notes = conf->CheckBox2->isChecked();
137 int maxcharclip = conf->SpinBox7->value(); 137 int maxcharclip = conf->SpinBox7->value();
138 int onlylater = conf->CheckBox3->isChecked(); 138 int onlylater = conf->CheckBox3->isChecked();
139 139
140 cfg.writeEntry("maxlinestask",maxlinestask); 140 cfg.writeEntry("maxlinestask",maxlinestask);
141 cfg.writeEntry("maxcharclip", maxcharclip); 141 cfg.writeEntry("maxcharclip", maxcharclip);
142 cfg.writeEntry("maxlinesmeet",maxmeet); 142 cfg.writeEntry("maxlinesmeet",maxmeet);
143 cfg.writeEntry("showlocation",location); 143 cfg.writeEntry("showlocation",location);
144 cfg.writeEntry("shownotes", notes); 144 cfg.writeEntry("shownotes", notes);
145 cfg.writeEntry("onlylater", onlylater); 145 cfg.writeEntry("onlylater", onlylater);
146 // sync it to "disk" 146 // sync it to "disk"
147 cfg.write(); 147 cfg.write();
148 148
149 draw(); 149 draw();
150} 150}
151 151
152 152
153/* 153/*
154 * Get all events that are in the datebook xml file for today 154 * Get all events that are in the datebook xml file for today
155 */ 155 */
156void Today::getDates() 156void Today::getDates()
157{ 157{
158 QDate date = QDate::currentDate(); 158 QDate date = QDate::currentDate();
159 QTime time = QTime::currentTime(); 159 QTime time = QTime::currentTime();
160 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); 160 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
161 161
162 Config config( "qpe" ); 162 Config config( "qpe" );
163 // if 24 h format 163 // if 24 h format
164 //bool ampm = config.readBoolEntry( "AMPM", TRUE ); 164 //bool ampm = config.readBoolEntry( "AMPM", TRUE );
165 165
166 int count=0; 166 int count=0;
167 167
168 if ( list.count() > 0 ) { 168 if ( list.count() > 0 ) {
169 QString msg; 169 QString msg;
170 170
171 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); 171 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin();
172 it!=list.end(); ++it ) { 172 it!=list.end(); ++it ) {
173 173
174 count++; 174 count++;
175 175
176 if ( count <= MAX_LINES_MEET ) 176 if ( count <= MAX_LINES_MEET )
177 { 177 {
178 //cout << time.toString() << endl; 178 //cout << time.toString() << endl;
179 //cout << TimeString::dateString((*it).event().end()) << endl; 179 //cout << TimeString::dateString((*it).event().end()) << endl;
180 180
181 // decide if to get all day or only later appointments 181 // decide if to get all day or only later appointments
182 if (!ONLY_LATER) 182 if (!ONLY_LATER)
183 { 183 {
184 msg += "<B>" + (*it).description() + "</B>"; 184 msg += "<B>" + (*it).description() + "</B>";
185 if ( (*it).event().hasAlarm() ) 185 if ( (*it).event().hasAlarm() )
186 { 186 {
187 msg += " <b>[with alarm]</b>"; 187 msg += " <b>[with alarm]</b>";
188 } 188 }
189 // include location or not 189 // include location or not
190 if (SHOW_LOCATION == 1) 190 if (SHOW_LOCATION == 1)
191 { 191 {
192 msg+= "<BR><i>" + (*it).location(); 192 msg += "<BR><i>" + (*it).location();
193 msg += "</i>";
193 } 194 }
194 msg += "</i><BR>"; 195
195
196 if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) 196 if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") )
197 { 197 {
198 msg += "All day"; 198 msg += "<br>All day";
199 } 199 }
200 else 200 else
201 { 201 {
202 // start time of event 202 // start time of event
203 msg += TimeString::timeString(QTime((*it).event().start().time()) ) 203 msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) )
204 // end time of event 204 // end time of event
205 + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); 205 + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) );
206 } 206 }
207 msg += "<BR>"; 207 msg += "<BR>";
208 // include possible note or not 208 // include possible note or not
209 if (SHOW_NOTES == 1) 209 if (SHOW_NOTES == 1)
210 { 210 {
211 msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; 211 msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>";
212 } 212 }
213 } 213 }
214 else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) 214 else if ((time.toString() <= TimeString::dateString((*it).event().end())) )
215 { 215 {
216 msg += "<B>" + (*it).description() + "</B>"; 216 msg += "<B>" + (*it).description() + "</B>";
217 if ( (*it).event().hasAlarm() ) 217 if ( (*it).event().hasAlarm() )
218 { 218 {
219 msg += " <b>[with alarm]</b>"; 219 msg += " <b>[with alarm]</b>";
220 } 220 }
221 // include location or not 221 // include location or not
222 if (SHOW_LOCATION == 1) 222 if (SHOW_LOCATION == 1)
223 { 223 {
224 msg+= "<BR><i>" + (*it).location(); 224 msg+= "<BR><i>" + (*it).location();
225 msg += "</i>";
225 } 226 }
226 msg += "</i><BR>"; 227
227
228 if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) 228 if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") )
229 { 229 {
230 msg += "All day"; 230 msg += "<br>All day";
231 } 231 }
232 else 232 else
233 { 233 {
234 // start time of event 234 // start time of event
235 msg += TimeString::timeString(QTime((*it).event().start().time()) ) 235 msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) )
236 // end time of event 236 // end time of event
237 + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); 237 + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) );
238 } 238 }
239 msg += "<BR>"; 239 msg += "<BR>";
240 // include possible note or not 240 // include possible note or not
241 if (SHOW_NOTES == 1) 241 if (SHOW_NOTES == 1)
242 { 242 {
243 msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; 243 msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>";
244 } 244 }
245 } 245 }
246 } 246 }
247 } 247 }
248 if (msg.isEmpty()) 248 if (msg.isEmpty())
249 { 249 {
250 msg = "No more appointments today"; 250 msg = "No more appointments today";
251 } 251 }
252 DatesField->setText(msg); 252 DatesField->setText(msg);
253 } 253 }
254} 254}
255 255
256/* 256/*
257 * Parse in the todolist.xml 257 * Parse in the todolist.xml
258 */ 258 */
259QList<TodoItem> Today::loadTodo(const char *filename) 259QList<TodoItem> Today::loadTodo(const char *filename)
260{ 260{
261 DOM *todo; 261 DOM *todo;
262 ELE *tasks; 262 ELE *tasks;
263 ELE **tasklist; 263 ELE **tasklist;
264 ATT **attlist; 264 ATT **attlist;
265 int i, j; 265 int i, j;
266 char *description; 266 char *description;
267 int completed; 267 int completed;
268 int priority; 268 int priority;
269 TodoItem *tmp; 269 TodoItem *tmp;
270 QList<TodoItem> loadtodolist; 270 QList<TodoItem> loadtodolist;
271 271
272 todo = minidom_load(filename); 272 todo = minidom_load(filename);
273 273
274 tasks = todo->el; 274 tasks = todo->el;
275 tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/ 275 tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/
276 if(tasks) 276 if(tasks)
277 { 277 {
278 tasklist = tasks->el; 278 tasklist = tasks->el;
279 i = 0; 279 i = 0;
280 while((tasklist) && (tasklist[i])) 280 while((tasklist) && (tasklist[i]))
281 { 281 {
282 attlist = tasklist[i]->at; 282 attlist = tasklist[i]->at;
283 j = 0; 283 j = 0;
284 description = NULL; 284 description = NULL;
285 priority = -1; 285 priority = -1;
286 completed = -1; 286 completed = -1;
287 while((attlist) && (attlist[j])) 287 while((attlist) && (attlist[j]))
288 { 288 {
289 // SEGFAULT HERE WITH MORE THAN 7 ENTRIES 289 // SEGFAULT HERE WITH MORE THAN 7 ENTRIES
290 if(!attlist[j]->name) continue; 290 if(!attlist[j]->name) continue;
291 if(!strcmp(attlist[j]->name, "Description")) 291 if(!strcmp(attlist[j]->name, "Description"))
292 { 292 {
293 description = attlist[j]->value; 293 description = attlist[j]->value;
294 } 294 }
295 // get Completed tag (0 or 1) 295 // get Completed tag (0 or 1)
296 if(!strcmp(attlist[j]->name, "Completed")) 296 if(!strcmp(attlist[j]->name, "Completed"))
297 { 297 {
298 QString s = attlist[j]->name; 298 QString s = attlist[j]->name;
299 if(s == "Completed") 299 if(s == "Completed")
300 { 300 {
301 completed = QString(attlist[j]->value).toInt(); 301 completed = QString(attlist[j]->value).toInt();
302 } 302 }
303 } 303 }
304 // get Priority (1 to 5) 304 // get Priority (1 to 5)
305 if(!strcmp(attlist[j]->name, "Priority")) 305 if(!strcmp(attlist[j]->name, "Priority"))
306 { 306 {
307 QString s = attlist[j]->name; 307 QString s = attlist[j]->name;
308 if(s == "Priority") 308 if(s == "Priority")
309 { 309 {
310 priority = QString(attlist[j]->value).toInt(); 310 priority = QString(attlist[j]->value).toInt();
311 } 311 }
312 } 312 }
313 j++; 313 j++;
314 } 314 }
315 if(description) 315 if(description)
316 { 316 {
317 tmp = new TodoItem(description, completed, priority); 317 tmp = new TodoItem(description, completed, priority);
318 loadtodolist.append(tmp); 318 loadtodolist.append(tmp);
319 } 319 }
320 i++; 320 i++;
321 } 321 }
322 } 322 }
323 323
324 minidom_free(todo); 324 minidom_free(todo);
325 325
326 return loadtodolist; 326 return loadtodolist;
327} 327}
328 328
329 329
330void Today::getMail() 330void Today::getMail()
331{ 331{
332 Config cfg("opiemail"); 332 Config cfg("opiemail");
333 cfg.setGroup("today"); 333 cfg.setGroup("today");
334 334
335 // how many lines should be showed in the task section 335 // how many lines should be showed in the task section
336 int NEW_MAILS = cfg.readNumEntry("newmails",0); 336 int NEW_MAILS = cfg.readNumEntry("newmails",0);
337 int OUTGOING = cfg.readNumEntry("outgoing",0); 337 int OUTGOING = cfg.readNumEntry("outgoing",0);
338 338
339 QString output = tr("<b>%1</b> new mails, <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING); 339 QString output = tr("<b>%1</b> new mails, <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING);
340 340
341 341
342 MailField->setText(output); 342 MailField->setText(output);
343} 343}
344 344
345 345
346/* 346/*
347 * Get the todos 347 * Get the todos
348 * 348 *
349 */ 349 */
350void Today::getTodo() 350void Today::getTodo()
351{ 351{
352 QString output; 352 QString output;
353 QString tmpout; 353 QString tmpout;
354 int count = 0; 354 int count = 0;
355 355
356 QDir dir; 356 QDir dir;
357 QString homedir = dir.homeDirPath (); 357 QString homedir = dir.homeDirPath ();
358 // see if todolist.xml does exist. 358 // see if todolist.xml does exist.
359 QFile f(homedir +"/Applications/todolist/todolist.xml"); 359 QFile f(homedir +"/Applications/todolist/todolist.xml");
360 if ( f.exists() ) 360 if ( f.exists() )
361 { 361 {
362 QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml"); 362 QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml");
363 363
364 TodoItem *item; 364 TodoItem *item;
365 for( item = todolist.first(); item; item = todolist.next()) 365 for( item = todolist.first(); item; item = todolist.next())
366 { 366 {
367 if (!(item->getCompleted() == 1) ) 367 if (!(item->getCompleted() == 1) )
368 { 368 {
369 count++; 369 count++;
370 if (count <= MAX_LINES_TASK) 370 if (count <= MAX_LINES_TASK)
371 { 371 {
372 tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>"))); 372 tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>")));
373 } 373 }
374 } 374 }
375 } 375 }
376 } 376 }
377 377
378 if (count > 0) 378 if (count > 0)
379 { 379 {
380 output = QString("There are <b> %1</b> active tasks: <br>").arg(count); 380 output = QString("There are <b> %1</b> active tasks: <br>").arg(count);
381 output += tmpout; 381 output += tmpout;
382 } 382 }
383 else 383 else
384 { 384 {
385 output = ("No active tasks"); 385 output = ("No active tasks");
386 } 386 }
387 387
388 TodoField->setText(output); 388 TodoField->setText(output);
389} 389}
390 390
391/* 391/*
392 * launches datebook 392 * launches datebook
393 */ 393 */
394void Today::startDatebook() 394void Today::startDatebook()
395{ 395{
396 QCopEnvelope e("QPE/System", "execute(QString)"); 396 QCopEnvelope e("QPE/System", "execute(QString)");
397 e << QString("datebook"); 397 e << QString("datebook");
398} 398}
399 399
400/* 400/*
401 * launches todolist 401 * launches todolist
402 */ 402 */
403void Today::startTodo() 403void Today::startTodo()
404{ 404{
405 QCopEnvelope e("QPE/System", "execute(QString)"); 405 QCopEnvelope e("QPE/System", "execute(QString)");
406 e << QString("todolist"); 406 e << QString("todolist");
407} 407}
408 408
409/* 409/*
410 * launch opiemail 410 * launch opiemail
411 */ 411 */
412void Today::startMail() 412void Today::startMail()
413{ 413{
414 QCopEnvelope e("QPE/System", "execute(QString)"); 414 QCopEnvelope e("QPE/System", "execute(QString)");
415 e << QString("opiemail"); 415 e << QString("opiemail");
416} 416}
417 417
418/* 418/*
419 * Destroys the object and frees any allocated resources 419 * Destroys the object and frees any allocated resources
420 */ 420 */
421Today::~Today() 421Today::~Today()
422{ 422{
423 // no need to delete child widgets, Qt does it all for us 423 // no need to delete child widgets, Qt does it all for us
424} 424}