File indexing completed on 2024-05-12 15:31:19
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de> 0004 // 0005 0006 #ifndef BBCITEMGETTER_H 0007 #define BBCITEMGETTER_H 0008 0009 // Marble 0010 #include "AbstractWorkerThread.h" 0011 #include "GeoDataLatLonBox.h" 0012 0013 // Qt 0014 #include <QList> 0015 #include <QMutex> 0016 #include <QThread> 0017 0018 namespace Marble 0019 { 0020 0021 class BBCStation; 0022 0023 class BBCItemGetter : public AbstractWorkerThread 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit BBCItemGetter( QObject *parent = nullptr ); 0029 ~BBCItemGetter() override; 0030 0031 void setSchedule( const GeoDataLatLonBox& box, 0032 qint32 number ); 0033 0034 void setStationList( const QList<BBCStation>& items ); 0035 0036 BBCStation station( const QString &id ); 0037 0038 protected: 0039 bool workAvailable() override; 0040 void work() override; 0041 0042 Q_SIGNALS: 0043 void foundStation( const BBCStation& ); 0044 0045 public: 0046 QList<BBCStation> m_items; 0047 QMutex m_scheduleMutex; 0048 GeoDataLatLonBox m_scheduledBox; 0049 qint32 m_scheduledNumber; 0050 }; 0051 0052 } // namespace Marble 0053 0054 #endif // BBCITEMGETTER_H