KWeatherCore
6#include "alertfeedentry.h"
7#include "kweathercore_p.h"
8#include <QNetworkAccessManager>
12class AlertFeedEntry::AlertFeedEntryPrivate
18 CAPAlertInfo::Urgency urgency = CAPAlertInfo::Urgency::UnknownUrgency;
19 CAPAlertInfo::Severity severity = CAPAlertInfo::Severity::UnknownSeverity;
20 CAPAlertInfo::Certainty certainty = CAPAlertInfo::Certainty::UnknownCertainty;
23 AreaCodeVec areaCodes;
28 : d(
std::make_unique<AlertFeedEntryPrivate>())
32 : d(
std::make_unique<AlertFeedEntryPrivate>(*other.d))
36AlertFeedEntry::~AlertFeedEntry() =
default;
37const QString &AlertFeedEntry::title()
const
41const QString &AlertFeedEntry::summary()
const
45const QString &AlertFeedEntry::area()
const
51 return KWeatherCorePrivate::urgencyToString(d->urgency);
55 return KWeatherCorePrivate::severityToString(d->severity);
59 return KWeatherCorePrivate::certaintyToString(d->certainty);
80void AlertFeedEntry::setTitle(
const QString &title)
84void AlertFeedEntry::setSummary(
const QString &summary)
88void AlertFeedEntry::setArea(
const QString &area)
92void AlertFeedEntry::setUrgency(CAPAlertInfo::Urgency urgency)
96void AlertFeedEntry::setCertainty(CAPAlertInfo::Certainty certainty)
98 d->certainty = certainty;
100void AlertFeedEntry::setSeverity(CAPAlertInfo::Severity severity)
102 d->severity = severity;
104void AlertFeedEntry::setDate(
const QDateTime &date)
108void AlertFeedEntry::setUrl(
const QUrl &url)
112void AlertFeedEntry::setAreaCodes(
const AreaCodeVec &areaCodes)
116void AlertFeedEntry::setAreaCodes(AreaCodeVec &&areaCodes)
120void AlertFeedEntry::setPolygon(CAPPolygon &&polygon)
122 d->polygon = std::move(
polygon);
124AlertFeedEntry &AlertFeedEntry::operator=(
const AlertFeedEntry &other)
129AlertFeedEntry &AlertFeedEntry::operator=(AlertFeedEntry &&other) =
default;
132#include "moc_alertfeedentry.cpp"
Class represents single CAP.
AlertFeedEntry()
default constructor
const CAPPolygon & polygon() const
area polygon
PendingCAP * CAP() const
CAP, request to download CAP file.
const AreaCodeVec & areaCodes() const
areaCodes
The PendingAlerts class contains the reply to an asynchronous CAP request.
QNetworkReply * get(const QNetworkRequest &request)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:42 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.