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 <qdatetime.h>
00029 
00030 class KRestrictedLine;
00031 
00032 class KDateEdit;
00033 class KTimeEdit;
00034 
00035 namespace KCal {
00036 class Todo;
00037 }
00038 using namespace KCal;
00039 
00040 class KOEditorGeneralTodo : public KOEditorGeneral
00041 {
00042     Q_OBJECT
00043   public:
00044     KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
00045     virtual ~KOEditorGeneralTodo();
00046 
00047     void initTime(QWidget *, QBoxLayout *);
00048     void initStatus(QWidget *, QBoxLayout *);
00049     void initCompletion(QWidget *, QBoxLayout *);
00050     void initPriority(QWidget *, QBoxLayout *);
00051 
00052     void finishSetup();
00053 
00055     void setDefaults( const QDateTime &due, bool allDay );
00057     void readTodo(Todo *);
00059     void writeTodo(Todo *);
00060 
00062     bool validateInput();
00063 
00065     void modified (Todo*, int);
00066 
00067   signals:
00068     void dueDateEditToggle( bool );
00069     void dateTimeStrChanged( const QString & );
00070     void signalDateTimeChanged( const QDateTime &, const QDateTime & );
00071 
00072   protected slots:
00073     void completedChanged(int);
00074     void dateChanged();
00075     void startDateModified();
00076 
00077     void enableDueEdit( bool enable );
00078     void enableStartEdit( bool enable );
00079     void enableTimeEdits( bool enable );
00080     void showAlarm();
00081 
00082   protected:
00083     void setCompletedDate();
00084 
00085  private:
00086     bool                    mAlreadyComplete;
00087     bool                    mStartDateModified;
00088 
00089     KDateEdit               *mStartDateEdit;
00090     KTimeEdit               *mStartTimeEdit;
00091     QCheckBox               *mTimeButton;
00092     QCheckBox               *mDueCheck;
00093     KDateEdit               *mDueDateEdit;
00094     KTimeEdit               *mDueTimeEdit;
00095     QComboBox               *mCompletedCombo;
00096     QLabel                  *mCompletedLabel;
00097     QLabel                  *mPriorityLabel;
00098     QComboBox               *mPriorityCombo;
00099     
00100     KDateEdit               *mCompletionDateEdit;
00101     KTimeEdit               *mCompletionTimeEdit;
00102 
00103     QCheckBox               *mStartCheck;
00104 
00105     QDateTime mCompleted;
00106 };
00107 
00108 
00109 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys