korganizer

kowhatsnextview.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
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 KOWHATSNEXTVIEW_H
00025 #define KOWHATSNEXTVIEW_H
00026 
00027 #include <qtextbrowser.h>
00028 
00029 #include <korganizer/baseview.h>
00030 
00031 class QListView;
00032 
00033 class KOEventViewerDialog;
00034 
00035 class WhatsNextTextBrowser : public QTextBrowser {
00036     Q_OBJECT
00037   public:
00038     WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}
00039 
00040     void setSource(const QString &);
00041 
00042   signals:
00043     void showIncidence(const QString &uid);
00044 };
00045 
00046 
00050 class KOWhatsNextView : public KOrg::BaseView
00051 {
00052     Q_OBJECT
00053   public:
00054     KOWhatsNextView(Calendar *calendar, QWidget *parent = 0,
00055                     const char *name = 0);
00056     ~KOWhatsNextView();
00057 
00058     virtual int currentDateCount();
00059     virtual Incidence::List selectedIncidences() { return Incidence::List(); }
00060     DateList selectedDates() { return DateList(); }
00061 
00062   public slots:
00063     virtual void updateView();
00064     virtual void showDates(const QDate &start, const QDate &end);
00065     virtual void showIncidences( const Incidence::List &incidenceList );
00066 
00067     void changeIncidenceDisplay(Incidence *, int);
00068 
00069   protected:
00070     void appendEvent( Incidence *, const QDateTime &start = QDateTime(), 
00071                       const QDateTime &end = QDateTime() );
00072     void appendTodo( Incidence * );
00073 
00074   private slots:
00075     void showIncidence(const QString &);
00076 
00077   private:
00078     QTextBrowser *mView;
00079     QString mText;
00080     QDate mStartDate;
00081     QDate mEndDate;
00082 
00083     Incidence::List mTodos;
00084 };
00085 
00086 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys