mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
[P3D] Adjustments for P3D v5
* guess version * added new version selection
This commit is contained in:
committed by
Mat Sutcliffe
parent
828b57f5a2
commit
8278a7d5e6
@@ -39,13 +39,13 @@ namespace BlackSimPlugin
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pb_OpenSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openSwiftSimConnectCfgFile);
|
||||
connect(ui->pb_OpenSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openSwiftSimConnectCfgFile);
|
||||
connect(ui->pb_DeleteSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::deleteSwiftSimConnectCfgFile);
|
||||
connect(ui->pb_ExistsSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::checkSwiftSimConnectCfgFile);
|
||||
connect(ui->pb_SaveSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectCfgFile);
|
||||
connect(ui->pb_OpenUserCfgFile, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openUserSimConnectCfgFile);
|
||||
connect(ui->pb_TestConnection, &QPushButton::clicked, this, &CSimConnectSettingsComponent::testSwiftSimConnectConnection);
|
||||
connect(ui->pb_SaveAsSimConnectIni, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectIniFileDialog);
|
||||
connect(ui->pb_ExistsSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::checkSwiftSimConnectCfgFile);
|
||||
connect(ui->pb_SaveSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectCfgFile);
|
||||
connect(ui->pb_OpenUserCfgFile, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openUserSimConnectCfgFile);
|
||||
connect(ui->pb_TestConnection, &QPushButton::clicked, this, &CSimConnectSettingsComponent::testSwiftSimConnectConnection);
|
||||
connect(ui->pb_SaveAsSimConnectIni, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectIniFileDialog);
|
||||
this->setSimConnectInfo();
|
||||
|
||||
if (m_p3d64bit)
|
||||
@@ -252,7 +252,7 @@ namespace BlackSimPlugin
|
||||
ui->cb_P3DVersion->setCurrentText(found ? v : "");
|
||||
}
|
||||
|
||||
void BlackSimPlugin::FsxCommon::CSimConnectSettingsComponent::onP3DVersionChanged(const QString &version)
|
||||
void CSimConnectSettingsComponent::onP3DVersionChanged(const QString &version)
|
||||
{
|
||||
if (m_p3dVersion.get() == version) { return; }
|
||||
const CStatusMessage saveMsg = m_p3dVersion.setAndSave(version);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>410</width>
|
||||
<height>466</height>
|
||||
<height>481</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -156,11 +156,31 @@ console=1
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_P3DVersion">
|
||||
<property name="currentText">
|
||||
<string>4.5 64bit</string>
|
||||
<string>6.0 64bit</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6.0 64bit</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5.2 64bit</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5.1 64bit</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5.0 64bit</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4.5 64bit</string>
|
||||
|
||||
@@ -191,6 +191,11 @@ P3DSimConnectVersion stringToP3DVersion(const QString &p3d)
|
||||
if (p.contains("43")) { return P3DSimConnectv43; }
|
||||
if (p.contains("44")) { return P3DSimConnectv44; }
|
||||
if (p.contains("45")) { return P3DSimConnectv45; }
|
||||
|
||||
if (p.contains("50")) { return P3DSimConnectv45; }
|
||||
if (p.contains("51")) { return P3DSimConnectv45; }
|
||||
if (p.contains("52")) { return P3DSimConnectv45; }
|
||||
|
||||
}
|
||||
return P3DSimConnectv44; // default
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ namespace BlackSimPlugin
|
||||
namespace P3D
|
||||
{
|
||||
CSimulatorP3D::CSimulatorP3D(const CSimulatorPluginInfo &info,
|
||||
IOwnAircraftProvider *ownAircraftProvider,
|
||||
IOwnAircraftProvider *ownAircraftProvider,
|
||||
IRemoteAircraftProvider *remoteAircraftProvider,
|
||||
IWeatherGridProvider *weatherGridProvider,
|
||||
IClientProvider *clientProvider,
|
||||
IWeatherGridProvider *weatherGridProvider,
|
||||
IClientProvider *clientProvider,
|
||||
QObject *parent) :
|
||||
CSimulatorFsxCommon(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, parent)
|
||||
{
|
||||
@@ -104,9 +104,9 @@ namespace BlackSimPlugin
|
||||
// P3D version with new P3D simconnect functions
|
||||
bool CSimulatorP3D::requestElevation(const ICoordinateGeodetic &reference, const CCallsign &callsign)
|
||||
{
|
||||
if (reference.isNull()) { return false; }
|
||||
if (reference.isNull()) { return false; }
|
||||
if (this->isShuttingDown()) { return false; }
|
||||
if (!this->isConnected()) { return false; }
|
||||
if (!this->isConnected()) { return false; }
|
||||
|
||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "thread");
|
||||
const bool hasHeight = reference.hasMSLGeodeticHeight();
|
||||
|
||||
@@ -37,10 +37,10 @@ namespace BlackSimPlugin
|
||||
public:
|
||||
//! Constructor, parameters as in \sa BlackCore::ISimulatorFactory::create
|
||||
CSimulatorP3D(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
|
||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
|
||||
BlackMisc::Network::IClientProvider *clientProvider,
|
||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
|
||||
BlackMisc::Network::IClientProvider *clientProvider,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
//! \name ISimulator implementations
|
||||
|
||||
Reference in New Issue
Block a user