korganizer

kogroupware.h

00001 /*
00002   This file is part of the Groupware/KOrganizer integration.
00003 
00004   Requires the Qt and KDE widget libraries, available at no cost at
00005   http://www.trolltech.com and http://www.kde.org respectively
00006 
00007   Copyright (c) 2002-2004 Klarälvdalens Datakonsult AB
00008         <info@klaralvdalens-datakonsult.se>
00009 
00010   This program is free software; you can redistribute it and/or modify
00011   it under the terms of the GNU General Public License as published by
00012   the Free Software Foundation; either version 2 of the License, or
00013   (at your option) any later version.
00014 
00015   This program is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018   GNU General Public License for more details.
00019 
00020   You should have received a copy of the GNU General Public License
00021   along with this program; if not, write to the Free Software
00022   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00023   MA  02110-1301, USA.
00024 
00025   In addition, as a special exception, the copyright holders give
00026   permission to link the code of this program with any edition of
00027   the Qt library by Trolltech AS, Norway (or with modified versions
00028   of Qt that use the same license as Qt), and distribute linked
00029   combinations including the two.  You must obey the GNU General
00030   Public License in all respects for all of the code used other than
00031   Qt.  If you modify this file, you may extend this exception to
00032   your version of the file, but you are not obligated to do so.  If
00033   you do not wish to do so, delete this exception statement from
00034   your version.
00035 */
00036 
00037 #ifndef KOGROUPWARE_H
00038 #define KOGROUPWARE_H
00039 
00040 #include "koglobals.h"
00041 
00042 #include <libkcal/calendarresources.h>
00043 #include <libkcal/icalformat.h>
00044 #include <libkcal/scheduler.h>
00045 
00046 #include <kio/job.h>
00047 
00048 #include <qstring.h>
00049 
00050 using namespace KCal;
00051 
00052 namespace KCal {
00053 class Calendar;
00054 class Event;
00055 }
00056 class CalendarView;
00057 class FreeBusyManager;
00058 
00059 namespace KOrg {
00060 class IncidenceChangerBase;
00061 }
00062 
00063 using namespace KOrg;
00064 
00065 class KOGroupware : public QObject
00066 {
00067     Q_OBJECT
00068   public:
00069     static KOGroupware* create( CalendarView*, KCal::CalendarResources* );
00070     static KOGroupware* instance();
00071 
00072     FreeBusyManager *freeBusyManager();
00073 
00082     bool sendICalMessage( QWidget *parent, KCal::Scheduler::Method method,
00083                           Incidence* incidence,
00084                           KOGlobals::HowChanged action,
00085                           bool attendeeStatusChanged,
00086                           bool useLastDialogAnswer = false );
00087 
00093     void sendCounterProposal( KCal::Calendar* calendar, KCal::Event* oldEvent, KCal::Event *newEvent ) const;
00094 
00095     // convert the TNEF attachment to a vCard or iCalendar part
00096     QString msTNEFToVPart( const QByteArray& tnef );
00097 
00098     // DoNotNotify is a flag indicating that the user does not want
00099     // updates sent back to the organizer.
00100     void setDoNotNotify( bool notify ) { mDoNotNotify = notify; }
00101     bool doNotNotify() { return mDoNotNotify; }
00102 
00103   private slots:
00105     void incomingDirChanged( const QString& path );
00106 
00108     void slotViewNewIncidenceChanger( IncidenceChangerBase* changer );
00109 
00110     void initialCheckForChanges();
00111   protected:
00112     KOGroupware( CalendarView*, KCal::CalendarResources* );
00113 
00114   private:
00115     static KOGroupware *mInstance;
00116     KCal::ICalFormat mFormat;
00117     CalendarView *mView;
00118     KCal::CalendarResources *mCalendar;
00119     static FreeBusyManager *mFreeBusyManager;
00120     bool mDoNotNotify;
00121 
00125     int lastUsedDialogAnswer;
00126 };
00127 
00128 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys