summaryrefslogtreecommitdiff
path: root/harmaccuweather/harmaccuweather.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-10-16 20:58:29 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-10-16 20:58:29 +0200
commit2c8f42cc6ad1c67c5ee0110393c7ee756d14044e (patch)
treee5f2d5d12c95533f17ef95909b1713a70e5559ef /harmaccuweather/harmaccuweather.h
parent4da9bced6a27b92d49b9fc9392946510b8519d82 (diff)
downloadsowatch-2c8f42cc6ad1c67c5ee0110393c7ee756d14044e.tar.gz
sowatch-2c8f42cc6ad1c67c5ee0110393c7ee756d14044e.zip
Now monitoring AccuWeather's config file
Diffstat (limited to 'harmaccuweather/harmaccuweather.h')
-rw-r--r--harmaccuweather/harmaccuweather.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/harmaccuweather/harmaccuweather.h b/harmaccuweather/harmaccuweather.h
index bac08e2..8b403b9 100644
--- a/harmaccuweather/harmaccuweather.h
+++ b/harmaccuweather/harmaccuweather.h
@@ -1,6 +1,7 @@
#ifndef HARMACCUWEATHER_H
#define HARMACCUWEATHER_H
+#include <QtCore/QFileSystemWatcher>
#include <QtCore/QTimer>
#include <QtCore/QSettings>
#include <sowatch.h>
@@ -13,7 +14,7 @@ class HarmAccuWeather : public WeatherNotification
Q_OBJECT
public:
- explicit HarmAccuWeather(int updateTime, QObject *parent = 0);
+ explicit HarmAccuWeather(QObject *parent = 0);
static QSettings* getAccuweatherData();
@@ -31,10 +32,13 @@ public:
void dismiss();
private slots:
+ void fileChanged(const QString& path);
void update();
private:
- QTimer* _updateTimer;
+ QFileSystemWatcher* _watcher;
+ QTimer* _timer;
+
bool _metric;
QDateTime _lastUpdate;
QString _lastLocation;