mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
refactor: Clean up simconnect settings
This commit is contained in:
@@ -34,20 +34,6 @@ namespace swift::simplugin::fsxcommon
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
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);
|
||||
this->setSimConnectInfo();
|
||||
|
||||
if (m_p3d64bit)
|
||||
@@ -62,161 +48,6 @@ namespace swift::simplugin::fsxcommon
|
||||
// void
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::openSwiftSimConnectCfgFile()
|
||||
{
|
||||
if (!CSimConnectUtilities::hasSwiftLocalSimConnectCfgFile()) { return; }
|
||||
const QFileInfo info(CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename());
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(info.absoluteFilePath()));
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::openUserSimConnectCfgFile()
|
||||
{
|
||||
if (!CSimConnectUtilities::hasUserSimConnectCfgFile()) { return; }
|
||||
const QFileInfo info(CSimConnectUtilities::getUserSimConnectCfgFilename());
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(info.absoluteFilePath()));
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::deleteSwiftSimConnectCfgFile()
|
||||
{
|
||||
const QString fileName = CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename();
|
||||
QFile file(fileName);
|
||||
const bool result = file.exists() && file.remove();
|
||||
if (result)
|
||||
{
|
||||
QMessageBox::information(qApp->activeWindow(), tr("File deleted"),
|
||||
tr("File %1 deleted successfully.").arg(fileName));
|
||||
}
|
||||
this->checkSwiftSimConnectCfgFile();
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::checkSwiftSimConnectCfgFile()
|
||||
{
|
||||
// this works for local files only
|
||||
const QString fileName = CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename();
|
||||
const QFile file(fileName);
|
||||
ui->le_ExistsSimConnectCfg->setText(file.exists() ? fileName : "no file");
|
||||
|
||||
// only works for local file (which the SimConnect file normally is)
|
||||
if (!CSimConnectUtilities::hasSwiftLocalSimConnectCfgFile()) { return; }
|
||||
const QSharedPointer<QSettings> settings = CSimConnectUtilities::simConnectFileAsSettings();
|
||||
if (!settings) { return; }
|
||||
const QString address = CSimConnectUtilities::ipAddress(settings.data());
|
||||
const int port = CSimConnectUtilities::ipPort(settings.data());
|
||||
if (!address.isEmpty()) { ui->le_Address->setText(address); }
|
||||
if (port > 0) { ui->le_Port->setText(QString::number(port)); }
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::testSwiftSimConnectConnection()
|
||||
{
|
||||
const QString address = ui->le_Address->text().trimmed();
|
||||
const QString port = ui->le_Port->text().trimmed();
|
||||
|
||||
if (address.isEmpty() || port.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"),
|
||||
tr("Address and/or port not specified!"));
|
||||
return;
|
||||
}
|
||||
if (!CNetworkUtils::isValidIPv4Address(address))
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"), tr("Wrong IPv4 address!"));
|
||||
return;
|
||||
}
|
||||
if (!CNetworkUtils::isValidPort(port))
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"), tr("Invalid port!"));
|
||||
return;
|
||||
}
|
||||
const int p = port.toInt();
|
||||
QString msg;
|
||||
if (!CNetworkUtils::canConnect(address, p, msg))
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"), msg);
|
||||
return;
|
||||
}
|
||||
|
||||
QMessageBox::information(qApp->activeWindow(), tr("Connection successful"),
|
||||
tr("Connected to '%1:%2'.").arg(address, port));
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::saveSimConnectCfgFile()
|
||||
{
|
||||
const QString address = ui->le_Address->text().trimmed();
|
||||
const QString port = ui->le_Port->text().trimmed();
|
||||
|
||||
if (address.isEmpty() || port.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"),
|
||||
tr("Address and/or port not specified!"));
|
||||
return;
|
||||
}
|
||||
if (!CNetworkUtils::isValidIPv4Address(address))
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"), tr("Wrong IPv4 address!"));
|
||||
return;
|
||||
}
|
||||
if (!CNetworkUtils::isValidPort(port))
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Connection invalid"), tr("Invalid port!"));
|
||||
return;
|
||||
}
|
||||
|
||||
const int p = port.toInt();
|
||||
QString fileName;
|
||||
|
||||
if (sGui->getIContextSimulator())
|
||||
{
|
||||
const swift::misc::simulation::CSimulatorInternals internals(
|
||||
sGui->getIContextSimulator()->getSimulatorInternals());
|
||||
fileName = internals.getStringValue("fsx/SimConnectCfgFilename");
|
||||
}
|
||||
|
||||
if (fileName.isEmpty()) { fileName = CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename(); }
|
||||
|
||||
if (fileName.isEmpty())
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Failed writing SimConnect.cfg"),
|
||||
tr("No file name specified!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (CFileUtils::writeStringToFile(CSimConnectUtilities::simConnectCfg(address, p), fileName))
|
||||
{
|
||||
QMessageBox::information(qApp->activeWindow(), tr("File saved"), tr("File '%1' saved.").arg(fileName));
|
||||
this->checkSwiftSimConnectCfgFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(qApp->activeWindow(), tr("Failed writing SimConnect.cfg"),
|
||||
tr("Failed writing '%1'!").arg(fileName));
|
||||
}
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::saveSimConnectIniFileDialog()
|
||||
{
|
||||
const QString iniFile = ui->pte_SimConnectIni->toPlainText();
|
||||
const QString dir = CSimConnectUtilities::getSimConnectIniFileDirectory(m_simulator);
|
||||
bool madeDir = false;
|
||||
QDir d(dir);
|
||||
if (!d.exists())
|
||||
{
|
||||
d.mkdir(dir);
|
||||
madeDir = true;
|
||||
}
|
||||
|
||||
const QString defaultFileName = CFileUtils::appendFilePaths(dir, CSimConnectUtilities::simConnectIniFilename());
|
||||
const QString fileName = QFileDialog::getSaveFileName(this, tr("Save SimConnect.ini"), defaultFileName,
|
||||
tr("FSX/P3D ini files (*.ini)"));
|
||||
if (!fileName.isEmpty())
|
||||
{
|
||||
const bool written = CFileUtils::writeStringToFile(iniFile, fileName);
|
||||
if (!written && madeDir) { d.removeRecursively(); } // clean up own created dir
|
||||
if (written) { CLogMessage(this).info(u"Written '%1'") << fileName; }
|
||||
}
|
||||
// always refresh info, as the dialog can also be used to delete the file
|
||||
this->setSimConnectInfo();
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::setSimConnectInfo()
|
||||
{
|
||||
if (CBuildConfig::isCompiledWithP3DSupport() && CBuildConfig::buildWordSize() == 64)
|
||||
@@ -238,13 +69,6 @@ namespace swift::simplugin::fsxcommon
|
||||
|
||||
ui->lbl_P3DVersion->setVisible(m_p3d64bit);
|
||||
ui->cb_P3DVersion->setVisible(m_p3d64bit);
|
||||
|
||||
ui->le_UserCfgFile->setText(CSimConnectUtilities::hasUserSimConnectCfgFile() ?
|
||||
CSimConnectUtilities::getUserSimConnectCfgFilename() :
|
||||
"");
|
||||
const QString iniFiles = CSimConnectUtilities::getSimConnectIniFiles().join("\n");
|
||||
ui->pte_SimConnectIniFiles->setPlainText(iniFiles);
|
||||
this->checkSwiftSimConnectCfgFile();
|
||||
}
|
||||
|
||||
void CSimConnectSettingsComponent::setComboBox(const QString &value)
|
||||
|
||||
@@ -35,27 +35,6 @@ namespace swift::simplugin::fsxcommon
|
||||
virtual ~CSimConnectSettingsComponent();
|
||||
|
||||
private:
|
||||
//! Open simConnect.cfg using default application
|
||||
void openSwiftSimConnectCfgFile();
|
||||
|
||||
//! Open simConnect.cfg using default application
|
||||
void openUserSimConnectCfgFile();
|
||||
|
||||
//! Delete simConnect.cfg file
|
||||
void deleteSwiftSimConnectCfgFile();
|
||||
|
||||
//! Check whether the simConnect.cfg file exists
|
||||
void checkSwiftSimConnectCfgFile();
|
||||
|
||||
//! Test the SimConnect connectivity
|
||||
void testSwiftSimConnectConnection();
|
||||
|
||||
//! Save a SimConnect.cfg file for FSX/P3D
|
||||
void saveSimConnectCfgFile();
|
||||
|
||||
//! Save dialog for a SimConnect.ini file
|
||||
void saveSimConnectIniFileDialog();
|
||||
|
||||
//! Set the simconnect info
|
||||
void setSimConnectInfo();
|
||||
|
||||
|
||||
@@ -31,104 +31,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SimConnectIniFiles">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-style:italic;">SimConnect.ini</span> files</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPlainTextEdit" name="pte_SimConnectIniFiles">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_DefaultSimConnectIniFile">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Default <span style=" font-style:italic;">SimConnect.ini</span> file</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPlainTextEdit" name="pte_SimConnectIni">
|
||||
<property name="plainText">
|
||||
<string>[SimConnect]
|
||||
level=verbose
|
||||
console=1
|
||||
;RedirectStdOutToConsole=1
|
||||
;OutputDebugString=1
|
||||
;file=c:\simconnect%03u.log
|
||||
;file_next_index=0
|
||||
;file_max_index=9
|
||||
</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>all SimConnect.ini files found</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QWidget" name="wi_SimConnectIniSaveAs" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_SimConnectIniSaveHint">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Hint: <span style=" font-style:italic;">SimConnect.ini</span> must be saved on FSX/P3D machine</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="pb_SaveAsSimConnectIni">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>save as</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPlainTextEdit" name="pte_SimConnectInfo">
|
||||
<property name="maximumSize">
|
||||
@@ -210,295 +112,11 @@ console=1
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_SwiftSimConnectCfg">
|
||||
<property name="title">
|
||||
<string>swift SimConnect.cfg</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="fl_SwiftSimConnectCfg">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_Address">
|
||||
<property name="text">
|
||||
<string>Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_Address">
|
||||
<property name="text">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>128</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. "127.0.0.1" or "192.128.3.1"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_Port">
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_Port">
|
||||
<property name="text">
|
||||
<string>500</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>normally "500"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_ExistsSimConnectCfg">
|
||||
<property name="toolTip">
|
||||
<string>is 'SimConnect.cfg' available?</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>.cfg file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="wi_ExistsSimConnectCfg" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_SettingsFsxExistsSimConnectCfg">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_ExistsSimConnectCfg">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>local "SimConnect.cfg" file?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_ExistsSimConnectCfg">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>check</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="hl_SimConnectCfgButtons">
|
||||
<property name="topMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="hs_SimConnectCfgButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_OpenSwiftSimConnectCfg">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_DeleteSwiftSimConnectCfg">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>del.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SaveSwiftSimConnectCfg">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_TestConnection">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Test connection</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="Test connection">test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_UserCfgFile">
|
||||
<property name="text">
|
||||
<string>User's .cfg file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QWidget" name="wi_UserSimConnectCfg" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_UserCfgFile">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_UserCfgFile">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User's "SimConnect.cfg" file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_OpenUserCfgFile">
|
||||
<property name="text">
|
||||
<string>open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>cb_P3DVersion</tabstop>
|
||||
<tabstop>pte_SimConnectInfo</tabstop>
|
||||
<tabstop>pte_SimConnectIniFiles</tabstop>
|
||||
<tabstop>pte_SimConnectIni</tabstop>
|
||||
<tabstop>pb_SaveAsSimConnectIni</tabstop>
|
||||
<tabstop>le_UserCfgFile</tabstop>
|
||||
<tabstop>pb_OpenUserCfgFile</tabstop>
|
||||
<tabstop>le_Address</tabstop>
|
||||
<tabstop>le_Port</tabstop>
|
||||
<tabstop>le_ExistsSimConnectCfg</tabstop>
|
||||
<tabstop>pb_ExistsSimConnectCfg</tabstop>
|
||||
<tabstop>pb_OpenSwiftSimConnectCfg</tabstop>
|
||||
<tabstop>pb_DeleteSwiftSimConnectCfg</tabstop>
|
||||
<tabstop>pb_SaveSwiftSimConnectCfg</tabstop>
|
||||
<tabstop>pb_TestConnection</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -2704,8 +2704,6 @@ namespace swift::simplugin::fsxcommon
|
||||
void CSimulatorFsxCommon::initSimulatorInternals()
|
||||
{
|
||||
CSimulatorFsCommon::initSimulatorInternals();
|
||||
m_simulatorInternals.setValue("fsx/simConnectCfgFilename",
|
||||
CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename());
|
||||
m_simulatorInternals.setValue("fsx/simConnectVersion", m_simConnectVersion);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user