mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #814, allow to disable aircraft parts updates, mostly for testing
* added flag in setup * and UI * plus some formatting in driver classes, removed unused member
This commit is contained in:
@@ -72,6 +72,7 @@ namespace BlackGui
|
||||
connect(ui->cb_DebugDriver, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
connect(ui->cb_DebugInterpolator, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
connect(ui->cb_ForceFullInterpolation, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
connect(ui->cb_EnableParts, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
|
||||
connect(ui->pb_SendTextMessage, &QPushButton::pressed, this, &CInternalsComponent::ps_sendTextMessage);
|
||||
connect(ui->tb_LogStatusMessage, &QPushButton::pressed, this, &CInternalsComponent::ps_logStatusMessage);
|
||||
@@ -176,17 +177,18 @@ namespace BlackGui
|
||||
bool debug = (checkState == Qt::Checked);
|
||||
QObject *sender = QObject::sender();
|
||||
|
||||
if (sender == ui->cb_DebugContextApplication) { sGui->getIContextApplication()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextAudio) { sGui->getIContextAudio()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextNetwork) { sGui->getIContextNetwork()->setDebugEnabled(debug);}
|
||||
else if (sender == ui->cb_DebugContextOwnAircraft) { sGui->getIContextOwnAircraft()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextSimulator) { sGui->getIContextSimulator()->setDebugEnabled(debug);}
|
||||
else if (sender == ui->cb_DebugDriver || sender == ui->cb_DebugInterpolator || sender == ui->cb_ForceFullInterpolation)
|
||||
if (sender == ui->cb_DebugContextApplication) { sGui->getIContextApplication()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextAudio) { sGui->getIContextAudio()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextNetwork) { sGui->getIContextNetwork()->setDebugEnabled(debug);}
|
||||
else if (sender == ui->cb_DebugContextOwnAircraft) { sGui->getIContextOwnAircraft()->setDebugEnabled(debug); }
|
||||
else if (sender == ui->cb_DebugContextSimulator) { sGui->getIContextSimulator()->setDebugEnabled(debug);}
|
||||
else if (sender == ui->cb_DebugDriver || sender == ui->cb_EnableParts || sender == ui->cb_DebugInterpolator || sender == ui->cb_ForceFullInterpolation)
|
||||
{
|
||||
CInterpolationAndRenderingSetup setup;
|
||||
setup.setForceFullInterpolation(ui->cb_ForceFullInterpolation->isChecked());
|
||||
setup.setDriverDebuggingMessages(ui->cb_DebugDriver->isChecked());
|
||||
setup.setInterpolatorDebuggingMessages(ui->cb_DebugInterpolator->isChecked());
|
||||
setup.setEnabledAircraftParts(ui->cb_EnableParts->isChecked());
|
||||
sGui->getIContextSimulator()->setInterpolationAndRenderingSetup(setup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="cb_DebugDriver">
|
||||
<property name="text">
|
||||
<string>Driver dbg. msgs.</string>
|
||||
<string>driver dbg. msgs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -115,10 +115,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cb_ForceFullInterpolation">
|
||||
<property name="text">
|
||||
<string>force full interpolation</string>
|
||||
<string>force full interpol.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="cb_EnableParts">
|
||||
<property name="text">
|
||||
<string>enable parts</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user