-rw-r--r-- | korganizer/koagendaitem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index df2e478..5a3c4d2 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -107,5 +107,5 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
107 | computeText(); | 107 | computeText(); |
108 | 108 | ||
109 | if ( (incidence->type() == "Todo") && | 109 | if ( (incidence->typeID() == todoID ) && |
110 | ( !((static_cast<Todo*>(incidence))->isCompleted()) && | 110 | ( !((static_cast<Todo*>(incidence))->isCompleted()) && |
111 | ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { | 111 | ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { |
@@ -119,5 +119,5 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
119 | QString cat = categories.first(); | 119 | QString cat = categories.first(); |
120 | if (cat.isEmpty()) { | 120 | if (cat.isEmpty()) { |
121 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) | 121 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) |
122 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | 122 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; |
123 | else | 123 | else |
@@ -125,5 +125,5 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
125 | } else { | 125 | } else { |
126 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); | 126 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); |
127 | if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) { | 127 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) { |
128 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) | 128 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) |
129 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | 129 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; |
@@ -360,5 +360,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) | |||
360 | static const QPixmap completedPxmp = SmallIcon("greenhook16"); | 360 | static const QPixmap completedPxmp = SmallIcon("greenhook16"); |
361 | static const QPixmap overduePxmp = SmallIcon("redcross16"); | 361 | static const QPixmap overduePxmp = SmallIcon("redcross16"); |
362 | if ( mIncidence->type() == "Todo" ) { | 362 | if ( mIncidence->typeID() == todoID ) { |
363 | Todo* tempTodo = static_cast<Todo*>(mIncidence); | 363 | Todo* tempTodo = static_cast<Todo*>(mIncidence); |
364 | int xx = pos().x()+(width()-completedPxmp.width()-3 ); | 364 | int xx = pos().x()+(width()-completedPxmp.width()-3 ); |
@@ -541,5 +541,5 @@ void KOAgendaItem::computeText() | |||
541 | { | 541 | { |
542 | mDisplayedText = mIncidence->summary(); | 542 | mDisplayedText = mIncidence->summary(); |
543 | if ( (mIncidence->type() == "Todo") ) { | 543 | if ( (mIncidence->typeID() == todoID ) ) { |
544 | if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) { | 544 | if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) { |
545 | if ( static_cast<Todo*>(mIncidence)->dtDue().date() < QDate::currentDate() ) | 545 | if ( static_cast<Todo*>(mIncidence)->dtDue().date() < QDate::currentDate() ) |
@@ -573,5 +573,5 @@ void KOAgendaItem::computeText() | |||
573 | QString tipText = mIncidence->summary(); | 573 | QString tipText = mIncidence->summary(); |
574 | if ( !mIncidence->doesFloat() ) { | 574 | if ( !mIncidence->doesFloat() ) { |
575 | if ( mIncidence->type() == "Event" ) { | 575 | if ( mIncidence->typeID() == eventID ) { |
576 | if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { | 576 | if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { |
577 | tipText += "\n"+i18n("From: ")+mIncidence->dtStartStr(); | 577 | tipText += "\n"+i18n("From: ")+mIncidence->dtStartStr(); |
@@ -583,5 +583,5 @@ void KOAgendaItem::computeText() | |||
583 | } | 583 | } |
584 | } | 584 | } |
585 | else if ( mIncidence->type() == "Todo" ) { | 585 | else if ( mIncidence->typeID() == todoID ) { |
586 | if (mIncidence->hasStartDate()) | 586 | if (mIncidence->hasStartDate()) |
587 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartStr(); | 587 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartStr(); |
@@ -589,5 +589,5 @@ void KOAgendaItem::computeText() | |||
589 | tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueStr(); | 589 | tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueStr(); |
590 | } | 590 | } |
591 | } else if ( mIncidence->type() == "Todo" ) { | 591 | } else if ( mIncidence->typeID() == todoID ) { |
592 | if (mIncidence->hasStartDate()) | 592 | if (mIncidence->hasStartDate()) |
593 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartDateStr(); | 593 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartDateStr(); |