summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -144,140 +144,140 @@ void Today::startConfig()
cfg.writeEntry("shownotes", notes);
cfg.writeEntry("onlylater", onlylater);
// sync it to "disk"
cfg.write();
draw();
}
/*
* Get all events that are in the datebook xml file for today
*/
void Today::getDates()
{
QDate date = QDate::currentDate();
QTime time = QTime::currentTime();
QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
Config config( "qpe" );
// if 24 h format
//bool ampm = config.readBoolEntry( "AMPM", TRUE );
int count=0;
if ( list.count() > 0 ) {
QString msg;
for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin();
it!=list.end(); ++it ) {
count++;
if ( count <= MAX_LINES_MEET )
{
//cout << time.toString() << endl;
//cout << TimeString::dateString((*it).event().end()) << endl;
// decide if to get all day or only later appointments
if (!ONLY_LATER)
{
msg += "<B>" + (*it).description() + "</B>";
if ( (*it).event().hasAlarm() )
{
msg += " <b>[with alarm]</b>";
}
// include location or not
if (SHOW_LOCATION == 1)
{
- msg+= "<BR><i>" + (*it).location();
+ msg += "<BR><i>" + (*it).location();
+ msg += "</i>";
}
- msg += "</i><BR>";
-
+
if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") )
{
- msg += "All day";
+ msg += "<br>All day";
}
else
{
// start time of event
- msg += TimeString::timeString(QTime((*it).event().start().time()) )
+ msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) )
// end time of event
+ "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) );
}
msg += "<BR>";
// include possible note or not
if (SHOW_NOTES == 1)
{
msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>";
}
}
else if ((time.toString() <= TimeString::dateString((*it).event().end())) )
{
msg += "<B>" + (*it).description() + "</B>";
if ( (*it).event().hasAlarm() )
{
msg += " <b>[with alarm]</b>";
}
// include location or not
if (SHOW_LOCATION == 1)
{
msg+= "<BR><i>" + (*it).location();
+ msg += "</i>";
}
- msg += "</i><BR>";
-
+
if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") )
{
- msg += "All day";
+ msg += "<br>All day";
}
else
{
// start time of event
- msg += TimeString::timeString(QTime((*it).event().start().time()) )
+ msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) )
// end time of event
+ "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) );
}
msg += "<BR>";
// include possible note or not
if (SHOW_NOTES == 1)
{
msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>";
}
}
}
}
if (msg.isEmpty())
{
msg = "No more appointments today";
}
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;
QList<TodoItem> loadtodolist;
todo = minidom_load(filename);
tasks = todo->el;
tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/
if(tasks)
{
tasklist = tasks->el;
i = 0;
while((tasklist) && (tasklist[i]))
{
attlist = tasklist[i]->at;
j = 0;