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

KCalUtils Library

  • KCalUtils
  • IncidenceFormatter
Functions
KCalUtils::IncidenceFormatter Namespace Reference

Functions

KCALUTILS_EXPORT QString dateTimeToString (const KDateTime &date, bool dateOnly=false, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
KCALUTILS_EXPORT QString dateToString (const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
KCALUTILS_EXPORT QString durationString (const KCalCore::Incidence::Ptr &incidence)
KCALUTILS_EXPORT QString extensiveDisplayStr (const KCalCore::Calendar::Ptr &calendar, const KCalCore::IncidenceBase::Ptr &incidence, const QDate &date=QDate(), KDateTime::Spec spec=KDateTime::Spec())
KCALUTILS_EXPORT QString extensiveDisplayStr (const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, const QDate &date=QDate(), KDateTime::Spec spec=KDateTime::Spec())
KCALUTILS_EXPORT QString formatICalInvitation (QString invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper, bool outlookCompareStyle)
KCALUTILS_EXPORT QString formatICalInvitationNoHtml (const QString &invitation, const KCalCore::MemoryCalendar::Ptr &calendar, InvitationFormatterHelper *helper, const QString &sender, bool outlookCompareStyle)
KCALUTILS_EXPORT QString incidenceStatusName (KCalCore::Incidence::Status status)
KCALUTILS_EXPORT QString incidenceStatusStr (const KCalCore::Incidence::Ptr &incidence)
KCALUTILS_EXPORT QString mailBodyStr (const KCalCore::IncidenceBase::Ptr &incidence, KDateTime::Spec spec=KDateTime::Spec())
KCALUTILS_EXPORT QString recurrenceString (const KCalCore::Incidence::Ptr &incidence)
KCALUTILS_EXPORT QStringList reminderStringList (const KCalCore::Incidence::Ptr &incidence, bool shortfmt=true)
KCALUTILS_EXPORT QString resourceString (const KCalCore::Calendar::Ptr &calendar, const KCalCore::Incidence::Ptr &incidence)
KCALUTILS_EXPORT QString timeToString (const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
KCALUTILS_EXPORT QString toolTipStr (const QString &sourceName, const KCalCore::IncidenceBase::Ptr &incidence, const QDate &date=QDate(), bool richText=true, KDateTime::Spec spec=KDateTime::Spec())

Detailed Description

Provides methods to format Incidences in various ways for display purposes.

Helpers that provides several static methods to format an Incidence in different ways: like an HTML representation for KMail, a representation for tool tips, or a representation for a viewer widget.


Function Documentation

QString KCalUtils::IncidenceFormatter::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.

Parameters:
dateThe date to be formatted.
dateOnlyIf true, don't print the time fields; print the date fields only.
shortfmtIf true, display info in short format.
specTime spec to use.
See also:
dateToString(), timeToString().

Definition at line 4336 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::dateToString ( const KDateTime &  date,
bool  shortfmt = true,
const KDateTime::Spec &  spec = KDateTime::Spec() 
)

Build a QString date representation of a KDateTime object.

Parameters:
dateThe date to be formatted.
shortfmtIf true, display info in short format.
specTime spec to use.
See also:
dateToString(), dateTimeToString().

Definition at line 4314 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::durationString ( const KCalCore::Incidence::Ptr &  incidence)

Returns a duration string computed for the specified Incidence.

Only makes sense for Events and Todos.

Parameters:
incidenceis a pointer to the Incidence.

Definition at line 4391 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::extensiveDisplayStr ( const KCalCore::Calendar::Ptr &  calendar,
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 viewer widget.

Parameters:
calendaris a pointer to the Calendar that owns the specified Incidence.
incidenceis a pointer to the Incidence to be formatted.
dateis the QDate for which the string representation should be computed; used mainly for recurring incidences.
specis an optional time specification which, when specified, will shift the Incidence times to different timezones.

Definition at line 1085 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::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 viewer widget.

Parameters:
sourceNamewhere the incidence is from (e.g. resource name)
incidenceis a pointer to the Incidence to be formatted.
dateis the QDate for which the string representation should be computed; used mainly for recurring incidences.
specis an optional time specification which, when specified, will shift the Incidence times to different timezones.

Definition at line 1102 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::formatICalInvitation ( QString  invitation,
const KCalCore::MemoryCalendar::Ptr &  calendar,
InvitationFormatterHelper *  helper,
bool  outlookCompareStyle 
)

Deliver an HTML formatted string displaying an invitation.

Use the time zone from mCalendar.

Parameters:
invitationa QString containing a string representation of a calendar Incidence which will be intrepreted as an invitation.
calendaris a pointer to the Calendar that owns the invitation.
helperis a pointer to an InvitationFormatterHelper.
outlookCompareStyleif true, display updated invitation comparisons in the style of Microsoft Outlook (tm); else use our own "classic" style.

Definition at line 3246 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::formatICalInvitationNoHtml ( const QString &  invitation,
const KCalCore::MemoryCalendar::Ptr &  calendar,
InvitationFormatterHelper *  helper,
const QString &  sender,
bool  outlookCompareStyle 
)

Deliver an HTML formatted string displaying an invitation.

Differs from formatICalInvitation() in that invitation details (summary, location, etc) have HTML formatting cleaned. Use the time zone from calendar.

Parameters:
invitationa QString containing a string representation of a calendar Incidence which will be intrepreted as an invitation.
calendaris a pointer to the Calendar that owns the invitation.
helperis a pointer to an InvitationFormatterHelper.
senderis a QString containing the email address of the person sending the invitation.
outlookCompareStyleif true, display updated invitation comparisons in the style of Microsoft Outlook (tm); else use our own "classic" style.

Definition at line 3256 of file incidenceformatter.cpp.

KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::incidenceStatusName ( KCalCore::Incidence::Status  status)

Returns the translated string form of a specified #Status.

Parameters:
statusis a #Status type.
KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::incidenceStatusStr ( const KCalCore::Incidence::Ptr &  incidence)

Returns a translatedstatus string for this incidence.

QString KCalUtils::IncidenceFormatter::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 message.

Parameters:
incidenceis a pointer to the Incidence to be formatted.
specis an optional time specification which, when specified, will shift the Incidence times to different timezones.

Definition at line 3864 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::recurrenceString ( const KCalCore::Incidence::Ptr &  incidence)

Build a pretty QString representation of an Incidence's recurrence info.

Parameters:
incidenceis a pointer to the Incidence whose recurrence info is to be formatted.

Definition at line 3895 of file incidenceformatter.cpp.

QStringList KCalUtils::IncidenceFormatter::reminderStringList ( const KCalCore::Incidence::Ptr &  incidence,
bool  shortfmt = true 
)

Returns a reminder string computed for the specified Incidence.

Each item of the returning QStringList corresponds to a string representation of an reminder belonging to this incidence.

Parameters:
incidenceis a pointer to the Incidence.
shortfmtif false, a short version of each reminder is printed; else a longer version of each reminder is printed.

Definition at line 4422 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::resourceString ( const KCalCore::Calendar::Ptr &  calendar,
const KCalCore::Incidence::Ptr &  incidence 
)

Returns a Calendar Resource label name for the specified Incidence.

Parameters:
calendaris a pointer to the Calendar.
incidenceis a pointer to the Incidence.

Definition at line 4361 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::timeToString ( const KDateTime &  date,
bool  shortfmt = true,
const KDateTime::Spec &  spec = KDateTime::Spec() 
)

Build a QString time representation of a KDateTime object.

Parameters:
dateThe date to be formatted.
shortfmtIf true, display info in short format.
specTime spec to use.
See also:
dateToString(), dateTimeToString().

Definition at line 4297 of file incidenceformatter.cpp.

QString KCalUtils::IncidenceFormatter::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.

Parameters:
sourceNamewhere the incidence is from (e.g. resource name)
incidenceis a pointer to the Incidence to be formatted.
dateis the QDate for which the toolTip should be computed; used mainly for recurring incidences. Note: For to-dos, this is the due date of the occurrence, not the start date.
richTextif yes, the QString will be created as RichText.
specis an optional time specification which, when specified, will shift the Incidence times to different timezones.

Definition at line 3702 of file incidenceformatter.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:25:00 by doxygen 1.7.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.8.5 API Reference

Skip menu "kdepimlibs-4.8.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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