KItinerary

organization.cpp
1/*
2 SPDX-FileCopyrightText: 2018 Luca Beltrame <lbeltrame@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "organization.h"
8#include "datatypes_p.h"
9#include "locationutil.h"
10
11#include <QUrl>
12
13using namespace KItinerary;
14
15namespace KItinerary {
16
17class OrganizationPrivate: public QSharedData
18{
19 KITINERARY_PRIVATE_BASE_GADGET(Organization)
20public:
21 QString name;
22 QString identifier;
23 QString description;
24 QUrl image;
25 QUrl logo;
26 QString email;
27 QString telephone;
28 QUrl url;
29 PostalAddress address;
31 QVariantList potentialAction;
32};
33
34KITINERARY_MAKE_CLASS(Organization)
35KITINERARY_MAKE_PROPERTY(Organization, QString, name, setName)
36KITINERARY_MAKE_PROPERTY(Organization, QString, identifier, setIdentifier)
37KITINERARY_MAKE_PROPERTY(Organization, QString, description, setDescription)
38KITINERARY_MAKE_PROPERTY(Organization, QUrl, image, setImage)
39KITINERARY_MAKE_PROPERTY(Organization, QUrl, logo, setLogo)
40KITINERARY_MAKE_PROPERTY(Organization, QString, email, setEmail)
41KITINERARY_MAKE_PROPERTY(Organization, QString, telephone, setTelephone)
42KITINERARY_MAKE_PROPERTY(Organization, QUrl, url, setUrl)
43KITINERARY_MAKE_PROPERTY(Organization, PostalAddress, address, setAddress)
44KITINERARY_MAKE_PROPERTY(Organization, KItinerary::GeoCoordinates, geo, setGeo)
45KITINERARY_MAKE_PROPERTY(Organization, QVariantList, potentialAction, setPotentialAction)
46KITINERARY_MAKE_OPERATOR(Organization)
47
49{
50 return LocationUtil::geoUri(*this);
51}
52
53class AirlinePrivate : public OrganizationPrivate
54{
55 KITINERARY_PRIVATE_GADGET(Airline)
56public:
57 QString iataCode;
58};
59
60KITINERARY_MAKE_DERIVED_CLASS(Airline, Organization)
61KITINERARY_MAKE_PROPERTY(Airline, QString, iataCode, setIataCode)
62KITINERARY_MAKE_OPERATOR(Airline)
63
64class LocalBusinessPrivate : public OrganizationPrivate
65{
66 KITINERARY_PRIVATE_GADGET(LocalBusiness)
67};
68KITINERARY_MAKE_DERIVED_CLASS(LocalBusiness, Organization)
69KITINERARY_MAKE_OPERATOR(LocalBusiness)
70
71class FoodEstablishmentPrivate: public LocalBusinessPrivate
72{
73 KITINERARY_PRIVATE_GADGET(FoodEstablishment)
74};
75KITINERARY_MAKE_DERIVED_CLASS(FoodEstablishment, LocalBusiness)
76KITINERARY_MAKE_OPERATOR(FoodEstablishment)
77
78class LodgingBusinessPrivate : public LocalBusinessPrivate
79{
80 KITINERARY_PRIVATE_GADGET(LodgingBusiness)
81};
82KITINERARY_MAKE_DERIVED_CLASS(LodgingBusiness, LocalBusiness)
83KITINERARY_MAKE_OPERATOR(LodgingBusiness)
84
85}
86
87template <>
89{
90 return d->clone();
91}
92
93#include "moc_organization.cpp"
Food-related business (such as a restaurant, or a bakery).
Geographic coordinates.
Definition place.h:23
Postal address.
Definition place.h:46
QUrl geoUri(const QVariant &location)
Returns a geo: URI for the given location.
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.