From 2448916479b456ca7c880427a80e8e32e95b2fba Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 08 Jun 2005 10:56:24 +0000 Subject: more type API changes --- (limited to 'korganizer/koagendaview.cpp') diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1320a2e..b2b136a 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -581,7 +581,7 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) calendar()->addIncidence( inc ); if ( incOld ) { - if ( incOld->type() == "Todo" ) + if ( incOld->typeID() == todoID ) emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); else emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); @@ -967,7 +967,7 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) // qDebug("RESIZEBOTTOM "); // if ( type == KOAgenda::MOVE ) // qDebug("MOVE "); - if ( item->incidence()->type() == "Event" ) { + if ( item->incidence()->typeID() == eventID ) { startDt =item->incidence()->dtStart(); endDt = item->incidence()->dtEnd(); lenInSecs = startDt.secsTo( endDt ); @@ -975,7 +975,7 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); - if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { + if ( item->incidence()->typeID()== todoID && item->mLastMoveXPos > 0 ) { startDate = mSelectedDates[item->mLastMoveXPos]; } else { if (item->cellX() < 0) { @@ -991,7 +991,7 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) } else { if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) startDt.setTime(mAgenda->gyToTime(item->cellYTop())); - if ( item->incidence()->type() == "Event" ) { + if ( item->incidence()->typeID() == eventID ) { if ( type == KOAgenda::MOVE ) { endDt = startDt.addSecs(lenInSecs); @@ -1021,10 +1021,10 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) } } } - if ( item->incidence()->type() == "Event" ) { + if ( item->incidence()->typeID() == eventID ) { item->incidence()->setDtStart(startDt); (static_cast(item->incidence()))->setDtEnd(endDt); - } else if ( item->incidence()->type() == "Todo" ) { + } else if ( item->incidence()->typeID() == todoID ) { Todo* to = static_cast(item->incidence()); to->setDtDue(endDt); @@ -1038,7 +1038,7 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) item->incidence()->setRevision(item->incidence()->revision()+1); item->setItemDate(startDt.date()); //item->updateItem(); - if ( item->incidence()->type() == "Todo" ) { + if ( item->incidence()->typeID() == todoID ) { emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); } -- cgit v0.9.0.2