mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Ref T299, added pitch to interpolation form
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "blackgui/guiutility.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Simulation;
|
||||
|
||||
namespace BlackGui
|
||||
@@ -29,8 +30,11 @@ namespace BlackGui
|
||||
connect(cb, &QCheckBox::stateChanged, this, &CInterpolationSetupForm::onCheckboxChanged);
|
||||
}
|
||||
|
||||
// one conect is enough, otherwise 2 change signals
|
||||
// one connect is enough, otherwise 2 change signals
|
||||
connect(ui->rb_Linear, &QRadioButton::toggled, this, &CInterpolationSetupForm::onInterpolatorModeChanged);
|
||||
|
||||
// pitch
|
||||
connect(ui->le_PitchOnGround, &QLineEdit::editingFinished, this, &CInterpolationSetupForm::onPitchChanged);
|
||||
}
|
||||
|
||||
CInterpolationSetupForm::~CInterpolationSetupForm()
|
||||
@@ -44,6 +48,7 @@ namespace BlackGui
|
||||
ui->cb_ForceVtolInterpolation->setChecked(setup.isForcingVtolInterpolation());
|
||||
ui->cb_SendGndFlagToSim->setChecked(setup.isSendingGndFlagToSimulator());
|
||||
ui->cb_FixSceneryOffset->setChecked(setup.isFixingSceneryOffset());
|
||||
ui->le_PitchOnGround->setText(setup.getPitchOnGround().valueRoundedWithUnit(CAngleUnit::deg()));
|
||||
this->setInterpolatorMode(setup.getInterpolatorMode());
|
||||
}
|
||||
|
||||
@@ -107,5 +112,12 @@ namespace BlackGui
|
||||
Q_UNUSED(checked);
|
||||
emit this->valueChanged();
|
||||
}
|
||||
|
||||
void CInterpolationSetupForm::onPitchChanged()
|
||||
{
|
||||
const QString p = ui->le_PitchOnGround->text().trimmed();
|
||||
CAngle pitch;
|
||||
pitch.parseFromString(p);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
||||
explicit CInterpolationSetupForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CInterpolationSetupForm();
|
||||
virtual ~CInterpolationSetupForm() override;
|
||||
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Simulation::CInterpolationAndRenderingSetupBase &setup);
|
||||
@@ -62,6 +62,9 @@ namespace BlackGui
|
||||
//! Interpolator mode
|
||||
void onInterpolatorModeChanged(bool checked);
|
||||
|
||||
//! Pitch entry
|
||||
void onPitchChanged();
|
||||
|
||||
//! Mode from UI
|
||||
BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode getInterpolatorMode() const;
|
||||
|
||||
|
||||
@@ -6,33 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>223</width>
|
||||
<height>91</height>
|
||||
<width>277</width>
|
||||
<height>88</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_InterpolationSetupForm">
|
||||
<layout class="QGridLayout" name="hl_PitchOnGround_2">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="cb_DebugDriver">
|
||||
<property name="text">
|
||||
<string>driver dbg. msgs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="cb_LogInterpolation">
|
||||
<property name="text">
|
||||
@@ -40,6 +33,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="cb_DebugDriver">
|
||||
<property name="text">
|
||||
<string>driver dbg. msgs.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cb_EnableParts">
|
||||
<property name="text">
|
||||
@@ -77,6 +77,44 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QFrame" name="fr_PitchOnGround">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hl_PitchOnGround">
|
||||
<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_PitchOnGround">
|
||||
<property name="text">
|
||||
<string>pitch on gnd.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_PitchOnGround">
|
||||
<property name="placeholderText">
|
||||
<string>pitch on gnd.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QWidget" name="wi_InterpolatorType" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_InterpolatorType">
|
||||
@@ -129,12 +167,13 @@
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>rb_Spline</tabstop>
|
||||
<tabstop>rb_Linear</tabstop>
|
||||
<tabstop>cb_EnableParts</tabstop>
|
||||
<tabstop>cb_SendGndFlagToSim</tabstop>
|
||||
<tabstop>cb_FixSceneryOffset</tabstop>
|
||||
<tabstop>cb_ForceVtolInterpolation</tabstop>
|
||||
<tabstop>cb_DebugDriver</tabstop>
|
||||
<tabstop>cb_LogInterpolation</tabstop>
|
||||
<tabstop>cb_DebugDriver</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user