Add weather routes project progress

This commit is contained in:
2025-04-07 19:40:38 +02:00
parent 8941d84bc8
commit fa5f6b2588
52 changed files with 2027 additions and 0 deletions

View File

@@ -0,0 +1,331 @@
#include "weatherdata.h"
WeatherData::WeatherData(QObject *parent) : QObject{parent} {}
WeatherData::WeatherData(long tijd, const QString &tijd_nl, int offset,
float temp, int wind_ms, int wind_bf, int wind_knp,
int wind_kmh, int wind_r, const QString &wind_ltr,
int visibility, int neersl, float luchtd_bar,
float luchtdmmhg, float luchtdinHg, int hw, int mw,
int lw, int tw, int rv, int gr, int gr_w,
const QString &cape, int snd, int snv, int cond,
int iconCode, const QString &sameenv,
const QString &icoon)
: m_tijd(tijd), m_tijd_nl(tijd_nl), m_offset(offset), m_temp(temp),
m_wind_ms(wind_ms), m_wind_bf(wind_bf), m_wind_knp(wind_knp),
m_wind_kmh(wind_kmh), m_wind_r(wind_r), m_wind_ltr(wind_ltr),
m_visibility(visibility), m_neersl(neersl), m_luchtd_bar(luchtd_bar),
m_luchtdmmhg(luchtdmmhg), m_luchtdinHg(luchtdinHg), m_hw(hw), m_mw(mw),
m_lw(lw), m_tw(tw), m_rv(rv), m_gr(gr), m_gr_w(gr_w), m_cape(cape),
m_snd(snd), m_snv(snv), m_cond(cond), m_iconCode(iconCode),
m_sameenv(sameenv), m_icoon(icoon) {}
WeatherData::WeatherData(const WeatherData &other)
: m_tijd(other.m_tijd), m_tijd_nl(other.m_tijd_nl),
m_offset(other.m_offset), m_temp(other.m_temp),
m_wind_ms(other.m_wind_ms), m_wind_bf(other.m_wind_bf),
m_wind_knp(other.m_wind_knp), m_wind_kmh(other.m_wind_kmh),
m_wind_r(other.m_wind_r), m_wind_ltr(other.m_wind_ltr),
m_visibility(other.m_visibility), m_neersl(other.m_neersl),
m_luchtd_bar(other.m_luchtd_bar), m_luchtdmmhg(other.m_luchtdmmhg),
m_luchtdinHg(other.m_luchtdinHg), m_hw(other.m_hw), m_mw(other.m_mw),
m_lw(other.m_lw), m_tw(other.m_tw), m_rv(other.m_rv), m_gr(other.m_gr),
m_gr_w(other.m_gr_w), m_cape(other.m_cape), m_snd(other.m_snd),
m_snv(other.m_snv), m_cond(other.m_cond), m_iconCode(other.m_iconCode),
m_sameenv(other.m_sameenv), m_icoon(other.m_icoon) {}
WeatherData WeatherData::operator=(const WeatherData &other) {
m_tijd = (other.m_tijd);
m_tijd_nl = (other.m_tijd_nl);
m_offset = (other.m_offset);
m_temp = (other.m_temp);
m_wind_ms = (other.m_wind_ms);
m_wind_bf = (other.m_wind_bf);
m_wind_knp = (other.m_wind_knp);
m_wind_kmh = (other.m_wind_kmh);
m_wind_r = (other.m_wind_r);
m_wind_ltr = (other.m_wind_ltr);
m_visibility = (other.m_visibility);
m_neersl = (other.m_neersl);
m_luchtd_bar = (other.m_luchtd_bar);
m_luchtdmmhg = (other.m_luchtdmmhg);
m_luchtdinHg = (other.m_luchtdinHg);
m_hw = (other.m_hw);
m_mw = (other.m_mw);
m_lw = (other.m_lw);
m_tw = (other.m_tw);
m_rv = (other.m_rv);
m_gr = (other.m_gr);
m_gr_w = (other.m_gr_w);
m_cape = (other.m_cape);
m_snd = (other.m_snd);
m_snv = (other.m_snv);
m_cond = (other.m_cond);
m_iconCode = (other.m_iconCode);
m_sameenv = (other.m_sameenv);
m_icoon = (other.m_icoon);
return *this;
}
long WeatherData::tijd() const { return m_tijd; }
void WeatherData::setTijd(long newTijd) {
if (m_tijd == newTijd)
return;
m_tijd = newTijd;
emit tijdChanged();
}
QString WeatherData::tijd_nl() const { return m_tijd_nl; }
void WeatherData::setTijd_nl(const QString &newTijd_nl) {
if (m_tijd_nl == newTijd_nl)
return;
m_tijd_nl = newTijd_nl;
emit tijd_nlChanged();
}
int WeatherData::offset() const { return m_offset; }
void WeatherData::setOffset(int newOffset) {
if (m_offset == newOffset)
return;
m_offset = newOffset;
emit offsetChanged();
}
float WeatherData::temp() const { return m_temp; }
void WeatherData::setTemp(float newTemp) {
if (qFuzzyCompare(m_temp, newTemp))
return;
m_temp = newTemp;
emit tempChanged();
}
int WeatherData::wind_ms() const { return m_wind_ms; }
void WeatherData::setWind_ms(int newWind_ms) {
if (m_wind_ms == newWind_ms)
return;
m_wind_ms = newWind_ms;
emit wind_msChanged();
}
int WeatherData::wind_bf() const { return m_wind_bf; }
void WeatherData::setWind_bf(int newWind_bf) {
if (m_wind_bf == newWind_bf)
return;
m_wind_bf = newWind_bf;
emit wind_bfChanged();
}
int WeatherData::wind_knp() const { return m_wind_knp; }
void WeatherData::setWind_knp(int newWind_knp) {
if (m_wind_knp == newWind_knp)
return;
m_wind_knp = newWind_knp;
emit wind_knpChanged();
}
int WeatherData::wind_kmh() const { return m_wind_kmh; }
void WeatherData::setWind_kmh(int newWind_kmh) {
if (m_wind_kmh == newWind_kmh)
return;
m_wind_kmh = newWind_kmh;
emit wind_kmhChanged();
}
int WeatherData::wind_r() const { return m_wind_r; }
void WeatherData::setWind_r(int newWind_r) {
if (m_wind_r == newWind_r)
return;
m_wind_r = newWind_r;
emit wind_rChanged();
}
QString WeatherData::wind_ltr() const { return m_wind_ltr; }
void WeatherData::setWind_ltr(const QString &newWind_ltr) {
if (m_wind_ltr == newWind_ltr)
return;
m_wind_ltr = newWind_ltr;
emit wind_ltrChanged();
}
int WeatherData::visibility() const { return m_visibility; }
void WeatherData::setVisibility(int newVisibility) {
if (m_visibility == newVisibility)
return;
m_visibility = newVisibility;
emit visibilityChanged();
}
int WeatherData::neersl() const { return m_neersl; }
void WeatherData::setNeersl(int newNeersl) {
if (m_neersl == newNeersl)
return;
m_neersl = newNeersl;
emit neerslChanged();
}
float WeatherData::luchtd_bar() const { return m_luchtd_bar; }
void WeatherData::setLuchtd_bar(float newLuchtd_bar) {
if (qFuzzyCompare(m_luchtd_bar, newLuchtd_bar))
return;
m_luchtd_bar = newLuchtd_bar;
emit luchtd_barChanged();
}
float WeatherData::luchtdmmhg() const { return m_luchtdmmhg; }
void WeatherData::setLuchtdmmhg(float newLuchtdmmhg) {
if (qFuzzyCompare(m_luchtdmmhg, newLuchtdmmhg))
return;
m_luchtdmmhg = newLuchtdmmhg;
emit luchtdmmhgChanged();
}
float WeatherData::luchtdinHg() const { return m_luchtdinHg; }
void WeatherData::setLuchtdinHg(float newLuchtdinHg) {
if (qFuzzyCompare(m_luchtdinHg, newLuchtdinHg))
return;
m_luchtdinHg = newLuchtdinHg;
emit luchtdinHgChanged();
}
int WeatherData::hw() const { return m_hw; }
void WeatherData::setHw(int newHw) {
if (m_hw == newHw)
return;
m_hw = newHw;
emit hwChanged();
}
int WeatherData::mw() const { return m_mw; }
void WeatherData::setMw(int newMw) {
if (m_mw == newMw)
return;
m_mw = newMw;
emit mwChanged();
}
int WeatherData::lw() const { return m_lw; }
void WeatherData::setLw(int newLw) {
if (m_lw == newLw)
return;
m_lw = newLw;
emit lwChanged();
}
int WeatherData::tw() const { return m_tw; }
void WeatherData::setTw(int newTw) {
if (m_tw == newTw)
return;
m_tw = newTw;
emit twChanged();
}
int WeatherData::rv() const { return m_rv; }
void WeatherData::setRv(int newRv) {
if (m_rv == newRv)
return;
m_rv = newRv;
emit rvChanged();
}
int WeatherData::gr() const { return m_gr; }
void WeatherData::setGr(int newGr) {
if (m_gr == newGr)
return;
m_gr = newGr;
emit grChanged();
}
int WeatherData::gr_w() const { return m_gr_w; }
void WeatherData::setGr_w(int newGr_w) {
if (m_gr_w == newGr_w)
return;
m_gr_w = newGr_w;
emit gr_wChanged();
}
QString WeatherData::cape() const { return m_cape; }
void WeatherData::setCape(const QString &newCape) {
if (m_cape == newCape)
return;
m_cape = newCape;
emit capeChanged();
}
int WeatherData::snd() const { return m_snd; }
void WeatherData::setSnd(int newSnd) {
if (m_snd == newSnd)
return;
m_snd = newSnd;
emit sndChanged();
}
int WeatherData::snv() const { return m_snv; }
void WeatherData::setSnv(int newSnv) {
if (m_snv == newSnv)
return;
m_snv = newSnv;
emit snvChanged();
}
int WeatherData::cond() const { return m_cond; }
void WeatherData::setCond(int newCond) {
if (m_cond == newCond)
return;
m_cond = newCond;
emit condChanged();
}
int WeatherData::iconCode() const { return m_iconCode; }
void WeatherData::setIconCode(int newIconCode) {
if (m_iconCode == newIconCode)
return;
m_iconCode = newIconCode;
emit iconCodeChanged();
}
QString WeatherData::sameenv() const { return m_sameenv; }
void WeatherData::setSameenv(const QString &newSameenv) {
if (m_sameenv == newSameenv)
return;
m_sameenv = newSameenv;
emit sameenvChanged();
}
QString WeatherData::icoon() const { return m_icoon; }
void WeatherData::setIcoon(const QString &newIcoon) {
if (m_icoon == newIcoon)
return;
m_icoon = newIcoon;
emit icoonChanged();
}
void WeatherData::print() {}