summaryrefslogtreecommitdiff
path: root/meecastweather/meecastprovider.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-15 16:24:46 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-15 16:24:46 +0200
commitcf54773b561c324596b25739888b8ab5b4b45bd1 (patch)
tree40f210f39cbb296a51473fcaa6e5b1f61f3ab998 /meecastweather/meecastprovider.cpp
parent2ecf718cc9d460ad192de196aac8d13e30a7ab4c (diff)
downloadsowatch-cf54773b561c324596b25739888b8ab5b4b45bd1.tar.gz
sowatch-cf54773b561c324596b25739888b8ab5b4b45bd1.zip
preparing meecastplugin
Diffstat (limited to 'meecastweather/meecastprovider.cpp')
-rw-r--r--meecastweather/meecastprovider.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/meecastweather/meecastprovider.cpp b/meecastweather/meecastprovider.cpp
index 2c26b67..0da042a 100644
--- a/meecastweather/meecastprovider.cpp
+++ b/meecastweather/meecastprovider.cpp
@@ -1,29 +1,26 @@
#include <QtCore/QtDebug>
#include <QtCore/QTimer>
-#include "harmaccuweather.h"
-#include "harmaccuprovider.h"
+#include "meecastweather.h"
+#include "meecastprovider.h"
using namespace sowatch;
-HarmAccuProvider::HarmAccuProvider(QObject *parent) :
+const QLatin1String MeeCastProvider::myId("meecast");
+
+MeeCastProvider::MeeCastProvider(QObject *parent) :
NotificationProvider(parent)
{
// Give some time to send the first notification
QTimer::singleShot(2000, this, SLOT(generateNotification()));
}
-HarmAccuProvider::~HarmAccuProvider()
+MeeCastProvider::~MeeCastProvider()
{
}
-void HarmAccuProvider::generateNotification()
+void MeeCastProvider::generateNotification()
{
- QSettings* s = HarmAccuWeather::getAccuweatherData();
- if (s->contains("LastUpdate")) {
- qDebug() << "generating harmaccuweather notification";
- emit incomingNotification(new HarmAccuWeather(this));
- } else {
- qWarning() << "Accuweather config file does not seem to exist";
+ if (QFile::exists(MeeCastWeather::configFilePath())) {
+ emit incomingNotification(new MeeCastWeather(this));
}
- delete s;
}