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_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 
45  /** @see LocationUtil::geoUri() */
46  Q_PROPERTY(QUrl geoUri READ geoUri STORED false)
47 
48 public:
49  QUrl geoUri() const;
50 
51 protected:
52  ///@cond internal
53  QExplicitlySharedDataPointer<OrganizationPrivate> d;
54  ///@endcond
55 };
56 
57 class AirlinePrivate;
58 
59 /** An airline.
60  * @see https://schema.org/Airline
61  */
62 class KITINERARY_EXPORT Airline : public Organization
63 {
64  KITINERARY_GADGET(Airline)
65  KITINERARY_PROPERTY(QString, iataCode, setIataCode)
66 };
67 
68 class LocalBusinessPrivate;
69 
70 /** LocalBusiness.
71  * @see https://schema.org/LocalBusiness
72  */
73 class KITINERARY_EXPORT LocalBusiness : public Organization
74 {
75  KITINERARY_GADGET(LocalBusiness)
76 };
77 
78 class LodgingBusinessPrivate;
79 
80 /** Hotel.
81  * @see https://schema.org/LodgingBusiness
82  */
83 class KITINERARY_EXPORT LodgingBusiness: public LocalBusiness
84 {
85  KITINERARY_GADGET(LodgingBusiness)
86 };
87 
88 class FoodEstablishmentPrivate;
89 
90 /** Food-related business (such as a restaurant, or a bakery).
91  * @see https://schema.org/FoodEstablishment
92  */
93 class KITINERARY_EXPORT FoodEstablishment: public LocalBusiness
94 {
95  KITINERARY_GADGET(FoodEstablishment)
96 };
97 
98 } // namespace KItinerary
99 
100 Q_DECLARE_METATYPE(KItinerary::Organization)
101 Q_DECLARE_METATYPE(KItinerary::Airline)
102 Q_DECLARE_METATYPE(KItinerary::FoodEstablishment)
103 Q_DECLARE_METATYPE(KItinerary::LodgingBusiness)
104 
Food-related business (such as a restaurant, or a bakery).
Definition: organization.h:93
Postal address.
Definition: place.h:45
Geographic coordinates.
Definition: place.h:22
An organization.
Definition: organization.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jan 31 2023 04:05:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.