summaryrefslogtreecommitdiff
path: root/examples/positioning/weatherinfo/providerbackend.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/positioning/weatherinfo/providerbackend.h')
-rw-r--r--examples/positioning/weatherinfo/providerbackend.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/positioning/weatherinfo/providerbackend.h b/examples/positioning/weatherinfo/providerbackend.h
index 3909642e..c59f6c49 100644
--- a/examples/positioning/weatherinfo/providerbackend.h
+++ b/examples/positioning/weatherinfo/providerbackend.h
@@ -52,10 +52,7 @@
#define PROVIDERBACKEND_H
#include <QObject>
-
-QT_BEGIN_NAMESPACE
-class QGeoCoordinate;
-QT_END_NAMESPACE
+#include <QGeoCoordinate>
struct WeatherInfo
{
@@ -65,6 +62,12 @@ struct WeatherInfo
QString m_temperature;
};
+struct LocationInfo
+{
+ QString m_name;
+ QGeoCoordinate m_coordinate;
+};
+
class ProviderBackend : public QObject
{
Q_OBJECT
@@ -77,7 +80,10 @@ public:
signals:
// The first element in weatherDetails represents current weather.
// Next are the weather forecast, including the current day.
- void weatherInformation(const QString &city, const QList<WeatherInfo> &weatherDetails);
+ // The LocationInfo object should contain valid coordinate only when it was
+ // initially used to request the weather. If the city name was used, an
+ // empty coordinate is expected to be transferred.
+ void weatherInformation(const LocationInfo &location, const QList<WeatherInfo> &weatherDetails);
void errorOccurred();
};