author | alwin <alwin> | 2005-03-20 12:49:50 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-20 12:49:50 (UTC) |
commit | a93e2c40f08388b7dea93a3dd0ce69b029a59092 (patch) (unidiff) | |
tree | af9e8cf769ae003db22b2a84d8b3fc3aeac90183 | |
parent | e006544cf2eb82b503b3ef979a2159b5de93037e (diff) | |
download | opie-a93e2c40f08388b7dea93a3dd0ce69b029a59092.zip opie-a93e2c40f08388b7dea93a3dd0ce69b029a59092.tar.gz opie-a93e2c40f08388b7dea93a3dd0ce69b029a59092.tar.bz2 |
last stuff before 1.2:
when day has a holiday-fake-event and not other allday-event it will paint
green.
-rw-r--r-- | library/datebookmonth.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp index 421559e..013ab66 100644 --- a/library/datebookmonth.cpp +++ b/library/datebookmonth.cpp | |||
@@ -548,4 +548,5 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
548 | bool repeatAllDay = FALSE; | 548 | bool repeatAllDay = FALSE; |
549 | bool travelAllDay = FALSE; | 549 | bool travelAllDay = FALSE; |
550 | bool holidayAllDay = FALSE; | ||
550 | 551 | ||
551 | QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin(); | 552 | QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin(); |
@@ -559,8 +560,12 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
559 | 560 | ||
560 | if (ev.isAllDay()) { | 561 | if (ev.isAllDay()) { |
561 | if (!ev.hasRepeat()) | 562 | if (!ev.hasRepeat()) { |
562 | normalAllDay = TRUE; | 563 | normalAllDay = TRUE; |
563 | else | 564 | if (!ev.isValidUid()) { |
564 | repeatAllDay = TRUE; | 565 | holidayAllDay = TRUE; |
566 | } | ||
567 | } else { | ||
568 | repeatAllDay = TRUE; | ||
569 | } | ||
565 | } else { | 570 | } else { |
566 | int sLine, eLine; | 571 | int sLine, eLine; |
@@ -600,5 +605,5 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
600 | 605 | ||
601 | // draw the background | 606 | // draw the background |
602 | if (normalAllDay || repeatAllDay || travelAllDay) { | 607 | if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) { |
603 | p->save(); | 608 | p->save(); |
604 | 609 | ||
@@ -609,10 +614,16 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
609 | p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, | 614 | p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, |
610 | colorRepeatLight ); | 615 | colorRepeatLight ); |
611 | } else | 616 | } else { |
617 | if (!holidayAllDay) { | ||
612 | p->fillRect( 0, 0, cr.width(), cr.height(), | 618 | p->fillRect( 0, 0, cr.width(), cr.height(), |
613 | colorNormalLight ); | 619 | colorNormalLight ); |
614 | else if (repeatAllDay) | 620 | } else { |
621 | p->fillRect( 0, 0, cr.width(), cr.height(), | ||
622 | QColor(0,220,0) ); | ||
623 | } | ||
624 | } else if (repeatAllDay) { | ||
615 | p->fillRect( 0, 0, cr.width(), cr.height(), | 625 | p->fillRect( 0, 0, cr.width(), cr.height(), |
616 | colorRepeatLight ); | 626 | colorRepeatLight ); |
627 | } | ||
617 | } else { | 628 | } else { |
618 | p->fillRect( 0, 0, cr.width(), | 629 | p->fillRect( 0, 0, cr.width(), |