mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Renamed to FullInterpolation (formerly VtolInterpolation)
This commit is contained in:
@@ -72,7 +72,7 @@ namespace BlackGui
|
||||
|
||||
CInterpolationSetupComponent::Mode CInterpolationSetupComponent::getSetupMode() const
|
||||
{
|
||||
return ui->rb_Callsign->isChecked() ? CInterpolationSetupComponent::PerCallsign : CInterpolationSetupComponent::Global;
|
||||
return ui->rb_Callsign->isChecked() ? CInterpolationSetupComponent::SetupPerCallsign : CInterpolationSetupComponent::SetupGlobal;
|
||||
}
|
||||
|
||||
void CInterpolationSetupComponent::onRowDoubleClicked(const QModelIndex &index)
|
||||
@@ -89,7 +89,7 @@ namespace BlackGui
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
bool enableCallsign = false;
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::Global)
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::SetupGlobal)
|
||||
{
|
||||
this->setUiValuesFromGlobal();
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace BlackGui
|
||||
{
|
||||
const bool overlay = QObject::sender() == ui->pb_Reload;
|
||||
if (!this->checkPrerequisites(overlay)) { return; }
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::Global)
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::SetupGlobal)
|
||||
{
|
||||
CInterpolationAndRenderingSetupGlobal gs = sGui->getIContextSimulator()->getInterpolationAndRenderingSetupGlobal();
|
||||
ui->form_InterpolationSetup->setValue(gs);
|
||||
@@ -130,7 +130,7 @@ namespace BlackGui
|
||||
if (!this->checkPrerequisites(true)) { return; }
|
||||
CInterpolationAndRenderingSetupPerCallsign setup = ui->form_InterpolationSetup->getValue();
|
||||
CInterpolationAndRenderingSetupGlobal gs = sGui->getIContextSimulator()->getInterpolationAndRenderingSetupGlobal();
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::Global)
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::SetupGlobal)
|
||||
{
|
||||
gs.setBaseValues(setup);
|
||||
gs.setLogInterpolation(false); // that would globally log all values
|
||||
@@ -175,7 +175,7 @@ namespace BlackGui
|
||||
void CInterpolationSetupComponent::removeSetup()
|
||||
{
|
||||
if (!this->checkPrerequisites(true)) { return; }
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::Global) { return; }
|
||||
if (this->getSetupMode() == CInterpolationSetupComponent::SetupGlobal) { return; }
|
||||
const CCallsign cs = ui->comp_CallsignCompleter->getCallsign(false);
|
||||
CInterpolationSetupList setups = ui->tvp_InterpolationSetup->container();
|
||||
const int removed = setups.removeByCallsign(cs);
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace BlackGui
|
||||
//! Mode of setup
|
||||
enum Mode
|
||||
{
|
||||
Global,
|
||||
PerCallsign
|
||||
SetupGlobal,
|
||||
SetupPerCallsign
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
|
||||
@@ -100,16 +100,29 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Editors::CInterpolationSetupForm" name="form_InterpolationSetup">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
<height>110</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="vs_InterpolationSetupComponent">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_Buttons">
|
||||
<layout class="QHBoxLayout" name="hl_Buttons">
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace BlackGui
|
||||
ui->cb_DebugDriver->setChecked(setup.showSimulatorDebugMessages());
|
||||
ui->cb_LogInterpolation->setChecked(setup.logInterpolation());
|
||||
ui->cb_EnableParts->setChecked(setup.isAircraftPartsEnabled());
|
||||
ui->cb_ForceVtolInterpolation->setChecked(setup.isForcingVtolInterpolation());
|
||||
ui->cb_ForceFullInterpolation->setChecked(setup.isForcingFullInterpolation());
|
||||
ui->cb_SendGndFlagToSim->setChecked(setup.isSendingGndFlagToSimulator());
|
||||
ui->cb_FixSceneryOffset->setChecked(setup.isFixingSceneryOffset());
|
||||
ui->le_PitchOnGround->setText(setup.getPitchOnGround().valueRoundedWithUnit(CAngleUnit::deg()));
|
||||
@@ -56,7 +56,7 @@ namespace BlackGui
|
||||
{
|
||||
CInterpolationAndRenderingSetupPerCallsign setup;
|
||||
setup.setEnabledAircraftParts(ui->cb_EnableParts->isChecked());
|
||||
setup.setForceVtolInterpolation(ui->cb_ForceVtolInterpolation->isChecked());
|
||||
setup.setForceFullInterpolation(ui->cb_ForceFullInterpolation->isChecked());
|
||||
setup.setLogInterpolation(ui->cb_LogInterpolation->isChecked());
|
||||
setup.setSendingGndFlagToSimulator(ui->cb_SendGndFlagToSim->isChecked());
|
||||
setup.setSimulatorDebuggingMessages(ui->cb_DebugDriver->isChecked());
|
||||
@@ -70,7 +70,7 @@ namespace BlackGui
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_DebugDriver, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_LogInterpolation, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_EnableParts, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ForceVtolInterpolation, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ForceFullInterpolation, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_SendGndFlagToSim, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_FixSceneryOffset, readonly);
|
||||
ui->rb_Linear->setEnabled(!readonly);
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="cb_ForceVtolInterpolation">
|
||||
<widget class="QCheckBox" name="cb_ForceFullInterpolation">
|
||||
<property name="text">
|
||||
<string>force VTOL interpolation</string>
|
||||
<string>force full interpolation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -168,10 +168,11 @@
|
||||
<tabstops>
|
||||
<tabstop>rb_Spline</tabstop>
|
||||
<tabstop>rb_Linear</tabstop>
|
||||
<tabstop>le_PitchOnGround</tabstop>
|
||||
<tabstop>cb_EnableParts</tabstop>
|
||||
<tabstop>cb_SendGndFlagToSim</tabstop>
|
||||
<tabstop>cb_FixSceneryOffset</tabstop>
|
||||
<tabstop>cb_ForceVtolInterpolation</tabstop>
|
||||
<tabstop>cb_ForceFullInterpolation</tabstop>
|
||||
<tabstop>cb_LogInterpolation</tabstop>
|
||||
<tabstop>cb_DebugDriver</tabstop>
|
||||
</tabstops>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BlackGui
|
||||
m_columns.addColumn(CColumn("parts", "aircraft parts", CInterpolationAndRenderingSetupPerCallsign::IndexEnabledAircraftParts, new CBoolIconFormatter("parts", "aircraft parts")));
|
||||
m_columns.addColumn(CColumn("send gnd.", "send gnd.", CInterpolationAndRenderingSetupPerCallsign::IndexSendGndFlagToSimulator, new CBoolIconFormatter("send gnd.", "send gnd.")));
|
||||
m_columns.addColumn(CColumn("sc.os.", "fix scenery offset", CInterpolationAndRenderingSetupPerCallsign::IndexFixSceneryOffset, new CBoolIconFormatter("sc.os.", "fix scenery offset")));
|
||||
m_columns.addColumn(CColumn("VTOL", "VTOL interpolstion", CInterpolationAndRenderingSetupPerCallsign::IndexForceVtolInterpolation, new CBoolIconFormatter("VTOL", "VTOL interpolation")));
|
||||
m_columns.addColumn(CColumn("full int.", "full interpolation", CInterpolationAndRenderingSetupPerCallsign::IndexForceFullInterpolation, new CBoolIconFormatter("full int.", "full interpolation")));
|
||||
m_columns.addColumn(CColumn("sim.dbg.", "simulator debug", CInterpolationAndRenderingSetupPerCallsign::IndexSimulatorDebugMessages, new CBoolIconFormatter("sim.dbg.", "simulator debug")));
|
||||
m_columns.addColumn(CColumn("log.int.", "log.interpolation", CInterpolationAndRenderingSetupPerCallsign::IndexLogInterpolation, new CBoolIconFormatter("log.int.", "log.interpolation")));
|
||||
// default sort order
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace BlackMisc
|
||||
{
|
||||
case IndexLogInterpolation: return CVariant::fromValue(m_logInterpolation);
|
||||
case IndexSimulatorDebugMessages: return CVariant::fromValue(m_simulatorDebugMessages);
|
||||
case IndexForceVtolInterpolation: return CVariant::fromValue(m_forceVtolInterpolation);
|
||||
case IndexForceFullInterpolation: return CVariant::fromValue(m_forceFullInterpolation);
|
||||
case IndexEnabledAircraftParts: return CVariant::fromValue(m_enabledAircraftParts);
|
||||
case IndexSendGndFlagToSimulator: return CVariant::fromValue(m_sendGndToSim);
|
||||
case IndexInterpolatorMode: return CVariant::fromValue(m_interpolatorMode);
|
||||
@@ -122,7 +122,7 @@ namespace BlackMisc
|
||||
{
|
||||
case IndexLogInterpolation: m_logInterpolation = variant.toBool(); return;
|
||||
case IndexSimulatorDebugMessages: m_simulatorDebugMessages = variant.toBool(); return;
|
||||
case IndexForceVtolInterpolation: m_forceVtolInterpolation = variant.toBool(); return;
|
||||
case IndexForceFullInterpolation: m_forceFullInterpolation = variant.toBool(); return;
|
||||
case IndexEnabledAircraftParts: m_enabledAircraftParts = variant.toBool(); return;
|
||||
case IndexSendGndFlagToSimulator: m_sendGndToSim = variant.toBool(); return;
|
||||
case IndexInterpolatorMode: m_interpolatorMode = variant.toInt(); return;
|
||||
@@ -141,7 +141,7 @@ namespace BlackMisc
|
||||
QStringLiteral("Interpolator: ") % this->getInterpolatorModeAsString() %
|
||||
QStringLiteral(" | Dbg.sim.msgs: ") % boolToYesNo(m_simulatorDebugMessages) %
|
||||
QStringLiteral(" | log interpolation: ") % boolToYesNo(m_logInterpolation) %
|
||||
QStringLiteral(" | force VTOL interpolation: ") % boolToYesNo(m_forceVtolInterpolation) %
|
||||
QStringLiteral(" | force VTOL interpolation: ") % boolToYesNo(m_forceFullInterpolation) %
|
||||
QStringLiteral(" | enable parts: ") % boolToYesNo(m_enabledAircraftParts) %
|
||||
QStringLiteral(" | send gnd: ") % boolToYesNo(m_sendGndToSim) %
|
||||
QStringLiteral(" | fix.scenery offset: ") % boolToYesNo(m_fixSceneryOffset) %
|
||||
@@ -266,7 +266,7 @@ namespace BlackMisc
|
||||
{
|
||||
m_logInterpolation = baseValues.logInterpolation();
|
||||
m_simulatorDebugMessages = baseValues.showSimulatorDebugMessages();
|
||||
m_forceVtolInterpolation = baseValues.isForcingVtolInterpolation();
|
||||
m_forceFullInterpolation = baseValues.isForcingFullInterpolation();
|
||||
m_enabledAircraftParts = baseValues.isAircraftPartsEnabled();
|
||||
m_sendGndToSim = baseValues.isSendingGndFlagToSimulator();
|
||||
m_fixSceneryOffset = baseValues.isFixingSceneryOffset();
|
||||
@@ -330,7 +330,7 @@ namespace BlackMisc
|
||||
CPropertyIndexList diff;
|
||||
if (this->logInterpolation() != globalSetup.logInterpolation()) { diff.push_back(IndexLogInterpolation); }
|
||||
if (this->showSimulatorDebugMessages() != globalSetup.showSimulatorDebugMessages()) { diff.push_back(IndexSimulatorDebugMessages); }
|
||||
if (this->isForcingVtolInterpolation() != globalSetup.isForcingVtolInterpolation()) { diff.push_back(IndexForceVtolInterpolation); }
|
||||
if (this->isForcingFullInterpolation() != globalSetup.isForcingFullInterpolation()) { diff.push_back(IndexForceFullInterpolation); }
|
||||
if (this->isAircraftPartsEnabled() != globalSetup.isAircraftPartsEnabled()) { diff.push_back(IndexEnabledAircraftParts); }
|
||||
if (this->isSendingGndFlagToSimulator() != globalSetup.isSendingGndFlagToSimulator()) { diff.push_back(IndexSendGndFlagToSimulator); }
|
||||
if (this->isFixingSceneryOffset() != globalSetup.isFixingSceneryOffset()) { diff.push_back(IndexFixSceneryOffset); }
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackMisc
|
||||
{
|
||||
IndexLogInterpolation = CPropertyIndex::GlobalIndexCInterpolatioRenderingSetup,
|
||||
IndexSimulatorDebugMessages,
|
||||
IndexForceVtolInterpolation,
|
||||
IndexForceFullInterpolation,
|
||||
IndexSendGndFlagToSimulator,
|
||||
IndexEnabledAircraftParts,
|
||||
IndexInterpolatorMode,
|
||||
@@ -63,10 +63,10 @@ namespace BlackMisc
|
||||
bool setLogInterpolation(bool log);
|
||||
|
||||
//! Full interpolation (skip optimizations like checking if aircraft moves etc.)
|
||||
bool isForcingVtolInterpolation() const { return m_forceVtolInterpolation; }
|
||||
bool isForcingFullInterpolation() const { return m_forceFullInterpolation; }
|
||||
|
||||
//! Force full interpolation
|
||||
void setForceVtolInterpolation(bool force) { m_forceVtolInterpolation = force; }
|
||||
void setForceFullInterpolation(bool force) { m_forceFullInterpolation = force; }
|
||||
|
||||
//! Set enabled aircraft parts
|
||||
bool setEnabledAircraftParts(bool enabled);
|
||||
@@ -131,7 +131,7 @@ namespace BlackMisc
|
||||
|
||||
bool m_logInterpolation = false; //!< Debug messages in interpolator
|
||||
bool m_simulatorDebugMessages = false; //!< Debug messages of simulator (aka plugin)
|
||||
bool m_forceVtolInterpolation = false; //!< always do a full interpolation, even if aircraft is not moving
|
||||
bool m_forceFullInterpolation = false; //!< always do a full interpolation, even if aircraft is not moving
|
||||
bool m_enabledAircraftParts = true; //!< Enable aircraft parts
|
||||
bool m_sendGndToSim = true; //!< Send the gnd.flag to simulator
|
||||
bool m_fixSceneryOffset = false; //!< Fix. scenery offset
|
||||
@@ -214,7 +214,7 @@ namespace BlackMisc
|
||||
CInterpolationAndRenderingSetupGlobal,
|
||||
BLACK_METAMEMBER(logInterpolation),
|
||||
BLACK_METAMEMBER(simulatorDebugMessages),
|
||||
BLACK_METAMEMBER(forceVtolInterpolation),
|
||||
BLACK_METAMEMBER(forceFullInterpolation),
|
||||
BLACK_METAMEMBER(sendGndToSim),
|
||||
BLACK_METAMEMBER(enabledAircraftParts),
|
||||
BLACK_METAMEMBER(fixSceneryOffset),
|
||||
@@ -273,7 +273,7 @@ namespace BlackMisc
|
||||
CInterpolationAndRenderingSetupPerCallsign,
|
||||
BLACK_METAMEMBER(logInterpolation),
|
||||
BLACK_METAMEMBER(simulatorDebugMessages),
|
||||
BLACK_METAMEMBER(forceVtolInterpolation),
|
||||
BLACK_METAMEMBER(forceFullInterpolation),
|
||||
BLACK_METAMEMBER(sendGndToSim),
|
||||
BLACK_METAMEMBER(enabledAircraftParts),
|
||||
BLACK_METAMEMBER(fixSceneryOffset),
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace BlackMisc
|
||||
template<typename Derived>
|
||||
CAircraftSituationList CInterpolator<Derived>::remoteAircraftSituationsAndChange(const CInterpolationAndRenderingSetupPerCallsign &setup)
|
||||
{
|
||||
// const bool vtol = setup.isForcingVtolInterpolation() || m_model.isVtol();
|
||||
// const bool vtol = setup.isForcingFullInterpolation() || m_model.isVtol();
|
||||
CAircraftSituationList validSituations = this->remoteAircraftSituations(m_callsign);
|
||||
|
||||
// get the changes, we need the second value as we want to look in the past
|
||||
|
||||
Reference in New Issue
Block a user