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