korganizer

koeditorgeneraltodo.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 _KOEDITORGENERALTODO_H
00025 #define _KOEDITORGENERALTODO_H
00026 
00027 #include "koeditorgeneral.h"
00028 #include "koglobals.h"
00029 
00030 #include <qdatetime.h>
00031 
00032 class KRestrictedLine;
00033 
00034 class KDateEdit;
00035 class KTimeEdit;
00036 
00037 namespace KCal {
00038 class Todo;
00039 }
00040 using namespace KCal;
00041 
00042 class KOEditorGeneralTodo : public KOEditorGeneral
00043 {
00044     Q_OBJECT
00045   public:
00046     KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
00047     virtual ~KOEditorGeneralTodo();
00048 
00049     void initTime(QWidget *, QBoxLayout *);
00050     void initStatus(QWidget *, QBoxLayout *);
00051     void initCompletion(QWidget *, QBoxLayout *);
00052     void initPriority(QWidget *, QBoxLayout *);
00053 
00054     void finishSetup();
00055 
00057     void setDefaults( const QDateTime &due, bool allDay );
00059     void readTodo( Todo *todo, Calendar *calendar, const QDate &date );
00061     void writeTodo(Todo *);
00062 
00064     bool validateInput();
00065 
00066     void updateRecurrenceSummary( Todo *todo );
00067 
00069     void modified( Todo *todo, KOGlobals::HowChanged modification );
00070 
00071   signals:
00072     void dueDateEditToggle( bool );
00073     void dateTimeStrChanged( const QString & );
00074     void signalDateTimeChanged( const QDateTime &, const QDateTime & );
00075     void editRecurrence();
00076 
00077   protected slots:
00078     void completedChanged(int);
00079     void dateChanged();
00080     void startDateModified();
00081 
00082     void enableDueEdit( bool enable );
00083     void enableStartEdit( bool enable );
00084     void enableTimeEdits( bool enable );
00085     void showAlarm();
00086 
00087   protected:
00088     void setCompletedDate();
00089 
00090  private:
00091     bool                    mAlreadyComplete;
00092     bool                    mStartDateModified;
00093 
00094     KDateEdit               *mStartDateEdit;
00095     KTimeEdit               *mStartTimeEdit;
00096     QCheckBox               *mTimeButton;
00097     QCheckBox               *mDueCheck;
00098     KDateEdit               *mDueDateEdit;
00099     KTimeEdit               *mDueTimeEdit;
00100     QComboBox               *mCompletedCombo;
00101     QLabel                  *mCompletedLabel;
00102     QLabel                  *mPriorityLabel;
00103     QComboBox               *mPriorityCombo;
00104 
00105     KDateEdit               *mCompletionDateEdit;
00106     KTimeEdit               *mCompletionTimeEdit;
00107 
00108     QCheckBox               *mStartCheck;
00109 
00110     QDateTime mCompleted;
00111 };
00112 
00113 
00114 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys