korganizer
koeventeditor.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 00021 As a special exception, permission is given to link this program 00022 with any edition of Qt, and distribute the resulting executable, 00023 without including the source code for Qt in the source distribution. 00024 */ 00025 #ifndef KOEVENTEDITOR_H 00026 #define KOEVENTEDITOR_H 00027 00028 #include "koincidenceeditor.h" 00029 00030 class KOEditorGeneralEvent; 00031 class KOEditorRecurrence; 00032 class KOEditorRecurrenceDialog; 00033 class KOEditorFreeBusy; 00034 00035 class SaveTemplateDialog; 00036 00037 class KOEditorFreeBusy; 00038 00039 namespace KCal { 00040 class Calendar; 00041 class Event; 00042 } 00043 using namespace KCal; 00044 00048 class KOEventEditor : public KOIncidenceEditor 00049 { 00050 Q_OBJECT 00051 public: 00055 KOEventEditor( Calendar *calendar, QWidget *parent ); 00056 virtual ~KOEventEditor(void); 00057 00058 void init(); 00060 void modified(); 00061 void reload(); 00062 00066 void newEvent(); 00067 00073 void setTexts( const QString &summary, const QString &description = QString::null ); 00077 void editIncidence( Incidence *incidence, const QDate &date, Calendar *calendar ); 00078 00082 void setDates( const QDateTime &from, const QDateTime &to, bool allDay ); 00083 00088 void readEvent( Event *event, Calendar *calendar, const QDate &date, bool tmpl = false ); 00092 void writeEvent( Event * ); 00093 00094 QObject *typeAheadReceiver() const; 00095 00096 void selectInvitationCounterProposal( bool enable ); 00097 00098 signals: 00099 void focusReceivedSignal(); 00100 00101 protected slots: 00102 void loadDefaults(); 00103 void deleteEvent(); 00104 00105 void slotSaveTemplate( const QString & ); 00106 void updateRecurrenceSummary(); 00107 00108 protected: 00109 QString type() { return "Event"; } 00110 void setupGeneral(); 00111 void setupRecurrence(); 00112 void setupFreeBusy(); 00113 00115 bool validateInput(); 00118 bool processInput(); 00119 void processCancel(); 00120 int msgItemDelete(); 00121 void loadTemplate( /*const*/ CalendarLocal& ); 00122 QStringList& templates() const; 00123 00124 private: 00125 Event *mEvent; 00126 Calendar* mCalendar; 00127 00128 KOEditorGeneralEvent *mGeneral; 00129 KOEditorRecurrenceDialog *mRecurrenceDialog; 00130 KOEditorRecurrence *mRecurrence; 00131 KOEditorFreeBusy *mFreeBusy; 00132 }; 00133 00134 #endif