blob: 4fcf2dabcfcd0c67112f9e788f41e8aaa63f095a (
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 HARMACCUWEATHER_H
#define HARMACCUWEATHER_H
#include <QtCore/QFileSystemWatcher>
#include <QtCore/QTimer>
#include <QtCore/QSettings>
#include <sowatch.h>
namespace sowatch
{
class HarmAccuWeather : public WeatherNotification
{
Q_OBJECT
public:
explicit HarmAccuWeather(QObject *parent = 0);
static QSettings* getAccuweatherData();
Type type() const;
uint count() const;
QDateTime dateTime() const;
QString title() const;
QString body() const;
WeatherType forecast() const;
int temperature() const;
Unit temperatureUnits() const;
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 // HARMACCUWEATHER_H
|