mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +08:00
Ref T180, driver settings (FSX/P3D) supports SimConnect.ini file
This commit is contained in:
@@ -7,16 +7,18 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "simconnectsettingscomponent.h"
|
#include "SimConnectsettingscomponent.h"
|
||||||
#include "ui_simconnectsettingscomponent.h"
|
#include "SimConnectsettingscomponent.h"
|
||||||
|
#include "ui_SimConnectsettingscomponent.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
#include "blackcore/context/contextapplication.h"
|
#include "blackcore/context/contextapplication.h"
|
||||||
#include "blackcore/context/contextsimulator.h"
|
#include "blackcore/context/contextsimulator.h"
|
||||||
#include "blackmisc/network/networkutils.h"
|
#include "blackmisc/network/networkutils.h"
|
||||||
#include "blackmisc/simulation/fsx/simconnectutilities.h"
|
#include "blackmisc/simulation/fsx/SimConnectutilities.h"
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
#include "blackconfig/buildconfig.h"
|
#include "blackconfig/buildconfig.h"
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QFileDialog>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QStringBuilder>
|
#include <QStringBuilder>
|
||||||
@@ -24,6 +26,7 @@
|
|||||||
|
|
||||||
using namespace BlackConfig;
|
using namespace BlackConfig;
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackMisc::Simulation;
|
||||||
using namespace BlackMisc::Simulation::Fsx;
|
using namespace BlackMisc::Simulation::Fsx;
|
||||||
using namespace BlackMisc::Network;
|
using namespace BlackMisc::Network;
|
||||||
|
|
||||||
@@ -37,11 +40,13 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
connect(ui->pb_SettingsFsxOpenSimconnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openSimConnectCfgFile);
|
connect(ui->pb_OpenSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::openSwiftSimConnectCfgFile);
|
||||||
connect(ui->pb_SettingsFsxDeleteSimconnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::deleteSimConnectCfgFile);
|
connect(ui->pb_DeleteSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::deleteSwiftSimConnectCfgFile);
|
||||||
connect(ui->pb_SettingsFsxExistsSimconncetCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::checkSimConnectCfgFile);
|
connect(ui->pb_ExistsSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::checkSwiftSimConnectCfgFile);
|
||||||
connect(ui->pb_SettingsFsxSaveSimconnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectCfgFile);
|
connect(ui->pb_SaveSwiftSimConnectCfg, &QPushButton::clicked, this, &CSimConnectSettingsComponent::saveSimConnectCfgFile);
|
||||||
connect(ui->pb_SettingsFsxTestConnection, &QPushButton::clicked, this, &CSimConnectSettingsComponent::testConnection);
|
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();
|
this->setSimConnectInfo();
|
||||||
}
|
}
|
||||||
@@ -51,51 +56,59 @@ namespace BlackSimPlugin
|
|||||||
// void
|
// void
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimConnectSettingsComponent::openSimConnectCfgFile()
|
void CSimConnectSettingsComponent::openSwiftSimConnectCfgFile()
|
||||||
{
|
{
|
||||||
const QFileInfo info(CSimConnectUtilities::getLocalSimConnectCfgFilename());
|
if (!CSimConnectUtilities::hasSwiftLocalSimConnectCfgFile()) { return; }
|
||||||
|
const QFileInfo info(CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename());
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(info.absoluteFilePath()));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(info.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimConnectSettingsComponent::deleteSimConnectCfgFile()
|
void CSimConnectSettingsComponent::openUserSimConnectCfgFile()
|
||||||
{
|
{
|
||||||
const QString fileName = CSimConnectUtilities::getLocalSimConnectCfgFilename();
|
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);
|
QFile file(fileName);
|
||||||
const bool result = file.exists() && file.remove();
|
const bool result = file.exists() && file.remove();
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
QMessageBox::information(qApp->activeWindow(), tr("File deleted"), tr("File %1 deleted successfully.").arg(fileName));
|
QMessageBox::information(qApp->activeWindow(), tr("File deleted"), tr("File %1 deleted successfully.").arg(fileName));
|
||||||
}
|
}
|
||||||
checkSimConnectCfgFile();
|
this->checkSwiftSimConnectCfgFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimConnectSettingsComponent::checkSimConnectCfgFile()
|
void CSimConnectSettingsComponent::checkSwiftSimConnectCfgFile()
|
||||||
{
|
{
|
||||||
// this works for local files only
|
// this works for local files only
|
||||||
const QString fileName = CSimConnectUtilities::getLocalSimConnectCfgFilename();
|
const QString fileName = CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename();
|
||||||
const QFile file(fileName);
|
const QFile file(fileName);
|
||||||
ui->le_SettingsFsxExistsSimconncetCfg->setText(file.exists() ? fileName : "no file");
|
ui->le_ExistsSimConnectCfg->setText(file.exists() ? fileName : "no file");
|
||||||
|
|
||||||
// only works for local file (which the simconnect file normally is)
|
// only works for local file (which the SimConnect file normally is)
|
||||||
if (!CSimConnectUtilities::hasLocalSimConnectCfgFilename()) { return; }
|
if (!CSimConnectUtilities::hasSwiftLocalSimConnectCfgFile()) { return; }
|
||||||
const QSharedPointer<QSettings> settings = CSimConnectUtilities::simConnectFileAsSettings();
|
const QSharedPointer<QSettings> settings = CSimConnectUtilities::simConnectFileAsSettings();
|
||||||
if (!settings) { return; }
|
if (!settings) { return; }
|
||||||
const QString address = CSimConnectUtilities::ipAddress(settings.data());
|
const QString address = CSimConnectUtilities::ipAddress(settings.data());
|
||||||
const int port = CSimConnectUtilities::ipPort(settings.data());
|
const int port = CSimConnectUtilities::ipPort(settings.data());
|
||||||
if (!address.isEmpty())
|
if (!address.isEmpty())
|
||||||
{
|
{
|
||||||
ui->le_SettingsFsxAddress->setText(address);
|
ui->le_Address->setText(address);
|
||||||
}
|
}
|
||||||
if (port > 0)
|
if (port > 0)
|
||||||
{
|
{
|
||||||
ui->le_SettingsFsxPort->setText(QString::number(port));
|
ui->le_Port->setText(QString::number(port));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimConnectSettingsComponent::testConnection()
|
void CSimConnectSettingsComponent::testSwiftSimConnectConnection()
|
||||||
{
|
{
|
||||||
const QString address = ui->le_SettingsFsxAddress->text().trimmed();
|
const QString address = ui->le_Address->text().trimmed();
|
||||||
const QString port = ui->le_SettingsFsxPort->text().trimmed();
|
const QString port = ui->le_Port->text().trimmed();
|
||||||
|
|
||||||
if (address.isEmpty() || port.isEmpty())
|
if (address.isEmpty() || port.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -125,8 +138,8 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
void CSimConnectSettingsComponent::saveSimConnectCfgFile()
|
void CSimConnectSettingsComponent::saveSimConnectCfgFile()
|
||||||
{
|
{
|
||||||
QString address = ui->le_SettingsFsxAddress->text().trimmed();
|
QString address = ui->le_Address->text().trimmed();
|
||||||
QString port = ui->le_SettingsFsxPort->text().trimmed();
|
QString port = ui->le_Port->text().trimmed();
|
||||||
|
|
||||||
if (address.isEmpty() || port.isEmpty())
|
if (address.isEmpty() || port.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -150,43 +163,69 @@ namespace BlackSimPlugin
|
|||||||
if (sGui->getIContextSimulator())
|
if (sGui->getIContextSimulator())
|
||||||
{
|
{
|
||||||
const BlackMisc::Simulation::CSimulatorInternals internals(sGui->getIContextSimulator()->getSimulatorInternals());
|
const BlackMisc::Simulation::CSimulatorInternals internals(sGui->getIContextSimulator()->getSimulatorInternals());
|
||||||
fileName = internals.getStringValue("fsx/simConnectCfgFilename");
|
fileName = internals.getStringValue("fsx/SimConnectCfgFilename");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
{
|
{
|
||||||
fileName = CSimConnectUtilities::getLocalSimConnectCfgFilename();
|
fileName = CSimConnectUtilities::getSwiftLocalSimConnectCfgFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
{
|
{
|
||||||
QMessageBox::warning(qApp->activeWindow(), tr("Failed writing simConnect.cfg"), tr("No file name specified!"));
|
QMessageBox::warning(qApp->activeWindow(), tr("Failed writing SimConnect.cfg"), tr("No file name specified!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sGui->getIContextApplication()->writeToFile(fileName, CSimConnectUtilities::simConnectCfg(address, p)))
|
if (sGui->getIContextApplication()->writeToFile(fileName, CSimConnectUtilities::simConnectCfg(address, p)))
|
||||||
{
|
{
|
||||||
QMessageBox::information(qApp->activeWindow(), tr("File saved"), tr("File '%1' saved.").arg(fileName));
|
QMessageBox::information(qApp->activeWindow(), tr("File saved"), tr("File '%1' saved.").arg(fileName));
|
||||||
checkSimConnectCfgFile();
|
this->checkSwiftSimConnectCfgFile();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QMessageBox::warning(qApp->activeWindow(), tr("Failed writing simConnect.cfg"), tr("Failed writing '%1'!").arg(fileName));
|
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("Written '%1'") << fileName; }
|
||||||
|
}
|
||||||
|
// always refresh info, as the dialog can also be used to delete the file
|
||||||
|
this->setSimConnectInfo();
|
||||||
|
}
|
||||||
|
|
||||||
void CSimConnectSettingsComponent::setSimConnectInfo()
|
void CSimConnectSettingsComponent::setSimConnectInfo()
|
||||||
{
|
{
|
||||||
if (CBuildConfig::isCompiledWithP3DSupport() && CBuildConfig::buildWordSize() == 64)
|
if (CBuildConfig::isCompiledWithP3DSupport() && CBuildConfig::buildWordSize() == 64)
|
||||||
{
|
{
|
||||||
ui->lbl_SimConnectInfo->setText("Static linking P3Dv4 x64");
|
ui->lbl_SimConnectInfo->setText("Static linking P3Dv4 x64");
|
||||||
|
m_simulator = CSimulatorInfo(CSimulatorInfo::P3D);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const CWinDllUtils::DLLInfo simConnectInfo = CSimConnectUtilities::simConnectDllInfo();
|
const CWinDllUtils::DLLInfo SimConnectInfo = CSimConnectUtilities::simConnectDllInfo();
|
||||||
ui->lbl_SimConnectInfo->setText(simConnectInfo.summary());
|
ui->lbl_SimConnectInfo->setText(SimConnectInfo.summary());
|
||||||
|
m_simulator = CSimulatorInfo(CSimulatorInfo::FSX);
|
||||||
}
|
}
|
||||||
this->checkSimConnectCfgFile();
|
ui->le_UserCfgFile->setText(CSimConnectUtilities::hasUserSimConnectCfgFile() ? CSimConnectUtilities::getUserSimConnectCfgFilename() : "");
|
||||||
|
const QString iniFiles = CSimConnectUtilities::getSimConnectIniFiles().join("\n");
|
||||||
|
ui->pte_SimConnectIniFiles->setPlainText(iniFiles);
|
||||||
|
this->checkSwiftSimConnectCfgFile();
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
#ifndef BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
||||||
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
#define BLACKSIMPLUGIN_FSXCOMMON_SIMCONNECTSETTINGSCOMPONENT_H
|
||||||
|
|
||||||
|
#include "blackmisc/simulation/simulatorinfo.h"
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
|
|
||||||
@@ -34,27 +35,33 @@ namespace BlackSimPlugin
|
|||||||
//! Dtor
|
//! Dtor
|
||||||
virtual ~CSimConnectSettingsComponent();
|
virtual ~CSimConnectSettingsComponent();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
//! Open simConnect.cfg using default application
|
//! Open simConnect.cfg using default application
|
||||||
void openSimConnectCfgFile();
|
void openSwiftSimConnectCfgFile();
|
||||||
|
|
||||||
|
//! Open simConnect.cfg using default application
|
||||||
|
void openUserSimConnectCfgFile();
|
||||||
|
|
||||||
//! Delete simConnect.cfg file
|
//! Delete simConnect.cfg file
|
||||||
void deleteSimConnectCfgFile();
|
void deleteSwiftSimConnectCfgFile();
|
||||||
|
|
||||||
//! Check whether the simConnect.cfg file exists
|
//! Check whether the simConnect.cfg file exists
|
||||||
void checkSimConnectCfgFile();
|
void checkSwiftSimConnectCfgFile();
|
||||||
|
|
||||||
//! Test the SimConnect connectivity
|
//! Test the SimConnect connectivity
|
||||||
void testConnection();
|
void testSwiftSimConnectConnection();
|
||||||
|
|
||||||
//! Save a simconnect.cfg file for FSX
|
//! Save a SimConnect.cfg file for FSX/P3D
|
||||||
void saveSimConnectCfgFile();
|
void saveSimConnectCfgFile();
|
||||||
|
|
||||||
private:
|
//! Save dialog for a SimConnect.ini file
|
||||||
QScopedPointer<Ui::CSimConnectSettingsComponent> ui;
|
void saveSimConnectIniFileDialog();
|
||||||
|
|
||||||
//! Set the simconnect info
|
//! Set the simconnect info
|
||||||
void setSimConnectInfo();
|
void setSimConnectInfo();
|
||||||
|
|
||||||
|
BlackMisc::Simulation::CSimulatorInfo m_simulator { BlackMisc::Simulation::CSimulatorInfo::FSX };
|
||||||
|
QScopedPointer<Ui::CSimConnectSettingsComponent> ui;
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -6,10 +6,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>363</width>
|
<width>377</width>
|
||||||
<height>179</height>
|
<height>434</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>350</width>
|
||||||
|
<height>300</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>FSX/P3D SimConnect config</string>
|
<string>FSX/P3D SimConnect config</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -17,7 +23,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_FsxSimConnectConfigFile">
|
<widget class="QGroupBox" name="gb_FsxSimConnectConfigFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>FSX/P3D SimConnect config file</string>
|
<string>FSX/P3D config files</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="fl_Settings">
|
<layout class="QFormLayout" name="fl_Settings">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -32,201 +38,6 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_SettingsFsxAddress">
|
|
||||||
<property name="text">
|
|
||||||
<string>Address</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="le_SettingsFsxAddress">
|
|
||||||
<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_SettingsFsxPort">
|
|
||||||
<property name="text">
|
|
||||||
<string>Port</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="le_SettingsFsxPort">
|
|
||||||
<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_SettingsFsxExistsSimconncetCfg">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>is 'SimConnect.cfg' available?</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>.cfg?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QWidget" name="wi_SettingsFsxExistsSimconncetCfg" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="hl_SettingsFsxExistsSimconncetCfg">
|
|
||||||
<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_SettingsFsxExistsSimconncetCfg">
|
|
||||||
<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_SettingsFsxExistsSimconncetCfg">
|
|
||||||
<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_SettingsSimconnectCfgButtons">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pb_SettingsFsxOpenSimconnectCfg">
|
|
||||||
<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_SettingsFsxDeleteSimconnectCfg">
|
|
||||||
<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_SettingsFsxSaveSimconnectCfg">
|
|
||||||
<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_SettingsFsxTestConnection">
|
|
||||||
<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">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lbl_SimConnect">
|
<widget class="QLabel" name="lbl_SimConnect">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -244,6 +55,362 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" 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="1" 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="2" 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="2" column="1">
|
||||||
|
<widget class="QPlainTextEdit" name="pte_SimConnectIni">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>75</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<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="5" column="0" colspan="2">
|
||||||
|
<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="spacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<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>
|
||||||
|
<item row="3" 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="text">
|
||||||
|
<string>save as</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user