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

KCalUtils Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kcalutils
incidenceformatter.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalutils library.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6  Copyright (c) 2009-2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
32 #ifndef KCALUTILS_INCIDENCEFORMATTER_H
33 #define KCALUTILS_INCIDENCEFORMATTER_H
34 
35 #include "kcalutils_export.h"
36 
37 #include <kcalcore/incidence.h>
38 #include <kcalcore/memorycalendar.h>
39 
40 #include <QDate>
41 
42 namespace KCalUtils {
43 
44 class KCALUTILS_EXPORT InvitationFormatterHelper
45 {
46 public:
47  InvitationFormatterHelper();
48  virtual ~InvitationFormatterHelper();
49  virtual QString generateLinkURL(const QString &id);
50  virtual QString makeLink(const QString &id, const QString &text);
51  virtual KCalCore::Calendar::Ptr calendar() const;
52 
53 private:
54  //@cond PRIVATE
55  Q_DISABLE_COPY(InvitationFormatterHelper)
56  class Private;
57  Private *const d;
58  //@endcond
59 };
60 
70 namespace IncidenceFormatter {
71 
84 KCALUTILS_EXPORT QString toolTipStr(const QString &sourceName,
85  const KCalCore::IncidenceBase::Ptr &incidence,
86  const QDate &date = QDate(),
87  bool richText = true,
88  KDateTime::Spec spec = KDateTime::Spec());
89 
100 KCALUTILS_EXPORT QString extensiveDisplayStr(const KCalCore::Calendar::Ptr &calendar,
101  const KCalCore::IncidenceBase::Ptr &incidence,
102  const QDate &date=QDate(),
103  KDateTime::Spec spec=KDateTime::Spec());
104 
115 KCALUTILS_EXPORT QString extensiveDisplayStr(const QString &sourceName,
116  const KCalCore::IncidenceBase::Ptr &incidence,
117  const QDate &date=QDate(),
118  KDateTime::Spec spec=KDateTime::Spec());
119 
127 KCALUTILS_EXPORT QString mailBodyStr(const KCalCore::IncidenceBase::Ptr &incidence,
128  KDateTime::Spec spec=KDateTime::Spec());
129 
141 KCALUTILS_EXPORT QString formatICalInvitation(
142  QString invitation,
143  const KCalCore::MemoryCalendar::Ptr &calendar,
144  InvitationFormatterHelper *helper,
145  bool outlookCompareStyle);
146 
161 KCALUTILS_EXPORT QString formatICalInvitationNoHtml(
162  const QString &invitation,
163  const KCalCore::MemoryCalendar::Ptr &calendar,
164  InvitationFormatterHelper *helper,
165  const QString &sender,
166  bool outlookCompareStyle);
167 
173 KCALUTILS_EXPORT QString recurrenceString(const KCalCore::Incidence::Ptr &incidence);
174 
183 KCALUTILS_EXPORT QStringList reminderStringList(const KCalCore::Incidence::Ptr &incidence,
184  bool shortfmt = true);
185 
193 KCALUTILS_EXPORT QString timeToString(const KDateTime &date, bool shortfmt = true,
194  const KDateTime::Spec &spec = KDateTime::Spec());
195 
203 KCALUTILS_EXPORT QString dateToString(const KDateTime &date, bool shortfmt = true,
204  const KDateTime::Spec &spec = KDateTime::Spec());
205 
214 KCALUTILS_EXPORT QString dateTimeToString(const KDateTime &date,
215  bool dateOnly = false,
216  bool shortfmt = true,
217  const KDateTime::Spec &spec = KDateTime::Spec());
218 
224 KCALUTILS_EXPORT QString resourceString(const KCalCore::Calendar::Ptr &calendar,
225  const KCalCore::Incidence::Ptr &incidence);
226 
232 KCALUTILS_EXPORT QString durationString(const KCalCore::Incidence::Ptr &incidence);
233 
238 KCALUTILS_EXPORT QString incidenceStatusName(KCalCore::Incidence::Status status);
239 
243 KCALUTILS_EXPORT QString incidenceStatusStr(const KCalCore::Incidence::Ptr &incidence);
244 
245 class EventViewerVisitor;
246 class ScheduleMessageVisitor;
247 class InvitationHeaderVisitor;
248 class InvitationBodyVisitor;
249 class IncidenceCompareVisitor;
250 class ToolTipVisitor;
251 class MailBodyVisitor;
252 }
253 
254 }
255 
256 #endif
KCalUtils::IncidenceFormatter::incidenceStatusName
KCALUTILS_EXPORT QString incidenceStatusName(KCalCore::Incidence::Status status)
Returns the translated string form of a specified #Status.
memorycalendar.h
KCalUtils::IncidenceFormatter::resourceString
KCALUTILS_EXPORT QString resourceString(const KCalCore::Calendar::Ptr &calendar, const KCalCore::Incidence::Ptr &incidence)
Returns a Calendar Resource label name for the specified Incidence.
KCalUtils::IncidenceFormatter::reminderStringList
KCALUTILS_EXPORT QStringList reminderStringList(const KCalCore::Incidence::Ptr &incidence, bool shortfmt=true)
Returns a reminder string computed for the specified Incidence.
KCalUtils::IncidenceFormatter::dateTimeToString
KCALUTILS_EXPORT QString dateTimeToString(const KDateTime &date, bool dateOnly=false, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
Build a QString date/time representation of a KDateTime object.
Definition: incidenceformatter.cpp:4455
KCalUtils::IncidenceFormatter::dateToString
KCALUTILS_EXPORT QString dateToString(const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
Build a QString date representation of a KDateTime object.
Definition: incidenceformatter.cpp:4433
KCalUtils::IncidenceFormatter::formatICalInvitationNoHtml
KCALUTILS_EXPORT QString formatICalInvitationNoHtml(const QString &invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper, const QString &sender, bool outlookCompareStyle)
Deliver an HTML formatted string displaying an invitation.
KCalUtils::IncidenceFormatter::toolTipStr
KCALUTILS_EXPORT QString toolTipStr(const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, const QDate &date=QDate(), bool richText=true, KDateTime::Spec spec=KDateTime::Spec())
Create a QString representation of an Incidence in a nice format suitable for using in a tooltip...
QSharedPointer
KCalUtils::IncidenceFormatter::timeToString
KCALUTILS_EXPORT QString timeToString(const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
Build a QString time representation of a KDateTime object.
Definition: incidenceformatter.cpp:4416
KCalUtils::IncidenceFormatter::recurrenceString
KCALUTILS_EXPORT QString recurrenceString(const KCalCore::Incidence::Ptr &incidence)
Build a pretty QString representation of an Incidence's recurrence info.
KCalUtils::IncidenceFormatter::mailBodyStr
KCALUTILS_EXPORT QString mailBodyStr(const KCalCore::IncidenceBase::Ptr &incidence, KDateTime::Spec spec=KDateTime::Spec())
Create a QString representation of an Incidence in format suitable for including inside a mail messag...
QDate
QString
KCalUtils::IncidenceFormatter::formatICalInvitation
KCALUTILS_EXPORT QString formatICalInvitation(QString invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper, bool outlookCompareStyle)
Deliver an HTML formatted string displaying an invitation.
QStringList
KCalUtils::IncidenceFormatter::extensiveDisplayStr
KCALUTILS_EXPORT QString extensiveDisplayStr(const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, const QDate &date=QDate(), KDateTime::Spec spec=KDateTime::Spec())
Create a RichText QString representation of an Incidence in a nice format suitable for using in a vie...
KCalUtils::IncidenceFormatter::incidenceStatusStr
KCALUTILS_EXPORT QString incidenceStatusStr(const KCalCore::Incidence::Ptr &incidence)
Returns a translatedstatus string for this incidence.
incidence.h
KCalUtils::IncidenceFormatter::durationString
KCALUTILS_EXPORT QString durationString(const KCalCore::Incidence::Ptr &incidence)
Returns a duration string computed for the specified Incidence.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:46 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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