refs #844, use inline UI for settings and settings in ATC component

Allow to toggle stations in/outside range
This commit is contained in:
Klaus Basan
2016-12-24 23:45:00 +01:00
committed by Mathew Sutcliffe
parent 2108422dc2
commit 5d5da0641f
3 changed files with 27 additions and 5 deletions

View File

@@ -162,10 +162,14 @@ namespace BlackGui
// update
if (this->m_timestampOnlineStationsChanged > this->m_timestampLastReadOnlineStations)
{
const CAtcStationList onlineStations =
// test: filter by frequency, see if this is better
// sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom()
// sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom()
const CAtcStationsSettings settings = m_settingsAtc.getThreadLocal();
CAtcStationList onlineStations =
sGui->getIContextNetwork()->getAtcStationsOnline().stationsWithValidFrequency();
if (settings.showOnlyInRange())
{
onlineStations.removeIfOutsideRange();
}
ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(onlineStations);
this->m_timestampLastReadOnlineStations = QDateTime::currentDateTimeUtc();
@@ -309,7 +313,7 @@ namespace BlackGui
void CAtcStationComponent::ps_settingsChanged()
{
const CViewUpdateSettings settings = this->m_settings.get();
const CViewUpdateSettings settings = this->m_settingsView.get();
const int ms = settings.getAtcUpdateTime().toMs();
this->m_updateTimer.setInterval(ms);
}