Ref T259, Ref T243 UI for FSD setup adjusted (added gnd flags)

This commit is contained in:
Klaus Basan
2018-03-10 17:57:55 +01:00
parent b0ca968837
commit c451602b8c
3 changed files with 67 additions and 55 deletions

View File

@@ -41,6 +41,7 @@ namespace BlackGui
CFsdSetup s(ui->le_TextCodec->text().trimmed().toLower()); CFsdSetup s(ui->le_TextCodec->text().trimmed().toLower());
s.setSendReceiveDetails( s.setSendReceiveDetails(
ui->cb_AircraftPartsSend->isChecked(), ui->cb_AircraftPartsReceive->isChecked(), ui->cb_AircraftPartsSend->isChecked(), ui->cb_AircraftPartsReceive->isChecked(),
ui->cb_GndFlagSend->isChecked(), ui->cb_GndFlagReceive->isChecked(),
ui->cb_FastPositionSend->isChecked(), ui->cb_FastPositionReceive->isChecked() ui->cb_FastPositionSend->isChecked(), ui->cb_FastPositionReceive->isChecked()
); );
return s; return s;
@@ -52,7 +53,7 @@ namespace BlackGui
return fsd; return fsd;
} }
void CFsdSetupForm::setValue(const BlackMisc::Network::CFsdSetup &setup) void CFsdSetupForm::setValue(const CFsdSetup &setup)
{ {
ui->le_TextCodec->setText(setup.getTextCodec()); ui->le_TextCodec->setText(setup.getTextCodec());
const CFsdSetup::SendReceiveDetails d = setup.getSendReceiveDetails(); const CFsdSetup::SendReceiveDetails d = setup.getSendReceiveDetails();
@@ -60,7 +61,7 @@ namespace BlackGui
ui->cb_AircraftPartsReceive->setChecked(d & CFsdSetup::ReceiveAircraftParts); ui->cb_AircraftPartsReceive->setChecked(d & CFsdSetup::ReceiveAircraftParts);
ui->cb_AircraftPartsSend->setChecked(d & CFsdSetup::SendAircraftParts); ui->cb_AircraftPartsSend->setChecked(d & CFsdSetup::SendAircraftParts);
ui->cb_FastPositionReceive->setChecked(d & CFsdSetup::ReceiveInterimPositions); ui->cb_FastPositionReceive->setChecked(d & CFsdSetup::ReceiveInterimPositions);
ui->cb_FastPositionSend->setChecked(d & CFsdSetup::SendIterimPositions); ui->cb_FastPositionSend->setChecked(d & CFsdSetup::SendInterimPositions);
} }
bool CFsdSetupForm::isFsdSetupEnabled() const bool CFsdSetupForm::isFsdSetupEnabled() const
@@ -88,6 +89,8 @@ namespace BlackGui
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly); CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly); CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionSend, readonly); CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionSend, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_GndFlagReceive, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_GndFlagSend, readonly);
this->forceStyleSheetUpdate(); this->forceStyleSheetUpdate();
} }
@@ -120,6 +123,8 @@ namespace BlackGui
ui->cb_AircraftPartsSend->setChecked(true); ui->cb_AircraftPartsSend->setChecked(true);
ui->cb_FastPositionReceive->setChecked(true); ui->cb_FastPositionReceive->setChecked(true);
ui->cb_FastPositionSend->setChecked(true); ui->cb_FastPositionSend->setChecked(true);
ui->cb_GndFlagReceive->setChecked(true);
ui->cb_GndFlagSend->setChecked(true);
ui->le_TextCodec->setText("latin1"); ui->le_TextCodec->setText("latin1");
} }
} // ns } // ns

View File

