KWeatherCore
dailyweatherforecast.cpp
175void DailyWeatherForecast::setHourlyWeatherForecast(const std::vector<HourlyWeatherForecast> &forecast)
179void DailyWeatherForecast::setHourlyWeatherForecast(std::vector<HourlyWeatherForecast> &&forecast)
195 if (KWeatherCorePrivate::weatherIconPriorityRank(forecast.neutralWeatherIcon()) >= KWeatherCorePrivate::weatherIconPriorityRank(weatherIcon())) {
196 setWeatherDescription(KWeatherCorePrivate::resolveAPIWeatherDesc(forecast.symbolCode() + QStringLiteral("_neutral")).desc);
Class represents weatherforecast in a day.
Definition dailyweatherforecast.h:25
void setPrecipitation(double precipitation)
set the precipitation of the day
Definition dailyweatherforecast.cpp:99
const std::vector< HourlyWeatherForecast > & hourlyWeatherForecast() const
returns all HourlyWeathreForecast belonged to this day
Definition dailyweatherforecast.cpp:171
bool operator<(const DailyWeatherForecast &forecast) const
if this is earlier than
Definition dailyweatherforecast.cpp:216
void setWeatherIcon(const QString &icon)
set the weather icon of the day
Definition dailyweatherforecast.cpp:115
void setDate(const QDate &date)
set the date this object represents
Definition dailyweatherforecast.cpp:123
bool isValid() const
Definition dailyweatherforecast.cpp:87
QJsonObject toJson()
Return a QJsonObject that can be converted back with DailyWeatherForecast::fromJson.
Definition dailyweatherforecast.cpp:49
void setWeatherDescription(const QString &description)
set the weather description of the day
Definition dailyweatherforecast.cpp:119
bool operator==(const DailyWeatherForecast &forecast) const
if on the same day
Definition dailyweatherforecast.cpp:211
void setMaxTemp(double maxTemp)
set the maximum temperature of the day
Definition dailyweatherforecast.cpp:91
void setHourlyWeatherForecast(const std::vector< HourlyWeatherForecast > &forecast)
set the hourly forecast of the day
Definition dailyweatherforecast.cpp:175
DailyWeatherForecast & operator+=(const HourlyWeatherForecast &forecast)
append hourly forecast, you can append valid hourly forecast into a invalid daily forecast,...
Definition dailyweatherforecast.cpp:184
void setMinTemp(double minTemp)
set the minimum temperature of the day
Definition dailyweatherforecast.cpp:95
static DailyWeatherForecast fromJson(const QJsonObject &obj)
Construct a DailyWeatherForecast from QJsonObject.
Definition dailyweatherforecast.cpp:68
Class represents weatherforecast in a hour.
Definition hourlyweatherforecast.h:30
static HourlyWeatherForecast fromJson(const QJsonObject &obj)
construct from QJsonObject
Definition hourlyweatherforecast.cpp:67
const QString & symbolCode() const
internal symbolcode from api, normally you can ignore this
Definition hourlyweatherforecast.cpp:115
QDate fromString(QStringView string, QStringView format, QCalendar cal)
QDate date() const const
QString toString(QStringView format, QCalendar cal) const const
void append(const QJsonValue &value)
ISODate
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
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.