Search for usage in LXR

KWeatherCore::HourlyWeatherForecast Class Reference

#include <hourlyweatherforecast.h>


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)
const QDateTimedate () const
double fog () const
double humidity () const
const QStringneutralWeatherIcon () const
HourlyWeatherForecastoperator= (const HourlyWeatherForecast &other)
HourlyWeatherForecastoperator= (HourlyWeatherForecast &&other)
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 QStringsymbolCode () const
double temperature () const
QJsonObject toJson () const
double uvIndex () const
const QStringweatherDescription () const
const QStringweatherIcon () 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
Han Young

Definition at line 29 of file hourlyweatherforecast.h.

Constructor & Destructor Documentation

◆ HourlyWeatherForecast()

KWeatherCore::HourlyWeatherForecast::HourlyWeatherForecast ( )

HourlyWeatherForecast construct a null forecast.

Definition at line 39 of file hourlyweatherforecast.cpp.

Member Function Documentation

◆ date()

const QDateTime& KWeatherCore::HourlyWeatherForecast::date ( ) const

date of the forecast


◆ fog()

double KWeatherCore::HourlyWeatherForecast::fog ( ) const

fog in percentage

◆ fromJson()

HourlyWeatherForecast KWeatherCore::HourlyWeatherForecast::fromJson ( const QJsonObject obj)

construct from QJsonObject

Definition at line 67 of file hourlyweatherforecast.cpp.

◆ humidity()

double KWeatherCore::HourlyWeatherForecast::humidity ( ) const

humidity in percentage

◆ neutralWeatherIcon()

const QString& KWeatherCore::HourlyWeatherForecast::neutralWeatherIcon ( ) const

icon without "day" or "night" attached

◆ operator==()

bool KWeatherCore::HourlyWeatherForecast::operator== ( const KWeatherCore::HourlyWeatherForecast rhs) const
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

◆ pressure()

double KWeatherCore::HourlyWeatherForecast::pressure ( ) const

pressure in hpa

◆ 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

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

◆ 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

◆ weatherDescription()

const QString& KWeatherCore::HourlyWeatherForecast::weatherDescription ( ) const

weather description

◆ weatherIcon()

const QString& KWeatherCore::HourlyWeatherForecast::weatherIcon ( ) const

weather icon, breeze icon if construct by WeatherForecastSource

◆ windDirectionCardinal()

WindDirection KWeatherCore::HourlyWeatherForecast::windDirectionCardinal ( ) const

Cardinal wind direction.

That is, the cardinal direction the wind is coming from.

See also

◆ windDirectionDegree()

double KWeatherCore::HourlyWeatherForecast::windDirectionDegree ( ) const

Wind direction in degree.

That is, the direction the wind is coming from.

See also

◆ windSpeed()

double KWeatherCore::HourlyWeatherForecast::windSpeed ( ) const

wind speed in km/h

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 03:54:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.