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 TQt, and distribute the resulting executable,
00023     without including the source code for TQt in the source distribution.
00024 */
00025 #ifndef KOEDITORGENERALJOURNAL_H
00026 #define KOEDITORGENERALJOURNAL_H
00027 
00028 #include "koeditorgeneral.h"
00029 
00030 #include <tqobject.h>
00031 #include <tqdatetime.h>
00032 
00033 class KDateEdit;
00034 class KTimeEdit;
00035 class KTextEdit;
00036 class TQLineEdit;
00037 class TQLabel;
00038 class TQBoxLayout;
00039 class TQCheckBox;
00040 class TQWidget;
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   
00052   public:
00053     KOEditorGeneralJournal ( TQWidget *parent=0, const char* name=0 );
00054     virtual ~KOEditorGeneralJournal();
00055 
00056     void initDate( TQWidget *, TQBoxLayout * );
00057     void initDescription( TQWidget *, TQBoxLayout * );
00058     void initTitle( TQWidget *parent, TQBoxLayout *topLayout );
00059 
00061     void setDefaults( const TQDate &date );
00062     void setDate( const TQDate &date );
00063     void setTime( const TQTime &time );
00065     void readJournal( Journal *, const TQDate &, bool tmpl = false );
00067     void writeJournal( Journal * );
00068 
00070     bool validateInput();
00071 
00072     void setDescription( const TQString &text );
00073     void setSummary( const TQString &text );
00074     void finishSetup();
00075 
00076   protected:
00077     TQLineEdit  *mSummaryEdit;
00078     TQLabel     *mSummaryLabel;
00079     KTextEdit  *mDescriptionEdit;
00080     TQLabel     *mDateLabel;
00081     KDateEdit  *mDateEdit;
00082     TQCheckBox  *mTimeCheckBox;
00083     KTimeEdit  *mTimeEdit;
00084 };
00085 
00086 #endif