-rw-r--r-- | core/pim/today/today.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 2dc96fc..58ba4f4 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -189,5 +189,4 @@ void Today::init() { | |||
189 | 189 | ||
190 | TextLabel1->setText(QString("<font color=#FFFFFF>" + time + "</font>")); | 190 | TextLabel1->setText(QString("<font color=#FFFFFF>" + time + "</font>")); |
191 | db = new DateBookDB; | ||
192 | 191 | ||
193 | // read config | 192 | // read config |
@@ -208,6 +207,7 @@ void Today::init() { | |||
208 | // should only later appointments be shown or all for the current day. | 207 | // should only later appointments be shown or all for the current day. |
209 | ONLY_LATER = cfg.readNumEntry("onlylater",1); | 208 | ONLY_LATER = cfg.readNumEntry("onlylater",1); |
210 | } | ||
211 | 209 | ||
210 | db = new DateBookDB; | ||
211 | } | ||
212 | 212 | ||
213 | /* | 213 | /* |
@@ -297,5 +297,5 @@ void Today::getDates() { | |||
297 | if (!ONLY_LATER) { | 297 | if (!ONLY_LATER) { |
298 | count++; | 298 | count++; |
299 | DateBookEvent *l=new DateBookEvent(*it, AllDateBookEvents); | 299 | DateBookEvent *l=new DateBookEvent(*it, AllDateBookEvents, SHOW_LOCATION, SHOW_NOTES); |
300 | layoutDates->addWidget(l); | 300 | layoutDates->addWidget(l); |
301 | connect (l, SIGNAL(editEvent(const Event &)), | 301 | connect (l, SIGNAL(editEvent(const Event &)), |
@@ -305,5 +305,5 @@ void Today::getDates() { | |||
305 | 305 | ||
306 | // show only later appointments | 306 | // show only later appointments |
307 | DateBookEventLater *l=new DateBookEventLater(*it, AllDateBookEvents); | 307 | DateBookEventLater *l=new DateBookEventLater(*it, AllDateBookEvents, SHOW_LOCATION, SHOW_NOTES); |
308 | layoutDates->addWidget(l); | 308 | layoutDates->addWidget(l); |
309 | connect (l, SIGNAL(editEvent(const Event &)), | 309 | connect (l, SIGNAL(editEvent(const Event &)), |
@@ -443,7 +443,9 @@ Today::~Today() { | |||
443 | */ | 443 | */ |
444 | DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | 444 | DateBookEvent::DateBookEvent(const EffectiveEvent &ev, |
445 | QWidget* parent = 0, | 445 | QWidget* parent = 0, |
446 | const char* name = 0, | 446 | int SHOW_LOCATION = 0, |
447 | WFlags fl = 0) : | 447 | int SHOW_NOTES = 0, |
448 | const char* name = 0, | ||
449 | WFlags fl = 0) : | ||
448 | ClickableLabel(parent,name,fl), event(ev) { | 450 | ClickableLabel(parent,name,fl), event(ev) { |
449 | 451 | ||
@@ -458,6 +460,5 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | |||
458 | // include location or not | 460 | // include location or not |
459 | if (SHOW_LOCATION == 1) { | 461 | if (SHOW_LOCATION == 1) { |
460 | msg += "<BR><i>" + (ev).location(); | 462 | msg += "<BR><i>" + (ev).location() + "</i>"; |
461 | msg += "</i>"; | ||
462 | } | 463 | } |
463 | 464 | ||
@@ -473,5 +474,5 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | |||
473 | // include possible note or not | 474 | // include possible note or not |
474 | if (SHOW_NOTES == 1) { | 475 | if (SHOW_NOTES == 1) { |
475 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 476 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP); |
476 | } | 477 | } |
477 | } | 478 | } |
@@ -484,4 +485,6 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | |||
484 | DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, | 485 | DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, |
485 | QWidget* parent = 0, | 486 | QWidget* parent = 0, |
487 | int SHOW_LOCATION = 0, | ||
488 | int SHOW_NOTES = 0, | ||
486 | const char* name = 0, | 489 | const char* name = 0, |
487 | WFlags fl = 0) : | 490 | WFlags fl = 0) : |
@@ -499,6 +502,5 @@ DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, | |||
499 | // include location or not | 502 | // include location or not |
500 | if (SHOW_LOCATION == 1) { | 503 | if (SHOW_LOCATION == 1) { |
501 | msg += "<BR><i>" + (ev).location(); | 504 | msg += "<BR><i>" + (ev).location() + "</i>"; |
502 | msg += "</i>"; | ||
503 | } | 505 | } |
504 | 506 | ||
@@ -513,5 +515,5 @@ DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, | |||
513 | // include possible note or not | 515 | // include possible note or not |
514 | if (SHOW_NOTES == 1) { | 516 | if (SHOW_NOTES == 1) { |
515 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 517 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP); |
516 | } | 518 | } |
517 | } | 519 | } |