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
30class KOEditorGeneralEvent;
31class KOEditorRecurrence;
32class KOEditorRecurrenceDialog;
33class KOEditorFreeBusy;
34
35class SaveTemplateDialog;
36
37class KOEditorFreeBusy;
38
39namespace KCal {
40class Calendar;
41class Event;
42}
43using 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
bool validateInput()
Check if the input is valid.
void modified()
This event has been modified externally.
void setDates(const TQDateTime &from, const TQDateTime &to, bool allDay)
Set widgets to the given date/time values.
void writeEvent(Event *)
Write event settings to event object.
void init()
Initialize editor.
void setTexts(const TQString &summary, const TQString &description=TQString())
Sets the given summary and description.
bool processInput()
Process user input and create or update event.
void readEvent(Event *event, Calendar *calendar, const TQDate &date, bool tmpl=false)
Read event object and setup widgets accordingly.
KOEventEditor(Calendar *calendar, TQWidget *parent)
Construct new event editor.
void newEvent()
Clear event win for new event.
void editIncidence(Incidence *incidence, const TQDate &date, Calendar *calendar)
Edit an existing event.
This is the base class for the calendar component editors.