summaryrefslogtreecommitdiff
path: root/harmaccuweather/harmaccuplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'harmaccuweather/harmaccuplugin.cpp')
-rw-r--r--harmaccuweather/harmaccuplugin.cpp30
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)