• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KCalUtils Library

  • kcalutils
htmlexport.h
1/*
2 This file is part of the kcalutils library.
3
4 Copyright (c) 2000-2003 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22#ifndef KCALUTILS_HTMLEXPORT_H
23#define KCALUTILS_HTMLEXPORT_H
24
25#include "kcalutils_export.h"
26
27#include <kcalcore/event.h>
28#include <kcalcore/incidence.h>
29#include <kcalcore/todo.h>
30
31#include <QtCore/QDateTime>
32#include <QtCore/QString>
33
34namespace KCalCore {
35class MemoryCalendar;
36}
37
38class QTextStream;
39
40namespace KCalUtils {
41
42class HTMLExportSettings;
43
47class KCALUTILS_EXPORT HtmlExport
48{
49public:
53 HtmlExport(KCalCore::MemoryCalendar *calendar, HTMLExportSettings *settings);
54 virtual ~HtmlExport();
55
59 bool save(const QString &fileName = QString());
60
64 bool save(QTextStream *ts);
65
66 void addHoliday(const QDate &date, const QString &name);
67
68protected:
69 void createWeekView(QTextStream *ts);
70 void createMonthView(QTextStream *ts);
71 void createEventList(QTextStream *ts);
72 void createTodoList(QTextStream *ts);
73 void createJournalView(QTextStream *ts);
74 void createFreeBusyView(QTextStream *ts);
75
76 void createTodo(QTextStream *ts, const KCalCore::Todo::Ptr &todo);
77
78 void createEvent(QTextStream *ts, const KCalCore::Event::Ptr &event,
79 const QDate &date, bool withDescription = true);
80
81 void createFooter(QTextStream *ts);
82
83 bool checkSecrecy(const KCalCore::Incidence::Ptr &incidence);
84
85 void formatLocation(QTextStream *ts, const KCalCore::Incidence::Ptr &incidence);
86
87 void formatCategories(QTextStream *ts, const KCalCore::Incidence::Ptr &incidence);
88
89 void formatAttendees(QTextStream *ts, const KCalCore::Incidence::Ptr &incidence);
90
91 QString breakString(const QString &text);
92
93 QDate fromDate() const;
94 QDate toDate() const;
95 QString styleSheet() const;
96
97private:
98 //@cond PRIVATE
99 Q_DISABLE_COPY(HtmlExport)
100 class Private;
101 Private *const d;
102 //@endcond
103};
104
105}
106
107#endif
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
KCalCore::MemoryCalendar
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
KCalUtils::HtmlExport
This class provides the functions to export a calendar as a HTML page.
Definition: htmlexport.h:48
event.h
incidence.h
todo.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalUtils Library

Skip menu "KCalUtils Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal