mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #452 signals in reader classes. adjusted METAR reader
* renamed to connectDataReadSignal * removed unused individual signals, e.g. vatsimMetarsRead -> replace by data read signal + entity flag * added data in METAR class (kept there, not in airspace monitor) -> reader aware
This commit is contained in:
committed by
Mathew Sutcliffe
parent
29d436ee67
commit
8827b68b3b
@@ -36,9 +36,24 @@ namespace BlackCore
|
||||
//! Read / re-read bookings
|
||||
void readInBackgroundThread();
|
||||
|
||||
//! Get METARs
|
||||
//! \threadsafe
|
||||
virtual BlackMisc::Weather::CMetarSet getMetars() const;
|
||||
|
||||
//! Get METAR for airport
|
||||
//! \threadsafe
|
||||
virtual BlackMisc::Weather::CMetar getMetarForAirport(const BlackMisc::Aviation::CAirportIcaoCode &icao) const;
|
||||
|
||||
//! Get METARs count
|
||||
//! \threadsafe
|
||||
virtual int getMetarsCount() const;
|
||||
|
||||
signals:
|
||||
//! METARs have been read and converted to BlackMisc::Weather::CMetarSet
|
||||
void dataRead(const BlackMisc::Weather::CMetarSet &metars);
|
||||
void metarsRead(const BlackMisc::Weather::CMetarSet &metars);
|
||||
|
||||
//! Data have been read
|
||||
void dataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number);
|
||||
|
||||
private slots:
|
||||
//! Decode METARs
|
||||
@@ -49,9 +64,10 @@ namespace BlackCore
|
||||
void ps_readMetars();
|
||||
|
||||
private:
|
||||
QString m_metarUrl; //!< URL of the service
|
||||
QNetworkAccessManager *m_networkManager = nullptr;
|
||||
QString m_metarUrl; //!< URL of the service
|
||||
QNetworkAccessManager *m_networkManager = nullptr;
|
||||
BlackMisc::Weather::CMetarDecoder m_metarDecoder;
|
||||
BlackMisc::Weather::CMetarSet m_metars;
|
||||
};
|
||||
}
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user