/
weather.h
88 lines (67 loc) · 1.7 KB
/
weather.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
#ifndef WEATHER_H_
#define WEATHER_H_
// QT headers
#include <QList>
// MythTV headers
#include <mythscreentype.h>
#include <mythuitext.h>
#include <mythmainwindow.h>
// MythWeather headers
#include "weatherUtils.h"
class SourceManager;
class WeatherScreen;
typedef QList<WeatherScreen*> ScreenList;
class Weather : public MythScreenType
{
Q_OBJECT
public:
Weather(MythScreenStack *parent, const QString &name, SourceManager *srcMan);
~Weather();
bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool UpdateData();
bool SetupScreens();
public slots:
void setupScreens();
private slots:
void update_timeout() {}
void nextpage_timeout();
void weatherTimeout() {}
void cursorLeft();
void cursorRight();
void holdPage();
void setupPage();
void screenReady(WeatherScreen *ws);
private:
WeatherScreen *nextScreen();
WeatherScreen *prevScreen();
void clearScreens();
void showScreen(WeatherScreen *ws);
void hideScreen(void);
MythScreenStack *m_weatherStack;
int m_timeoutCounter;
int m_wantAnimated;
bool m_stopProcessing;
units_t m_units;
bool m_firstRun;
int m_updateInterval;
int m_nextpageInterval;
int m_nextpageIntArrow;
QTimer *m_nextpage_Timer;
bool m_gotDataHook;
bool m_firstSetup;
bool m_createdSrcMan;
SourceManager *m_srcMan;
ScreenList m_screens; //screens in correct display order
int m_cur_screen;
ScreenListMap m_allScreens; //screens parsed from xml
WeatherScreen *m_currScreen;
bool m_paused;
MythUIText *m_pauseText;
MythUIText *m_headerText;
MythUIText *m_updatedText;
};
#endif
/*
* vim:ts=4:sw=4:ai:et:si:sts=4
*/