Make fast position update settings persistent

Instead of enabling fast position updates via context methods, the
settings API will be used instead. This also allowed to move the timer
into CNetworkVatlib instead of CAirspaceMonitor. The only necessary thing
was to regularly update the receiver callsign set.

refs #677
This commit is contained in:
Roland Winklmeier
2016-06-17 10:17:00 +02:00
parent 1d1ca0faa3
commit fbad0977fd
13 changed files with 54 additions and 121 deletions

View File

@@ -26,8 +26,7 @@ namespace BlackGui
{
ui->setupUi(this);
connect(this->ui->cb_FastPositionUpdates, &QCheckBox::released, this, &CSettingsNetworkComponent::ps_guiValuesChanged);
bool enabled = sGui->getIContextNetwork()->isFastPositionSendingEnabled();
this->ui->cb_FastPositionUpdates->setChecked(enabled);
this->ui->cb_FastPositionUpdates->setChecked(m_interimPositionsEnabled.get());
}
CSettingsNetworkComponent::~CSettingsNetworkComponent() { }
@@ -38,7 +37,7 @@ namespace BlackGui
if (sender == ui->cb_FastPositionUpdates)
{
bool enabled = this->ui->cb_FastPositionUpdates->isChecked();
sGui->getIContextNetwork()->enableFastPositionSending(enabled);
m_interimPositionsEnabled.set(enabled);
}
}
} // ns