incomingdialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef INCOMINGDIALOG_H
00025 #define INCOMINGDIALOG_H
00026
00027 #include <qlistview.h>
00028
00029 #include <libkcal/incidence.h>
00030 #include <libkcal/scheduler.h>
00031
00032 #include "incomingdialog_base.h"
00033 #include "outgoingdialog.h"
00034
00035 using namespace KCal;
00036
00037 class ScheduleItemIn : public QListViewItem
00038 {
00039 public:
00040 ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method,
00041 ScheduleMessage::Status status);
00042 virtual ~ScheduleItemIn() {}
00043
00044 IncidenceBase *event() { return mIncidence; }
00045 Scheduler::Method method() { return mMethod; }
00046 ScheduleMessage::Status status() { return mStatus; }
00047
00048 private:
00049 IncidenceBase *mIncidence;
00050 Scheduler::Method mMethod;
00051 ScheduleMessage::Status mStatus;
00052 };
00053
00054
00059 class ScheduleItemVisitor : public Incidence::Visitor
00060 {
00061 public:
00062 ScheduleItemVisitor(ScheduleItemIn *);
00063 ~ScheduleItemVisitor();
00064
00065 bool visit(Event *);
00066 bool visit(Todo *);
00067 bool visit(Journal *);
00068
00069 private:
00070 ScheduleItemIn *mItem;
00071 };
00072
00073
00074
00075 class IncomingDialog : public IncomingDialog_base
00076 {
00077 Q_OBJECT
00078 public:
00079 IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
00080 QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0);
00081 ~IncomingDialog();
00082
00083 void setOutgoingDialog(OutgoingDialog *outgoing);
00084
00085 signals:
00086 void calendarUpdated();
00087 void numMessagesChanged(int);
00088 public slots:
00089 void retrieve();
00090
00091 protected slots:
00092 void acceptAllMessages();
00093 void acceptMessage();
00094 void rejectMessage();
00095 void showEvent(QListViewItem *);
00096 void updateActions();
00097
00098 protected:
00099 bool acceptMessage(ScheduleItemIn *item);
00100 bool incomeRefresh(ScheduleItemIn *item);
00101 bool incomeCounter(ScheduleItemIn *item);
00102 bool incomeDeclineCounter(ScheduleItemIn *item);
00103 bool incomeAdd(ScheduleItemIn *item);
00104 bool incomeRequest(ScheduleItemIn *item);
00105 bool incomeDefault(ScheduleItemIn *item);
00106 bool automaticAction(ScheduleItemIn *item);
00107
00108 private:
00109 bool checkAttendeesInAddressbook(IncidenceBase *inc);
00110 bool checkOrganizerInAddressbook(QString organizer);
00111 Calendar *mCalendar;
00112 Scheduler *mScheduler;
00113 OutgoingDialog *mOutgoing;
00114 };
00115
00116 #endif // INCOMINGDIALOG_H
This file is part of the documentation for korganizer Library Version 3.3.2.