korganizer
kojournalview.h
00001 /* 00002 This file is part of KOrganizer. 00003 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00004 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 #ifndef KOJOURNALVIEW_H 00025 #define KOJOURNALVIEW_H 00026 00027 #include <korganizer/baseview.h> 00028 #include "journalentry.h" 00029 00030 class JournalEntry; 00031 class QScrollView; 00032 class QVBox; 00033 00041 class KOJournalView : public KOrg::BaseView 00042 { 00043 Q_OBJECT 00044 public: 00045 KOJournalView( Calendar *calendar, QWidget *parent = 0, 00046 const char *name = 0); 00047 ~KOJournalView(); 00048 00049 virtual int currentDateCount(); 00050 virtual Incidence::List selectedIncidences(); 00051 DateList selectedDates() { return DateList(); } 00052 void appendJournal( Journal*journal, const QDate &dt); 00053 00054 public slots: 00055 // Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145) 00056 virtual void dayPassed( const QDate & ) {} 00057 void updateView(); 00058 void flushView(); 00059 00060 void showDates( const QDate &start, const QDate &end ); 00061 void showIncidences( const Incidence::List &incidenceList ); 00062 00063 void changeIncidenceDisplay( Incidence *, int ); 00064 void setIncidenceChanger( IncidenceChangerBase *changer ); 00065 void newJournal(); 00066 signals: 00067 void flushEntries(); 00068 void setIncidenceChangerSignal( IncidenceChangerBase * ); 00069 void journalEdited( Journal* ); 00070 void journalDeleted( Journal* ); 00071 00072 protected: 00073 void clearEntries(); 00074 00075 private: 00076 QScrollView *mSV; 00077 QVBox *mVBox; 00078 QMap<QDate, JournalDateEntry*> mEntries; 00079 // DateList mSelectedDates; // List of dates to be displayed 00080 }; 00081 00082 #endif