korganizer

kojournaleditor.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 1997, 1998 Preston Brown <pbrown@kde.org>
5  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
6  Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 
22  As a special exception, permission is given to link this program
23  with any edition of TQt, and distribute the resulting executable,
24  without including the source code for TQt in the source distribution.
25 */
26 #ifndef KOJOURNALEDITOR_H
27 #define KOJOURNALEDITOR_H
28 
29 #include "koincidenceeditor.h"
30 
31 #include <tqdatetime.h>
32 
33 class TQDateTime;
34 namespace KCal {
35 class Calendar;
36 class Journal;
37 class Incidence;
38 }
39 using namespace KCal;
40 
41 class KOEditorGeneralJournal;
42 
47 {
48  TQ_OBJECT
49 
50  public:
54  KOJournalEditor( Calendar *calendar, TQWidget *parent );
55  virtual ~KOJournalEditor();
56 
57  void init();
58 
59  void reload();
60 
64  void newJournal();
65 
71  void setTexts( const TQString &summary, const TQString &description = TQString() );
73  void editIncidence(Incidence *, const TQDate &date, Calendar *);
74 
76  void setDate( const TQDate &date );
78  void readJournal( Journal *, const TQDate &date );
80  void writeJournal( Journal * );
81 
82  int msgItemDelete();
84  bool validateInput();
87  bool processInput();
88 
90  void modified();
91 
92  protected slots:
93  void loadDefaults();
94  void deleteJournal();
95 
96  void slotSaveTemplate( const TQString & );
97 
98  protected:
99  TQString type() { return "Journal"; }
100  void setupGeneral();
101 // int msgItemDelete();
102 
103  void loadTemplate( /*const*/ CalendarLocal& );
104  TQStringList& templates() const;
105  private:
106  Journal *mJournal;
107  KOEditorGeneralJournal *mGeneral;
108 };
109 
110 #endif
This is the base class for the calendar component editors.
This class provides a dialog for editing a Journal.