summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-08 10:56:24 (UTC)
committer zautrix <zautrix>2005-06-08 10:56:24 (UTC)
commit2448916479b456ca7c880427a80e8e32e95b2fba (patch) (side-by-side diff)
tree83be907f0eccb43ffc44a7f1bc07995c32760cb5
parent793d117812b4da36c9c11d90cccba347cbc6e208 (diff)
downloadkdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.zip
kdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.tar.gz
kdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.tar.bz2
more type API changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/incomingdialog.cpp14
-rw-r--r--korganizer/koagendaview.cpp14
-rw-r--r--korganizer/koeditorrecurrence.cpp2
-rw-r--r--korganizer/koeventviewerdialog.cpp12
-rw-r--r--korganizer/komonthview.cpp4
-rw-r--r--korganizer/outgoingdialog.cpp12
-rw-r--r--libkcal/alarm.cpp4
7 files changed, 31 insertions, 31 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index 50e3077..fe78356 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -180,3 +180,3 @@ void IncomingDialog::retrieve()
ScheduleItemIn *item = new ScheduleItemIn(mMessageListView,inc,method,status);
- if(inc->type()!="FreeBusy") {
+ if(inc->typeID() != freebusyID ) {
Incidence *incidence = static_cast<Incidence *>(inc);
@@ -257,3 +257,3 @@ void IncomingDialog::showEvent(QListViewItem *item)
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
- if( incidence && incidence->type() == "Event" ) {
+ if( incidence && incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>(incidence);
@@ -292,3 +292,3 @@ bool IncomingDialog::incomeCounter(ScheduleItemIn *item)
// currently only events supportet - attetion at insertion below!
- if ( incidence->type() != "Event" ) return false;
+ if ( incidence->typeID() != eventID ) return false;
@@ -370,3 +370,3 @@ bool IncomingDialog::incomeAdd(ScheduleItemIn *item)
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
- if (incidence->type() == "Event" ) {
+ if (incidence->typeID() == eventID ) {
Event *refr = static_cast<Event *>( incidence );
@@ -404,3 +404,3 @@ bool IncomingDialog::incomeRequest(ScheduleItemIn *item)
{
- if (item->event()->type()=="FreeBusy") {
+ if (item->event()->typeID() == freebusyID ) {
//handel freebusy request
@@ -439,3 +439,3 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item)
- if( inc->type()=="FreeBusy" ) {
+ if( inc->typeID() == freebusyID ) {
if ( method==Scheduler::Request ) {
@@ -467,3 +467,3 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item)
- if ( inc->type()=="Event" ) {
+ if ( inc->typeID() == eventID ) {
if ( method==Scheduler::Request || method==Scheduler::Publish ) {
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 1320a2e..b2b136a 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -583,3 +583,3 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld )
if ( incOld ) {
- if ( incOld->type() == "Todo" )
+ if ( incOld->typeID() == todoID )
emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED );
@@ -969,3 +969,3 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
// qDebug("MOVE ");
- if ( item->incidence()->type() == "Event" ) {
+ if ( item->incidence()->typeID() == eventID ) {
startDt =item->incidence()->dtStart();
@@ -977,3 +977,3 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
- if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) {
+ if ( item->incidence()->typeID()== todoID && item->mLastMoveXPos > 0 ) {
startDate = mSelectedDates[item->mLastMoveXPos];
@@ -993,3 +993,3 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
startDt.setTime(mAgenda->gyToTime(item->cellYTop()));
- if ( item->incidence()->type() == "Event" ) {
+ if ( item->incidence()->typeID() == eventID ) {
if ( type == KOAgenda::MOVE ) {
@@ -1023,6 +1023,6 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
}
- if ( item->incidence()->type() == "Event" ) {
+ if ( item->incidence()->typeID() == eventID ) {
item->incidence()->setDtStart(startDt);
(static_cast<Event*>(item->incidence()))->setDtEnd(endDt);
- } else if ( item->incidence()->type() == "Todo" ) {
+ } else if ( item->incidence()->typeID() == todoID ) {
Todo* to = static_cast<Todo*>(item->incidence());
@@ -1040,3 +1040,3 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
//item->updateItem();
- if ( item->incidence()->type() == "Todo" ) {
+ if ( item->incidence()->typeID() == todoID ) {
emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED );
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index e165017..dea8981 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -873,3 +873,3 @@ void KOEditorRecurrence::readEvent(Incidence *event)
QDateTime dtEnd;
- if ( event->type() == "Event" )
+ if ( event->typeID() == eventID )
dtEnd = ((Event*)event)->dtEnd();
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index e5ff8af..02f13c7 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -150,7 +150,7 @@ void KOEventViewerDialog::setIncidence(Incidence *in )
{
- if ( in->type() == "Event" )
+ if ( in->typeID() == eventID )
setEvent( (Event*) in );
- else if ( in->type() =="Todo" )
+ else if ( in->typeID() == todoID )
setTodo( (Todo*) in );
- else if ( in->type() =="Journal" )
+ else if ( in->typeID() == journalID )
setJournal( (Journal*) in );
@@ -159,7 +159,7 @@ void KOEventViewerDialog::addIncidence(Incidence *in)
{
- if ( in->type() == "Event" )
+ if ( in->typeID() == eventID )
addEvent( (Event*) in );
- else if ( in->type() =="Todo" )
+ else if ( in->typeID() == todoID )
mEventViewer->setTodo( (Todo*) in, false );
- else if ( in->type() =="Journal" )
+ else if ( in->typeID() == journalID )
mEventViewer->setJournal( (Journal*) in, false );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 678cab6..c868270 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -384,3 +384,3 @@ void MonthViewItem::paint(QPainter *p)
- if ( mIncidence->type() == "Todo" ){
+ if ( mIncidence->typeID() == todoID ){
Todo* td = ( Todo* ) mIncidence;
@@ -1945,3 +1945,3 @@ void KOMonthView::showContextMenu( Incidence *incidence )
/*
- if( incidence && incidence->type() == "Event" ) {
+ if( incidence && incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>(incidence);
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 0fc90c4..7253c8e 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -57,3 +57,3 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
//Set the summary
- if(ev->type() != "FreeBusy") {
+ if(ev->typeID() != freebusyID ) {
Incidence *incidence = static_cast<Incidence *>(ev);
@@ -66,3 +66,3 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
//If the object is an event
- if(ev->type()=="Event") {
+ if(ev->typeID()== eventID ) {
Event *event = static_cast<Event *>(ev);
@@ -90,3 +90,3 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
//If the object is an Todo
- if(ev->type()=="Todo") {
+ if(ev->typeID() == todoID ) {
Todo *event = static_cast<Todo *>(ev);
@@ -108,3 +108,3 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
//If the object is a freebusy object
- if(ev->type() == "FreeBusy") {
+ if(ev->typeID() == freebusyID ) {
FreeBusy *freebusy = static_cast<FreeBusy *>(ev);
@@ -243,6 +243,6 @@ void OutgoingDialog::showEvent(QListViewItem *qitem)
Todo *todo = 0;
- if ( item->event()->type()=="Event" ) {
+ if ( item->event()->typeID() == eventID ) {
event = static_cast<Event *>(item->event());
}
- if ( item->event()->type()=="Todo" ) {
+ if ( item->event()->typeID() == todoID ) {
todo = static_cast<Todo *>(item->event());
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index 6de1566..0afa0a7 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -340,3 +340,3 @@ int Alarm::offset()
if ( hasTime() ) {
- if (mParent->type()=="Todo") {
+ if (mParent->typeID() == todoID ) {
Todo *t = static_cast<Todo*>(mParent);
@@ -383,3 +383,3 @@ QDateTime Alarm::time() const
{
- if (mParent->type()=="Todo") {
+ if (mParent->typeID() == todoID ) {
Todo *t = static_cast<Todo*>(mParent);