blob: 7bd1561935ed9cb0db3d5438549de95873a03adf (
plain)
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
|
#ifndef MEECASTWEATHER_H
#define MEECASTWEATHER_H
#include <QtCore/QFileSystemWatcher>
#include <QtCore/QTimer>
#include <QtCore/QSettings>
#include <sowatch.h>
namespace sowatch
{
class MeeCastWeather : public WeatherNotification
{
Q_OBJECT
public:
explicit MeeCastWeather(QObject *parent = 0);
static QString configFilePath();
Type type() const;
uint count() const;
QDateTime dateTime() const;
QString title() const;
QString body() const;
WeatherType forecast();
int temperature();
Unit temperatureUnits();
void activate();
void dismiss();
private slots:
void fileChanged(const QString& path);
void update();
private:
QFileSystemWatcher* _watcher;
QTimer* _timer;
bool _metric;
QDateTime _lastUpdate;
QString _lastLocation;
int _lastTemp;
int _lastWxCode;
};
}
#endif // MEECASTWEATHER_H
|