KCalUtils Library
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
-
date The date to be formatted. dateOnly If true, don't print the time fields; print the date fields only. shortfmt If true, display info in short format. spec Time spec to use.
- See also
- dateToString(), timeToString().
Definition at line 4455 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
-
date The date to be formatted. shortfmt If true, display info in short format. spec Time spec to use.
- See also
- dateToString(), dateTimeToString().
Definition at line 4433 of file incidenceformatter.cpp.
KCALUTILS_EXPORT 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
-
incidence is a pointer to the Incidence.
KCALUTILS_EXPORT 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
-
calendar is a pointer to the Calendar that owns the specified Incidence. incidence is a pointer to the Incidence to be formatted. date is the QDate for which the string representation should be computed; used mainly for recurring incidences. spec is an optional time specification which, when specified, will shift the Incidence times to different timezones.
KCALUTILS_EXPORT 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
-
sourceName where the incidence is from (e.g. resource name) incidence is a pointer to the Incidence to be formatted. date is the QDate for which the string representation should be computed; used mainly for recurring incidences. spec is an optional time specification which, when specified, will shift the Incidence times to different timezones.
KCALUTILS_EXPORT 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
-
invitation a QString containing a string representation of a calendar Incidence which will be intrepreted as an invitation. calendar is a pointer to the Calendar that owns the invitation. helper is a pointer to an InvitationFormatterHelper. outlookCompareStyle if true, display updated invitation comparisons in the style of Microsoft Outlook (tm); else use our own "classic" style.
KCALUTILS_EXPORT 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
-
invitation a QString containing a string representation of a calendar Incidence which will be intrepreted as an invitation. calendar is a pointer to the Calendar that owns the invitation. helper is a pointer to an InvitationFormatterHelper. sender is a QString containing the email address of the person sending the invitation. outlookCompareStyle if true, display updated invitation comparisons in the style of Microsoft Outlook (tm); else use our own "classic" style.
KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::incidenceStatusName | ( | KCalCore::Incidence::Status | status | ) |
Returns the translated string form of a specified #Status.
- Parameters
-
status is a #Status type.
KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::incidenceStatusStr | ( | const KCalCore::Incidence::Ptr & | incidence | ) |
Returns a translatedstatus string for this incidence.
KCALUTILS_EXPORT 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
-
incidence is a pointer to the Incidence to be formatted. spec is an optional time specification which, when specified, will shift the Incidence times to different timezones.
KCALUTILS_EXPORT QString KCalUtils::IncidenceFormatter::recurrenceString | ( | const KCalCore::Incidence::Ptr & | incidence | ) |
Build a pretty QString representation of an Incidence's recurrence info.
- Parameters
-
incidence is a pointer to the Incidence whose recurrence info is to be formatted.
KCALUTILS_EXPORT 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
-
incidence is a pointer to the Incidence. shortfmt if false, a short version of each reminder is printed; else a longer version of each reminder is printed.
KCALUTILS_EXPORT 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
-
calendar is a pointer to the Calendar. incidence is a pointer to the Incidence.
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
-
date The date to be formatted. shortfmt If true, display info in short format. spec Time spec to use.
- See also
- dateToString(), dateTimeToString().
Definition at line 4416 of file incidenceformatter.cpp.
KCALUTILS_EXPORT 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
-
sourceName where the incidence is from (e.g. resource name) incidence is a pointer to the Incidence to be formatted. date is 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. richText if yes, the QString will be created as RichText. spec is an optional time specification which, when specified, will shift the Incidence times to different timezones.
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.