mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T723 [xswiftbus] UI/settings for TCAS enabled and debug mode
* UI checkboxes added * Qt free settings updated
This commit is contained in:
committed by
Mat Sutcliffe
parent
0f6b7d910e
commit
12fbd87bbc
@@ -38,7 +38,7 @@ namespace BlackSimPlugin
|
||||
CSimulatorXPlaneConfig(QObject *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CSimulatorXPlaneConfig() {}
|
||||
virtual ~CSimulatorXPlaneConfig() override {}
|
||||
|
||||
//! \copydoc BlackGui::IPluginConfig::createConfigWindow()
|
||||
BlackGui::CPluginConfigWindow *createConfigWindow(QWidget *parent) override;
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace BlackSimPlugin
|
||||
m_xSwiftBusServerSettings.set(changed);
|
||||
CXSwiftBusConfigWriter xswiftbusConfigWriter;
|
||||
xswiftbusConfigWriter.setDBusAddress(changed.getDBusServerAddressQt());
|
||||
xswiftbusConfigWriter.setDebugMode(s.isLogRenderPhases());
|
||||
xswiftbusConfigWriter.setTcasEnabled(s.isTcasEnabled());
|
||||
xswiftbusConfigWriter.updateInAllXPlaneVersions();
|
||||
}
|
||||
this->close();
|
||||
@@ -70,6 +72,8 @@ namespace BlackSimPlugin
|
||||
s.setDrawingLabels(ui->cb_DrawLabels->isChecked());
|
||||
s.setNightTextureModeQt(ui->cb_NightTextureMode->currentText());
|
||||
s.setBundlingTaxiAndLandingLights(ui->cb_BundleTaxiLandingLights->isChecked());
|
||||
s.setTcasEnabled(ui->cb_TcasEnabled->isChecked());
|
||||
s.setLogRenderPhases(ui->cb_LogRenderPhases->isChecked());
|
||||
|
||||
// left, top, right, bottom, height
|
||||
s.setMessageBoxValues(
|
||||
@@ -88,9 +92,11 @@ namespace BlackSimPlugin
|
||||
ui->comp_SettingsXSwiftBus->set(settings.getDBusServerAddressQt());
|
||||
ui->sb_MaxAircraft->setValue(settings.getMaxPlanes());
|
||||
ui->sb_FollowAircraftDistanceM->setValue(settings.getFollowAircraftDistanceM());
|
||||
ui->cb_DrawLabels->setChecked(settings.isDrawingLabels());
|
||||
ui->ds_MaxDrawDistanceNM->setValue(settings.getMaxDrawDistanceNM());
|
||||
ui->cb_DrawLabels->setChecked(settings.isDrawingLabels());
|
||||
ui->cb_BundleTaxiLandingLights->setChecked(settings.isBundlingTaxiAndLandingLights());
|
||||
ui->cb_TcasEnabled->setChecked(settings.isTcasEnabled());
|
||||
ui->cb_LogRenderPhases->setChecked(settings.isLogRenderPhases());
|
||||
|
||||
const QString s = settings.getNightTextureModeQt().left(1);
|
||||
if (!s.isEmpty())
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>300</width>
|
||||
<height>450</height>
|
||||
<width>378</width>
|
||||
<height>585</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>425</height>
|
||||
<width>275</width>
|
||||
<height>475</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -158,14 +158,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lbl_MessageBox">
|
||||
<property name="text">
|
||||
<string>Message box </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QWidget" name="wi_MessageBox" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_MessageBox">
|
||||
<property name="leftMargin">
|
||||
@@ -193,33 +193,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sb_MessageBoxDuration">
|
||||
<property name="suffix">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>25000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="lbl_MessageBoxMargins">
|
||||
<property name="text">
|
||||
<string>Box margins px.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QWidget" name="wi_Margins" native="true">
|
||||
<layout class="QGridLayout" name="gl_MessageBoxMargins">
|
||||
<property name="leftMargin">
|
||||
@@ -293,14 +277,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="lbl_NightTextureMode">
|
||||
<property name="text">
|
||||
<string>Night texture</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QComboBox" name="cb_NightTextureMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -319,6 +303,57 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="cb_LogRenderPhases">
|
||||
<property name="text">
|
||||
<string>log.render phases</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lbl_DebugMode">
|
||||
<property name="text">
|
||||
<string>Logging</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_TcasEnabled">
|
||||
<property name="text">
|
||||
<string>show traffic on TCAS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lbl_TcasEnabled">
|
||||
<property name="text">
|
||||
<string>TCAS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QSpinBox" name="sb_MessageBoxDuration">
|
||||
<property name="suffix">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>25000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="lbl_MessageBoxDuration">
|
||||
<property name="text">
|
||||
<string>Box disappears after</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -351,8 +386,9 @@
|
||||
<tabstop>sb_FollowAircraftDistanceM</tabstop>
|
||||
<tabstop>cb_DrawLabels</tabstop>
|
||||
<tabstop>cb_BundleTaxiLandingLights</tabstop>
|
||||
<tabstop>cb_TcasEnabled</tabstop>
|
||||
<tabstop>cb_LogRenderPhases</tabstop>
|
||||
<tabstop>sb_MessageBoxLines</tabstop>
|
||||
<tabstop>sb_MessageBoxDuration</tabstop>
|
||||
<tabstop>le_MsgBoxMarginsTop</tabstop>
|
||||
<tabstop>le_MsgBoxMarginsBottom</tabstop>
|
||||
<tabstop>le_MsgBoxMarginsLeft</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user