KItinerary

organization.h
1/*
2 SPDX-FileCopyrightText: 2018 Luca Beltrame <lbeltrame@kde.org>
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
15class QUrl;
16
17namespace KItinerary {
18
19class 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
30class 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
48public:
49 QUrl geoUri() const;
50
51protected:
52 ///@cond internal
53 QExplicitlySharedDataPointer<OrganizationPrivate> d;
54 ///@endcond
55};
56
57class AirlinePrivate;
58
59/** An airline.
60 * @see https://schema.org/Airline
61 */
62class KITINERARY_EXPORT Airline : public Organization
63{
64 KITINERARY_GADGET(Airline)
65 KITINERARY_PROPERTY(QString, iataCode, setIataCode)
66};
67
68class LocalBusinessPrivate;
69
70/** LocalBusiness.
71 * @see https://schema.org/LocalBusiness
72 */
73class KITINERARY_EXPORT LocalBusiness : public Organization
74{
75 KITINERARY_GADGET(LocalBusiness)
76};
77
78class LodgingBusinessPrivate;
79
80/** Hotel.
81 * @see https://schema.org/LodgingBusiness
82 */
83class KITINERARY_EXPORT LodgingBusiness: public LocalBusiness
84{
85 KITINERARY_GADGET(LodgingBusiness)
86};
87
88class FoodEstablishmentPrivate;
89
90/** Food-related business (such as a restaurant, or a bakery).
91 * @see https://schema.org/FoodEstablishment
92 */
93class KITINERARY_EXPORT FoodEstablishment: public LocalBusiness
94{
95 KITINERARY_GADGET(FoodEstablishment)
96};
97
98} // namespace KItinerary
99
100Q_DECLARE_METATYPE(KItinerary::Organization)
101Q_DECLARE_METATYPE(KItinerary::Airline)
102Q_DECLARE_METATYPE(KItinerary::FoodEstablishment)
103Q_DECLARE_METATYPE(KItinerary::LodgingBusiness)
104
Food-related business (such as a restaurant, or a bakery).
Geographic coordinates.
Definition place.h:23
Postal address.
Definition place.h:46
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.