@@ -6,12 +6,12 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>244</width> <width>194</width>
<height>91</height> <height>101</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Frame</string> <string>FSD setup</string>
</property> </property>
<layout class="QGridLayout" name="gl_FsdSetupForm"> <layout class="QGridLayout" name="gl_FsdSetupForm">
<property name="leftMargin"> <property name="leftMargin">
@@ -26,17 +26,13 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="4" column="2"> <property name="spacing">
<widget class="QCheckBox" name="cb_FastPositionReceive"> <number>4</number>
<property name="text">
<string>receive</string>
</property> </property>
</widget> <item row="0" column="2">
</item> <widget class="QPushButton" name="pb_SetDefaults">
<item row="1" column="0">
<widget class="QLabel" name="lbl_TextCodec">
<property name="text"> <property name="text">
<string>Text codec</string> <string>set defaults</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -47,38 +43,52 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="4" column="2">
<widget class="QCheckBox" name="cb_AircraftPartsSend"> <widget class="QCheckBox" name="cb_FastPositionSend">
<property name="text"> <property name="text">
<string>send</string> <string>send</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="4" column="1">
<widget class="QPushButton" name="pb_SetDefaults"> <widget class="QCheckBox" name="cb_GndFlagSend">
<property name="text"> <property name="text">
<string>set defaults</string> <string>send</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="5" column="2">
<widget class="QLabel" name="lbl_FastPositions"> <widget class="QCheckBox" name="cb_FastPositionReceive">
<property name="text"> <property name="text">
<string>Fast positions</string> <string>receive</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="5" column="0">
<widget class="QCheckBox" name="cb_AircraftPartsReceive"> <widget class="QCheckBox" name="cb_AircraftPartsReceive">
<property name="text"> <property name="text">
<string>receive</string> <string>receive</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="1">
<widget class="QCheckBox" name="cb_FastPositionSend"> <widget class="QLabel" name="lbl_GndFlag">
<property name="text"> <property name="text">
<string>send</string> <string>Gnd.flag</string>
</property>
</widget>
</item>
<item row="3" column="2">
<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_FsdSetup">
<property name="text">
<string>FSD setup:</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -89,10 +99,24 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="4" column="0">
<widget class="QLabel" name="lbl_FsdSetup"> <widget class="QCheckBox" name="cb_AircraftPartsSend">
<property name="text"> <property name="text">
<string>FSD setup:</string> <string>send</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="cb_GndFlagReceive">
<property name="text">
<string>receive</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lbl_TextCodec">
<property name="text">
<string>Text codec</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -109,10 +133,6 @@
<tabstop>cb_Override</tabstop> <tabstop>cb_Override</tabstop>
<tabstop>pb_SetDefaults</tabstop> <tabstop>pb_SetDefaults</tabstop>
<tabstop>le_TextCodec</tabstop> <tabstop>le_TextCodec</tabstop>
<tabstop>cb_AircraftPartsSend</tabstop>
<tabstop>cb_AircraftPartsReceive</tabstop>
<tabstop>cb_FastPositionSend</tabstop>
<tabstop>cb_FastPositionReceive</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>227</width> <width>223</width>
<height>194</height> <height>190</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -55,16 +55,16 @@
<widget class="QFrame" name="fr_ServerGeneral"> <widget class="QFrame" name="fr_ServerGeneral">
<layout class="QGridLayout" name="gl_ServerGeneral" columnstretch="1,2,2"> <layout class="QGridLayout" name="gl_ServerGeneral" columnstretch="1,2,2">
<property name="leftMargin"> <property name="leftMargin">
<number>3</number> <number>1</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>3</number> <number>1</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>3</number> <number>1</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>3</number> <number>1</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lbl_Name"> <widget class="QLabel" name="lbl_Name">
@@ -200,12 +200,12 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>3</number> <number>3</number>
</property> </property>
<item> <item alignment="Qt::AlignTop">
<widget class="BlackGui::Editors::CFsdSetupForm" name="form_ServerFsd"> <widget class="BlackGui::Editors::CFsdSetupForm" name="form_ServerFsd">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>75</height> <height>100</height>
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@@ -216,19 +216,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="vs_ServerFsd">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>