summaryrefslogtreecommitdiffstats
path: root/weather/src/forecastprovider.h
diff options
context:
space:
mode:
Diffstat (limited to 'weather/src/forecastprovider.h')
-rw-r--r--weather/src/forecastprovider.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/weather/src/forecastprovider.h b/weather/src/forecastprovider.h
new file mode 100644
index 0000000..fcb75dd
--- /dev/null
+++ b/weather/src/forecastprovider.h
@@ -0,0 +1,37 @@
+#ifndef FORECASTPROVIDER_H
+#define FORECASTPROVIDER_H
+
+#include <QObject>
+#include <QString>
+#include <QStringList>
+#include <QList>
+#include <QMap>
+
+#include "forecastdata.h"
+#include "forecastsource.h"
+
+class ForecastProvider : public QObject
+{
+ Q_OBJECT
+public:
+ static int getForecast(const QString &key, bool locationId);
+
+ static void connectToResponseSignal(QObject *receiver, const char *method);
+ static void disconnectReceiver(QObject *receiver);
+
+ static void setForecastSource(ForecastSource *source);
+
+signals:
+ void forecastResponse(int reqId, const ForecastData &forecast);
+
+private:
+
+ ForecastSource *m_source;
+
+ ForecastProvider();
+ ~ForecastProvider();
+ static ForecastProvider *instance();
+
+};
+
+#endif // FORECASTPROVIDER_H