KWeatherCore

capreference.h
1/*
2 * SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 * SPDX-License-Identifier: LGPL-2.0-or-later
4 */
5
6#ifndef KWEATHERCORE_CAPREFERENCE_H
7#define KWEATHERCORE_CAPREFERENCE_H
8
9#include <kweathercore/kweathercore_export.h>
10
11#include <QMetaType>
12#include <QSharedDataPointer>
13
14namespace KWeatherCore
15{
16
17class CAPReferencePrivate;
18
19/** A reference to a previous CAP alert message.
20 * @see https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2.html ยง3.2.1
21 */
22class KWEATHERCORE_EXPORT CAPReference
23{
24 Q_GADGET
25 Q_PROPERTY(QString sender READ sender)
26 Q_PROPERTY(QString identifier READ identifier)
27 Q_PROPERTY(QDateTime sent READ sent)
28
29public:
30 explicit CAPReference();
31 explicit CAPReference(const QString &sender, const QString &identifier, const QDateTime &sent);
33 CAPReference(CAPReference &&) noexcept;
35 CAPReference &operator=(const CAPReference &);
36 CAPReference &operator=(CAPReference &&) noexcept;
37
38 bool operator==(const CAPReference &other) const;
39
40 QString sender() const;
41 QString identifier() const;
42 QDateTime sent() const;
43
44private:
46};
47
48}
49
50Q_DECLARE_METATYPE(KWeatherCore::CAPReference)
51
52#endif // KWEATHERCORE_CAPREFERENCE_H
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 Fri Nov 22 2024 12:02:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.