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     CalPrinterBase::PrintType printType();
00055 
00056   public slots:
00057     // Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145)
00058     virtual void dayPassed( const QDate & ) {}
00059     void updateView();
00060     void flushView();
00061 
00062     void showDates( const QDate &start, const QDate &end );
00063     void showIncidences( const Incidence::List &incidenceList );
00064 
00065     void changeIncidenceDisplay( Incidence *, int );
00066     void setIncidenceChanger( IncidenceChangerBase *changer );
00067     void newJournal();
00068   signals:
00069     void flushEntries();
00070     void setIncidenceChangerSignal( IncidenceChangerBase * );
00071     void journalEdited( Journal* );
00072     void journalDeleted( Journal* );
00073 
00074   protected:
00075     void clearEntries();
00076 
00077   private:
00078     QScrollView *mSV;
00079     QVBox *mVBox;
00080     QMap<QDate, JournalDateEntry*> mEntries;
00081 //    DateList mSelectedDates;  // List of dates to be displayed
00082 };
00083 
00084 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys