KCalendarCore
vcalformat.cpp
Go to the documentation of this file.
57 qCritical() << "There number of relatedTos for this incidence is " << cnt << " (there must be 1 relatedTo only)";
177 anEvent->setCreated(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
192 anEvent->setLastModified(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
224 a = Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1)));
285 anEvent->setCompleted(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
302 anEvent->setDtDue(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
304 if (anEvent->dtDue().time().hour() == 0 && anEvent->dtDue().time().minute() == 0 && anEvent->dtDue().time().second() == 0) {
313 anEvent->setDtStart(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
315 if (anEvent->dtStart().time().hour() == 0 && anEvent->dtStart().time().minute() == 0 && anEvent->dtStart().time().second() == 0) {
436 if ((tmpStr.mid((index2 - 1), 1) == QLatin1String("-")) || (tmpStr.mid((index2 - 1), 1) == QLatin1String("+"))) {
636 anEvent->setCreated(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
662 anEvent->setLastModified(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
695 a = Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1)));
731 anEvent->setDtStart(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
734 if (anEvent->dtStart().time().hour() == 0 && anEvent->dtStart().time().minute() == 0 && anEvent->dtStart().time().second() == 0) {
741 anEvent->setDtEnd(ISOToQDateTime(QString::fromUtf8(s = fakeCString(vObjectUStringZValue(vo)))));
744 if (anEvent->dtEnd().time().hour() == 0 && anEvent->dtEnd().time().minute() == 0 && anEvent->dtEnd().time().second() == 0) {
873 if ((tmpStr.mid((index2 - 1), 1) == QLatin1String("-")) || (tmpStr.mid((index2 - 1), 1) == QLatin1String("+"))) {
974 anEvent->setDescription(anEvent->description() + QLatin1Char('\n') + QString::fromUtf8(s), isRich);
1180 return QStringLiteral("TRUE;") + sOffset + QLatin1Char(';') + sStart + QLatin1Char(';') + sEnd + QLatin1String(";;");
1334 // qCDebug(KCALCORE_LOG) << "This calendar is an iTIP transaction of type '" << methodType << "'";
1353 qCDebug(KCALCORE_LOG) << "This vCalendar file has version" << s << "We only support" << _VCAL_VERSION;
1422 tz = QStringLiteral("%1;%2;false;%3").arg(strRealEndDate, QString::number(utcOffset), realEndDate.toString());
1425 tz = QStringLiteral("%1;%2;true;%3").arg(strRealStartDate, QString::number(utcOffsetDst), realStartDate.toString());
1479 !anEvent->hasRecurrenceId() ? d->mCalendar->event(anEvent->uid()) : d->mCalendar->event(anEvent->uid(), anEvent->recurrenceId());
1509 Todo::Ptr old = !aTodo->hasRecurrenceId() ? d->mCalendar->todo(aTodo->uid()) : d->mCalendar->todo(aTodo->uid(), aTodo->recurrenceId());
1642 i->setNonKDECustomProperty(curname, QString::fromUtf8(s = fakeCString(vObjectUStringZValue(cur))));
1654 if (d->mManuallyWrittenExtensionFields.contains(property) || property.startsWith("X-KDE-VOLATILE")) { // krazy:exclude=strings
This file is part of the API for handling calendar data and defines the Calendar class.
Represents information related to an attachment for a Calendar Incidence.
Definition attachment.h:47
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition attendee.h:45
void setStatus(PartStat status)
Sets the PartStat of the attendee to status.
Definition attendee.cpp:205
An abstract base class that provides an interface to various calendar formats.
Definition calformat.h:39
void setLoadedProductId(const QString &id)
Sets the PRODID string loaded from calendar file.
Definition calformat.cpp:83
static const QString & productId()
Returns the our library's PRODID string to write into calendar files.
Definition calformat.cpp:73
void setException(Exception *error)
Sets an exception that is to be used by the functions of this class to report errors.
Definition calformat.cpp:52
Exception base class, currently used as a fancy kind of error code and not as an C++ exception.
Definition exceptions.h:42
QString qDateTimeToISO(const QDateTime &date, bool zulu=true)
Takes a QDateTime and returns a string in format YYYYMMDDTHHMMSS.
Definition vcalformat.cpp:1192
QDateTime ISOToQDateTime(const QString &dtStr)
Takes a string in YYYYMMDDTHHMMSS format and returns a valid QDateTime.
Definition vcalformat.cpp:1218
QByteArray writeStatus(Attendee::PartStat status) const
Converts an Attendee::PartStat into a QByteArray string.
Definition vcalformat.cpp:1608
QString qDateToISO(const QDate &date)
Takes a QDate and returns a string in the format YYYYMMDDTHHMMSS.
Definition vcalformat.cpp:1183
Todo::Ptr VTodoToEvent(VObject *vtodo)
Translates a VObject of the TODO type into an Event.
Definition vcalformat.cpp:166
void populate(VObject *vcal)
Takes a vCalendar tree of VObjects, and puts all of them that have the "event" property into the dict...
Definition vcalformat.cpp:1320
QString parseDst(QByteArray &timezone) const
Parse DAYLIGHT tag from vtimezone.
Definition vcalformat.cpp:1162
Attendee::PartStat readStatus(const char *s) const
Converts a status string into an Attendee::PartStat.
Definition vcalformat.cpp:1576
bool load(const Calendar::Ptr &calendar, const QString &fileName) override
Definition vcalformat.cpp:89
bool parseTZOffsetISO8601(const QString &s, int &result)
Parse one of the myriad of ISO8601 timezone offset formats, e.g.
Definition vcalformat.cpp:1258
QString parseTZ(const QByteArray &timezone) const
Parse TZ tag from vtimezone.
Definition vcalformat.cpp:1155
QDate ISOToQDate(const QString &dtStr)
Takes a string in the YYYYMMDD format and returns a valid QDate.
Definition vcalformat.cpp:1247
Event::Ptr VEventToEvent(VObject *vevent)
Translates a VObject into a Event and returns a pointer to it.
Definition vcalformat.cpp:625
QString toString(const Calendar::Ptr &calendar) override
Definition vcalformat.cpp:158
bool save(const Calendar::Ptr &calendar, const QString &fileName) override
Definition vcalformat.cpp:121
bool fromRawString(const Calendar::Ptr &calendar, const QByteArray &string) override
Definition vcalformat.cpp:129
int numFromDay(const QString &day)
Converts a two letter representation of the day (i.e.
Definition vcalformat.cpp:1549
This file is part of the API for handling calendar data and defines the Exception class.
Q_SCRIPTABLE CaptureState status()
bool fill(bool value, qsizetype size)
void setBit(qsizetype i)
bool contains(QByteArrayView bv) const const
qsizetype indexOf(QByteArrayView bv, qsizetype from) const const
QByteArray mid(qsizetype pos, qsizetype len) const const
int day() const const
bool isValid(int year, int month, int day)
int month() const const
bool setDate(int year, int month, int day)
int year() const const
QDateTime currentDateTimeUtc()
QDate date() const const
bool isValid() const const
void setTimeZone(const QTimeZone &toZone)
QTime time() const const
QTimeZone timeZone() const const
QString toString(QStringView format, QCalendar cal) const const
QDateTime toTimeZone(const QTimeZone &timeZone) const const
QDateTime toUTC() const const
QString decodeName(const QByteArray &localFileName)
QByteArray encodeName(const QString &fileName)
void append(QList< T > &&value)
qsizetype size() const const
const_iterator cbegin() const const
const_iterator cend() const const
QString arg(Args &&... args) const const
QString asprintf(const char *cformat,...)
const QChar at(qsizetype position) const const
void chop(qsizetype n)
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
QString & insert(qsizetype position, QChar ch)
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
QString number(double n, char format, int precision)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QString simplified() const const
qsizetype size() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
short toShort(bool *ok, int base) const const
QString toUpper() const const
QString trimmed() const const
QStringView left(qsizetype length) const const
QStringView mid(qsizetype start, qsizetype length) const const
int toInt(bool *ok, int base) const const
bool mightBeRichText(const QString &text)
int hour() const const
bool isValid(int h, int m, int s, int ms)
int minute() const const
int second() const const
bool setHMS(int h, int m, int s, int ms)
bool isTimeZoneIdAvailable(const QByteArray &ianaId)
QTimeZone utc()
This file is part of the API for handling calendar data and defines the VCalFormat base class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.