korganizer

koeditorgeneraljournal.h
1/*
2 This file is part of KOrganizer.
3
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21 As a special exception, permission is given to link this program
22 with any edition of TQt, and distribute the resulting executable,
23 without including the source code for TQt in the source distribution.
24*/
25#ifndef KOEDITORGENERALJOURNAL_H
26#define KOEDITORGENERALJOURNAL_H
27
28#include "koeditorgeneral.h"
29
30#include <tqobject.h>
31#include <tqdatetime.h>
32
33class KDateEdit;
34class KTimeEdit;
35class KTextEdit;
36class TQLineEdit;
37class TQLabel;
38class TQBoxLayout;
39class TQCheckBox;
40class TQWidget;
41
42namespace KCal {
43class Incidence;
44class Journal;
45}
46using namespace KCal;
47
48class KOEditorGeneralJournal : public KOEditorGeneral
49{
50 TQ_OBJECT
51
52 public:
53 KOEditorGeneralJournal ( TQWidget *parent=0, const char* name=0 );
54 virtual ~KOEditorGeneralJournal();
55
56 void initDate( TQWidget *, TQBoxLayout * );
57 void initDescription( TQWidget *, TQBoxLayout * );
58 void initTitle( TQWidget *parent, TQBoxLayout *topLayout );
59
61 void setDefaults( const TQDate &date );
62 void setDate( const TQDate &date );
63 void setTime( const TQTime &time );
65 void readJournal( Journal *, const TQDate &, bool tmpl = false );
67 void writeJournal( Journal * );
68
70 bool validateInput();
71
72 void setDescription( const TQString &text );
73 void setSummary( const TQString &text );
74 void finishSetup();
75
76 protected:
77 TQLineEdit *mSummaryEdit;
78 TQLabel *mSummaryLabel;
79 KTextEdit *mDescriptionEdit;
80 TQLabel *mDateLabel;
81 KDateEdit *mDateEdit;
82 TQCheckBox *mTimeCheckBox;
83 KTimeEdit *mTimeEdit;
84};
85
86#endif