mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refactor: Remove FSX specific method from context
This method was only uses to provide a secondary way installing the terrain probe. For simplicity we should only provide a single way to install the probe (through the config wizard).
This commit is contained in:
@@ -31,7 +31,6 @@ namespace BlackSimPlugin::FsxCommon
|
||||
connect(ui->cb_TraceSimConnectCalls, &QCheckBox::released, this, &CFsxSettingsComponent::onSimConnectTraceChanged);
|
||||
connect(ui->cb_EnableTerrainProbe, &QCheckBox::released, this, &CFsxSettingsComponent::onEnableTerrainProbeChanged);
|
||||
connect(ui->cb_SBOffsets, &QCheckBox::released, this, &CFsxSettingsComponent::onSBOffsetsChanged);
|
||||
connect(ui->pb_CopyTerrainProbe, &QPushButton::released, this, &CFsxSettingsComponent::copyTerrainProbe);
|
||||
connect(ui->pb_Refresh, &QPushButton::released, this, &CFsxSettingsComponent::refresh);
|
||||
|
||||
if (sGui && sGui->getIContextSimulator())
|
||||
@@ -75,7 +74,6 @@ namespace BlackSimPlugin::FsxCommon
|
||||
|
||||
const bool terrainProbe = CBuildConfig::isRunningOnWindowsNtPlatform() && (CBuildConfig::buildWordSize() == 32);
|
||||
ui->cb_EnableTerrainProbe->setEnabled(terrainProbe);
|
||||
ui->pb_CopyTerrainProbe->setVisible(terrainProbe);
|
||||
}
|
||||
|
||||
void CFsxSettingsComponent::onSimConnectTraceChanged()
|
||||
@@ -106,16 +104,6 @@ namespace BlackSimPlugin::FsxCommon
|
||||
fsxOrP3D->setUsingSbOffsetValues(ui->cb_SBOffsets->isChecked());
|
||||
}
|
||||
|
||||
void CFsxSettingsComponent::copyTerrainProbe()
|
||||
{
|
||||
if (!sGui || !sGui->getIContextSimulator() || sGui->isShuttingDown()) { return; }
|
||||
const CSimulatorInfo simulator(this->getSimulator());
|
||||
const CStatusMessageList msgs = sGui->getIContextSimulator()->copyFsxTerrainProbe(simulator);
|
||||
CLogMessage::preformatted(msgs);
|
||||
if (!m_mf) { m_mf = CGuiUtility::nextOverlayMessageFrame(this); }
|
||||
if (m_mf) { m_mf->showOverlayMessages(msgs); }
|
||||
}
|
||||
|
||||
void CFsxSettingsComponent::onSimulatorStatusChanged(int status)
|
||||
{
|
||||
Q_UNUSED(status);
|
||||
|
||||
@@ -58,9 +58,6 @@ namespace BlackSimPlugin::FsxCommon
|
||||
//! Offsets on/off
|
||||
void onSBOffsetsChanged();
|
||||
|
||||
//! Copy the terrain probe
|
||||
void copyTerrainProbe();
|
||||
|
||||
//! Status has been changed
|
||||
void onSimulatorStatusChanged(int status);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>296</width>
|
||||
<height>275</height>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -59,42 +59,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QWidget" name="wi_Buttons" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="pb_CopyTerrainProbe">
|
||||
<property name="text">
|
||||
<string>copy terrain probe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="pb_Refresh">
|
||||
<property name="text">
|
||||
<string>refresh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_Buttons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QPushButton" name="pb_Refresh">
|
||||
<property name="text">
|
||||
<string>refresh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="lbl_TraceTerrainProbe">
|
||||
<property name="text">
|
||||
<string>Use the terrain probe (32bit only)</string>
|
||||
<string>Use the terrain probe (32bit only) (needs to be installed through the config wizard first)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -129,7 +106,6 @@
|
||||
<tabstop>cb_SBOffsets</tabstop>
|
||||
<tabstop>cb_AddingAsSimulatedObject</tabstop>
|
||||
<tabstop>cb_EnableTerrainProbe</tabstop>
|
||||
<tabstop>pb_CopyTerrainProbe</tabstop>
|
||||
<tabstop>pb_Refresh</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user