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., 675 Mass Ave, Cambridge, MA 02139, 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 
00058     void editTodo(Todo *);
00059 
00061     void setDefaults(QDateTime due,Todo *relatedTodo,bool allDay);
00063     void readTodo(Todo *);
00065     void writeTodo(Todo *);
00066 
00068     bool validateInput();
00071     bool processInput();
00072 
00074     void modified (int);
00075 
00076   signals:
00077     void todoChanged(Todo *);
00078     void todoAdded(Todo *);
00079     void todoToBeDeleted(Todo *);
00080     void todoDeleted();
00081 
00082   protected slots:
00083     void loadDefaults();
00084     void deleteTodo();
00085 
00086     void slotLoadTemplate();  
00087     void slotSaveTemplate();
00088     void saveTemplate( const QString & );
00089   
00090   protected:
00091     void setupGeneral();
00092     int msgItemDelete();
00093 
00094   private:  
00095     Todo *mTodo;
00096     
00097     Todo *mRelatedTodo;
00098 
00099     KOEditorGeneralTodo *mGeneral;
00100 };
00101 
00102 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:10 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001