KItinerary::CalendarHandler Namespace Reference


bool canCreateEvent (const QVariant &reservation)
void fillEvent (const QVector< QVariant > &reservations, const QSharedPointer< KCalendarCore::Event > &event)
QVector< QSharedPointer< KCalendarCore::Event > > findEvents (const QSharedPointer< KCalendarCore::Calendar > &calendar, const QVariant &reservation)
QVector< QSharedPointer< KCalendarCore::Event > > findEvents (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

◆ canCreateEvent()

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 133 of file calendarhandler.cpp.

◆ fillEvent()

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.

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 149 of file calendarhandler.cpp.

◆ findEvents()

QVector< QSharedPointer< KCalendarCore::Event > > KItinerary::CalendarHandler::findEvents ( 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).


Definition at line 78 of file calendarhandler.cpp.

◆ reservationsForEvent()

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 121 of file calendarhandler.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:16:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.