mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Ref T280, interpolation log display shows parts from provider
This commit is contained in:
@@ -133,10 +133,7 @@ namespace BlackGui
|
||||
const CClient client = m_airspaceMonitor->getClientOrDefaultForCallsign(m_callsign);
|
||||
ui->le_GndFlag->setText(boolToYesNo(client.hasGndFlagCapability()));
|
||||
|
||||
static const QString hits("%1/%2");
|
||||
const QPair<int, int> foundMissed = m_airspaceMonitor->getElevationsFoundMissed();
|
||||
ui->le_ElevationHits->setText(hits.arg(foundMissed.first).arg(foundMissed.second));
|
||||
|
||||
this->displayElevationRequestReceive();
|
||||
this->displayLastInterpolation();
|
||||
}
|
||||
}
|
||||
@@ -146,10 +143,8 @@ namespace BlackGui
|
||||
if (!this->checkLogPrerequisites()) { return; }
|
||||
|
||||
const SituationLog sLog = m_simulatorCommon->interpolationLogger().getLastSituationLog();
|
||||
// ui->te_LastInterpolatedSituation->setText(sLog.toQString(false, true, true, false, "<br>"));
|
||||
ui->te_LastInterpolatedSituation->setText(sLog.situationCurrent.toQString(true));
|
||||
ui->te_SituationChange->setText(sLog.change.toQString(true));
|
||||
ui->tvp_Changes->push_frontKeepLatestAdjustedFirst(sLog.change, 5);
|
||||
|
||||
ui->le_SceneryOffset->setText(sLog.change.getGuessedSceneryDeviation().valueRoundedWithUnit(CLengthUnit::ft(), 1));
|
||||
ui->le_SceneryOffsetCG->setText(sLog.change.getGuessedSceneryDeviationCG().valueRoundedWithUnit(CLengthUnit::ft(), 1));
|
||||
@@ -267,7 +262,9 @@ namespace BlackGui
|
||||
const CCallsign cs = situation.getCallsign();
|
||||
if (!this->logCallsign(cs)) { return; }
|
||||
const CAircraftSituationList situations = m_airspaceMonitor->remoteAircraftSituations(cs);
|
||||
const CAircraftSituationChangeList changes = m_airspaceMonitor->remoteAircraftSituationChanges(cs);
|
||||
ui->tvp_AircraftSituations->updateContainerAsync(situations);
|
||||
ui->tvp_Changes->updateContainerMaybeAsync(changes);
|
||||
ui->led_Situation->blink();
|
||||
}
|
||||
|
||||
@@ -310,7 +307,6 @@ namespace BlackGui
|
||||
ui->le_CG->clear();
|
||||
ui->le_Elevation->clear();
|
||||
ui->le_ElevationReqRec->clear();
|
||||
ui->le_ElevationHits->clear();
|
||||
ui->le_Parts->clear();
|
||||
ui->le_UpdateTimes->clear();
|
||||
ui->le_UpdateTimes->clear();
|
||||
@@ -369,8 +365,13 @@ namespace BlackGui
|
||||
|
||||
void CInterpolationLogDisplay::displayElevationRequestReceive()
|
||||
{
|
||||
static const QString rr("%1/%2");
|
||||
ui->le_ElevationReqRec->setText(rr.arg(m_elvRequested).arg(m_elvReceived));
|
||||
if (!m_airspaceMonitor) { return; }
|
||||
static const QString rr("%1 / %2 hits %3 / %4 %5%");
|
||||
const QPair<int, int> foundMissed = m_airspaceMonitor->getElevationsFoundMissed();
|
||||
const int f = foundMissed.first;
|
||||
const int m = foundMissed.second;
|
||||
const double hitRatioPercent = 100.0 * static_cast<double>(f) / static_cast<double>(f + m);
|
||||
ui->le_ElevationReqRec->setText(rr.arg(m_elvRequested).arg(m_elvReceived).arg(f).arg(m).arg(QString::number(hitRatioPercent, 'f', 1)));
|
||||
}
|
||||
|
||||
void CInterpolationLogDisplay::linkWithAirspaceMonitor()
|
||||
|
||||
@@ -289,19 +289,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="le_ElevationHits">
|
||||
<property name="toolTip">
|
||||
<string>elevation received</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>hits/missed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_CG">
|
||||
<property name="readOnly">
|
||||
@@ -340,13 +327,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="lbl_ElevationHits">
|
||||
<property name="text">
|
||||
<string>Hits:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLineEdit" name="le_SceneryOffset">
|
||||
<property name="readOnly">
|
||||
@@ -425,19 +405,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_ElevationReqRec">
|
||||
<property name="toolTip">
|
||||
<string>elevation requested</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>req./rec.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="lbl_Elevation">
|
||||
<property name="text">
|
||||
@@ -472,6 +439,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="3">
|
||||
<widget class="QLineEdit" name="le_ElevationReqRec">
|
||||
<property name="toolTip">
|
||||
<string>elevation requested</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>req./rec.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -744,7 +724,6 @@
|
||||
<tabstop>le_UpdateTimes</tabstop>
|
||||
<tabstop>le_Limited</tabstop>
|
||||
<tabstop>le_ElevationReqRec</tabstop>
|
||||
<tabstop>le_ElevationHits</tabstop>
|
||||
<tabstop>le_Elevation</tabstop>
|
||||
<tabstop>le_SimulatorSpecific</tabstop>
|
||||
<tabstop>tvp_AircraftSituations</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user