korganizer

kotodoeditor.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 1997, 1998 Preston Brown <pbrown@kde.org>
00005     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00006     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 #ifndef _KOTODOEDITOR_H
00027 #define _KOTODOEDITOR_H
00028 
00029 #include "koincidenceeditor.h"
00030 
00031 class QDateTime;
00032 class KOEditorGeneralTodo;
00033 class KOEditorRecurrence;
00037 class KOTodoEditor : public KOIncidenceEditor
00038 {
00039     Q_OBJECT
00040   public:
00044     KOTodoEditor( Calendar *calendar, QWidget *parent );
00045     virtual ~KOTodoEditor();
00046 
00047     void init();
00048 
00049     void reload();
00050 
00054     void newTodo();
00055 
00061     void setTexts( const QString &summary, const QString &description = QString::null );
00063     void editIncidence(Incidence *);
00064 
00066     void setDates( const QDateTime &due, bool allDay = true, Todo *relatedTodo = 0 );
00068     void readTodo(Todo *);
00070     void writeTodo(Todo *);
00071 
00073     bool validateInput();
00076     bool processInput();
00077 
00079     void modified (int change=0);
00080 
00081   protected slots:
00082     void loadDefaults();
00083     void deleteTodo();
00084     void slotSaveTemplate( const QString & );
00085 
00086   protected:
00087     void loadTemplate( /*const*/ CalendarLocal& );
00088     QStringList& templates() const;
00089     QString type() { return "Todo"; }
00090     void setupGeneral();
00091     void setupRecurrence();
00092     int msgItemDelete();
00093 
00094   private:
00095     Todo *mTodo;
00096 
00097     Todo *mRelatedTodo;
00098 
00099     KOEditorGeneralTodo *mGeneral;
00100     KOEditorRecurrence *mRecurrence;
00101 };
00102 
00103 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys