File indexing completed on 2024-05-12 15:31:20
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de> 0004 // 0005 0006 #ifndef BBCWEATHERSERVICE_H 0007 #define BBCWEATHERSERVICE_H 0008 0009 #include "AbstractWeatherService.h" 0010 0011 #include <QStringList> 0012 #include <QList> 0013 0014 namespace Marble 0015 { 0016 0017 class BBCItemGetter; 0018 class BBCStation; 0019 class GeoDataLatLonAltBox; 0020 class StationListParser; 0021 0022 class BBCWeatherService : public AbstractWeatherService 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit BBCWeatherService( const MarbleModel *model, QObject *parent ); 0028 ~BBCWeatherService() override; 0029 0030 void setFavoriteItems( const QStringList& favorite ) override; 0031 0032 public Q_SLOTS: 0033 void getAdditionalItems( const GeoDataLatLonAltBox& box, 0034 qint32 number = 10 ) override; 0035 void getItem( const QString &id ) override; 0036 0037 private Q_SLOTS: 0038 void fetchStationList(); 0039 void createItem( const BBCStation& station ); 0040 0041 private: 0042 QList<BBCStation> m_stationList; 0043 bool m_parsingStarted; 0044 StationListParser *m_parser; 0045 BBCItemGetter *m_itemGetter; 0046 }; 0047 0048 } // namespace Marble 0049 0050 #endif // BBCWEATHERSERVICE_H