KCalendarCore::VCalFormat
#include <vcalformat.h>

Public Member Functions | |
VCalFormat () | |
~VCalFormat () override | |
bool | fromRawString (const Calendar::Ptr &calendar, const QByteArray &string, bool deleted=false, const QString ¬ebook=QString()) override |
bool | fromString (const Calendar::Ptr &calendar, const QString &string, bool deleted, const QString ¬ebook=QString()) override |
virtual bool | fromString (const Calendar::Ptr &calendar, const QString &string, bool deleted, const QString ¬ebook={})=0 |
bool | fromString (const Calendar::Ptr &calendar, const QString &string, const QString ¬ebook={}) |
bool | load (const Calendar::Ptr &calendar, const QString &fileName) override |
bool | save (const Calendar::Ptr &calendar, const QString &fileName) override |
QString | toString (const Calendar::Ptr &calendar, const QString ¬ebook=QString(), bool deleted=false) override |
![]() | |
CalFormat () | |
virtual | ~CalFormat () |
void | clearException () |
Exception * | exception () const |
bool | fromString (const Calendar::Ptr &calendar, const QString &string, const QString ¬ebook={}) |
QString | loadedProductId () |
void | setException (Exception *error) |
Protected Member Functions | |
QDate | ISOToQDate (const QString &dtStr) |
QDateTime | ISOToQDateTime (const QString &dtStr) |
int | numFromDay (const QString &day) |
QString | parseDst (QByteArray &timezone) const |
QString | parseTZ (const QByteArray &timezone) const |
bool | parseTZOffsetISO8601 (const QString &s, int &result) |
void | populate (VObject *vcal, bool deleted=false, const QString ¬ebook=QString()) |
QString | qDateTimeToISO (const QDateTime &date, bool zulu=true) |
QString | qDateToISO (const QDate &date) |
void | readCustomProperties (VObject *o, const Incidence::Ptr &i) |
Attendee::PartStat | readStatus (const char *s) const |
Event::Ptr | VEventToEvent (VObject *vevent) |
void | virtual_hook (int id, void *data) override |
Todo::Ptr | VTodoToEvent (VObject *vtodo) |
void | writeCustomProperties (VObject *o, const Incidence::Ptr &i) |
QByteArray | writeStatus (Attendee::PartStat status) const |
![]() | |
void | setLoadedProductId (const QString &id) |
Additional Inherited Members | |
![]() | |
static const QString & | application () |
static QString | createUniqueId () |
static const QString & | productId () |
static void | setApplication (const QString &application, const QString &productID) |
Detailed Description
vCalendar format implementation.
This class implements the vCalendar format. It provides methods for loading/saving/converting vCalendar format data into the internal representation as Calendar and Incidences.
Definition at line 60 of file vcalformat.h.
Constructor & Destructor Documentation
◆ VCalFormat()
VCalFormat::VCalFormat | ( | ) |
Constructor a new vCalendar Format object.
Private class that helps to provide binary compatibility between releases.
Definition at line 75 of file vcalformat.cpp.
◆ ~VCalFormat()
|
override |
Destructor.
Definition at line 80 of file vcalformat.cpp.
Member Function Documentation
◆ fromRawString()
|
overridevirtual |
Implements KCalendarCore::CalFormat.
Definition at line 136 of file vcalformat.cpp.
◆ fromString() [1/3]
|
overridevirtual |
Implements KCalendarCore::CalFormat.
Definition at line 130 of file vcalformat.cpp.
◆ fromString() [2/3]
virtual bool KCalendarCore::CalFormat::fromString |
Loads a calendar from a string.
When a notebook is given, incidences are added to this notebook, otherwise no notebook is associated to loaded incidences. The notebook should already be added to the calendar, see Calendar::addNotebook().
- Parameters
-
calendar is the Calendar to be loaded. string is the QString containing the Calendar data. deleted use deleted incidences notebook notebook uid
- Returns
- true if successful; false otherwise.
- See also
- fromRawString(), toString().
- Deprecated:
- since 5.97, use fromString(const Calendar::Ptr &calendar, const QString &string, const QString ¬ebook) instead.
◆ fromString() [3/3]
bool CalFormat::fromString |
Loads a calendar from a string.
When a notebook is given, incidences are added to this notebook, otherwise no notebook is associated to loaded incidences. The notebook should already be added to the calendar, see Calendar::addNotebook().
- Parameters
-
calendar is the Calendar to be loaded. string is the QString containing the Calendar data. notebook notebook uid
- Returns
- true if successful; false otherwise.
- See also
- fromRawString(), toString().
- Since
- 5.97
Definition at line 49 of file calformat.cpp.
◆ ISOToQDate()
Takes a string in the YYYYMMDD format and returns a valid QDate.
- Parameters
-
dtStr is a QString containing the date to convert. If this value is invalid, then QDateTime() is returned.
Definition at line 1276 of file vcalformat.cpp.
◆ ISOToQDateTime()
Takes a string in YYYYMMDDTHHMMSS format and returns a valid QDateTime.
- Parameters
-
dtStr is a QString containing the date to convert. If this value is invalid, then QDateTime() is returned.
Definition at line 1243 of file vcalformat.cpp.
◆ load()
|
overridevirtual |
Implements KCalendarCore::CalFormat.
Definition at line 89 of file vcalformat.cpp.
◆ numFromDay()
|
protected |
Converts a two letter representation of the day (i.e.
MO, TU, WE, etc) and returns a number 0-6 corresponding to that ordinal day of the week.
- Parameters
-
day is the QString containing the two letter day representation.
Definition at line 1610 of file vcalformat.cpp.
◆ parseDst()
|
protected |
Parse DAYLIGHT tag from vtimezone.
Definition at line 1187 of file vcalformat.cpp.
◆ parseTZ()
|
protected |
Parse TZ tag from vtimezone.
Definition at line 1180 of file vcalformat.cpp.
◆ parseTZOffsetISO8601()
|
protected |
Parse one of the myriad of ISO8601 timezone offset formats, e.g.
+- hh : mm +- hh mm +- hh
- Parameters
-
s string to be parsed. result timezone offset in seconds, if parse succeeded.
- Returns
- Whether the parse succeeded or not.
Definition at line 1291 of file vcalformat.cpp.
◆ populate()
|
protected |
Takes a vCalendar tree of VObjects, and puts all of them that have the "event" property into the dictionary, todos in the todo-list, etc.
Definition at line 1361 of file vcalformat.cpp.
◆ qDateTimeToISO()
Takes a QDateTime and returns a string in format YYYYMMDDTHHMMSS.
- Parameters
-
date is the date to format. zulu if true, then shift the date to UTC.
Definition at line 1217 of file vcalformat.cpp.
◆ qDateToISO()
Takes a QDate and returns a string in the format YYYYMMDDTHHMMSS.
- Parameters
-
date is the date to format.
Definition at line 1208 of file vcalformat.cpp.
◆ readStatus()
|
protected |
Converts a status string into an Attendee::PartStat.
- Parameters
-
s is a null-terminated character string containing the status to convert.
- Returns
- a valid Attendee::PartStat. If the string provided is empty, null, or the contents are unrecognized, then Attendee::NeedsAction is returned.
Definition at line 1637 of file vcalformat.cpp.
◆ save()
|
overridevirtual |
Implements KCalendarCore::CalFormat.
Definition at line 121 of file vcalformat.cpp.
◆ toString()
|
overridevirtual |
Implements KCalendarCore::CalFormat.
Definition at line 165 of file vcalformat.cpp.
◆ VEventToEvent()
|
protected |
Translates a VObject into a Event and returns a pointer to it.
- Parameters
-
vevent is a pointer to a valid VObject object.
Definition at line 642 of file vcalformat.cpp.
◆ virtual_hook()
|
overrideprotectedvirtual |
Reimplemented from KCalendarCore::CalFormat.
Definition at line 1724 of file vcalformat.cpp.
◆ VTodoToEvent()
|
protected |
Translates a VObject of the TODO type into an Event.
- Parameters
-
vtodo is a pointer to a valid VObject object.
Definition at line 175 of file vcalformat.cpp.
◆ writeStatus()
|
protected |
Converts an Attendee::PartStat into a QByteArray string.
- Parameters
-
status is the Attendee::PartStat to convert.
- Returns
- a QByteArray containing the status string.
Definition at line 1669 of file vcalformat.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:00:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.