KWeatherCore::HourlyWeatherForecast
#include <hourlyweatherforecast.h>
Properties | |
QDateTime | date |
qreal | fog |
qreal | humidity |
QString | neutralWeatherIcon |
qreal | precipitationAmount |
qreal | pressure |
qreal | temperature |
qreal | uvIndex |
QString | weatherDescription |
QString | weatherIcon |
KWeatherCore::WindDirection | windDirectionCardinal |
double | windDirectionDegree |
qreal | windSpeed |
Public Member Functions | |
HourlyWeatherForecast () | |
HourlyWeatherForecast (const HourlyWeatherForecast &other) | |
HourlyWeatherForecast (const QDateTime &date) | |
HourlyWeatherForecast (HourlyWeatherForecast &&other) noexcept | |
const QDateTime & | date () const |
double | fog () const |
double | humidity () const |
const QString & | neutralWeatherIcon () const |
HourlyWeatherForecast & | operator= (const HourlyWeatherForecast &other) |
HourlyWeatherForecast & | operator= (HourlyWeatherForecast &&other) noexcept |
bool | operator== (const KWeatherCore::HourlyWeatherForecast &) const |
double | precipitationAmount () const |
double | pressure () const |
void | setDate (const QDateTime &date) |
void | setFog (double fog) |
void | setHumidity (double humidity) |
void | setNeutralWeatherIcon (const QString &neutralWeatherIcon) |
void | setPrecipitationAmount (double precipitationAmount) |
void | setPressure (double pressure) |
void | setSymbolCode (const QString &symbolCode) |
void | setTemperature (double temperature) |
void | setUvIndex (double uvIndex) |
void | setWeatherDescription (const QString &weatherDescription) |
void | setWeatherIcon (const QString &weatherIcon) |
void | setWindDirectionDegree (double windDirection) |
void | setWindSpeed (double windSpeed) |
const QString & | symbolCode () const |
double | temperature () const |
QJsonObject | toJson () const |
double | uvIndex () const |
const QString & | weatherDescription () const |
const QString & | weatherIcon () const |
WindDirection | windDirectionCardinal () const |
double | windDirectionDegree () const |
double | windSpeed () const |
Static Public Member Functions | |
static HourlyWeatherForecast | fromJson (const QJsonObject &obj) |
Detailed Description
Class represents weatherforecast in a hour.
This is a class to hold hourly forecast
- See also
- DailyWeatherForecast
Definition at line 33 of file hourlyweatherforecast.h.
Property Documentation
◆ date
|
read |
Definition at line 36 of file hourlyweatherforecast.h.
◆ fog
|
read |
Definition at line 46 of file hourlyweatherforecast.h.
◆ humidity
|
read |
Definition at line 45 of file hourlyweatherforecast.h.
◆ neutralWeatherIcon
|
read |
Definition at line 39 of file hourlyweatherforecast.h.
◆ precipitationAmount
|
read |
Definition at line 48 of file hourlyweatherforecast.h.
◆ pressure
|
read |
Definition at line 43 of file hourlyweatherforecast.h.
◆ temperature
|
read |
Definition at line 42 of file hourlyweatherforecast.h.
◆ uvIndex
|
read |
Definition at line 47 of file hourlyweatherforecast.h.
◆ weatherDescription
|
read |
Definition at line 37 of file hourlyweatherforecast.h.
◆ weatherIcon
|
read |
Definition at line 38 of file hourlyweatherforecast.h.
◆ windDirectionCardinal
|
read |
Definition at line 41 of file hourlyweatherforecast.h.
◆ windDirectionDegree
|
read |
Definition at line 40 of file hourlyweatherforecast.h.
◆ windSpeed
|
read |
Definition at line 44 of file hourlyweatherforecast.h.
Constructor & Destructor Documentation
◆ HourlyWeatherForecast() [1/2]
KWeatherCore::HourlyWeatherForecast::HourlyWeatherForecast | ( | ) |
HourlyWeatherForecast construct a null forecast.
Definition at line 43 of file hourlyweatherforecast.cpp.
◆ HourlyWeatherForecast() [2/2]
|
explicit |
Definition at line 33 of file hourlyweatherforecast.cpp.
Member Function Documentation
◆ date()
const QDateTime & KWeatherCore::HourlyWeatherForecast::date | ( | ) | const |
◆ fog()
double KWeatherCore::HourlyWeatherForecast::fog | ( | ) | const |
fog in percentage
Definition at line 191 of file hourlyweatherforecast.cpp.
◆ fromJson()
|
static |
construct from QJsonObject
Definition at line 67 of file hourlyweatherforecast.cpp.
◆ humidity()
double KWeatherCore::HourlyWeatherForecast::humidity | ( | ) | const |
humidity in percentage
Definition at line 183 of file hourlyweatherforecast.cpp.
◆ neutralWeatherIcon()
const QString & KWeatherCore::HourlyWeatherForecast::neutralWeatherIcon | ( | ) | const |
icon without "day" or "night" attached
Definition at line 107 of file hourlyweatherforecast.cpp.
◆ operator==()
bool KWeatherCore::HourlyWeatherForecast::operator== | ( | const KWeatherCore::HourlyWeatherForecast & | rhs | ) | const |
- Returns
- true if date, weather icon and description is same
Definition at line 215 of file hourlyweatherforecast.cpp.
◆ precipitationAmount()
double KWeatherCore::HourlyWeatherForecast::precipitationAmount | ( | ) | const |
precipitation in mm
Definition at line 207 of file hourlyweatherforecast.cpp.
◆ pressure()
double KWeatherCore::HourlyWeatherForecast::pressure | ( | ) | const |
pressure in hpa
Definition at line 131 of file hourlyweatherforecast.cpp.
◆ setDate()
void KWeatherCore::HourlyWeatherForecast::setDate | ( | const QDateTime & | date | ) |
set date
Definition at line 87 of file hourlyweatherforecast.cpp.
◆ setFog()
void KWeatherCore::HourlyWeatherForecast::setFog | ( | double | fog | ) |
set fog in percentage
Definition at line 195 of file hourlyweatherforecast.cpp.
◆ setHumidity()
void KWeatherCore::HourlyWeatherForecast::setHumidity | ( | double | humidity | ) |
set humidity in percentage
Definition at line 187 of file hourlyweatherforecast.cpp.
◆ setNeutralWeatherIcon()
void KWeatherCore::HourlyWeatherForecast::setNeutralWeatherIcon | ( | const QString & | neutralWeatherIcon | ) |
set neutral weatherIcon
Definition at line 111 of file hourlyweatherforecast.cpp.
◆ setPrecipitationAmount()
void KWeatherCore::HourlyWeatherForecast::setPrecipitationAmount | ( | double | precipitationAmount | ) |
set precipitation in mm
Definition at line 211 of file hourlyweatherforecast.cpp.
◆ setPressure()
void KWeatherCore::HourlyWeatherForecast::setPressure | ( | double | pressure | ) |
set pressure in hpa
Definition at line 135 of file hourlyweatherforecast.cpp.
◆ setSymbolCode()
void KWeatherCore::HourlyWeatherForecast::setSymbolCode | ( | const QString & | symbolCode | ) |
set internal symbolcode from api, normally you can ignore this
Definition at line 119 of file hourlyweatherforecast.cpp.
◆ setTemperature()
void KWeatherCore::HourlyWeatherForecast::setTemperature | ( | double | temperature | ) |
set temperature in celsius
Definition at line 127 of file hourlyweatherforecast.cpp.
◆ setUvIndex()
void KWeatherCore::HourlyWeatherForecast::setUvIndex | ( | double | uvIndex | ) |
set uv index, 0-1
Definition at line 203 of file hourlyweatherforecast.cpp.
◆ setWeatherDescription()
void KWeatherCore::HourlyWeatherForecast::setWeatherDescription | ( | const QString & | weatherDescription | ) |
set weather description
Definition at line 95 of file hourlyweatherforecast.cpp.
◆ setWeatherIcon()
void KWeatherCore::HourlyWeatherForecast::setWeatherIcon | ( | const QString & | weatherIcon | ) |
set weather icon
Definition at line 103 of file hourlyweatherforecast.cpp.
◆ setWindDirectionDegree()
void KWeatherCore::HourlyWeatherForecast::setWindDirectionDegree | ( | double | windDirection | ) |
Sets the wind direction in degree.
- See also
- windDirectionDegree
Definition at line 145 of file hourlyweatherforecast.cpp.
◆ setWindSpeed()
void KWeatherCore::HourlyWeatherForecast::setWindSpeed | ( | double | windSpeed | ) |
set wind speed in km/h
Definition at line 179 of file hourlyweatherforecast.cpp.
◆ symbolCode()
const QString & KWeatherCore::HourlyWeatherForecast::symbolCode | ( | ) | const |
internal symbolcode from api, normally you can ignore this
Definition at line 115 of file hourlyweatherforecast.cpp.
◆ temperature()
double KWeatherCore::HourlyWeatherForecast::temperature | ( | ) | const |
temperature in celsius
Definition at line 123 of file hourlyweatherforecast.cpp.
◆ toJson()
QJsonObject KWeatherCore::HourlyWeatherForecast::toJson | ( | ) | const |
convert this to QJsonObject
Definition at line 50 of file hourlyweatherforecast.cpp.
◆ uvIndex()
double KWeatherCore::HourlyWeatherForecast::uvIndex | ( | ) | const |
uv index, 0-1
Definition at line 199 of file hourlyweatherforecast.cpp.
◆ weatherDescription()
const QString & KWeatherCore::HourlyWeatherForecast::weatherDescription | ( | ) | const |
weather description
Definition at line 91 of file hourlyweatherforecast.cpp.
◆ weatherIcon()
const QString & KWeatherCore::HourlyWeatherForecast::weatherIcon | ( | ) | const |
weather icon, breeze icon if construct by WeatherForecastSource
Definition at line 99 of file hourlyweatherforecast.cpp.
◆ windDirectionCardinal()
WindDirection KWeatherCore::HourlyWeatherForecast::windDirectionCardinal | ( | ) | const |
Cardinal wind direction.
That is, the cardinal direction the wind is coming from.
- See also
- windDirectionDegree
Definition at line 164 of file hourlyweatherforecast.cpp.
◆ windDirectionDegree()
double KWeatherCore::HourlyWeatherForecast::windDirectionDegree | ( | ) | const |
Wind direction in degree.
That is, the direction the wind is coming from.
- See also
- https://en.wikipedia.org/wiki/Wind_direction
- windDirectionCardinal
Definition at line 140 of file hourlyweatherforecast.cpp.
◆ windSpeed()
double KWeatherCore::HourlyWeatherForecast::windSpeed | ( | ) | const |
wind speed in km/h
Definition at line 175 of file hourlyweatherforecast.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.