refs #93, re-read ATIS by pressing button from GUI

This commit is contained in:
Klaus Basan
2014-02-07 21:31:03 +01:00
parent 1a72b4b691
commit e88ee7c808
3 changed files with 14 additions and 1 deletions

View File

@@ -448,6 +448,9 @@ private slots:
*/
void getMetar(const QString &airportIcaoCode = "");
//! \brief Request new ATIS
void requestAtis();
/*!
* \brief Close text message tab
*/

View File

@@ -63,7 +63,6 @@ void MainWindow::onlineAtcStationSelected(QModelIndex index)
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
infoMessage.append(stationClicked.getMetar().getMessage());
}
this->ui->te_AtcStationsOnlineInfo->setText(infoMessage);
}
@@ -83,6 +82,16 @@ void MainWindow::getMetar(const QString &airportIcaoCode)
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
}
/*
* Get METAR
*/
void MainWindow::requestAtis()
{
if (!this->isContextNetworkAvailableCheck()) return;
if (!this->m_contextNetwork->isConnected()) return;
this->m_contextNetwork->requestAtisUpdates();
}
/*
* ATC station tab changed are changed
*/

View File

@@ -317,6 +317,7 @@ void MainWindow::initGuiSignals()
this->connect(this->ui->tw_AtcStations, &QTabWidget::currentChanged, this, &MainWindow::atcStationTabChanged);
this->connect(this->ui->pb_ReloadAtcStationsBooked, &QPushButton::clicked, this, &MainWindow::reloadAtcStationsBooked);
this->connect(this->ui->tv_AtcStationsOnline, &QTableView::clicked, this, &MainWindow::onlineAtcStationSelected);
this->connect(this->ui->pb_AtcStationsAtisReload, &QPushButton::clicked, this, &MainWindow::requestAtis);
// Settings server
this->connect(this->ui->pb_SettingsTnCurrentServer, &QPushButton::released, this, &MainWindow::alterTrafficServer);