KItinerary::CalendarHandler

KItinerary::CalendarHandler Namespace Reference

Functions

bool canCreateEvent (const QVariant &reservation)
 
void fillEvent (const QVector< QVariant > &reservations, const QSharedPointer< KCalendarCore::Event > &event)
 
KITINERARY_DEPRECATED_EXPORT QSharedPointer< KCalendarCore::EventfindEvent (const QSharedPointer< KCalendarCore::Calendar > &calendar, const QVariant &reservation)
 
QVector< QSharedPointer< KCalendarCore::Event > > findEvents (const QSharedPointer< KCalendarCore::Calendar > &calendar, const QVariant &reservation)
 
QVector< QVariantreservationsForEvent (const QSharedPointer< KCalendarCore::Event > &event)
 

Detailed Description

Methods for converting between ical events and JSON-LD booking data.

Function Documentation

bool KItinerary::CalendarHandler::canCreateEvent ( const QVariant reservation)

Checks if the given reservation contains enough information to create an iCal event from it.

Definition at line 138 of file calendarhandler.cpp.

void KItinerary::CalendarHandler::fillEvent ( const QVector< QVariant > &  reservations,
const QSharedPointer< KCalendarCore::Event > &  event 
)

Fills event with details of reservations.

Can be used on new events or to update existing ones.

Parameters
reservationsWhen passing more than one reservation here, those must be for the same multi-traveler trip. That is, MergeUtil::isSame() returns true for Reservation::reservationFor for each pair of values.
eventThe event.

Definition at line 154 of file calendarhandler.cpp.

QSharedPointer< KCalendarCore::Event > KItinerary::CalendarHandler::findEvent ( const QSharedPointer< KCalendarCore::Calendar > &  calendar,
const QVariant reservation 
)

Attempts to find an event in calendar for reservation.

Deprecated:
since 20.08 use findEvents instead.

Definition at line 114 of file calendarhandler.cpp.

QVector< QSharedPointer< KCalendarCore::Event > > KItinerary::CalendarHandler::findEvents ( const QSharedPointer< KCalendarCore::Calendar > &  calendar,
const QVariant reservation 
)

Attempts to find calendar events in calendar for reservation.

For a complete reservation this should not return more than one element, for a minimal cancellation element however this can return multiple events (e.g. all trip segments covered by the same reservation number).

Since
20.08

Definition at line 71 of file calendarhandler.cpp.

QVector< QVariant > KItinerary::CalendarHandler::reservationsForEvent ( const QSharedPointer< KCalendarCore::Event > &  event)

Returns the reservations for this event.

In case of a mult-travler trip, the result contains more than one reservation.

Definition at line 126 of file calendarhandler.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 20 2022 23:06:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.