Replace INetwork::CConnectionStatus with proper value object

This commit is contained in:
Roland Rossgotterer
2019-09-13 10:55:48 +02:00
parent 865b25df87
commit 4772aadc1a
42 changed files with 206 additions and 121 deletions

View File

@@ -47,6 +47,7 @@ using namespace BlackGui::Views;
using namespace BlackGui::Settings;
using namespace BlackMisc;
using namespace BlackMisc::Aviation;
using namespace BlackMisc::Network;
using namespace BlackMisc::PhysicalQuantities;
using namespace BlackMisc::Weather;
using namespace BlackCore;
@@ -338,16 +339,16 @@ namespace BlackGui
this->update();
}
void CAtcStationComponent::connectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to)
void CAtcStationComponent::connectionStatusChanged(const CConnectionStatus &from, const CConnectionStatus &to)
{
Q_UNUSED(from);
if (INetwork::isConnectedStatus(to))
if (to.isConnected())
{
ui->tvp_AtcStationsOnline->clear();
this->updateTreeView();
m_updateTimer.start();
}
else if (INetwork::isDisconnectedStatus(to))
else if (to.isDisconnected())
{
m_updateTimer.stop();
this->clearOnlineViews();