• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCalUtils Library

  • KCalUtils
  • IncidenceFormatter
Functions
KCalUtils::IncidenceFormatter Namespace Reference

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

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 formatTNEFInvitation (const QByteArray &tnef, const KCalCore::Calendar::Ptr &mCalendar, InvitationFormatterHelper *helper)
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 msTNEFToVPart (const QByteArray &tnef)
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 4314 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 4292 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 4369 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 1077 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 1094 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 3228 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 3238 of file incidenceformatter.cpp.

KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::formatTNEFInvitation ( const QByteArray &  tnef,
const KCalCore::Calendar::Ptr &  mCalendar,
InvitationFormatterHelper *  helper 
)

Format a TNEF attachment to an HTML mail.

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 3846 of file incidenceformatter.cpp.

KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::msTNEFToVPart ( const QByteArray &  tnef)

Transform a TNEF attachment to an iCal or vCard.

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 3877 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 4400 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 4339 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 4275 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 3684 of file incidenceformatter.cpp.

KCalUtils Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • 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
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal