summaryrefslogtreecommitdiff
path: root/core/pim
authorharlekin <harlekin>2002-03-21 10:57:44 (UTC)
committer harlekin <harlekin>2002-03-21 10:57:44 (UTC)
commit20fa51b3d38725ca151364a14d8005b4e6c9b415 (patch) (unidiff)
treee8a987bc0824020f531344fa36a845b2e0e6f4ab /core/pim
parent74b4a41d2671bd85a47041f107624d0c61edc346 (diff)
downloadopie-20fa51b3d38725ca151364a14d8005b4e6c9b415.zip
opie-20fa51b3d38725ca151364a14d8005b4e6c9b415.tar.gz
opie-20fa51b3d38725ca151364a14d8005b4e6c9b415.tar.bz2
fixes reagarding calendar part
Diffstat (limited to 'core/pim') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp22
-rw-r--r--core/pim/today/today.h10
2 files changed, 20 insertions, 12 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
@@ -188,7 +188,6 @@ void Today::init() {
188 QString time = (tr( date.toString()) ); 188 QString time = (tr( date.toString()) );
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
194 Config cfg("today"); 193 Config cfg("today");
@@ -207,8 +206,9 @@ void Today::init() {
207 SHOW_NOTES = cfg.readNumEntry("shownotes",0); 206 SHOW_NOTES = cfg.readNumEntry("shownotes",0);
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/*
214 * The method for the configuration dialog. 214 * The method for the configuration dialog.
@@ -296,7 +296,7 @@ void Today::getDates() {
296 296
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 &)),
302 this, SLOT(editEvent(const Event &))); 302 this, SLOT(editEvent(const Event &)));
@@ -304,7 +304,7 @@ void Today::getDates() {
304 count++; 304 count++;
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 &)),
310 this, SLOT(editEvent(const Event &))); 310 this, SLOT(editEvent(const Event &)));
@@ -443,6 +443,8 @@ Today::~Today() {
443 */ 443 */
444DateBookEvent::DateBookEvent(const EffectiveEvent &ev, 444DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
445 QWidget* parent = 0, 445 QWidget* parent = 0,
446 int SHOW_LOCATION = 0,
447 int SHOW_NOTES = 0,
446 const char* name = 0, 448 const char* name = 0,
447 WFlags fl = 0) : 449 WFlags fl = 0) :
448 ClickableLabel(parent,name,fl), event(ev) { 450 ClickableLabel(parent,name,fl), event(ev) {
@@ -457,8 +459,7 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
457 } 459 }
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
464 if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { 465 if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) {
@@ -472,7 +473,7 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
472 473
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 }
478 setText(msg); 479 setText(msg);
@@ -483,6 +484,8 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
483 484
484DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, 485DateBookEventLater::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) :
488 ClickableLabel(parent,name,fl), event(ev) { 491 ClickableLabel(parent,name,fl), event(ev) {
@@ -498,8 +501,7 @@ DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev,
498 } 501 }
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
505 if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { 507 if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) {
@@ -512,7 +514,7 @@ DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev,
512 } 514 }
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 }
518 520
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 6048781..090e8f9 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -78,7 +78,10 @@ class DateBookEvent: public ClickableLabel {
78 Q_OBJECT 78 Q_OBJECT
79public: 79public:
80 DateBookEvent(const EffectiveEvent &ev, 80 DateBookEvent(const EffectiveEvent &ev,
81 QWidget* parent = 0, const char* name = 0, 81 QWidget* parent = 0,
82 int SHOW_LOCATION = 0,
83 int SHOW_NOTES = 0,
84 const char* name = 0,
82 WFlags fl = 0); 85 WFlags fl = 0);
83signals: 86signals:
84 void editEvent(const Event &e); 87 void editEvent(const Event &e);
@@ -92,7 +95,10 @@ class DateBookEventLater: public ClickableLabel {
92 Q_OBJECT 95 Q_OBJECT
93public: 96public:
94 DateBookEventLater(const EffectiveEvent &ev, 97 DateBookEventLater(const EffectiveEvent &ev,
95 QWidget* parent = 0, const char* name = 0, 98 QWidget* parent = 0,
99 int SHOW_LOCATION = 0,
100 int SHOW_NOTES = 0,
101 const char* name = 0,
96 WFlags fl = 0); 102 WFlags fl = 0);
97signals: 103signals:
98 void editEvent(const Event &e); 104 void editEvent(const Event &e);