korganizer

koeventeditor.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 #ifndef KOEVENTEDITOR_H
26 #define KOEVENTEDITOR_H
27 
28 #include "koincidenceeditor.h"
29 
30 class KOEditorGeneralEvent;
31 class KOEditorRecurrence;
32 class KOEditorRecurrenceDialog;
33 class KOEditorFreeBusy;
34 
35 class SaveTemplateDialog;
36 
37 class KOEditorFreeBusy;
38 
39 namespace KCal {
40 class Calendar;
41 class Event;
42 }
43 using namespace KCal;
44 
49 {
50  TQ_OBJECT
51 
52  public:
56  KOEventEditor( Calendar *calendar, TQWidget *parent );
57  virtual ~KOEventEditor(void);
58 
59  void init();
61  void modified();
62  void reload();
63 
67  void newEvent();
68 
74  void setTexts( const TQString &summary, const TQString &description = TQString() );
78  void editIncidence( Incidence *incidence, const TQDate &date, Calendar *calendar );
79 
83  void setDates( const TQDateTime &from, const TQDateTime &to, bool allDay );
84 
89  void readEvent( Event *event, Calendar *calendar, const TQDate &date, bool tmpl = false );
93  void writeEvent( Event * );
94 
95  TQObject *typeAheadReceiver() const;
96 
97  void selectInvitationCounterProposal( bool enable );
98 
99  signals:
100  void focusReceivedSignal();
101 
102  protected slots:
103  void loadDefaults();
104  void deleteEvent();
105 
106  void slotSaveTemplate( const TQString & );
107  void updateRecurrenceSummary();
108 
109  protected:
110  TQString type() { return "Event"; }
111  void setupGeneral();
112  void setupRecurrence();
113  void setupFreeBusy();
114 
116  bool validateInput();
119  bool processInput();
120  void processCancel();
121  int msgItemDelete();
122  void loadTemplate( /*const*/ CalendarLocal& );
123  TQStringList& templates() const;
124 
125  private:
126  Event *mEvent;
127  Calendar* mCalendar;
128 
129  KOEditorGeneralEvent *mGeneral;
130  KOEditorRecurrenceDialog *mRecurrenceDialog;
131  KOEditorRecurrence *mRecurrence;
132  KOEditorFreeBusy *mFreeBusy;
133 };
134 
135 #endif
This class provides a dialog for editing an event.
Definition: koeventeditor.h:49
This is the base class for the calendar component editors.