KItinerary

programmembership.cpp
1/*
2 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "programmembership.h"
8#include "datatypes_p.h"
9
10using namespace KItinerary;
11
12namespace KItinerary {
13class ProgramMembershipPrivate : public QSharedData
14{
15public:
16 QString programName;
17 QString membershipNumber;
18 Person member;
19 QVariantList subjectOf;
20 QString token;
21 QDateTime validFrom;
22 QDateTime validUntil;
23};
24
25KITINERARY_MAKE_CLASS(ProgramMembership)
26KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, programName, setProgramName)
27KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, membershipNumber, setMembershipNumber)
28KITINERARY_MAKE_PROPERTY(ProgramMembership, Person, member, setMember)
29KITINERARY_MAKE_PROPERTY(ProgramMembership, QVariantList, subjectOf, setSubjectOf)
30KITINERARY_MAKE_PROPERTY(ProgramMembership, QString, token, setToken)
31KITINERARY_MAKE_PROPERTY(ProgramMembership, QDateTime, validFrom, setValidFrom)
32KITINERARY_MAKE_PROPERTY(ProgramMembership, QDateTime, validUntil, setValidUntil)
33KITINERARY_MAKE_OPERATOR(ProgramMembership)
34
35}
36
38{
39 return Token::tokenType(d->token);
40}
41
43{
44 return Token::tokenData(d->token);
45}
46
47#include "moc_programmembership.cpp"
A person.
Definition person.h:20
A frequent traveler, bonus points or discount scheme program membership.
QVariant tokenData
The token payload for barcodes, otherwise the same as ticketToken.
KItinerary::Token::TokenType tokenType
The type of the token.
static QVariant tokenData(const QString &token)
Determine token content for the given token.
Definition token.cpp:41
TokenType
Token format.
Definition token.h:28
static TokenType tokenType(QStringView token)
Determine token type for the given token.
Definition token.cpp:13
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.