• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

  • KCal
  • IncidenceFormatter
Functions

KCal::IncidenceFormatter Namespace Reference

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

Functions

QString dateTimeToString (const KDateTime &date, bool dateOnly=false, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
QString dateToString (const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
QString durationString (Incidence *incidence)
QString extensiveDisplayStr (Calendar *calendar, IncidenceBase *incidence, const QDate &date=QDate(), KDateTime::Spec spec=KDateTime::Spec())
QString extensiveDisplayStr (const QString &sourceName, IncidenceBase *incidence, const QDate &date=QDate(), KDateTime::Spec spec=KDateTime::Spec())
KCAL_EXPORT_DEPRECATED QString extensiveDisplayStr (IncidenceBase *incidence, KDateTime::Spec spec=KDateTime::Spec())
KCAL_EXPORT_DEPRECATED QString extensiveDisplayString (IncidenceBase *incidence)
QString formatICalInvitation (QString invitation, Calendar *calendar, InvitationFormatterHelper *helper)
QString formatICalInvitationNoHtml (QString invitation, Calendar *calendar, InvitationFormatterHelper *helper)
QString formatICalInvitationNoHtml (const QString &invitation, Calendar *calendar, InvitationFormatterHelper *helper, const QString &sender)
QString formatTNEFInvitation (const QByteArray &tnef, Calendar *mCalendar, InvitationFormatterHelper *helper)
QString mailBodyStr (IncidenceBase *incidence, KDateTime::Spec spec=KDateTime::Spec())
KCAL_EXPORT_DEPRECATED QString mailBodyString (IncidenceBase *incidence)
QString msTNEFToVPart (const QByteArray &tnef)
QString recurrenceString (Incidence *incidence)
QStringList reminderStringList (Incidence *incidence, bool shortfmt=true)
QString resourceString (Calendar *calendar, Incidence *incidence)
QString timeToString (const KDateTime &date, bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec())
KCAL_EXPORT_DEPRECATED QString toolTipStr (IncidenceBase *incidence, bool richText=true, KDateTime::Spec spec=KDateTime::Spec())
QString toolTipStr (Calendar *calendar, IncidenceBase *incidence, const QDate &date=QDate(), bool richText=true, KDateTime::Spec spec=KDateTime::Spec())
QString toolTipStr (const QString &sourceName, IncidenceBase *incidence, const QDate &date=QDate(), bool richText=true, KDateTime::Spec spec=KDateTime::Spec())
KCAL_EXPORT_DEPRECATED QString toolTipString (IncidenceBase *incidence, bool richText=true)

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 KCal::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().
Since:
4.3

Definition at line 3751 of file incidenceformatter.cpp.

QString KCal::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().
Since:
4.3

Definition at line 3729 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::durationString ( Incidence *  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.
Since:
4.5

Definition at line 3826 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::extensiveDisplayStr ( Calendar *  calendar,
IncidenceBase *  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.
Since:
4.4

Definition at line 990 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::extensiveDisplayStr ( const QString &  sourceName,
IncidenceBase *  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.
Since:
4.5

Definition at line 1007 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::extensiveDisplayStr ( IncidenceBase *  incidence,
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:
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.
Since:
4.2
Deprecated:
use extensiveDisplayStr( Calendar *, IncidenceBase *, KDateTime::Spec )

Definition at line 975 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::extensiveDisplayString ( IncidenceBase *  incidence  ) 

Create a RichText QString representation of an Incidence in a nice format suitable for using in a viewer widget.

Parameters:
incidence is a pointer to the Incidence to be formatted.
Deprecated:
use extensiveDisplayStr( Calendar *, IncidenceBase *, KDateTime::Spec )

Definition at line 970 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::formatICalInvitation ( QString  invitation,
Calendar *  calendar,
InvitationFormatterHelper *  helper 
)

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 Event 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.

Definition at line 2736 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::formatICalInvitationNoHtml ( QString  invitation,
Calendar *  calendar,
InvitationFormatterHelper *  helper 
)

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 Event 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.
Deprecated:
use formatICalInvitationNoHtml(const QString &,Calendar *, InvitationFormatterHelper *,const QString &) instead.

Definition at line 2744 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::formatICalInvitationNoHtml ( const QString &  invitation,
Calendar *  calendar,
InvitationFormatterHelper *  helper,
const QString &  sender 
)

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 Event 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.
Since:
4.5

Definition at line 2752 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::formatTNEFInvitation ( const QByteArray &  tnef,
Calendar *  mCalendar,
InvitationFormatterHelper *  helper 
)

Format a TNEF attachment to an HTML mail.

Since:
4.1
QString KCal::IncidenceFormatter::mailBodyStr ( IncidenceBase *  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.
Since:
4.2

Definition at line 3370 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::mailBodyString ( IncidenceBase *  incidence  ) 

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.
Deprecated:
use mailBodyStr( IncidenceBase *, KDateTime::Spec )

Definition at line 3365 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::msTNEFToVPart ( const QByteArray &  tnef  ) 

Transform a TNEF attachment to an iCal or vCard.

Since:
4.1
QString KCal::IncidenceFormatter::recurrenceString ( Incidence *  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.
Since:
4.1

Definition at line 3401 of file incidenceformatter.cpp.

QStringList KCal::IncidenceFormatter::reminderStringList ( Incidence *  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.
Since:
4.5

Definition at line 3857 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::resourceString ( Calendar *  calendar,
Incidence *  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.
Since:
4.4

Definition at line 3776 of file incidenceformatter.cpp.

QString KCal::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().
Since:
4.3

Definition at line 3712 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::toolTipStr ( IncidenceBase *  incidence,
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:
incidence is a pointer to the Incidence to be formatted.
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.
Since:
4.2
Deprecated:
use toolTipStr( Calendar *, IncidenceBase *, bool, KDateTime::Spec)

Definition at line 3179 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::toolTipStr ( Calendar *  calendar,
IncidenceBase *  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:
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.
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.
Since:
4.4

Definition at line 3190 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::toolTipStr ( const QString &  sourceName,
IncidenceBase *  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.
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.
Since:
4.5

Definition at line 3203 of file incidenceformatter.cpp.

QString KCal::IncidenceFormatter::toolTipString ( IncidenceBase *  incidence,
bool  richText = true 
)

Create a QString representation of an Incidence in a nice format suitable for using in a tooltip.

Parameters:
incidence is a pointer to the Incidence to be formatted.
richText if yes, the QString will be created as RichText.
Deprecated:
use toolTipStr( Calendar *, IncidenceBase *, bool, KDateTime::Spec)

Definition at line 3173 of file incidenceformatter.cpp.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • 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
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • 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.1
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