refs #253, faster updates of ATC stations by changedAtcStationConnectionStatus(const

This commit is contained in:
Klaus Basan
2014-05-28 13:14:56 +02:00
parent 421cd61195
commit f1ac4deda6
6 changed files with 55 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ namespace BlackGui
Q_ASSERT(this->getIContextNetwork());
this->connect(this->getIContextNetwork(), &IContextNetwork::changedAtcStationsOnline, this, &CAtcStationComponent::changedAtcStationsOnline);
this->connect(this->getIContextNetwork(), &IContextNetwork::changedAtcStationsBooked, this, &CAtcStationComponent::changedAtcStationsBooked);
this->connect(this->getIContextNetwork(), &IContextNetwork::changedAtcStationOnlineConnectionStatus, this, &CAtcStationComponent::changedAtcStationOnlineConnectionStatus);
}
void CAtcStationComponent::update()
@@ -79,9 +80,16 @@ namespace BlackGui
void CAtcStationComponent::changedAtcStationsOnline()
{
// just update timestamp, data will be pulled by time
// the timestamp will tell if there are newer data
this->m_timestampOnlineStationsChanged = QDateTime::currentDateTimeUtc();
}
void CAtcStationComponent::changedAtcStationOnlineConnectionStatus(const CAtcStation &station, bool added)
{
this->ui->tvp_AtcStationsOnline->changedAtcStationConnectionStatus(station, added);
}
void CAtcStationComponent::changedAtcStationsBooked()
{
this->reloadAtcStationsBooked();