KWeatherCore

capreference.cpp
1/*
2 * SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 * SPDX-License-Identifier: LGPL-2.0-or-later
4 */
5
6#include "capreference.h"
7
8#include <QDateTime>
9
10using namespace KWeatherCore;
11
12namespace KWeatherCore
13{
14class CAPReferencePrivate : public QSharedData
15{
16public:
17 QString sender;
18 QString identifier;
19 QDateTime sent;
20};
21}
22
23CAPReference::CAPReference()
24 : d(new CAPReferencePrivate)
25{
26}
27
28CAPReference::CAPReference(const QString &sender, const QString &identifier, const QDateTime &sent)
29 : d(new CAPReferencePrivate)
30{
31 d->sender = sender;
32 d->identifier = identifier;
33 d->sent = sent;
34}
35
36CAPReference::CAPReference(const CAPReference &) = default;
37CAPReference::CAPReference(CAPReference &&) noexcept = default;
38CAPReference::~CAPReference() = default;
39
40CAPReference &CAPReference::operator=(const CAPReference &) = default;
41CAPReference &CAPReference::operator=(CAPReference &&) noexcept = default;
42
43bool CAPReference::operator==(const CAPReference &other) const
44{
45 return d->sender == other.d->sender && d->identifier == other.d->identifier && d->sent == other.d->sent;
46}
47
48QString CAPReference::sender() const
49{
50 return d->sender;
51}
52
53QString CAPReference::identifier() const
54{
55 return d->identifier;
56}
57
58QDateTime CAPReference::sent() const
59{
60 return d->sent;
61}
62
63#include "moc_capreference.cpp"
A reference to a previous CAP alert message.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.