diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 04:42:30 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 04:42:30 +0200 |
commit | 4da9bced6a27b92d49b9fc9392946510b8519d82 (patch) | |
tree | 7a2417a932a6463e3e6f6ec4d3799e24de917306 /harmaccuweather/harmaccuplugin.cpp | |
parent | bde4bde8ec9d6d09874d5ae9e0ba6dc9431859b6 (diff) | |
download | sowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.tar.gz sowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.zip |
Initial implementation of weather
Diffstat (limited to 'harmaccuweather/harmaccuplugin.cpp')
-rw-r--r-- | harmaccuweather/harmaccuplugin.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/harmaccuweather/harmaccuplugin.cpp b/harmaccuweather/harmaccuplugin.cpp new file mode 100644 index 0000000..9ea94bd --- /dev/null +++ b/harmaccuweather/harmaccuplugin.cpp @@ -0,0 +1,30 @@ +#include "harmaccuprovider.h" +#include "harmaccuplugin.h" + +using namespace sowatch; + +HarmAccuPlugin::HarmAccuPlugin(QObject *parent) : + QObject(parent) +{ +} + +HarmAccuPlugin::~HarmAccuPlugin() +{ +} + +QStringList HarmAccuPlugin::providers() +{ + QStringList providers; + providers << "harmaccu"; + return providers; +} + +NotificationProvider* HarmAccuPlugin::getProvider(const QString& id, QSettings& settings, QObject *parent) +{ + if (id != "harmaccu") return 0; + int updateTime = settings.value("updateTime").toInt(); + if (updateTime <= 0) updateTime = 2 * 3600; // Two hours by default + return new HarmAccuProvider(updateTime, parent); +} + +Q_EXPORT_PLUGIN2(harmaccuweather, HarmAccuPlugin) |