mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Split of CSimulatorPluginInfo and CSimulatorSetup
refs #404, and discussion https://dev.vatsim-germany.org/issues/404#note-8 * Changed CSimulatorSetup to use CNameVariantPairList as data. The old version was an hack and had to go, CNameVariantPairList would allow complex types in the future and can be already shown in the GUI. * CNameVariantPairList was improved slightly in the same step * Functions to get CSimulatorSetup from driver / context * Removed CSimulatorSetup data from CSimulatorPluginInfo
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
using namespace BlackMisc::Simulation;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -24,18 +25,29 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Fsx
|
||||
{
|
||||
void CFsxSimulatorSetup::init()
|
||||
CSimulatorSetup CFsxSimulatorSetup::getInitialSetup()
|
||||
{
|
||||
CSimulatorSetup::init();
|
||||
this->m_setup.addValue(SetupSimConnectCfgFile, CSimConnectUtilities::getLocalSimConnectCfgFilename());
|
||||
CSimulatorSetup s;
|
||||
s.setValue(KeyLocalSimConnectCfgFilename(), CSimConnectUtilities::getLocalSimConnectCfgFilename());
|
||||
|
||||
if (CProject::isCompiledWithFsxSupport())
|
||||
{
|
||||
// set FSX path
|
||||
QString fsxPath = CFsCommonUtil::fsxDirFromRegistry();
|
||||
if (!fsxPath.isEmpty()) this->m_setup.value(CSimulatorSetup::SetupSimPath, CVariant(fsxPath));
|
||||
if (!fsxPath.isEmpty())
|
||||
{
|
||||
s.setSimulatorInstallationDirectory(fsxPath);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
const QString &CFsxSimulatorSetup::KeyLocalSimConnectCfgFilename()
|
||||
{
|
||||
static const QString k("fsx/simConnectCfgFilename"); return k;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user