korganizer Library API Documentation

kotodoeditor.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 1997, 1998 Preston Brown
00004     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef _KOTODOEDITOR_H
00025 #define _KOTODOEDITOR_H
00026 
00027 #include "koincidenceeditor.h"
00028 
00029 class QDateTime;
00030 class KOEditorGeneralTodo;
00031 class KOEditorRecurrence;
00035 class KOTodoEditor : public KOIncidenceEditor
00036 {
00037     Q_OBJECT
00038   public:
00042     KOTodoEditor( Calendar *calendar, QWidget *parent );
00043     virtual ~KOTodoEditor();
00044 
00045     void init();
00046 
00047     void reload();
00048 
00052     void newTodo(QDateTime due,Todo *relatedTodo=0,bool allDay=false);
00053 
00057     void newTodo( const QString & );
00061     void newTodo( const QString &summary, const QString &description,
00062                   const QString &attachment );
00066     void newTodo( const QString &summary, const QString &description,
00067                   const QString &attachment, const QStringList &attendees );
00068 
00070     void editIncidence(Incidence *);
00071 
00073     void setDefaults(QDateTime due,Todo *relatedTodo,bool allDay);
00075     void readTodo(Todo *);
00077     void writeTodo(Todo *);
00078 
00080     bool validateInput();
00083     bool processInput();
00084     void processCancel();
00085 
00087     void modified (int change=0);
00088 
00089   protected slots:
00090     void loadDefaults();
00091     void deleteTodo();
00092     void slotSaveTemplate( const QString & );
00093 
00094   protected:
00095     void loadTemplate( /*const*/ CalendarLocal& );
00096     QStringList& templates() const;
00097     QString type() { return "ToDo"; }
00098     void setupGeneral();
00099     void setupRecurrence();
00100     int msgItemDelete();
00101 
00102   private:
00103     Todo *mTodo;
00104 
00105     Todo *mRelatedTodo;
00106 
00107     KOEditorGeneralTodo *mGeneral;
00108     KOEditorRecurrence *mRecurrence;
00109 };
00110 
00111 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 2 09:56:05 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003