korganizer
koeditorgeneraljournal.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 00021 As a special exception, permission is given to link this program 00022 with any edition of Qt, and distribute the resulting executable, 00023 without including the source code for Qt in the source distribution. 00024 */ 00025 #ifndef KOEDITORGENERALJOURNAL_H 00026 #define KOEDITORGENERALJOURNAL_H 00027 00028 #include "koeditorgeneral.h" 00029 00030 #include <qobject.h> 00031 #include <qdatetime.h> 00032 00033 class KDateEdit; 00034 class KTimeEdit; 00035 class KTextEdit; 00036 class QLineEdit; 00037 class QLabel; 00038 class QBoxLayout; 00039 class QCheckBox; 00040 class QWidget; 00041 00042 namespace KCal { 00043 class Incidence; 00044 class Journal; 00045 } 00046 using namespace KCal; 00047 00048 class KOEditorGeneralJournal : public KOEditorGeneral 00049 { 00050 Q_OBJECT 00051 public: 00052 KOEditorGeneralJournal ( QWidget *parent=0, const char* name=0 ); 00053 virtual ~KOEditorGeneralJournal(); 00054 00055 void initDate( QWidget *, QBoxLayout * ); 00056 void initDescription( QWidget *, QBoxLayout * ); 00057 void initTitle( QWidget *parent, QBoxLayout *topLayout ); 00058 00060 void setDefaults( const QDate &date ); 00061 void setDate( const QDate &date ); 00062 void setTime( const QTime &time ); 00064 void readJournal( Journal *, bool tmpl = false ); 00066 void writeJournal( Journal * ); 00067 00069 bool validateInput(); 00070 00071 void setDescription( const QString &text ); 00072 void setSummary( const QString &text ); 00073 void finishSetup(); 00074 00075 protected: 00076 QLineEdit *mSummaryEdit; 00077 QLabel *mSummaryLabel; 00078 KTextEdit *mDescriptionEdit; 00079 QLabel *mDateLabel; 00080 KDateEdit *mDateEdit; 00081 QCheckBox *mTimeCheckBox; 00082 KTimeEdit *mTimeEdit; 00083 }; 00084 00085 #endif