korganizer Library API Documentation

incomingdialog.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 */
00019 #ifndef INCOMINGDIALOG_H
00020 #define INCOMINGDIALOG_H
00021 
00022 #include <qlistview.h>
00023 
00024 #include <libkcal/calendar.h>
00025 #include <libkcal/scheduler.h>
00026 
00027 #include "incomingdialog_base.h"
00028 #include "outgoingdialog.h"
00029 
00030 using namespace KCal;
00031 
00032 class ScheduleItemIn : public QListViewItem
00033 {
00034   public:
00035     ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method,
00036                    ScheduleMessage::Status status);
00037     virtual ~ScheduleItemIn() {}
00038 
00039     IncidenceBase *event() { return mIncidence; }
00040     Scheduler::Method method() { return mMethod; }
00041     ScheduleMessage::Status status() { return mStatus; }
00042 
00043   private:
00044     IncidenceBase *mIncidence;
00045     Scheduler::Method mMethod;
00046     ScheduleMessage::Status mStatus;
00047 };
00048 
00049 
00054 class ScheduleItemVisitor : public Incidence::Visitor
00055 {
00056   public:
00057     ScheduleItemVisitor(ScheduleItemIn *);
00058     ~ScheduleItemVisitor();
00059 
00060     bool visit(Event *);
00061     bool visit(Todo *);
00062     bool visit(Journal *);
00063 
00064   private:
00065     ScheduleItemIn *mItem;
00066 };
00067 
00068 
00069 
00070 class IncomingDialog : public IncomingDialog_base
00071 {
00072     Q_OBJECT
00073   public:
00074     IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
00075             QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0);
00076     ~IncomingDialog();
00077     
00078     void setOutgoingDialog(OutgoingDialog *outgoing);
00079 
00080   signals:
00081     void calendarUpdated();
00082     void numMessagesChanged(int);
00083   public slots:
00084     void retrieve();
00085     
00086   protected slots:
00087     void acceptAllMessages();
00088     void acceptMessage();
00089     void rejectMessage();
00090     void showEvent(QListViewItem *);
00091 
00092   protected:
00093     bool acceptMessage(ScheduleItemIn *item);
00094     bool incomeRefresh(ScheduleItemIn *item);
00095     bool incomeCounter(ScheduleItemIn *item);
00096     bool incomeDeclineCounter(ScheduleItemIn *item);
00097     bool incomeAdd(ScheduleItemIn *item);
00098     bool incomeRequest(ScheduleItemIn *item);
00099     bool incomeDefault(ScheduleItemIn *item);
00100     bool automaticAction(ScheduleItemIn *item);
00101 
00102   private:
00103     bool checkAttendeesInAddressbook(IncidenceBase *inc);
00104     bool checkOrganizerInAddressbook(QString organizer);
00105     Calendar *mCalendar;
00106     Scheduler *mScheduler;
00107     OutgoingDialog *mOutgoing;
00108 };
00109 
00110 #endif // INCOMINGDIALOG_H
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:27 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003