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 TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 #ifndef KOWHATSNEXTVIEW_H 00025 #define KOWHATSNEXTVIEW_H 00026 00027 #include <tqtextbrowser.h> 00028 00029 #include <korganizer/baseview.h> 00030 00031 class TQListView; 00032 00033 class KOEventViewerDialog; 00034 00035 class WhatsNextTextBrowser : public TQTextBrowser { 00036 Q_OBJECT 00037 00038 public: 00039 WhatsNextTextBrowser(TQWidget *parent) : TQTextBrowser(parent) {} 00040 00041 void setSource(const TQString &); 00042 00043 signals: 00044 void showIncidence(const TQString &uid); 00045 }; 00046 00047 00051 class KOWhatsNextView : public KOrg::BaseView 00052 { 00053 Q_OBJECT 00054 00055 public: 00056 KOWhatsNextView(Calendar *calendar, TQWidget *parent = 0, 00057 const char *name = 0); 00058 ~KOWhatsNextView(); 00059 00060 virtual int currentDateCount(); 00061 virtual Incidence::List selectedIncidences() { return Incidence::List(); } 00062 DateList selectedIncidenceDates() { return DateList(); } 00063 00064 bool supportsDateNavigation() const { return true; } 00065 00066 public slots: 00067 virtual void updateView(); 00068 virtual void showDates(const TQDate &start, const TQDate &end); 00069 virtual void showIncidences( const Incidence::List &incidenceList, const TQDate &date ); 00070 00071 void changeIncidenceDisplay(Incidence *, int); 00072 00073 protected: 00074 void appendEvent( Incidence *, const TQDateTime &start = TQDateTime(), 00075 const TQDateTime &end = TQDateTime() ); 00076 void appendTodo( Incidence * ); 00077 00078 private slots: 00079 void showIncidence(const TQString &); 00080 00081 private: 00082 TQTextBrowser *mView; 00083 TQString mText; 00084 TQDate mStartDate; 00085 TQDate mEndDate; 00086 00087 Incidence::List mTodos; 00088 }; 00089 00090 #endif