mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T219, FSD setup form adjustments / renamings
This commit is contained in:
@@ -25,11 +25,10 @@ namespace BlackGui
|
||||
ui(new Ui::CFsdSetupForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->showEnableInfo(false);
|
||||
this->resetToDefaultValues();
|
||||
ui->cb_Enabled->setChecked(true);
|
||||
ui->cb_Override->setChecked(true);
|
||||
ui->le_TextCodec->setCompleter(new QCompleter(textCodecNames(true, true), this));
|
||||
connect(ui->cb_Enabled, &QCheckBox::toggled, this, &CFsdSetupForm::enabledToggled);
|
||||
connect(ui->cb_Override, &QCheckBox::toggled, this, &CFsdSetupForm::enabledToggled);
|
||||
connect(ui->pb_SetDefaults, &QPushButton::clicked, this, &CFsdSetupForm::resetToDefaultValues);
|
||||
}
|
||||
|
||||
@@ -66,23 +65,25 @@ namespace BlackGui
|
||||
|
||||
bool CFsdSetupForm::isFsdSetupEnabled() const
|
||||
{
|
||||
return ui->cb_Enabled->isChecked();
|
||||
return ui->cb_Override->isChecked();
|
||||
}
|
||||
|
||||
void CFsdSetupForm::setFsdSetupEnabled(bool enabled)
|
||||
{
|
||||
ui->cb_Enabled->setChecked(enabled);
|
||||
ui->cb_Override->setChecked(enabled);
|
||||
}
|
||||
|
||||
void CFsdSetupForm::showEnableInfo(bool visible)
|
||||
{
|
||||
ui->cb_Enabled->setVisible(visible);
|
||||
ui->lbl_Enabled->setVisible(visible);
|
||||
ui->cb_Override->setVisible(visible);
|
||||
ui->lbl_FsdSetup->setVisible(visible);
|
||||
ui->pb_SetDefaults->setVisible(visible);
|
||||
}
|
||||
|
||||
void CFsdSetupForm::setReadOnly(bool readonly)
|
||||
{
|
||||
ui->le_TextCodec->setReadOnly(readonly);
|
||||
this->showEnableInfo(!readonly);
|
||||
ui->le_TextCodec->setReadOnly(!readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsReceive, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly);
|
||||
|
||||
@@ -6,20 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>209</width>
|
||||
<height>130</height>
|
||||
<width>244</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="fl_FsdSetupForm">
|
||||
<layout class="QGridLayout" name="gl_FsdSetupForm">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -32,6 +26,13 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="4" column="2">
|
||||
<widget class="QCheckBox" name="cb_FastPositionReceive">
|
||||
<property name="text">
|
||||
<string>receive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_TextCodec">
|
||||
<property name="text">
|
||||
@@ -39,104 +40,74 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_AircraftParts">
|
||||
<property name="text">
|
||||
<string>Aircraft parts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="cb_AircraftPartsSend">
|
||||
<property name="text">
|
||||
<string>send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pb_SetDefaults">
|
||||
<property name="text">
|
||||
<string>set defaults</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_FastPositions">
|
||||
<property name="text">
|
||||
<string>Fast positions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QCheckBox" name="cb_AircraftPartsReceive">
|
||||
<property name="text">
|
||||
<string>receive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="cb_FastPositionSend">
|
||||
<property name="text">
|
||||
<string>send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cb_Override">
|
||||
<property name="text">
|
||||
<string>override</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_FsdSetup">
|
||||
<property name="text">
|
||||
<string>FSD setup:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="le_TextCodec">
|
||||
<property name="placeholderText">
|
||||
<string>e.g. "latin1"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QFrame" name="fr_SendReceive">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_SendReceive">
|
||||
<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 row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_FastPositions">
|
||||
<property name="text">
|
||||
<string>Fast positions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_AircraftParts">
|
||||
<property name="text">
|
||||
<string>Aircraft parts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="cb_FastPositionSend">
|
||||
<property name="text">
|
||||
<string>send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="cb_AircraftPartsReceive">
|
||||
<property name="text">
|
||||
<string>receive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="cb_AircraftPartsSend">
|
||||
<property name="text">
|
||||
<string>send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="cb_FastPositionReceive">
|
||||
<property name="text">
|
||||
<string>receive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pb_SetDefaults">
|
||||
<property name="text">
|
||||
<string>set defaults</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Enabled">
|
||||
<property name="text">
|
||||
<string>Enabled:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cb_Enabled">
|
||||
<property name="text">
|
||||
<string>override defaults</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>cb_Enabled</tabstop>
|
||||
<tabstop>cb_Override</tabstop>
|
||||
<tabstop>pb_SetDefaults</tabstop>
|
||||
<tabstop>le_TextCodec</tabstop>
|
||||
<tabstop>cb_AircraftPartsSend</tabstop>
|
||||
<tabstop>cb_AircraftPartsReceive</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user