KItinerary::JsApi::JsonLd

Search for usage in LXR

KItinerary::JsApi::JsonLd Class Reference

#include <jsonld.h>

Inheritance diagram for KItinerary::JsApi::JsonLd:

Public Member Functions

Q_INVOKABLE QJSValue apply (const QJSValue &lhs, const QJSValue &rhs) const
 
Q_INVOKABLE QJSValue busToTrainReservation (const QJSValue &busRes) const
 
Q_INVOKABLE QJSValue clone (const QJSValue &v) const
 
Q_INVOKABLE QJSValue newBoatReservation () const
 
Q_INVOKABLE QJSValue newBusReservation () const
 
Q_INVOKABLE QJSValue newEventReservation () const
 
Q_INVOKABLE QJSValue newFlightReservation () const
 
Q_INVOKABLE QJSValue newFoodEstablishmentReservation () const
 
Q_INVOKABLE QJSValue newLodgingReservation () const
 
Q_INVOKABLE QJSValue newObject (const QString &typeName) const
 
Q_INVOKABLE QJSValue newRentalCarReservation () const
 
Q_INVOKABLE QJSValue newTrainReservation () const
 
Q_INVOKABLE QJSValue readQDateTime (const QVariant &obj, const QString &propName) const
 
Q_INVOKABLE QDateTime toDateTime (const QString &dtStr, const QJSValue &format, const QJSValue &localeName) const
 
Q_INVOKABLE QJSValue toGeoCoordinates (const QString &mapUrl)
 
Q_INVOKABLE QJSValue toJson (const QVariant &v) const
 
Q_INVOKABLE QJSValue trainToBusReservation (const QJSValue &trainRes) const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Methods to create JSON-LD objects.

Definition at line 19 of file jsapi/jsonld.h.

Member Function Documentation

◆ apply()

QJSValue JsApi::JsonLd::apply ( const QJSValue & lhs,
const QJSValue & rhs ) const
See also
JsonLdDocument::apply.

Definition at line 377 of file jsapi/jsonld.cpp.

◆ busToTrainReservation()

QJSValue JsApi::JsonLd::busToTrainReservation ( const QJSValue & busRes) const

Convert a bus reservation to a train reservation.

Definition at line 204 of file jsapi/jsonld.cpp.

◆ clone()

QJSValue JsApi::JsonLd::clone ( const QJSValue & v) const

Clones the given JS object.

That is, create a deep copy of v.

Definition at line 330 of file jsapi/jsonld.cpp.

◆ newBoatReservation()

QJSValue JsApi::JsonLd::newBoatReservation ( ) const

Convenience method that generates a full BoatReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 180 of file jsapi/jsonld.cpp.

◆ newBusReservation()

QJSValue JsApi::JsonLd::newBusReservation ( ) const

Convenience method that generates a full BusReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 96 of file jsapi/jsonld.cpp.

◆ newEventReservation()

QJSValue JsApi::JsonLd::newEventReservation ( ) const

Convenience method that generates a full EventReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 131 of file jsapi/jsonld.cpp.

◆ newFlightReservation()

QJSValue JsApi::JsonLd::newFlightReservation ( ) const

Convenience method that generates a full FlightReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 50 of file jsapi/jsonld.cpp.

◆ newFoodEstablishmentReservation()

QJSValue JsApi::JsonLd::newFoodEstablishmentReservation ( ) const

Convenience method that generates a full FoodEstablishmentReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 149 of file jsapi/jsonld.cpp.

◆ newLodgingReservation()

QJSValue JsApi::JsonLd::newLodgingReservation ( ) const

Convenience method that generates a full LodgingReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 119 of file jsapi/jsonld.cpp.

◆ newObject()

QJSValue JsApi::JsonLd::newObject ( const QString & typeName) const

Create a new JSON-LD object of type typeName.

Definition at line 31 of file jsapi/jsonld.cpp.

◆ newRentalCarReservation()

QJSValue JsApi::JsonLd::newRentalCarReservation ( ) const

Convenience method that generates a full RentalCarReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 161 of file jsapi/jsonld.cpp.

◆ newTrainReservation()

QJSValue JsApi::JsonLd::newTrainReservation ( ) const

Convenience method that generates a full TrainReservation JS object.

This can be used by extractor scripts to fill in the extracted information.

Definition at line 72 of file jsapi/jsonld.cpp.

◆ readQDateTime()

QJSValue JsApi::JsonLd::readQDateTime ( const QVariant & obj,
const QString & propName ) const

Read a QDateTime property and return a JSON-LD serialization of it.

This is a workaround for JS destroying timezone information when getting in touch with a QDateTime object. With this method it is safe to read a QDateTime property e.g. from a Qt gadget or QObject without the risk of losing information.

Parameters
objThe object to read from.
propNameThe name of the property to read.

Definition at line 361 of file jsapi/jsonld.cpp.

◆ toDateTime()

QDateTime JsApi::JsonLd::toDateTime ( const QString & dtStr,
const QJSValue & format,
const QJSValue & localeName ) const

Convert a date/time string to a date/time value.

Parameters
dtStrThe input string containing a date/time value.
formatThe format of the input string. Same format specification as used by QLocale and QDateTime. If the year is not part of the date it is attempted to be recovered from the context date set on the ExtractorEngine (that is, the returned date will be after the context date). Can be a string or an array of strings, which are then tried sequentially.
localeNameThe locale in which the string is formatted. This is relevant when the input contains for example localized month names or month abbreviations. Can be a string or an array of strings.

Definition at line 291 of file jsapi/jsonld.cpp.

◆ toGeoCoordinates()

QJSValue JsApi::JsonLd::toGeoCoordinates ( const QString & mapUrl)

Parses geo coordinates from a given mapping service URLs.

This consumes for example Google Maps links and returns a JSON-LD GeoCoordinates object.

Definition at line 335 of file jsapi/jsonld.cpp.

◆ toJson()

QJSValue JsApi::JsonLd::toJson ( const QVariant & v) const

Convert object v to a JSON-LD object.

This is useful when interacting with API returning regular data types, such as Uic9183Parser.

Definition at line 319 of file jsapi/jsonld.cpp.

◆ trainToBusReservation()

QJSValue JsApi::JsonLd::trainToBusReservation ( const QJSValue & trainRes) const

Convert a train reservation to a bus reservation.

Definition at line 199 of file jsapi/jsonld.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.