korganizer

kogroupware.h
1/*
2 This file is part of the Groupware/KOrganizer integration.
3
4 Requires the TQt and KDE widget libraries, available at no cost at
5 http://www.trolltech.com and http://www.kde.org respectively
6
7 Copyright (c) 2002-2004 Klarälvdalens Datakonsult AB
8 <info@klaralvdalens-datakonsult.se>
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 MA 02110-1301, USA.
24
25 In addition, as a special exception, the copyright holders give
26 permission to link the code of this program with any edition of
27 the TQt library by Trolltech AS, Norway (or with modified versions
28 of TQt that use the same license as TQt), and distribute linked
29 combinations including the two. You must obey the GNU General
30 Public License in all respects for all of the code used other than
31 TQt. If you modify this file, you may extend this exception to
32 your version of the file, but you are not obligated to do so. If
33 you do not wish to do so, delete this exception statement from
34 your version.
35*/
36
37#ifndef KOGROUPWARE_H
38#define KOGROUPWARE_H
39
40#include "koglobals.h"
41
43#include <libkcal/icalformat.h>
44#include <libkcal/scheduler.h>
45
46#include <tdeio/job.h>
47
48#include <tqstring.h>
49
50using namespace KCal;
51
52namespace KCal {
53class Calendar;
54class Event;
55}
56class CalendarView;
57class FreeBusyManager;
58
59namespace KOrg {
60class IncidenceChangerBase;
61}
62
63using namespace KOrg;
64
65class KOGroupware : public TQObject
66{
67 TQ_OBJECT
68
69 public:
70 static KOGroupware* create( CalendarView*, KCal::CalendarResources* );
71 static KOGroupware* instance();
72
73 FreeBusyManager *freeBusyManager();
74
79 bool sendICalMessage( TQWidget *parent, KCal::Scheduler::Method method,
80 Incidence* incidence,
81 KOGlobals::HowChanged action,
82 bool attendeeStatusChanged,
83 int dontAskForGroupware = 0 );
84
90 void sendCounterProposal( KCal::Calendar* calendar, KCal::Event* oldEvent, KCal::Event *newEvent ) const;
91
92 // convert the TNEF attachment to a vCard or iCalendar part
93 TQString msTNEFToVPart( const TQByteArray& tnef );
94
95 // DoNotNotify is a flag indicating that the user does not want
96 // updates sent back to the organizer.
97 void setDoNotNotify( bool notify ) { mDoNotNotify = notify; }
98 bool doNotNotify() { return mDoNotNotify; }
99
100 private slots:
102 void incomingDirChanged( const TQString& path );
103
105 void slotViewNewIncidenceChanger( IncidenceChangerBase* changer );
106
107 void initialCheckForChanges();
108 protected:
109 KOGroupware( CalendarView*, KCal::CalendarResources* );
110
111 private:
112 static KOGroupware *mInstance;
113 KCal::ICalFormat mFormat;
114 CalendarView *mView;
115 KCal::CalendarResources *mCalendar;
116 static FreeBusyManager *mFreeBusyManager;
117 bool mDoNotNotify;
118};
119
120#endif
This is the main calendar widget.
Definition: calendarview.h:82