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 <libkcal/calendar.h>
00028 
00029 #include "koeditorgeneraltodo.h"
00030 #include "koeditordetails.h"
00031 #include "koincidenceeditor.h"
00032 
00033 class QDateTime;
00034 
00038 class KOTodoEditor : public KOIncidenceEditor
00039 {
00040     Q_OBJECT
00041   public:
00045     KOTodoEditor( Calendar *calendar, QWidget *parent );
00046     virtual ~KOTodoEditor();
00047 
00048     void init();
00049   
00050     void reload();
00051 
00055     void newTodo(QDateTime due,Todo *relatedTodo=0,bool allDay=false);
00056 
00060     void newTodo( const QString & );
00064     void newTodo( const QString &summary, const QString &description,
00065                   const QString &attachment );
00066 
00068     void editTodo(Todo *);
00069 
00071     void setDefaults(QDateTime due,Todo *relatedTodo,bool allDay);
00073     void readTodo(Todo *);
00075     void writeTodo(Todo *);
00076 
00078     bool validateInput();
00081     bool processInput();
00082     void processCancel();
00083 
00085     void modified (int);
00086 
00087   signals:
00088     void todoChanged( Todo *oldTodo, Todo *newTodo );
00089     void todoAdded( Todo * );
00090     void todoToBeDeleted( Todo * );
00091     void todoDeleted();
00092 
00093   protected slots:
00094     void loadDefaults();
00095     void deleteTodo();
00096 
00097     void slotLoadTemplate();  
00098     void saveTemplate( const QString & );
00099   
00100   protected:
00101     QString type() { return "ToDo"; }
00102     void setupGeneral();
00103     int msgItemDelete();
00104 
00105   private:  
00106     Todo *mTodo;
00107     
00108     Todo *mRelatedTodo;
00109 
00110     KOEditorGeneralTodo *mGeneral;
00111 };
00112 
00113 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:30 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003