summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
authorzautrix <zautrix>2005-06-08 10:34:22 (UTC)
committer zautrix <zautrix>2005-06-08 10:34:22 (UTC)
commit793d117812b4da36c9c11d90cccba347cbc6e208 (patch) (side-by-side diff)
tree5bc77e2b7a32a541c2a3b3c3d6d50f873216deef /korganizer/koagendaitem.cpp
parent39d84e2fc3099bd5d7596e8be5dc6783826cec01 (diff)
downloadkdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.zip
kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.gz
kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.bz2
changed incidence type to a faster access method
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp16
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
@@ -108,3 +108,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
- if ( (incidence->type() == "Todo") &&
+ if ( (incidence->typeID() == todoID ) &&
( !((static_cast<Todo*>(incidence))->isCompleted()) &&
@@ -120,3 +120,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
if (cat.isEmpty()) {
- if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) )
+ if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) )
mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
@@ -126,3 +126,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
mBackgroundColor = *KOPrefs::instance()->categoryColor(cat);
- if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) {
+ if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) {
if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
@@ -361,3 +361,3 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
static const QPixmap overduePxmp = SmallIcon("redcross16");
- if ( mIncidence->type() == "Todo" ) {
+ if ( mIncidence->typeID() == todoID ) {
Todo* tempTodo = static_cast<Todo*>(mIncidence);
@@ -542,3 +542,3 @@ void KOAgendaItem::computeText()
mDisplayedText = mIncidence->summary();
- if ( (mIncidence->type() == "Todo") ) {
+ if ( (mIncidence->typeID() == todoID ) ) {
if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) {
@@ -574,3 +574,3 @@ void KOAgendaItem::computeText()
if ( !mIncidence->doesFloat() ) {
- if ( mIncidence->type() == "Event" ) {
+ if ( mIncidence->typeID() == eventID ) {
if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) {
@@ -584,3 +584,3 @@ void KOAgendaItem::computeText()
}
- else if ( mIncidence->type() == "Todo" ) {
+ else if ( mIncidence->typeID() == todoID ) {
if (mIncidence->hasStartDate())
@@ -590,3 +590,3 @@ void KOAgendaItem::computeText()
}
- } else if ( mIncidence->type() == "Todo" ) {
+ } else if ( mIncidence->typeID() == todoID ) {
if (mIncidence->hasStartDate())