mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +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
@@ -63,9 +63,8 @@ namespace BlackCore
|
||||
Q_ASSERT_X(webDataReader, Q_FUNC_INFO, "Missing data reader");
|
||||
if (webDataReader)
|
||||
{
|
||||
this->connect(webDataReader->getBookingReader(), &CVatsimBookingReader::dataRead, this, &CAirspaceMonitor::ps_receivedBookings);
|
||||
this->connect(webDataReader->getDataFileReader(), &CVatsimDataFileReader::dataRead, this, &CAirspaceMonitor::ps_receivedDataFile);
|
||||
this->connect(webDataReader->getMetarReader(), &CVatsimMetarReader::dataRead, this, &CAirspaceMonitor::ps_updateMetars);
|
||||
this->connect(webDataReader->getBookingReader(), &CVatsimBookingReader::atcBookingsRead, this, &CAirspaceMonitor::ps_receivedBookings);
|
||||
this->connect(webDataReader->getDataFileReader(), &CVatsimDataFileReader::dataFileRead, this, &CAirspaceMonitor::ps_receivedDataFile);
|
||||
}
|
||||
|
||||
// Force snapshot in the main event loop
|
||||
@@ -335,11 +334,6 @@ namespace BlackCore
|
||||
return m_otherClients;
|
||||
}
|
||||
|
||||
CMetar CAirspaceMonitor::getMetar(const BlackMisc::Aviation::CAirportIcaoCode &airportIcaoCode)
|
||||
{
|
||||
return m_metars.findFirstByOrDefault(&CMetar::getAirportIcaoCode, airportIcaoCode);
|
||||
}
|
||||
|
||||
CAtcStation CAirspaceMonitor::getAtcStationForComUnit(const CComSystem &comSystem)
|
||||
{
|
||||
CAtcStation station;
|
||||
@@ -391,7 +385,6 @@ namespace BlackCore
|
||||
|
||||
void CAirspaceMonitor::clear()
|
||||
{
|
||||
m_metars.clear();
|
||||
m_flightPlanCache.clear();
|
||||
m_modelCache.clear();
|
||||
|
||||
@@ -606,12 +599,6 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::ps_updateMetars(const CMetarSet &metars)
|
||||
{
|
||||
Q_ASSERT(BlackCore::isCurrentThreadObjectThread(this));
|
||||
m_metars = metars;
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::ps_sendReadyForModelMatching(const CCallsign &callsign, int trial)
|
||||
{
|
||||
// some checks for special conditions, e.g. logout -> empty list, but still signals pending
|
||||
|
||||
Reference in New Issue
Block a user