mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T268, allow to reset last sent values from log. display for testing
This commit is contained in:
@@ -337,6 +337,18 @@ namespace BlackCore
|
||||
return limInfo.arg(m_statsUpdateAircraftLimited).arg(m_limitUpdateAircraftBucket.getTokensPerSecond());
|
||||
}
|
||||
|
||||
void CSimulatorCommon::resetLastSentValues()
|
||||
{
|
||||
m_lastSentParts.clear();
|
||||
m_lastSentSituations.clear();
|
||||
}
|
||||
|
||||
void CSimulatorCommon::resetLastSentValues(const CCallsign &callsign)
|
||||
{
|
||||
m_lastSentParts.remove(callsign);
|
||||
m_lastSentSituations.remove(callsign);
|
||||
}
|
||||
|
||||
void CSimulatorCommon::onSwiftDbAllDataRead()
|
||||
{
|
||||
// void, can be overridden in specialized drivers
|
||||
|
||||
@@ -152,6 +152,12 @@ namespace BlackCore
|
||||
//! Info about update aircraft limitations
|
||||
QString updateAircraftLimitationInfo() const;
|
||||
|
||||
//! Reset the last sent values
|
||||
void resetLastSentValues();
|
||||
|
||||
//! Reset the last sent values per callsign
|
||||
void resetLastSentValues(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CSimulatorCommon(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace BlackGui
|
||||
connect(ui->comp_CallsignCompleter, &CCallsignCompleter::validCallsignEntered, this, &CInterpolationLogDisplay::onCallsignEntered);
|
||||
connect(ui->hs_UpdateTime, &QSlider::valueChanged, this, &CInterpolationLogDisplay::onSliderChanged);
|
||||
connect(ui->pb_StartStop, &QPushButton::released, this, &CInterpolationLogDisplay::toggleStartStop);
|
||||
connect(ui->pb_ResetLastSent, &QPushButton::released, this, &CInterpolationLogDisplay::resetLastSentValues);
|
||||
connect(ui->pb_ResetStats, &QPushButton::released, this, &CInterpolationLogDisplay::resetStatistics);
|
||||
connect(ui->pb_ShowLogInSimulator, &QPushButton::released, this, &CInterpolationLogDisplay::showLogInSimulator);
|
||||
connect(ui->pb_FollowInSimulator, &QPushButton::released, this, &CInterpolationLogDisplay::followInSimulator);
|
||||
@@ -332,6 +333,11 @@ namespace BlackGui
|
||||
if (m_simulatorCommon) { m_simulatorCommon->resetAircraftStatistics(); }
|
||||
}
|
||||
|
||||
void CInterpolationLogDisplay::resetLastSentValues()
|
||||
{
|
||||
if (m_simulatorCommon) { m_simulatorCommon->resetLastSentValues(); }
|
||||
}
|
||||
|
||||
void CInterpolationLogDisplay::clear()
|
||||
{
|
||||
ui->tvp_AircraftParts->clear();
|
||||
|
||||
@@ -120,6 +120,9 @@ namespace BlackGui
|
||||
//! \copydoc BlackCore::CSimulatorCommon::resetAircraftStatistics
|
||||
void resetStatistics();
|
||||
|
||||
//! \copydoc BlackCore::CSimulatorCommon::resetLastSentValues
|
||||
void resetLastSentValues();
|
||||
|
||||
//! Clear
|
||||
void clear();
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_LogStatus">
|
||||
<layout class="QHBoxLayout" name="hl_LogCallsign" stretch="2,1,4,0,0,0,1">
|
||||
<layout class="QHBoxLayout" name="hl_LogCallsign" stretch="2,1,4,0,0,0,0,1">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
@@ -183,6 +183,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_ResetLastSent">
|
||||
<property name="text">
|
||||
<string> reset last sent </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_ShowLogInSimulator">
|
||||
<property name="text">
|
||||
@@ -765,6 +772,7 @@
|
||||
<tabstop>le_UpdateTime</tabstop>
|
||||
<tabstop>hs_UpdateTime</tabstop>
|
||||
<tabstop>pb_ResetStats</tabstop>
|
||||
<tabstop>pb_ResetLastSent</tabstop>
|
||||
<tabstop>pb_ShowLogInSimulator</tabstop>
|
||||
<tabstop>pb_FollowInSimulator</tabstop>
|
||||
<tabstop>pb_StartStop</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user