refs #199, console redirection enabled for GUI

# hooked up with siganls
# changed widget to courier font
This commit is contained in:
Klaus Basan
2014-04-08 18:17:52 +02:00
parent 093462e7fb
commit 35b489d89a
3 changed files with 35 additions and 12 deletions

View File

@@ -67,6 +67,7 @@ void MainWindow::gracefulShutdown()
{
if (!this->m_init) return;
this->m_init = false;
if (this->m_rt->getIContextApplication()) emit this->m_rt->getIContextApplication()->widgetGuiTerminating();
// close info window
if (this->m_infoWindow)
@@ -280,6 +281,13 @@ void MainWindow::displayStatusMessages(const CStatusMessageList &messages)
}
}
void MainWindow::displayRedirectedOutput(const CStatusMessage &statusMessage, qint64 contextId)
{
if (!this->m_rt->getIContextApplication()) return;
if (this->m_rt->getIContextApplication()->getUniqueId() == contextId) return; //self triggered
this->ui->te_StatusPageConsole->appendHtml(statusMessage.toHtml());
}
/*
* Connection terminated
*/
@@ -317,11 +325,6 @@ void MainWindow::connectionStatusChanged(uint /** from **/, uint to)
}
}
void MainWindow::simulatorAvailable()
{
m_timerSimulator->start(500);
}
/*
* Timer event
*/
@@ -353,7 +356,7 @@ void MainWindow::timerBasedUpdates()
}
else if (sender == this->m_timerSimulator)
{
updateSimulatorData();
this->updateSimulatorData();
}
// own aircraft
@@ -525,3 +528,12 @@ void MainWindow::updateSimulatorData()
ui->le_SimulatorCom2Standby->setText(ownAircraft.getCom2System().getFrequencyStandby().toFormattedQString());
ui->le_SimulatorTransponder->setText(ownAircraft.getTransponderCodeFormatted());
}
void MainWindow::simulatorConnectionChanged(bool isAvailable)
{
// Simulator timer, TODO remove later
if (isAvailable)
this->m_timerSimulator->start(500);
else
this->m_timerSimulator->stop();
}