KItinerary::CalendarHandler

KItinerary::CalendarHandler Namespace Reference

Functions

bool canCreateEvent (const QVariant &reservation)
 
void fillEvent (const QList< QVariant > &reservations, const QSharedPointer< KCalendarCore::Event > &event)
 
QList< QSharedPointer< KCalendarCore::Event > > findEvents (const QSharedPointer< KCalendarCore::Calendar > &calendar, const QVariant &reservation)
 
QList< QSharedPointer< KCalendarCore::Event > > findEvents (KCalendarCore::Calendar *calendar, const QVariant &reservation)
 
QList< 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 124 of file calendarhandler.cpp.

◆ fillEvent()

void KItinerary::CalendarHandler::fillEvent ( const QList< 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 135 of file calendarhandler.cpp.

◆ findEvents() [1/2]

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

Definition at line 68 of file calendarhandler.cpp.

◆ findEvents() [2/2]

QList< 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).

Since
20.08

Definition at line 75 of file calendarhandler.cpp.

◆ reservationsForEvent()

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

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.