summaryrefslogtreecommitdiffabout
path: root/korganizer/incomingdialog.cpp
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 /korganizer/incomingdialog.cpp
parent793d117812b4da36c9c11d90cccba347cbc6e208 (diff)
downloadkdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.zip
kdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.tar.gz
kdepimpi-2448916479b456ca7c880427a80e8e32e95b2fba.tar.bz2
more type API changes
Diffstat (limited to 'korganizer/incomingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/incomingdialog.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index 50e3077..fe78356 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -175,13 +175,13 @@ void IncomingDialog::retrieve()
for(message = messages.first();message;message = messages.next()) {
IncidenceBase *inc = message->event();
Scheduler::Method method = (Scheduler::Method)message->method();
ScheduleMessage::Status status = message->status();
ScheduleItemIn *item = new ScheduleItemIn(mMessageListView,inc,method,status);
- if(inc->type()!="FreeBusy") {
+ if(inc->typeID() != freebusyID ) {
Incidence *incidence = static_cast<Incidence *>(inc);
ScheduleItemVisitor v(item);
if (!incidence->accept(v)) delete item;
} else {
FreeBusy *fb = static_cast<FreeBusy *>(item->event());
item->setText(0, "FreeBusy");
@@ -252,13 +252,13 @@ void IncomingDialog::rejectMessage()
}
}
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);
KOEventViewerDialog *eventViewer = new KOEventViewerDialog(this);
eventViewer->setEvent(event);
eventViewer->show();
}
}
@@ -287,13 +287,13 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
}
bool IncomingDialog::incomeCounter(ScheduleItemIn *item)
{
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
// currently only events supportet - attetion at insertion below!
- if ( incidence->type() != "Event" ) return false;
+ if ( incidence->typeID() != eventID ) return false;
Event *counterEvent = static_cast<Event *>( incidence );
Event *even = mCalendar->event(counterEvent->uid());
KOCounterDialog *eventViewer = new KOCounterDialog(this);
@@ -365,13 +365,13 @@ bool IncomingDialog::incomeDeclineCounter(ScheduleItemIn *item)
return false;
}
bool IncomingDialog::incomeAdd(ScheduleItemIn *item)
{
IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
- if (incidence->type() == "Event" ) {
+ if (incidence->typeID() == eventID ) {
Event *refr = static_cast<Event *>( incidence );
mOutgoing->addMessage(refr,Scheduler::Refresh);
mScheduler->deleteTransaction( incidence );
delete item;
emit numMessagesChanged(mMessageListView->childCount());
return true;
@@ -399,13 +399,13 @@ bool IncomingDialog::incomeDefault(ScheduleItemIn *item)
}
return false;
}
bool IncomingDialog::incomeRequest(ScheduleItemIn *item)
{
- if (item->event()->type()=="FreeBusy") {
+ if (item->event()->typeID() == freebusyID ) {
//handel freebusy request
IncidenceBase *inc = item->event();
QDateTime start = inc->dtStart();
QDateTime end = start.addDays(inc->duration()/86400);
FreeBusy *freebusy = new FreeBusy(mCalendar, start, end);
@@ -434,13 +434,13 @@ bool IncomingDialog::incomeRequest(ScheduleItemIn *item)
bool IncomingDialog::automaticAction(ScheduleItemIn *item)
{
bool autoAction = false;
IncidenceBase *inc = item->event();
Scheduler::Method method = item->method();
- if( inc->type()=="FreeBusy" ) {
+ if( inc->typeID() == freebusyID ) {
if ( method==Scheduler::Request ) {
if ( KOPrefs::instance()->mIMIPAutoFreeBusy==KOPrefs::addressbookAuto ) {
// reply freebusy information
if ( checkOrganizerInAddressbook(inc->organizer()) ) {
incomeRequest(item);
}
@@ -462,13 +462,13 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item)
}
} else return false;
}
}
}
- if ( inc->type()=="Event" ) {
+ if ( inc->typeID() == eventID ) {
if ( method==Scheduler::Request || method==Scheduler::Publish ) {
if ( KOPrefs::instance()->mIMIPAutoInsertRequest==KOPrefs::addressbookAuto ) {
// insert event
if ( checkOrganizerInAddressbook(inc->organizer()) )
autoAction = acceptMessage(item);
} else return false;