mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T275, display elevation cache hits in log display
This commit is contained in:
@@ -133,6 +133,10 @@ 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->displayLastInterpolation();
|
||||
}
|
||||
}
|
||||
@@ -281,7 +285,7 @@ namespace BlackGui
|
||||
if (!this->logCallsign(callsign)) { return; }
|
||||
m_elvReceived++;
|
||||
ui->le_Elevation->setText(plane.toQString());
|
||||
ui->le_ElevationRec->setText(QString::number(m_elvReceived));
|
||||
this->displayElevationRequestReceive();
|
||||
ui->led_Elevation->blink();
|
||||
}
|
||||
|
||||
@@ -289,7 +293,7 @@ namespace BlackGui
|
||||
{
|
||||
if (!this->logCallsign(callsign)) { return; }
|
||||
m_elvRequested++;
|
||||
ui->le_ElevationReq->setText(QString::number(m_elvRequested));
|
||||
this->displayElevationRequestReceive();
|
||||
ui->led_Elevation->blink();
|
||||
}
|
||||
|
||||
@@ -305,8 +309,8 @@ namespace BlackGui
|
||||
ui->te_TextLog->clear();
|
||||
ui->le_CG->clear();
|
||||
ui->le_Elevation->clear();
|
||||
ui->le_ElevationRec->clear();
|
||||
ui->le_ElevationReq->clear();
|
||||
ui->le_ElevationReqRec->clear();
|
||||
ui->le_ElevationHits->clear();
|
||||
ui->le_Parts->clear();
|
||||
ui->le_UpdateTimes->clear();
|
||||
ui->le_UpdateTimes->clear();
|
||||
@@ -363,6 +367,12 @@ namespace BlackGui
|
||||
});
|
||||
}
|
||||
|
||||
void CInterpolationLogDisplay::displayElevationRequestReceive()
|
||||
{
|
||||
static const QString rr("%1/%2");
|
||||
ui->le_ElevationReqRec->setText(rr.arg(m_elvRequested).arg(m_elvReceived));
|
||||
}
|
||||
|
||||
void CInterpolationLogDisplay::linkWithAirspaceMonitor()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace BlackGui
|
||||
enum Tab
|
||||
{
|
||||
TabFlow,
|
||||
TabFlow2,
|
||||
TabInterpolation,
|
||||
TabTextLog
|
||||
};
|
||||
@@ -122,6 +123,9 @@ namespace BlackGui
|
||||
//! Init the parts view
|
||||
void initPartsView();
|
||||
|
||||
//! Display elevation requested/receive
|
||||
void displayElevationRequestReceive();
|
||||
|
||||
QScopedPointer<Ui::CInterpolationLogDisplay> ui;
|
||||
QTimer m_updateTimer;
|
||||
QPointer<BlackCore::CSimulatorCommon> m_simulatorCommon; //!< related simulator
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="le_ElevationRec">
|
||||
<widget class="QLineEdit" name="le_ElevationHits">
|
||||
<property name="toolTip">
|
||||
<string>elevation received</string>
|
||||
</property>
|
||||
@@ -298,7 +298,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>rec.</string>
|
||||
<string>hits/missed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -334,16 +334,16 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_ElevationRequested">
|
||||
<widget class="QLabel" name="lbl_ElevationReqRec">
|
||||
<property name="text">
|
||||
<string>Req.:</string>
|
||||
<string>Req/rec:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="lbl_ElevationReceived">
|
||||
<widget class="QLabel" name="lbl_ElevationHits">
|
||||
<property name="text">
|
||||
<string>Rec.:</string>
|
||||
<string>Hits:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -426,7 +426,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_ElevationReq">
|
||||
<widget class="QLineEdit" name="le_ElevationReqRec">
|
||||
<property name="toolTip">
|
||||
<string>elevation requested</string>
|
||||
</property>
|
||||
@@ -434,7 +434,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>req.</string>
|
||||
<string>req./rec.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -743,8 +743,8 @@
|
||||
<tabstop>le_UpdateCount</tabstop>
|
||||
<tabstop>le_UpdateTimes</tabstop>
|
||||
<tabstop>le_Limited</tabstop>
|
||||
<tabstop>le_ElevationReq</tabstop>
|
||||
<tabstop>le_ElevationRec</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