-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforecastdata.h
114 lines (103 loc) · 2.25 KB
/
forecastdata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#ifndef FORECAST_H
#define FORECAST_H
//=============================================================================
#include <QDate>
//=============================================================================
/// = "1day",
/// "5day",
/// "10day",
/// "15day"
const QStringList FORECASTS_DAYS =
{
"1day", // 0
"5day", // 1
"10day", // 2 -
"15day" // 3 -
};
/// = "1hour",
/// "12hour",
/// "24hour",
/// "72hour",
/// "120hour"
const QStringList FORECASTS_HOURS =
{
"1hour", // 0
"12hour", // 1
"24hour", // 2 -
"72hour", // 3 -
"120hour" // 4 -
};
//=============================================================================
struct ForecastData
{
QTime time{};
QDate date{};
QString dayOfWeek();
int iconNo {};
QString iconPhrase{};
bool isDayNight{};
int temperatureF {};
int temperatureC();
int temperatureMinF{};
int temperatureMaxF{};
int temperatureMinC();
int temperatureMaxC();
int iconDayNo {};
QString iconPhraseDay {};
int iconNightNo {};
QString iconPhraseNight{};
QString showData();
};
namespace day
{
enum IconNumber
{
Synny = 1,
MostlySunny ,
PartlySunny ,
IntermittentSunny ,
HazySunshine ,
MostlyCloudy ,
Cloudy ,
Dreary ,
Fog = 11,
Showers ,
MostlyCloudyShowers ,
PartlyCloudyShowers ,
TStorms ,
MostlyCloudyTStorms ,
PartlyCloudyTStroms ,
Rain ,
Flurries ,
MostlyCloudyFlurries,
PartlyCloudyFlurries,
Snow ,
MostlyCloudySnow ,
Ice ,
Sleet ,
FreezingRain ,
RainAndSnow = 29,
Hot ,
Cold ,
Windy
};
}
namespace night
{
enum IconNumber
{
Clear = 33,
MostlyClear ,
PartlyCloudy ,
IntermittentClouds ,
HazyMoonlight ,
MostlyCloudy ,
PartlyCloudyShowers ,
MostlyCloudyShowers ,
PartlyCloudyTStorms ,
MostlyCloudyTStorms ,
MostlyCloudyFlurries,
MostlyCloudySnow
};
}
#endif // FORECAST_H