Formatting, renaming

This commit is contained in:
Klaus Basan
2014-09-13 23:47:02 +02:00
parent 936cc7c147
commit 1ce7b11988
7 changed files with 37 additions and 37 deletions

View File

@@ -95,6 +95,33 @@ namespace BlackGui
}
}
void CAtcStationComponent::changedAtcStationOnlineConnectionStatus(const CAtcStation &station, bool added)
{
this->ui->tvp_AtcStationsOnline->changedAtcStationConnectionStatus(station, added);
}
void CAtcStationComponent::getMetar(const QString &airportIcaoCode)
{
if (!this->getIContextNetwork()->isConnected())
{
this->ui->te_AtcStationsOnlineInfo->clear();
return;
}
QString icao = airportIcaoCode.isEmpty() ? this->ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper();
this->ui->le_AtcStationsOnlineMetar->setText(icao);
if (icao.length() != 4) return;
CInformationMessage metar = this->getIContextNetwork()->getMetar(icao);
if (metar.getType() != CInformationMessage::METAR) return;
if (metar.isEmpty())
{
this->ui->te_AtcStationsOnlineInfo->clear();
}
else
{
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
}
}
void CAtcStationComponent::ps_reloadAtcStationsBooked()
{
Q_ASSERT(this->ui->tvp_AtcStationsBooked);
@@ -151,33 +178,6 @@ namespace BlackGui
}
}
void CAtcStationComponent::changedAtcStationOnlineConnectionStatus(const CAtcStation &station, bool added)
{
this->ui->tvp_AtcStationsOnline->changedAtcStationConnectionStatus(station, added);
}
void CAtcStationComponent::getMetar(const QString &airportIcaoCode)
{
if (!this->getIContextNetwork()->isConnected())
{
this->ui->te_AtcStationsOnlineInfo->clear();
return;
}
QString icao = airportIcaoCode.isEmpty() ? this->ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper();
this->ui->le_AtcStationsOnlineMetar->setText(icao);
if (icao.length() != 4) return;
CInformationMessage metar = this->getIContextNetwork()->getMetar(icao);
if (metar.getType() != CInformationMessage::METAR) return;
if (metar.isEmpty())
{
this->ui->te_AtcStationsOnlineInfo->clear();
}
else
{
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
}
}
void CAtcStationComponent::ps_onlineAtcStationSelected(QModelIndex index)
{
this->ui->te_AtcStationsOnlineInfo->setText(""); // reset