/** * Subscribe to MeteoDataManagement and provide the correct weather for the given position * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include #include namespace AreaEffectSimulation { class MainHandler; class MeteoDataProvider : public QObject { Q_OBJECT public: explicit MeteoDataProvider(MainHandler *mainHandler); ~MeteoDataProvider(); MeteoDataManagement::MeteoData getStaticWeather(); MeteoDataManagement::MeteoData getNearestWeather(const Core::GeoPosition2D &pos); private Q_SLOTS: void meteoDataChanged(const MeteoDataManagement::MeteoData &data, DataModification modType); private: void initWeatherData(); private: MainHandler *m_mainHandler; std::shared_ptr m_mdmDtc; QMap m_meteoData; int m_staticWeatherId; }; } // namespace AreaEffectSimulation