korganizer Library API Documentation

incomingdialog.h

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 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
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:53:20 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003