KItinerary

organization.h
1 /*
2  SPDX-FileCopyrightText: 2018 Luca Beltrame <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 
8 #pragma once
9 
10 #include "kitinerary_export.h"
11 
12 #include "datatypes.h"
13 #include "place.h"
14 
15 class QUrl;
16 
17 namespace KItinerary {
18 
19 class OrganizationPrivate;
20 
21 /** An organization.
22  *
23  * This slightly deviates from the schema.org definition and also includes
24  * properties of Place that its sub-classes need. This is a simplification
25  * to avoid having to use multi-inheritance.
26  *
27  * @see https://schema.org/Organization
28  */
29 
30 class KITINERARY_EXPORT Organization
31 {
32  KITINERARY_BASE_GADGET(Organization)
33  KITINERARY_PROPERTY(QString, name, setName)
34  KITINERARY_PROPERTY(QString, identifier, setIdentifier)
35  KITINERARY_PROPERTY(QString, description, setDescription)
36  KITINERARY_PROPERTY(QUrl, image, setImage)
37  KITINERARY_PROPERTY(QUrl, logo, setLogo)
38  KITINERARY_PROPERTY(QString, email, setEmail)
39  KITINERARY_PROPERTY(QString, telephone, setTelephone)
40  KITINERARY_PROPERTY(QUrl, url, setUrl)
41  KITINERARY_PROPERTY(KItinerary::PostalAddress, address, setAddress)
42  KITINERARY_PROPERTY(KItinerary::GeoCoordinates, geo, setGeo)
43  KITINERARY_PROPERTY(QVariantList, potentialAction, setPotentialAction)
44 protected:
45  ///@cond internal
47  ///@endcond
48 };
49 
50 class AirlinePrivate;
51 
52 /** An airline.
53  * @see https://schema.org/Airline
54  */
55 class KITINERARY_EXPORT Airline : public Organization
56 {
57  KITINERARY_BASE_GADGET(Airline)
58  KITINERARY_PROPERTY(QString, iataCode, setIataCode)
59 };
60 
61 class LocalBusinessPrivate;
62 
63 /** LocalBusiness.
64  * @see https://schema.org/LocalBusiness
65  */
66 class KITINERARY_EXPORT LocalBusiness : public Organization
67 {
68  KITINERARY_BASE_GADGET(LocalBusiness)
69 };
70 
71 /** Hotel.
72  * @see https://schema.org/LodgingBusiness
73  */
74 class KITINERARY_EXPORT LodgingBusiness: public LocalBusiness
75 {
76  KITINERARY_GADGET(LodgingBusiness)
77 };
78 
79 /** Food-related business (such as a restaurant, or a bakery).
80  * @see https://schema.org/FoodEstablishment
81  */
82 class KITINERARY_EXPORT FoodEstablishment: public LocalBusiness
83 {
84  KITINERARY_GADGET(FoodEstablishment)
85 };
86 
87 } // namespace KItinerary
88 
89 Q_DECLARE_METATYPE(KItinerary::Organization)
90 Q_DECLARE_METATYPE(KItinerary::Airline)
91 Q_DECLARE_METATYPE(KItinerary::FoodEstablishment)
92 Q_DECLARE_METATYPE(KItinerary::LodgingBusiness)
93 
An airline.
Definition: organization.h:55
Classes for reservation/travel data models, data extraction and data augmentation.
Food-related business (such as a restaurant, or a bakery).
Definition: organization.h:82
const QLatin1String name
Geographic coordinates.
Definition: place.h:21
An organization.
Definition: organization.h:30
Postal address.
Definition: place.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:05:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.