Skip to content
Snippets Groups Projects
Commit c40c8b08 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rename -> ScanEditor

parent f2a3de05
No related branches found
No related tags found
1 merge request!1438unify GUI code for scanning instruments
......@@ -15,7 +15,7 @@
#include "GUI/View/Instrument/DepthprobeInstrumentEditor.h"
#include "GUI/Model/Device/InstrumentItems.h"
#include "GUI/View/Device/AxisPropertyForm.h"
#include "GUI/View/Instrument/SpecularBeamEditor.h"
#include "GUI/View/Instrument/ScanEditor.h"
#include <QVBoxLayout>
DepthprobeInstrumentEditor::DepthprobeInstrumentEditor(QWidget* parent,
......@@ -28,7 +28,7 @@ DepthprobeInstrumentEditor::DepthprobeInstrumentEditor(QWidget* parent,
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new SpecularBeamEditor(this, instrument->scanItem(), &m_ec);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec);
layout->addWidget(scanEditor);
auto* depthAxisEditor = new AxisPropertyForm(this, "Depth axis", &instrument->zAxis(),
......@@ -37,8 +37,7 @@ DepthprobeInstrumentEditor::DepthprobeInstrumentEditor(QWidget* parent,
layout->addStretch();
connect(scanEditor, &SpecularBeamEditor::dataChanged, this,
&DepthprobeInstrumentEditor::dataChanged);
connect(scanEditor, &ScanEditor::dataChanged, this, &DepthprobeInstrumentEditor::dataChanged);
connect(depthAxisEditor, &AxisPropertyForm::dataChanged, this,
&DepthprobeInstrumentEditor::dataChanged);
}
......@@ -16,7 +16,7 @@
#include "GUI/Model/Device/InstrumentItems.h"
#include "GUI/View/Instrument/OffspecDetectorEditor.h"
#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
#include "GUI/View/Instrument/SpecularBeamEditor.h"
#include "GUI/View/Instrument/ScanEditor.h"
OffspecInstrumentEditor::OffspecInstrumentEditor(QWidget* parent, OffspecInstrumentItem* instrument,
MultiInstrumentNotifier* ec)
......@@ -28,7 +28,7 @@ OffspecInstrumentEditor::OffspecInstrumentEditor(QWidget* parent, OffspecInstrum
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new SpecularBeamEditor(this, instrument->scanItem(), &m_ec);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec);
layout->addWidget(scanEditor);
auto* detectorEditor = new OffspecDetectorEditor(this, instrument);
......@@ -39,8 +39,7 @@ OffspecInstrumentEditor::OffspecInstrumentEditor(QWidget* parent, OffspecInstrum
layout->addStretch();
connect(scanEditor, &SpecularBeamEditor::dataChanged, this,
&OffspecInstrumentEditor::dataChanged);
connect(scanEditor, &ScanEditor::dataChanged, this, &OffspecInstrumentEditor::dataChanged);
connect(detectorEditor, &OffspecDetectorEditor::dataChanged, this,
&OffspecInstrumentEditor::dataChanged);
connect(polMatricesAnalysisEditor, &PolarizationAnalysisEditor::dataChanged, this,
......
......@@ -2,8 +2,8 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/Instrument/SpecularBeamEditor.cpp
//! @brief Defines class SpecularBeamEditor
//! @file GUI/View/Instrument/ScanEditor.cpp
//! @brief Defines class ScanEditor
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -12,7 +12,7 @@
//
// ************************************************************************************************
#include "GUI/View/Instrument/SpecularBeamEditor.h"
#include "GUI/View/Instrument/ScanEditor.h"
#include "Base/Util/Assert.h"
#include "GUI/Model/Device/BeamItems.h"
#include "GUI/Model/Device/BeamWavelengthItem.h"
......@@ -25,7 +25,7 @@
#include <QFormLayout>
#include <QLineEdit>
SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec)
ScanEditor::ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec)
: QGroupBox("Beam and scan parameters", parent)
{
ASSERT(item);
......@@ -75,7 +75,7 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, ScanItem* item, Instrume
connect(inclinationEditor, &AlphaScanEditor::dataChanged, wavelengthEditor,
&DistributionEditor::updateData);
connect(footprintEditor, &FootprintForm::dataChanged, this, &SpecularBeamEditor::dataChanged);
connect(footprintEditor, &FootprintForm::dataChanged, this, &ScanEditor::dataChanged);
// validate value while typing
connect(intensityLineEdit, &QLineEdit::textEdited, [=]() {
......
......@@ -2,8 +2,8 @@
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/Instrument/SpecularBeamEditor.h
//! @brief Defines class SpecularBeamEditor
//! @file GUI/View/Instrument/ScanEditor.h
//! @brief Defines class ScanEditor
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -12,8 +12,8 @@
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SCANEDITOR_H
#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SCANEDITOR_H
#include <QGroupBox>
......@@ -22,14 +22,14 @@ class InstrumentNotifier;
//! Specular beam editor. Operates on ScanItem.
class SpecularBeamEditor : public QGroupBox {
class ScanEditor : public QGroupBox {
Q_OBJECT
public:
SpecularBeamEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec);
ScanEditor(QWidget* parent, ScanItem* item, InstrumentNotifier* ec);
signals:
void dataChanged();
};
#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SCANEDITOR_H
......@@ -16,7 +16,7 @@
#include "GUI/Model/Device/InstrumentItems.h"
#include "GUI/View/Device/BackgroundForm.h"
#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
#include "GUI/View/Instrument/SpecularBeamEditor.h"
#include "GUI/View/Instrument/ScanEditor.h"
SpecularInstrumentEditor::SpecularInstrumentEditor(QWidget* parent,
SpecularInstrumentItem* instrument,
......@@ -28,7 +28,7 @@ SpecularInstrumentEditor::SpecularInstrumentEditor(QWidget* parent,
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
auto* scanEditor = new SpecularBeamEditor(this, instrument->scanItem(), &m_ec);
auto* scanEditor = new ScanEditor(this, instrument->scanItem(), &m_ec);
layout->addWidget(scanEditor);
auto* polMatricesAnalysisEditor = new PolarizationAnalysisEditor(this, instrument);
......@@ -39,8 +39,7 @@ SpecularInstrumentEditor::SpecularInstrumentEditor(QWidget* parent,
layout->addStretch();
connect(scanEditor, &SpecularBeamEditor::dataChanged, this,
&SpecularInstrumentEditor::dataChanged);
connect(scanEditor, &ScanEditor::dataChanged, this, &SpecularInstrumentEditor::dataChanged);
connect(polMatricesAnalysisEditor, &PolarizationAnalysisEditor::dataChanged, this,
&SpecularInstrumentEditor::dataChanged);
connect(backgroundForm, &BackgroundForm::dataChanged, this,
......
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