mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
refs #93, re-read ATIS by pressing button from GUI
This commit is contained in:
@@ -448,6 +448,9 @@ private slots:
|
|||||||
*/
|
*/
|
||||||
void getMetar(const QString &airportIcaoCode = "");
|
void getMetar(const QString &airportIcaoCode = "");
|
||||||
|
|
||||||
|
//! \brief Request new ATIS
|
||||||
|
void requestAtis();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Close text message tab
|
* \brief Close text message tab
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ void MainWindow::onlineAtcStationSelected(QModelIndex index)
|
|||||||
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
|
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
|
||||||
infoMessage.append(stationClicked.getMetar().getMessage());
|
infoMessage.append(stationClicked.getMetar().getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
this->ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
this->ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,6 +82,16 @@ void MainWindow::getMetar(const QString &airportIcaoCode)
|
|||||||
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
|
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
|
* ATC station tab changed are changed
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ void MainWindow::initGuiSignals()
|
|||||||
this->connect(this->ui->tw_AtcStations, &QTabWidget::currentChanged, this, &MainWindow::atcStationTabChanged);
|
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->pb_ReloadAtcStationsBooked, &QPushButton::clicked, this, &MainWindow::reloadAtcStationsBooked);
|
||||||
this->connect(this->ui->tv_AtcStationsOnline, &QTableView::clicked, this, &MainWindow::onlineAtcStationSelected);
|
this->connect(this->ui->tv_AtcStationsOnline, &QTableView::clicked, this, &MainWindow::onlineAtcStationSelected);
|
||||||
|
this->connect(this->ui->pb_AtcStationsAtisReload, &QPushButton::clicked, this, &MainWindow::requestAtis);
|
||||||
|
|
||||||
// Settings server
|
// Settings server
|
||||||
this->connect(this->ui->pb_SettingsTnCurrentServer, &QPushButton::released, this, &MainWindow::alterTrafficServer);
|
this->connect(this->ui->pb_SettingsTnCurrentServer, &QPushButton::released, this, &MainWindow::alterTrafficServer);
|
||||||
|
|||||||
Reference in New Issue
Block a user