mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 22:29:13 +08:00
Ref T650, simulator setting UI of SimulatedObject can be used
This commit is contained in:
@@ -35,12 +35,13 @@ namespace BlackSimPlugin
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->cb_TraceSimConnectCalls->setChecked(false);
|
ui->cb_TraceSimConnectCalls->setChecked(false);
|
||||||
|
|
||||||
|
connect(ui->cb_AddingAsSimulatedObject, &QCheckBox::released, this, &CFsxSettingsComponent::onSimulatedObjectChanged);
|
||||||
connect(ui->cb_TraceSimConnectCalls, &QCheckBox::released, this, &CFsxSettingsComponent::onSimConnectTraceChanged);
|
connect(ui->cb_TraceSimConnectCalls, &QCheckBox::released, this, &CFsxSettingsComponent::onSimConnectTraceChanged);
|
||||||
connect(ui->cb_EnableTerrainProbe, &QCheckBox::released, this, &CFsxSettingsComponent::onEnableTerrainProbeChanged);
|
connect(ui->cb_EnableTerrainProbe, &QCheckBox::released, this, &CFsxSettingsComponent::onEnableTerrainProbeChanged);
|
||||||
connect(ui->cb_UseFsuipc, &QCheckBox::released, this, &CFsxSettingsComponent::onFsuipcChanged);
|
connect(ui->cb_UseFsuipc, &QCheckBox::released, this, &CFsxSettingsComponent::onFsuipcChanged);
|
||||||
connect(ui->cb_SBOffsets, &QCheckBox::released, this, &CFsxSettingsComponent::onSBOffsetsChanged);
|
connect(ui->cb_SBOffsets, &QCheckBox::released, this, &CFsxSettingsComponent::onSBOffsetsChanged);
|
||||||
connect(ui->pb_CopyTerrainProbe, &QPushButton::released, this, &CFsxSettingsComponent::copyTerrainProbe);
|
connect(ui->pb_CopyTerrainProbe, &QPushButton::released, this, &CFsxSettingsComponent::copyTerrainProbe);
|
||||||
connect(ui->pb_Refresh, &QPushButton::released, this, &CFsxSettingsComponent::refresh);
|
connect(ui->pb_Refresh, &QPushButton::released, this, &CFsxSettingsComponent::refresh);
|
||||||
|
|
||||||
if (sGui && sGui->getIContextSimulator())
|
if (sGui && sGui->getIContextSimulator())
|
||||||
{
|
{
|
||||||
@@ -75,6 +76,7 @@ namespace BlackSimPlugin
|
|||||||
ui->cb_EnableTerrainProbe->setChecked(fsxOrP3D->isUsingFsxTerrainProbe());
|
ui->cb_EnableTerrainProbe->setChecked(fsxOrP3D->isUsingFsxTerrainProbe());
|
||||||
ui->cb_SBOffsets->setChecked(fsxOrP3D->isUsingSbOffsetValues());
|
ui->cb_SBOffsets->setChecked(fsxOrP3D->isUsingSbOffsetValues());
|
||||||
ui->cb_UseFsuipc->setChecked(fsxOrP3D->isFsuipcOpened());
|
ui->cb_UseFsuipc->setChecked(fsxOrP3D->isFsuipcOpened());
|
||||||
|
ui->cb_AddingAsSimulatedObject->setChecked(fsxOrP3D->isAddingAsSimulatedObjectEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lbl_NoLocalSimulator->setVisible(!localSim);
|
ui->lbl_NoLocalSimulator->setVisible(!localSim);
|
||||||
@@ -95,6 +97,13 @@ namespace BlackSimPlugin
|
|||||||
fsxOrP3D->setTractingSendId(ui->cb_TraceSimConnectCalls->isChecked());
|
fsxOrP3D->setTractingSendId(ui->cb_TraceSimConnectCalls->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFsxSettingsComponent::onSimulatedObjectChanged()
|
||||||
|
{
|
||||||
|
CSimulatorFsxCommon *fsxOrP3D = this->getFsxOrP3DSimulator();
|
||||||
|
if (!fsxOrP3D) { return; }
|
||||||
|
fsxOrP3D->setAddingAsSimulatedObjectEnabled(ui->cb_AddingAsSimulatedObject->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
void CFsxSettingsComponent::onEnableTerrainProbeChanged()
|
void CFsxSettingsComponent::onEnableTerrainProbeChanged()
|
||||||
{
|
{
|
||||||
CSimulatorFsxCommon *fsxOrP3D = this->getFsxOrP3DSimulator();
|
CSimulatorFsxCommon *fsxOrP3D = this->getFsxOrP3DSimulator();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace BlackSimPlugin
|
|||||||
explicit CFsxSettingsComponent(QWidget *parent = nullptr);
|
explicit CFsxSettingsComponent(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CFsxSettingsComponent();
|
virtual ~CFsxSettingsComponent() override;
|
||||||
|
|
||||||
//! Simulator, P3D/FSX
|
//! Simulator, P3D/FSX
|
||||||
void setSimulator(const BlackMisc::Simulation::CSimulatorInfo &simulator) { m_simulator = simulator; }
|
void setSimulator(const BlackMisc::Simulation::CSimulatorInfo &simulator) { m_simulator = simulator; }
|
||||||
@@ -53,6 +53,9 @@ namespace BlackSimPlugin
|
|||||||
//! Terrain probe checkbox changed
|
//! Terrain probe checkbox changed
|
||||||
void onEnableTerrainProbeChanged();
|
void onEnableTerrainProbeChanged();
|
||||||
|
|
||||||
|
//! Using simulated objects
|
||||||
|
void onSimulatedObjectChanged();
|
||||||
|
|
||||||
//! FSUIPC setting changed
|
//! FSUIPC setting changed
|
||||||
void onFsuipcChanged();
|
void onFsuipcChanged();
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,65 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>254</width>
|
<width>254</width>
|
||||||
<height>174</height>
|
<height>212</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>FSX/P3D settings</string>
|
<string>FSX/P3D settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gl_Settings" columnstretch="0,0">
|
<layout class="QGridLayout" name="gl_Settings" columnstretch="0,0,0">
|
||||||
<item row="5" column="1">
|
<item row="3" column="2">
|
||||||
|
<widget class="QLabel" name="lbl_SBOffsets">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable SB SimConnect offsets. Those are needed to detect "Ident" and "Standby" from your transponder (supported by some vendors as PMDG).</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="lbl_TraceSimConnectCalls">
|
||||||
|
<property name="text">
|
||||||
|
<string>Trace simConnect calls (this will trace sendId calls and provide further information)</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_TraceSimConnectCalls">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="lbl_NoLocalSimulator">
|
||||||
|
<property name="text">
|
||||||
|
<string>Looks like you are running a remote GUI, these settings only work locally. Use core settings.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_UseFsuipc">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_AddingAsSimulatedObject">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
<widget class="QWidget" name="wi_Buttons" native="true">
|
<widget class="QWidget" name="wi_Buttons" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item alignment="Qt::AlignRight">
|
<item alignment="Qt::AlignRight">
|
||||||
@@ -47,54 +98,27 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="5" column="2">
|
||||||
<widget class="QLabel" name="lbl_TraceSimConnectCalls">
|
|
||||||
<property name="text">
|
|
||||||
<string>Trace simConnect calls (this will trace sendId calls and provide further information)</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="lbl_SBOffsets">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable SB SimConnect offsets. Those are needed to detect "Ident" and "Standby" from your transponder (supported by some vendors as PMDG).</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="cb_UseFsuipc">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="cb_TraceSimConnectCalls">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLabel" name="lbl_TraceTerrainProbe">
|
<widget class="QLabel" name="lbl_TraceTerrainProbe">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use the terrain probe (32bit only)</string>
|
<string>Use the terrain probe (32bit only)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="2">
|
||||||
<widget class="QLabel" name="lbl_UseFsuipc">
|
<widget class="QLabel" name="lbl_UseFsuipc">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Enable FSUIPC support</string>
|
<string>Enable FSUIPC support</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_EnableTerrainProbe">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="cb_SBOffsets">
|
<widget class="QCheckBox" name="cb_SBOffsets">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -102,17 +126,10 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="2">
|
||||||
<widget class="QCheckBox" name="cb_EnableTerrainProbe">
|
<widget class="QLabel" name="lbl_FailedUseSimulatedObjects">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>If SimConnect NonATC AI aircraft adding fails, use simulated objects. You cannot see those in the aircraft menu, but might work for some helicopters etc.</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="lbl_NoLocalSimulator">
|
|
||||||
<property name="text">
|
|
||||||
<string>Looks like you are running a remote GUI, these settings only work locally. Use core settings.</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -125,6 +142,7 @@
|
|||||||
<tabstop>cb_TraceSimConnectCalls</tabstop>
|
<tabstop>cb_TraceSimConnectCalls</tabstop>
|
||||||
<tabstop>cb_UseFsuipc</tabstop>
|
<tabstop>cb_UseFsuipc</tabstop>
|
||||||
<tabstop>cb_SBOffsets</tabstop>
|
<tabstop>cb_SBOffsets</tabstop>
|
||||||
|
<tabstop>cb_AddingAsSimulatedObject</tabstop>
|
||||||
<tabstop>cb_EnableTerrainProbe</tabstop>
|
<tabstop>cb_EnableTerrainProbe</tabstop>
|
||||||
<tabstop>pb_CopyTerrainProbe</tabstop>
|
<tabstop>pb_CopyTerrainProbe</tabstop>
|
||||||
<tabstop>pb_Refresh</tabstop>
|
<tabstop>pb_Refresh</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user