korganizer

kojournalview.h
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef KOJOURNALVIEW_H
25 #define KOJOURNALVIEW_H
26 
27 #include <korganizer/baseview.h>
28 
29 class JournalDateEntry;
30 class JournalEntry;
31 class TQScrollView;
32 class TQVBox;
33 
42 {
43  TQ_OBJECT
44 
45  public:
46  KOJournalView( Calendar *calendar, TQWidget *parent = 0,
47  const char *name = 0);
48  ~KOJournalView();
49 
50  virtual int currentDateCount();
51  virtual Incidence::List selectedIncidences();
52  DateList selectedIncidenceDates() { return DateList(); }
53  void appendJournal( Journal*journal, const TQDate &dt);
54 
55  CalPrinterBase::PrintType printType();
56 
57  public slots:
58  // Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145)
59  virtual void dayPassed( const TQDate & ) {}
60  void updateView();
61  void flushView();
62 
63  void showDates( const TQDate &start, const TQDate &end );
64  void showIncidences( const Incidence::List &incidenceList, const TQDate &date );
65 
66  void changeIncidenceDisplay( Incidence *, int );
67  void setIncidenceChanger( IncidenceChangerBase *changer );
68  void newJournal();
69  signals:
70  void flushEntries();
71  void setIncidenceChangerSignal( IncidenceChangerBase * );
72  void journalEdited( Journal* );
73  void journalDeleted( Journal* );
74 
75  protected:
76  void clearEntries();
77 
78  private:
79  TQScrollView *mSV;
80  TQVBox *mVBox;
81  TQMap<TQDate, JournalDateEntry*> mEntries;
82 // DateList mSelectedDates; // List of dates to be displayed
83 };
84 
85 #endif
This class provides a journal view.
Definition: kojournalview.h:42
virtual Incidence::List selectedIncidences()
DateList selectedIncidenceDates()
Definition: kojournalview.h:52
virtual int currentDateCount()
Return number of currently shown dates.
This class provides an interface for all views being displayed within the main calendar view.
Definition: baseview.h:60
virtual Calendar * calendar()
Return calendar object of this view.
Definition: baseview.h:89