KWeatherCore::AlertInfo

Search for usage in LXR

KWeatherCore::AlertInfo Class Reference

#include <alertinfo.h>

Public Types

enum  Category {
  Unknown = 0, Geo = 0b1, Met = 0b10, Safety = 0b100,
  Security = 0b1000, Rescue = 0b10000, Fire = 0b100000, Health = 0b1000000,
  Env = 0b10000000, Transport = 0b100000000, Infra = 0b1000000000, CBRNE = 0b10000000000,
  Other = 0b100000000000
}
 
enum  Certainty {
  Observed, Likely, Possible, Unlikely,
  Unknown
}
 
enum  Severity {
  Extreme, Severe, Moderate, Minor,
  Unknown
}
 
enum  Urgency {
  Immediate, Expected, Future, Past,
  Unknown
}
 

Properties

QString description
 
QDateTime effectiveTime
 
QString event
 
QDateTime expireTime
 
QString headline
 

Public Member Functions

 AlertInfo ()
 
 AlertInfo (const AlertInfo &other)
 
 AlertInfo (AlertInfo &&other)
 
void addAreaCode (std::pair< QString, QString > &areaCode)
 
void addCategory (Category category)
 
void addParameter (std::pair< QString, QString > &)
 
void addPolygon (const std::vector< std::pair< float, float >> &area)
 
void addPolygon (std::vector< std::pair< float, float >> &&area)
 
const AreaCodeVec & areaCodes () const
 
const QStringareaDesc () const
 
Category category () const
 
Certainty certainty () const
 
const QStringdescription () const
 
const QDateTimeeffectiveTime () const
 
const QStringevent () const
 
const QDateTimeexpireTime () const
 
const QStringheadline () const
 
const QStringinstruction () const
 
const QStringlanguage () const
 
const QDateTimeonsetTime () const
 
AlertInfooperator= (const AlertInfo &other)
 
AlertInfooperator= (AlertInfo &&other)
 
const Parameter & parameter () const
 
const std::vector< std::vector< std::pair< float, float > > > & polygon () const
 
const QStringsender () const
 
void setAreaCodes (const AreaCodeVec &areaCodes)
 
void setAreaDesc (const QString &areaDesc)
 
void setCategory (Category category)
 
void setCertainty (Certainty certainty)
 
void setDescription (const QString &description)
 
void setEffectiveTime (const QDateTime &time)
 
void setEvent (const QString &event)
 
void setExpireTime (const QDateTime &time)
 
void setHeadline (const QString &headline)
 
void setInstruction (const QString &instruction)
 
void setLanguage (const QString &language)
 
void setOnsetTime (const QDateTime &time)
 
void setParameter (const Parameter &parameter)
 
void setPolygon (const std::vector< std::vector< std::pair< float, float >>> &area)
 
void setPolygon (std::vector< std::vector< std::pair< float, float >>> &&area)
 
void setSender (const QString &sender)
 
void setSeverity (Severity severity)
 
void setUrgency (Urgency urgency)
 
Severity severity () const
 
Urgency urgency () const
 

Detailed Description

Constructor & Destructor Documentation

KWeatherCore::AlertInfo::AlertInfo ( )

default constructor

Definition at line 30 of file alertinfo.cpp.

Member Function Documentation

const AreaCodeVec & KWeatherCore::AlertInfo::areaCodes ( ) const

areaCodes

Returns
pairs of QString, the first one is code type, ie. {"UGC", "AKZ017 AKZ020 AKZ021 AKZ022 AKZ023"}

Definition at line 46 of file alertinfo.cpp.

const QString & KWeatherCore::AlertInfo::areaDesc ( ) const

Text describe the area of the alert message.

Definition at line 102 of file alertinfo.cpp.

AlertInfo::Category KWeatherCore::AlertInfo::category ( ) const

The category of the alert message.

Returns
default to Unknown, value is bit or-ed

Definition at line 62 of file alertinfo.cpp.

AlertInfo::Certainty KWeatherCore::AlertInfo::certainty ( ) const

The certainty of the alert message.

Returns
default to Unknown

Definition at line 94 of file alertinfo.cpp.

const QString& KWeatherCore::AlertInfo::description ( ) const

The description of the alert message.

const QDateTime& KWeatherCore::AlertInfo::effectiveTime ( ) const

The effective time of the information of the alert message.

const QString& KWeatherCore::AlertInfo::event ( ) const

The text denoting the type of the subject event of the alert message.

const QDateTime& KWeatherCore::AlertInfo::expireTime ( ) const

The expire time of the information of the alert message.

const QString& KWeatherCore::AlertInfo::headline ( ) const

The text headline of the alert message.

const QString & KWeatherCore::AlertInfo::instruction ( ) const

The instruction of the alert message.

Definition at line 74 of file alertinfo.cpp.

const QString & KWeatherCore::AlertInfo::language ( ) const

The code denoting the language of the info default to "en-US".

Returns
Natural language identifier per [RFC 3066].

Definition at line 82 of file alertinfo.cpp.

const QDateTime & KWeatherCore::AlertInfo::onsetTime ( ) const

The onset time of the information of the alert message.

Definition at line 54 of file alertinfo.cpp.

const Parameter & KWeatherCore::AlertInfo::parameter ( ) const

The Parameter of the alert message refer to CAP protocol v1.2.

Definition at line 98 of file alertinfo.cpp.

const std::vector< std::vector< std::pair< float, float > > > & KWeatherCore::AlertInfo::polygon ( ) const

area polygon

Returns
latitude longitude pairs

Definition at line 106 of file alertinfo.cpp.

const QString & KWeatherCore::AlertInfo::sender ( ) const

The sender of the alert message.

Definition at line 78 of file alertinfo.cpp.

AlertInfo::Severity KWeatherCore::AlertInfo::severity ( ) const

The severity of the alert message.

Returns
default to Unknown

Definition at line 90 of file alertinfo.cpp.

AlertInfo::Urgency KWeatherCore::AlertInfo::urgency ( ) const

The urgency of the alert message.

Returns
default to Unknown

Definition at line 86 of file alertinfo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Oct 24 2021 23:03:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.