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 <qobject.h>
00029 #include <qdatetime.h>
00030 
00031 class KDateEdit;
00032 class KTimeEdit;
00033 class KTextEdit;
00034 class QLineEdit;
00035 class QLabel;
00036 class QBoxLayout;
00037 class QCheckBox;
00038 class QWidget;
00039 
00040 namespace KCal {
00041 class Incidence;
00042 class Journal;
00043 }
00044 using namespace KCal;
00045 
00046 class KOEditorGeneralJournal : public QObject
00047 {
00048     Q_OBJECT
00049   public:
00050     KOEditorGeneralJournal ( QObject* parent=0, const char* name=0 );
00051     virtual ~KOEditorGeneralJournal();
00052 
00053     void initDate( QWidget *, QBoxLayout * );
00054     void initDescription( QWidget *, QBoxLayout * );
00055     void initTitle( QWidget *parent, QBoxLayout *topLayout );
00056 
00058     void setDefaults( const QDate &date );
00059     void setDate( const QDate &date );
00060     void setTime( const QTime &time );
00062     void readJournal( Journal *, bool tmpl = false );
00064     void writeJournal( Journal * );
00065 
00067     bool validateInput();
00068 
00069     void setDescription( const QString &text );
00070     void setSummary( const QString &text );
00071     void finishSetup();
00072 
00073   protected:
00074     QLineEdit  *mSummaryEdit;
00075     QLabel     *mSummaryLabel;
00076     KTextEdit  *mDescriptionEdit;
00077     QLabel     *mDateLabel;
00078     KDateEdit  *mDateEdit;
00079     QCheckBox  *mTimeCheckBox;
00080     KTimeEdit  *mTimeEdit;
00081 };
00082 
00083 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys