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 KOEditorFreeBusy; 00033 00034 class SaveTemplateDialog; 00035 00036 class KOEditorFreeBusy; 00037 00038 namespace KCal { 00039 class Calendar; 00040 class Event; 00041 } 00042 using namespace KCal; 00043 00047 class KOEventEditor : public KOIncidenceEditor 00048 { 00049 Q_OBJECT 00050 public: 00054 KOEventEditor( Calendar *calendar, QWidget *parent ); 00055 virtual ~KOEventEditor(void); 00056 00057 void init(); 00059 void modified (int change=0); 00060 void reload(); 00061 00065 void newEvent(); 00066 00072 void setTexts( const QString &summary, const QString &description = QString::null ); 00076 void editIncidence( Incidence * ); 00077 00081 void setDates( const QDateTime &from, const QDateTime &to, bool allDay ); 00082 00087 void readEvent( Event *, bool tmpl = false ); 00091 void writeEvent( Event * ); 00092 00093 QObject *typeAheadReceiver() const; 00094 00095 signals: 00096 void focusReceivedSignal(); 00097 00098 protected slots: 00099 void loadDefaults(); 00100 void deleteEvent(); 00101 00102 void slotSaveTemplate( const QString & ); 00103 00104 protected: 00105 QString type() { return "Event"; } 00106 void setupGeneral(); 00107 void setupRecurrence(); 00108 void setupFreeBusy(); 00109 00111 bool validateInput(); 00114 bool processInput(); 00115 void processCancel(); 00116 int msgItemDelete(); 00117 void loadTemplate( /*const*/ CalendarLocal& ); 00118 QStringList& templates() const; 00119 00120 private: 00121 Event *mEvent; 00122 00123 KOEditorGeneralEvent *mGeneral; 00124 KOEditorRecurrence *mRecurrence; 00125 KOEditorFreeBusy *mFreeBusy; 00126 }; 00127 00128 #endif