Skip to content
Snippets Groups Projects
Commit 9be9059f authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

hide footprint form

parent c5f624a5
No related branches found
No related tags found
1 merge request!2147Do not apply footprint to depth-probe simulation (837)
Pipeline #120495 failed
......@@ -29,7 +29,7 @@ DepthprobeInstrumentEditor::DepthprobeInstrumentEditor(QWidget* parent,
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec, false);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec, false, false);
layout->addWidget(scanEditor);
auto* depthAxisEditor = new AxisPropertyForm(this, "Depth axis", &instrument->zAxis(),
......
......@@ -29,7 +29,7 @@ OffspecInstrumentEditor::OffspecInstrumentEditor(QWidget* parent, OffspecInstrum
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec, false);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec, true, false);
layout->addWidget(scanEditor);
auto* detectorEditor = new OffspecDetectorEditor(this, instrument);
......
......@@ -24,7 +24,8 @@
#include <QFormLayout>
#include <QLineEdit>
ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec, bool allow_distr)
ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec,
bool allow_footprint, bool allow_distr)
: CollapsibleGroupBox("Beam and scan parameters", parent, item->expandBeamParameters)
{
auto* layout = new QVBoxLayout;
......@@ -44,6 +45,7 @@ ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec,
validator->setRange(0.0, 1e32, 1000);
auto* hLayout = new QHBoxLayout;
hLayout->setAlignment(Qt::AlignLeft);
layout->addLayout(hLayout);
auto* wavelengthEditor = new DistributionEditor("Wavelength (nm)", MeanConfig{true},
......@@ -54,8 +56,11 @@ ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec,
auto* inclinationEditor = new AlphaScanEditor(this, item->grazingScanItem(), allow_distr);
hLayout->addWidget(inclinationEditor);
auto* footprintEditor = new FootprintForm(this, item);
hLayout->addWidget(footprintEditor);
if (allow_footprint) {
auto* footprintEditor = new FootprintForm(this, item);
hLayout->addWidget(footprintEditor);
connect(footprintEditor, &FootprintForm::dataChanged, this, &ScanEditor::dataChanged);
}
intensityLineEdit->setText(QString::number(item->intensity()));
......@@ -73,7 +78,6 @@ ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec,
connect(inclinationEditor, &AlphaScanEditor::dataChanged, wavelengthEditor,
&DistributionEditor::updateData);
connect(footprintEditor, &FootprintForm::dataChanged, this, &ScanEditor::dataChanged);
// validate value while typing
connect(intensityLineEdit, &QLineEdit::textEdited, [this, intensityLineEdit, item]() {
......
......@@ -25,7 +25,8 @@ class ScanItem;
class ScanEditor : public CollapsibleGroupBox {
Q_OBJECT
public:
ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec, bool allow_distr = true);
ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec, bool allow_footprint,
bool allow_distr);
signals:
void dataChanged();
......
......@@ -29,7 +29,7 @@ SpecularInstrumentEditor::SpecularInstrumentEditor(QWidget* parent,
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec, true, true);
layout->addWidget(scanEditor);
auto* polMatricesAnalysisEditor = new PolarizationAnalysisEditor(this, instrument);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment