libkcal
htmlexport.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KCAL_HTMLEXPORT_H
00023 #define KCAL_HTMLEXPORT_H
00024
00025 #include <qstring.h>
00026 #include <qdatetime.h>
00027 #include <qmap.h>
00028
00029 #include <libkcal/calendar.h>
00030 #include <libkcal/htmlexportsettings.h>
00031
00032 #include "libkcal_export.h"
00033
00034 class QFile;
00035 class QTextStream;
00036
00037 namespace KCal {
00038
00042 class KDE_EXPORT HtmlExport
00043 {
00044 public:
00048 HtmlExport( Calendar *calendar, HTMLExportSettings *settings );
00049 virtual ~HtmlExport() {}
00050
00054 bool save( const QString &fileName = QString::null );
00055
00059 bool save( QTextStream * );
00060
00061 void addHoliday( const QDate &date, const QString &name );
00062
00063 protected:
00064 void createWeekView( QTextStream *ts );
00065 void createMonthView( QTextStream *ts );
00066 void createEventList( QTextStream *ts );
00067 void createTodoList( QTextStream *ts );
00068 void createJournalView( QTextStream *ts );
00069 void createFreeBusyView( QTextStream *ts );
00070
00071 void createTodo( QTextStream *ts, Todo *todo);
00072 void createEvent( QTextStream *ts, Event *event, QDate date,
00073 bool withDescription = true);
00074 void createFooter( QTextStream *ts );
00075
00076 bool checkSecrecy( Incidence * );
00077
00078 void formatLocation( QTextStream *ts, Incidence *event );
00079 void formatCategories( QTextStream *ts, Incidence *event );
00080 void formatAttendees( QTextStream *ts, Incidence *event );
00081
00082 QString breakString( const QString &text );
00083
00084 QDate fromDate() const;
00085 QDate toDate() const;
00086 QString styleSheet() const;
00087
00088 private:
00089 QString cleanChars( const QString &txt );
00090
00091 Calendar *mCalendar;
00092 HTMLExportSettings *mSettings;
00093 QMap<QDate,QString> mHolidayMap;
00094
00095 class Private;
00096 Private *d;
00097 };
00098
00099 }
00100
00101 #endif
|