KCalendarCore
icalformat.cpp
Go to the documentation of this file.
141 bool ICalFormat::fromString(const Calendar::Ptr &cal, const QString &string, bool deleted, const QString ¬ebook)
152 icalcomponent *calendar = icalcomponent_new_from_string(const_cast<char *>(string.constData()));
154 qCritical() << "parse error from icalcomponent_new_from_string. string=" << QString::fromLatin1(string);
184 bool ICalFormat::fromRawString(const Calendar::Ptr &cal, const QByteArray &string, bool deleted, const QString ¬ebook)
195 qCritical() << "parse error from icalcomponent_new_from_string. string=" << QString::fromLatin1(string);
266 if (notebook.isEmpty() || (!cal->notebook(*it).isEmpty() && notebook.endsWith(cal->notebook(*it)))) {
278 if (notebook.isEmpty() || (!cal->notebook(*it).isEmpty() && notebook.endsWith(cal->notebook(*it)))) {
291 if (notebook.isEmpty() || (!cal->notebook(*it).isEmpty() && notebook.endsWith(cal->notebook(*it)))) {
391 // contrary to the libical API docs, the returned string is actually freed by icalmemory_free_ring,
429 QString ICalFormat::createScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method)
509 ScheduleMessage::Ptr ICalFormat::parseScheduleMessage(const Calendar::Ptr &cal, const QString &messageText)
610 qCWarning(KCALCORE_LOG) << ScheduleMessage::methodName(method) << ":" << d->mImpl.extractErrorProperty(c);
634 icalproperty_xlicclass result = icalclassify(message, calendarComponent, static_cast<const char *>(""));
QTimeZone utc()
T & first()
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
bool fromRawString(const Calendar::Ptr &calendar, const QByteArray &string, bool deleted=false, const QString ¬ebook=QString()) override
Definition: icalformat.cpp:184
QString errorString() const const
bool isEmpty() const const
Represents a span of time measured in seconds or days.
Definition: duration.h:43
ReadOnly
QString fromUtf8(const char *str, int size)
bool remove()
QString toString(const Calendar::Ptr &calendar, const QString ¬ebook=QString(), bool deleted=false) override
Definition: icalformat.cpp:251
bool load(const Calendar::Ptr &calendar, const QString &fileName) override
Definition: icalformat.cpp:64
QByteArray & append(char ch)
virtual bool open(QIODevice::OpenMode mode) override
QVector::const_iterator cend() const const
bool copy(const QString &newName)
Incidence::Ptr readIncidence(const QByteArray &string)
Parses a bytearray, returning the first iCal component as an Incidence, ignoring timezone information...
Definition: icalformat.cpp:147
void setTimeZone(const QTimeZone &timeZone)
Sets the iCalendar time zone.
Definition: icalformat.cpp:666
bool commit()
QByteArray trimmed() const const
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:59
FreeBusy::Ptr parseFreeBusy(const QString &string)
Converts a QString into a FreeBusy object.
Definition: icalformat.cpp:475
QByteArray toLatin1() const const
QString toICalString(const Incidence::Ptr &incidence)
Converts an Incidence to iCalendar formatted text.
Definition: icalformat.cpp:332
QSharedPointer< ScheduleMessage > Ptr
A shared pointer to a ScheduleMessage.
Definition: schedulemessage.h:59
Exception base class, currently used as a fancy kind of error code and not as an C++ exception.
Definition: exceptions.h:41
void setException(Exception *error)
Sets an exception that is to be used by the functions of this class to report errors.
Definition: calformat.cpp:59
virtual bool open(QIODevice::OpenMode mode) override
QString createScheduleMessage(const IncidenceBase::Ptr &incidence, iTIPMethod method)
Creates a scheduling message string for an Incidence.
Definition: icalformat.cpp:429
bool fromString(const Calendar::Ptr &calendar, const QString &string, bool deleted, const QString ¬ebook) override
Definition: icalformat.cpp:141
An abstract class that provides a common base for all calendar incidence classes.
Definition: incidencebase.h:98
QByteArray timeZoneId() const
Returns the timezone id string used by the iCalendar; an empty string if the iCalendar does not have ...
Definition: icalformat.cpp:678
void setLoadedProductId(const QString &id)
Sets the PRODID string loaded from calendar file.
Definition: calformat.cpp:90
QVector::const_iterator cbegin() const const
bool isEmpty() const const
QByteArray toUtf8() const const
Q_SCRIPTABLE CaptureState status()
Exception * exception() const
Returns an exception, if there is any, containing information about the last error that occurred.
Definition: calformat.cpp:64
bool isEmpty() const const
virtual void close() override
This class represents a recurrence rule for a calendar incidence.
Definition: recurrencerule.h:31
bool flush()
bool isEmpty() const const
const char * constData() const const
bool save(const Calendar::Ptr &calendar, const QString &fileName) override
Definition: icalformat.cpp:95
An abstract base class that provides an interface to various calendar formats.
Definition: calformat.h:38
ScheduleMessage::Ptr parseScheduleMessage(const Calendar::Ptr &calendar, const QString &string)
Parses a Calendar scheduling message string into ScheduleMessage object.
Definition: icalformat.cpp:509
QString fromLatin1(const char *str, int size)
Duration durationFromString(const QString &duration) const
Parses a string representation of a duration.
Definition: icalformat.cpp:417
int size() const const
QByteArray readAll()
void virtual_hook(int id, void *data) override
Definition: icalformat.cpp:685
This class provides a calendar stored in memory.
Definition: memorycalendar.h:31
QByteArray toRawString(const Incidence::Ptr &incidence)
Converts an Incidence to a QByteArray.
Definition: icalformat.cpp:346
static QString methodName(iTIPMethod method)
Returns a machine-readable (not translatable) name for a iTIP method.
Definition: schedulemessage.cpp:58
QString message
char * data()
qint64 write(const char *data, qint64 maxSize)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.