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