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 "kcal_export.h"
00026
00027 #include <QtCore/QDateTime>
00028 #include <QtCore/QString>
00029 #include <QtCore/QTextStream>
00030
00031 class QTextStream;
00032
00033 namespace KCal {
00034
00035 class HTMLExportSettings;
00036 class Calendar;
00037 class Event;
00038 class Incidence;
00039 class Todo;
00040
00044 class KCAL_EXPORT_DEPRECATED HtmlExport
00045 {
00046 public:
00050 HtmlExport( Calendar *calendar, HTMLExportSettings *settings );
00051 virtual ~HtmlExport();
00052
00056 bool save( const QString &fileName = QString() );
00057
00061 bool save( QTextStream *ts );
00062
00063 void addHoliday( const QDate &date, const QString &name );
00064
00065 protected:
00066 void createWeekView( QTextStream *ts );
00067 void createMonthView( QTextStream *ts );
00068 void createEventList( QTextStream *ts );
00069 void createTodoList( QTextStream *ts );
00070 void createJournalView( QTextStream *ts );
00071 void createFreeBusyView( QTextStream *ts );
00072
00073 void createTodo( QTextStream *ts, Todo *todo );
00074 void createEvent( QTextStream *ts, Event *event, QDate date,
00075 bool withDescription = true );
00076 void createFooter( QTextStream *ts );
00077
00078 bool checkSecrecy( Incidence *incidence );
00079
00080 void formatLocation( QTextStream *ts, Incidence *incidence );
00081 void formatCategories( QTextStream *ts, Incidence *incidence );
00082 void formatAttendees( QTextStream *ts, Incidence *incidence );
00083
00084 QString breakString( const QString &text );
00085
00086 QDate fromDate() const;
00087 QDate toDate() const;
00088 QString styleSheet() const;
00089
00090 private:
00091
00092 Q_DISABLE_COPY( HtmlExport )
00093 class Private;
00094 Private *const d;
00095
00096 };
00097
00098 }
00099
00100 #endif