mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #796, UI for internals
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "blackmisc/aviation/aircraftenginelist.h"
|
||||
#include "blackmisc/aviation/aircraftlights.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "ui_internalscomponent.h"
|
||||
@@ -58,8 +59,11 @@ namespace BlackGui
|
||||
connect(ui->cb_DebugContextNetwork, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
connect(ui->cb_DebugContextOwnAircraft, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
connect(ui->cb_DebugContextSimulator, &QCheckBox::stateChanged, this, &CInternalsComponent::ps_enableDebug);
|
||||
|
||||
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);
|
||||
|
||||
contextFlagsToGui();
|
||||
}
|
||||
|
||||
@@ -164,12 +168,13 @@ namespace BlackGui
|
||||
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)
|
||||
else if (sender == ui->cb_DebugDriver || sender == ui->cb_DebugInterpolator || sender == ui->cb_ForceFullInterpolation)
|
||||
{
|
||||
sGui->getIContextSimulator()->enableDebugMessages(
|
||||
ui->cb_DebugDriver->isChecked(),
|
||||
ui->cb_DebugInterpolator->isChecked()
|
||||
);
|
||||
CInterpolationAndRenderingSetup setup;
|
||||
setup.setForceFullInterpolation(ui->cb_ForceFullInterpolation->isChecked());
|
||||
setup.setDriverDebuggingMessages(ui->cb_DebugDriver->isChecked());
|
||||
setup.setInterpolatorDebuggingMessages(ui->cb_DebugInterpolator->isChecked());
|
||||
sGui->getIContextSimulator()->setInterpolationAndRenderingSetup(setup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +230,6 @@ namespace BlackGui
|
||||
ui->cb_AircraftPartsEngine4->setChecked(engines.isEngineOn(4));
|
||||
ui->cb_AircraftPartsEngine5->setChecked(engines.isEngineOn(5));
|
||||
ui->cb_AircraftPartsEngine6->setChecked(engines.isEngineOn(6));
|
||||
|
||||
}
|
||||
|
||||
void CInternalsComponent::contextFlagsToGui()
|
||||
@@ -235,6 +239,5 @@ namespace BlackGui
|
||||
ui->cb_DebugContextOwnAircraft->setChecked(sGui->getIContextOwnAircraft()->isDebugEnabled());
|
||||
ui->cb_DebugContextSimulator->setChecked(sGui->getIContextSimulator()->isDebugEnabled());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -104,27 +104,27 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="cb_DebugDriver">
|
||||
<property name="text">
|
||||
<string>Driver</string>
|
||||
<string>Driver dbg. msgs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cb_DebugInterpolator">
|
||||
<property name="text">
|
||||
<string>Interpolator</string>
|
||||
<string>Interpolator dbg. msgs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cb_ForceFullInterpolation">
|
||||
<property name="text">
|
||||
<string>force full interpolation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="lbl_Disclaimer_1">
|
||||
<property name="text">
|
||||
<string>WORK IN PROGRESS!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="vs_DebugWidget">
|
||||
<property name="orientation">
|
||||
@@ -144,7 +144,7 @@
|
||||
<attribute name="title">
|
||||
<string>Statistics</string>
|
||||
</attribute>
|
||||
<widget class="QLabel" name="lbl_Disclaimer_2">
|
||||
<widget class="QLabel" name="lbl_Disclaimer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
|
||||
Reference in New Issue
Block a user