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 
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_BASE_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_BASE_GADGET(LocalBusiness)
76 };
77 
78 /** Hotel.
79  * @see https://schema.org/LodgingBusiness
80  */
81 class KITINERARY_EXPORT LodgingBusiness: public LocalBusiness
82 {
83  KITINERARY_GADGET(LodgingBusiness)
84 };
85 
86 /** Food-related business (such as a restaurant, or a bakery).
87  * @see https://schema.org/FoodEstablishment
88  */
89 class KITINERARY_EXPORT FoodEstablishment: public LocalBusiness
90 {
91  KITINERARY_GADGET(FoodEstablishment)
92 };
93 
94 } // namespace KItinerary
95 
96 Q_DECLARE_METATYPE(KItinerary::Organization)
97 Q_DECLARE_METATYPE(KItinerary::Airline)
98 Q_DECLARE_METATYPE(KItinerary::FoodEstablishment)
99 Q_DECLARE_METATYPE(KItinerary::LodgingBusiness)
100 
Food-related business (such as a restaurant, or a bakery).
Definition: organization.h:89
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-2022 The KDE developers.
Generated on Tue Sep 27 2022 03:59:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.