From 689031422de77f70232626f13bc459591ba9db18 Mon Sep 17 00:00:00 2001 From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de> Date: Mon, 6 Feb 2023 18:55:28 +0100 Subject: [PATCH] rm JobRealBase --- GUI/Model/BaseItem/JobRealBase.cpp | 22 ------------- GUI/Model/BaseItem/JobRealBase.h | 32 ------------------- GUI/Model/Data/RealItem.cpp | 2 +- GUI/Model/Data/RealItem.h | 3 +- GUI/Model/Job/JobItem.cpp | 2 +- GUI/Model/Job/JobItem.h | 4 +-- GUI/Model/Job/ParameterTreeItems.cpp | 1 + GUI/Model/Model/FitParameterHelper.cpp | 1 + GUI/Model/Model/FitParameterModel.cpp | 1 + GUI/View/Common/DataAccessWidget.cpp | 4 +-- GUI/View/Common/DataAccessWidget.h | 8 ++--- GUI/View/Common/ItemComboWidget.cpp | 2 +- GUI/View/Common/ItemComboWidget.h | 4 +-- GUI/View/Common/ItemStackPresenter.h | 7 ++-- GUI/View/Fit/FitParameterWidget.cpp | 2 +- GUI/View/Fit/FitParameterWidget.h | 2 +- GUI/View/Fit/ParameterTuningWidget.cpp | 2 +- GUI/View/Fit/ParameterTuningWidget.h | 2 +- GUI/View/Fit/RunFitControlWidget.cpp | 2 +- GUI/View/Fit/RunFitControlWidget.h | 2 +- GUI/View/Fit/SliderSettingsWidget.cpp | 2 +- GUI/View/Fit/SliderSettingsWidget.h | 2 +- GUI/View/Import/RealDataMaskWidget.cpp | 2 +- GUI/View/Import/RealDataMaskWidget.h | 2 +- GUI/View/Import/SpecularDataImportWidget.cpp | 2 +- GUI/View/Import/SpecularDataImportWidget.h | 2 +- GUI/View/Job/JobListViewDelegate.cpp | 1 + GUI/View/Mask/MaskEditorPropertyPanel.cpp | 2 +- GUI/View/Mask/MaskEditorPropertyPanel.h | 2 +- GUI/View/Plot2D/IntensityDataCanvas.cpp | 2 +- GUI/View/Plot2D/IntensityDataCanvas.h | 2 +- GUI/View/Plot2D/IntensityDataWidget.cpp | 2 +- GUI/View/Plot2D/IntensityDataWidget.h | 2 +- .../PlotComparison/FitComparisonWidget.cpp | 2 +- GUI/View/PlotComparison/FitComparisonWidget.h | 2 +- .../PlotComparison/FitComparisonWidget1D.cpp | 2 +- .../PlotComparison/FitComparisonWidget1D.h | 2 +- GUI/View/PlotComparison/FitFlowWidget.cpp | 2 +- GUI/View/PlotComparison/FitFlowWidget.h | 2 +- GUI/View/PlotSpecular/SpecularDataCanvas.cpp | 2 +- GUI/View/PlotSpecular/SpecularDataCanvas.h | 2 +- GUI/View/PlotSpecular/SpecularDataWidget.cpp | 2 +- GUI/View/PlotSpecular/SpecularDataWidget.h | 2 +- GUI/View/PlotUtil/DataPropertyWidget.cpp | 2 +- GUI/View/PlotUtil/DataPropertyWidget.h | 2 +- .../IntensityDataProjectionsWidget.cpp | 2 +- .../IntensityDataProjectionsWidget.h | 2 +- 47 files changed, 52 insertions(+), 106 deletions(-) delete mode 100644 GUI/Model/BaseItem/JobRealBase.cpp delete mode 100644 GUI/Model/BaseItem/JobRealBase.h diff --git a/GUI/Model/BaseItem/JobRealBase.cpp b/GUI/Model/BaseItem/JobRealBase.cpp deleted file mode 100644 index 453d4a78e66..00000000000 --- a/GUI/Model/BaseItem/JobRealBase.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Model/BaseItem/JobRealBase.cpp -//! @brief Implements class JobRealBase -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2022 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#include "GUI/Model/BaseItem/JobRealBase.h" - -JobRealBase::JobRealBase(QObject* parent) - : QObject(parent) -{ -} - -JobRealBase::~JobRealBase() = default; diff --git a/GUI/Model/BaseItem/JobRealBase.h b/GUI/Model/BaseItem/JobRealBase.h deleted file mode 100644 index f0e518e33eb..00000000000 --- a/GUI/Model/BaseItem/JobRealBase.h +++ /dev/null @@ -1,32 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Model/BaseItem/JobRealBase.h -//! @brief Implements class JobRealBase -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2022 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef BORNAGAIN_GUI_MODEL_BASEITEM_JOBREALBASE_H -#define BORNAGAIN_GUI_MODEL_BASEITEM_JOBREALBASE_H - -#include "Base/Util/Assert.h" -#include "Wrap/WinDllMacros.h" -#include <QObject> - -//! This class serves as base class for JobItem and RealItem for passing them as function -//! arguments. - -class JobRealBase : public QObject { - Q_OBJECT -public: - explicit JobRealBase(QObject* parent = nullptr); - ~JobRealBase() override; -}; - -#endif // BORNAGAIN_GUI_MODEL_BASEITEM_JOBREALBASE_H diff --git a/GUI/Model/Data/RealItem.cpp b/GUI/Model/Data/RealItem.cpp index e3cab3f599e..d7828bcf0f0 100644 --- a/GUI/Model/Data/RealItem.cpp +++ b/GUI/Model/Data/RealItem.cpp @@ -47,7 +47,7 @@ const QString PresentationType("PresentationType"); RealItem::RealItem() - : JobRealBase() + : QObject() { } diff --git a/GUI/Model/Data/RealItem.h b/GUI/Model/Data/RealItem.h index f835d18f50a..e7f03274190 100644 --- a/GUI/Model/Data/RealItem.h +++ b/GUI/Model/Data/RealItem.h @@ -15,7 +15,6 @@ #ifndef BORNAGAIN_GUI_MODEL_DATA_REALITEM_H #define BORNAGAIN_GUI_MODEL_DATA_REALITEM_H -#include "GUI/Model/BaseItem/JobRealBase.h" #include "GUI/Model/Data/DataItem.h" #include "GUI/Support/IO/AbstractDataLoader.h" @@ -30,7 +29,7 @@ class SpecularDataItem; //! Provides access to experimental data, for display and fitting. //! Owns an AbstractDataLoader. -class BA_CORE_API_ RealItem : public JobRealBase { +class BA_CORE_API_ RealItem : public QObject { Q_OBJECT friend class TestView; diff --git a/GUI/Model/Job/JobItem.cpp b/GUI/Model/Job/JobItem.cpp index 28b2b1dd530..4fe9d79fbd7 100644 --- a/GUI/Model/Job/JobItem.cpp +++ b/GUI/Model/Job/JobItem.cpp @@ -63,7 +63,7 @@ const QString FitSuite("FitSuite"); } // namespace JobItem::JobItem() - : JobRealBase() + : QObject() , m_simulationOptionsItem(std::make_unique<SimulationOptionsItem>()) , m_parameterContainer(std::make_unique<ParameterContainerItem>()) , m_sampleItem(std::make_unique<SampleItem>()) diff --git a/GUI/Model/Job/JobItem.h b/GUI/Model/Job/JobItem.h index e79ffd48633..aeab9f5b5df 100644 --- a/GUI/Model/Job/JobItem.h +++ b/GUI/Model/Job/JobItem.h @@ -15,11 +15,11 @@ #ifndef BORNAGAIN_GUI_MODEL_JOB_JOBITEM_H #define BORNAGAIN_GUI_MODEL_JOB_JOBITEM_H -#include "GUI/Model/BaseItem/JobRealBase.h" #include "GUI/Model/CatDevice/InstrumentItemCatalog.h" #include "GUI/Model/Descriptor/SelectionProperty.h" #include "GUI/Support/Data/JobStatus.h" #include "GUI/Support/Data/SimulationOptionsItem.h" +#include "Wrap/WinDllMacros.h" #include <QDateTime> #include <optional> @@ -35,7 +35,7 @@ class RealItem; class SampleItem; class SimulationResult; -class BA_CORE_API_ JobItem : public JobRealBase { +class BA_CORE_API_ JobItem : public QObject { Q_OBJECT public: diff --git a/GUI/Model/Job/ParameterTreeItems.cpp b/GUI/Model/Job/ParameterTreeItems.cpp index d9d32af6b5d..ad91c02e075 100644 --- a/GUI/Model/Job/ParameterTreeItems.cpp +++ b/GUI/Model/Job/ParameterTreeItems.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/Model/Job/ParameterTreeItems.h" +#include "Base/Util/Assert.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Sample/MaterialItem.h" #include "GUI/Model/Sample/MaterialModel.h" diff --git a/GUI/Model/Model/FitParameterHelper.cpp b/GUI/Model/Model/FitParameterHelper.cpp index b129e143c30..4212ab1ab10 100644 --- a/GUI/Model/Model/FitParameterHelper.cpp +++ b/GUI/Model/Model/FitParameterHelper.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/Model/Model/FitParameterHelper.h" +#include "Base/Util/Assert.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Job/ParameterTreeItems.h" diff --git a/GUI/Model/Model/FitParameterModel.cpp b/GUI/Model/Model/FitParameterModel.cpp index 0ad59c9b8ea..369f34f6305 100644 --- a/GUI/Model/Model/FitParameterModel.cpp +++ b/GUI/Model/Model/FitParameterModel.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/Model/Model/FitParameterModel.h" +#include "Base/Util/Assert.h" #include "GUI/Model/Job/FitParameterContainerItem.h" #include "GUI/Model/Job/FitParameterItem.h" #include "GUI/Model/Job/FitParameterLinkItem.h" diff --git a/GUI/View/Common/DataAccessWidget.cpp b/GUI/View/Common/DataAccessWidget.cpp index ca6cd6664a2..e8725a97543 100644 --- a/GUI/View/Common/DataAccessWidget.cpp +++ b/GUI/View/Common/DataAccessWidget.cpp @@ -24,7 +24,7 @@ DataAccessWidget::DataAccessWidget(QWidget* parent) } DataAccessWidget::~DataAccessWidget() = default; -void DataAccessWidget::setJobOrRealItem(JobRealBase* item) +void DataAccessWidget::setJobOrRealItem(QObject* item) { m_item = item; ASSERT(jobItem() || realItem()); @@ -53,7 +53,7 @@ RealItem* DataAccessWidget::realItem() const return dynamic_cast<RealItem*>(m_item); } -JobRealBase* DataAccessWidget::jobRealBase() const +QObject* DataAccessWidget::jobRealBase() const { return m_item; } diff --git a/GUI/View/Common/DataAccessWidget.h b/GUI/View/Common/DataAccessWidget.h index 5531a460eee..5ad533fc21a 100644 --- a/GUI/View/Common/DataAccessWidget.h +++ b/GUI/View/Common/DataAccessWidget.h @@ -24,7 +24,7 @@ //! as a list of items that is required for simultaneous, synchronous work while plotting and //! changing their properties. -class JobRealBase; +class QObject; class DataAccessWidget : public QWidget { Q_OBJECT @@ -32,7 +32,7 @@ public: explicit DataAccessWidget(QWidget* parent = nullptr); ~DataAccessWidget() override; - virtual void setJobOrRealItem(JobRealBase* item); + virtual void setJobOrRealItem(QObject* item); virtual void setFourierItem(IntensityDataItem* fftItem); @@ -40,7 +40,7 @@ public: JobItem* jobItem() const; RealItem* realItem() const; - JobRealBase* jobRealBase() const; + QObject* jobRealBase() const; // Access to concrete items: @@ -112,7 +112,7 @@ private: template <class T> QList<T*> allDataItems() const; - JobRealBase* m_item; + QObject* m_item; IntensityDataItem* m_fftItem; }; diff --git a/GUI/View/Common/ItemComboWidget.cpp b/GUI/View/Common/ItemComboWidget.cpp index 7b6957b1a4c..1ffe132fb73 100644 --- a/GUI/View/Common/ItemComboWidget.cpp +++ b/GUI/View/Common/ItemComboWidget.cpp @@ -84,7 +84,7 @@ void ItemComboWidget::setToolbarVisible(bool value) m_toolbar->setVisible(value); } -void ItemComboWidget::setJobOrRealItem(JobRealBase* job_or_real_item) +void ItemComboWidget::setJobOrRealItem(QObject* job_or_real_item) { if (!job_or_real_item) { m_stackedWidget->setCurrentWidget(m_blankWidget); diff --git a/GUI/View/Common/ItemComboWidget.h b/GUI/View/Common/ItemComboWidget.h index a33eddc4296..746e9e91a16 100644 --- a/GUI/View/Common/ItemComboWidget.h +++ b/GUI/View/Common/ItemComboWidget.h @@ -23,7 +23,7 @@ class ItemComboToolbar; //! The ItemComboWidget class combines stack of widgets with QComboBox controller to switch between -//! widgets. It is used in the case when one SessionItem can be presented with different widgets. +//! widgets. It is used in the case when corresponding item can be presented with different widgets. //! For example, in JobDatafieldWidget the results of the job can be presented with either //! IntensityDataWidget or FitDataWidget, depending from the JobView's activity type. @@ -47,7 +47,7 @@ public: void setToolbarVisible(bool value); - void setJobOrRealItem(JobRealBase* job_or_real_item) override; + void setJobOrRealItem(QObject* job_or_real_item) override; protected: virtual QStringList activePresentationList() const; diff --git a/GUI/View/Common/ItemStackPresenter.h b/GUI/View/Common/ItemStackPresenter.h index 44ddf478489..75af26baccf 100644 --- a/GUI/View/Common/ItemStackPresenter.h +++ b/GUI/View/Common/ItemStackPresenter.h @@ -16,7 +16,6 @@ #define BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKPRESENTER_H #include "Base/Util/Assert.h" -#include "GUI/Model/BaseItem/JobRealBase.h" #include "GUI/View/Common/ItemStackWidget.h" #include <QMap> #include <QStackedWidget> @@ -34,9 +33,7 @@ public: //! Shows the widget for given item (and hides previous one). //! If no widget yet exists, it will be created. - void setItem(JobRealBase *item, QObject* model = nullptr); - - void setModel(QObject* model = nullptr); + void setItem(QObject *item, QObject* model = nullptr); T* currentWidget(); T* itemWidget(QObject* item); @@ -52,7 +49,7 @@ private: }; template <class T> -void ItemStackPresenter<T>::setItem(JobRealBase* item, QObject* model) +void ItemStackPresenter<T>::setItem(QObject* item, QObject* model) { if (!item) { hideWidgets(); diff --git a/GUI/View/Fit/FitParameterWidget.cpp b/GUI/View/Fit/FitParameterWidget.cpp index 7d5008fe0f7..351f4f406c6 100644 --- a/GUI/View/Fit/FitParameterWidget.cpp +++ b/GUI/View/Fit/FitParameterWidget.cpp @@ -68,7 +68,7 @@ FitParameterWidget::FitParameterWidget(QWidget* parent) m_infoLabel->setText("Drop parameter(s) to fit here"); } -void FitParameterWidget::setJobOrRealItem(JobRealBase* job_item) +void FitParameterWidget::setJobOrRealItem(QObject* job_item) { DataAccessWidget::setJobOrRealItem(job_item); ASSERT(jobItem()); diff --git a/GUI/View/Fit/FitParameterWidget.h b/GUI/View/Fit/FitParameterWidget.h index 50b178a3767..aedcc990e49 100644 --- a/GUI/View/Fit/FitParameterWidget.h +++ b/GUI/View/Fit/FitParameterWidget.h @@ -32,7 +32,7 @@ class FitParameterWidget : public DataAccessWidget { public: FitParameterWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; void setParameterTuningWidget(ParameterTuningWidget* tuningWidget); diff --git a/GUI/View/Fit/ParameterTuningWidget.cpp b/GUI/View/Fit/ParameterTuningWidget.cpp index 9df475d050b..2eb0769c346 100644 --- a/GUI/View/Fit/ParameterTuningWidget.cpp +++ b/GUI/View/Fit/ParameterTuningWidget.cpp @@ -70,7 +70,7 @@ ParameterTuningWidget::ParameterTuningWidget(QWidget* parent) &ParameterTuningWidget::onCustomContextMenuRequested); } -void ParameterTuningWidget::setJobOrRealItem(JobRealBase* job_item) +void ParameterTuningWidget::setJobOrRealItem(QObject* job_item) { DataAccessWidget::setJobOrRealItem(job_item); m_sliderSettingsWidget->setJobOrRealItem(job_item); diff --git a/GUI/View/Fit/ParameterTuningWidget.h b/GUI/View/Fit/ParameterTuningWidget.h index 181bc90ba29..2d98764f967 100644 --- a/GUI/View/Fit/ParameterTuningWidget.h +++ b/GUI/View/Fit/ParameterTuningWidget.h @@ -35,7 +35,7 @@ class ParameterTuningWidget : public DataAccessWidget { public: explicit ParameterTuningWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; void setModel(QObject *jobModel); QItemSelectionModel* selectionModel(); diff --git a/GUI/View/Fit/RunFitControlWidget.cpp b/GUI/View/Fit/RunFitControlWidget.cpp index 5451c66c1ee..8834c620ecc 100644 --- a/GUI/View/Fit/RunFitControlWidget.cpp +++ b/GUI/View/Fit/RunFitControlWidget.cpp @@ -90,7 +90,7 @@ RunFitControlWidget::RunFitControlWidget(QWidget* parent) setEnabled(false); } -void RunFitControlWidget::setJobOrRealItem(JobRealBase* job_item) +void RunFitControlWidget::setJobOrRealItem(QObject* job_item) { DataAccessWidget::setJobOrRealItem(job_item); ASSERT(jobItem()); diff --git a/GUI/View/Fit/RunFitControlWidget.h b/GUI/View/Fit/RunFitControlWidget.h index aa59ffc6e59..16c458b5bd9 100644 --- a/GUI/View/Fit/RunFitControlWidget.h +++ b/GUI/View/Fit/RunFitControlWidget.h @@ -30,7 +30,7 @@ class RunFitControlWidget : public DataAccessWidget { public: RunFitControlWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; signals: void startFittingPushed(); diff --git a/GUI/View/Fit/SliderSettingsWidget.cpp b/GUI/View/Fit/SliderSettingsWidget.cpp index 063228c6e82..727d79a7095 100644 --- a/GUI/View/Fit/SliderSettingsWidget.cpp +++ b/GUI/View/Fit/SliderSettingsWidget.cpp @@ -68,7 +68,7 @@ SliderSettingsWidget::SliderSettingsWidget(QWidget* parent) setLayout(hbox); } -void SliderSettingsWidget::setJobOrRealItem(JobRealBase* job_item) +void SliderSettingsWidget::setJobOrRealItem(QObject* job_item) { DataAccessWidget::setJobOrRealItem(job_item); diff --git a/GUI/View/Fit/SliderSettingsWidget.h b/GUI/View/Fit/SliderSettingsWidget.h index 6d35b2d1fb4..aa116612927 100644 --- a/GUI/View/Fit/SliderSettingsWidget.h +++ b/GUI/View/Fit/SliderSettingsWidget.h @@ -25,7 +25,7 @@ class SliderSettingsWidget : public DataAccessWidget { public: SliderSettingsWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; signals: void sliderRangeFactorChanged(int value); diff --git a/GUI/View/Import/RealDataMaskWidget.cpp b/GUI/View/Import/RealDataMaskWidget.cpp index d62c48199c1..c84e5ba0ce4 100644 --- a/GUI/View/Import/RealDataMaskWidget.cpp +++ b/GUI/View/Import/RealDataMaskWidget.cpp @@ -55,7 +55,7 @@ RealDataMaskWidget::RealDataMaskWidget(QWidget* parent) m_editorPropertyPanel->setPanelHidden(true); } -void RealDataMaskWidget::setJobOrRealItem(JobRealBase* job_or_real_item) +void RealDataMaskWidget::setJobOrRealItem(QObject* job_or_real_item) { DataAccessWidget::setJobOrRealItem(job_or_real_item); m_editorPropertyPanel->setJobOrRealItem(job_or_real_item); diff --git a/GUI/View/Import/RealDataMaskWidget.h b/GUI/View/Import/RealDataMaskWidget.h index c2b76886aca..dd4e8474d46 100644 --- a/GUI/View/Import/RealDataMaskWidget.h +++ b/GUI/View/Import/RealDataMaskWidget.h @@ -29,7 +29,7 @@ class RealDataMaskWidget : public DataAccessWidget { public: RealDataMaskWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_item) override; + void setJobOrRealItem(QObject* job_or_real_item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/Import/SpecularDataImportWidget.cpp b/GUI/View/Import/SpecularDataImportWidget.cpp index 967f6f88d30..45dfef7e8fd 100644 --- a/GUI/View/Import/SpecularDataImportWidget.cpp +++ b/GUI/View/Import/SpecularDataImportWidget.cpp @@ -72,7 +72,7 @@ SpecularDataImportWidget::SpecularDataImportWidget(QWidget* parent) m_ui->plotToolbar->addAction(action); } -void SpecularDataImportWidget::setJobOrRealItem(JobRealBase* real_item) +void SpecularDataImportWidget::setJobOrRealItem(QObject* real_item) { DataAccessWidget::setJobOrRealItem(real_item); ASSERT(realItem()); diff --git a/GUI/View/Import/SpecularDataImportWidget.h b/GUI/View/Import/SpecularDataImportWidget.h index fdbeb4dc7b0..a5ae8a6290b 100644 --- a/GUI/View/Import/SpecularDataImportWidget.h +++ b/GUI/View/Import/SpecularDataImportWidget.h @@ -40,7 +40,7 @@ class SpecularDataImportWidget : public DataAccessWidget { public: SpecularDataImportWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* real_item) override; + void setJobOrRealItem(QObject* real_item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/Job/JobListViewDelegate.cpp b/GUI/View/Job/JobListViewDelegate.cpp index 84ee994aba8..c08329f109b 100644 --- a/GUI/View/Job/JobListViewDelegate.cpp +++ b/GUI/View/Job/JobListViewDelegate.cpp @@ -13,6 +13,7 @@ // ************************************************************************************************ #include "GUI/View/Job/JobListViewDelegate.h" +#include "Base/Util/Assert.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/View/Job/JobListModel.h" #include <QApplication> diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.cpp b/GUI/View/Mask/MaskEditorPropertyPanel.cpp index 6875cc66e02..ed782a8d135 100644 --- a/GUI/View/Mask/MaskEditorPropertyPanel.cpp +++ b/GUI/View/Mask/MaskEditorPropertyPanel.cpp @@ -80,7 +80,7 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent) setLayout(mainLayout); } -void MaskEditorPropertyPanel::setJobOrRealItem(JobRealBase* job_or_real_item) +void MaskEditorPropertyPanel::setJobOrRealItem(QObject* job_or_real_item) { DataAccessWidget::setJobOrRealItem(job_or_real_item); m_propertyPanel->setJobOrRealItem(job_or_real_item); diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.h b/GUI/View/Mask/MaskEditorPropertyPanel.h index cdf7df280a9..61e40846d7a 100644 --- a/GUI/View/Mask/MaskEditorPropertyPanel.h +++ b/GUI/View/Mask/MaskEditorPropertyPanel.h @@ -35,7 +35,7 @@ class MaskEditorPropertyPanel : public DataAccessWidget { public: MaskEditorPropertyPanel(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_item) override; + void setJobOrRealItem(QObject* job_or_real_item) override; QSize sizeHint() const override; QSize minimumSizeHint() const override; diff --git a/GUI/View/Plot2D/IntensityDataCanvas.cpp b/GUI/View/Plot2D/IntensityDataCanvas.cpp index 0e5a1fc7805..674ddbf13b5 100644 --- a/GUI/View/Plot2D/IntensityDataCanvas.cpp +++ b/GUI/View/Plot2D/IntensityDataCanvas.cpp @@ -56,7 +56,7 @@ IntensityDataCanvas::IntensityDataCanvas(QWidget* parent) &IntensityDataCanvas::onMousePress, Qt::UniqueConnection); } -void IntensityDataCanvas::setJobOrRealItem(JobRealBase* job_or_real_Item) +void IntensityDataCanvas::setJobOrRealItem(QObject* job_or_real_Item) { DataAccessWidget::setJobOrRealItem(job_or_real_Item); m_colorMapCanvas->setIntensityItem(currentIntensityDataItem()); diff --git a/GUI/View/Plot2D/IntensityDataCanvas.h b/GUI/View/Plot2D/IntensityDataCanvas.h index 3d2b95a77c5..3aa14e6622e 100644 --- a/GUI/View/Plot2D/IntensityDataCanvas.h +++ b/GUI/View/Plot2D/IntensityDataCanvas.h @@ -29,7 +29,7 @@ class IntensityDataCanvas : public DataAccessWidget { public: explicit IntensityDataCanvas(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_Item) override; + void setJobOrRealItem(QObject* job_or_real_Item) override; void setFourierItem(IntensityDataItem* fftItem) override; QSize sizeHint() const override; diff --git a/GUI/View/Plot2D/IntensityDataWidget.cpp b/GUI/View/Plot2D/IntensityDataWidget.cpp index 047052b39c1..d218909e212 100644 --- a/GUI/View/Plot2D/IntensityDataWidget.cpp +++ b/GUI/View/Plot2D/IntensityDataWidget.cpp @@ -49,7 +49,7 @@ IntensityDataWidget::IntensityDataWidget(QWidget* parent) m_propertyWidget->setVisible(false); } -void IntensityDataWidget::setJobOrRealItem(JobRealBase* job_or_real_item) +void IntensityDataWidget::setJobOrRealItem(QObject* job_or_real_item) { JobItem* oldJob = jobItem(); DataAccessWidget::setJobOrRealItem(job_or_real_item); diff --git a/GUI/View/Plot2D/IntensityDataWidget.h b/GUI/View/Plot2D/IntensityDataWidget.h index 051bf2f5c3b..10f8c383358 100644 --- a/GUI/View/Plot2D/IntensityDataWidget.h +++ b/GUI/View/Plot2D/IntensityDataWidget.h @@ -30,7 +30,7 @@ class IntensityDataWidget : public DataAccessWidget { public: IntensityDataWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_item) override; + void setJobOrRealItem(QObject* job_or_real_item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/PlotComparison/FitComparisonWidget.cpp b/GUI/View/PlotComparison/FitComparisonWidget.cpp index e56b2160d44..8b1ef87f70f 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget.cpp +++ b/GUI/View/PlotComparison/FitComparisonWidget.cpp @@ -82,7 +82,7 @@ FitComparisonWidget::FitComparisonWidget(QWidget* parent) &FitComparisonWidget::onResetViewAction, Qt::UniqueConnection); } -void FitComparisonWidget::setJobOrRealItem(JobRealBase* job_item) +void FitComparisonWidget::setJobOrRealItem(QObject* job_item) { JobItem* oldJob = jobItem(); diff --git a/GUI/View/PlotComparison/FitComparisonWidget.h b/GUI/View/PlotComparison/FitComparisonWidget.h index 81b407dda38..640330302a2 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget.h +++ b/GUI/View/PlotComparison/FitComparisonWidget.h @@ -32,7 +32,7 @@ class FitComparisonWidget : public DataAccessWidget { public: explicit FitComparisonWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/PlotComparison/FitComparisonWidget1D.cpp b/GUI/View/PlotComparison/FitComparisonWidget1D.cpp index c420bf0a278..97041e61085 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget1D.cpp +++ b/GUI/View/PlotComparison/FitComparisonWidget1D.cpp @@ -77,7 +77,7 @@ FitComparisonWidget1D::FitComparisonWidget1D(QWidget* parent) &FitComparisonWidget1D::onResetViewAction, Qt::UniqueConnection); } -void FitComparisonWidget1D::setJobOrRealItem(JobRealBase* job_item) +void FitComparisonWidget1D::setJobOrRealItem(QObject* job_item) { JobItem* oldJob = jobItem(); diff --git a/GUI/View/PlotComparison/FitComparisonWidget1D.h b/GUI/View/PlotComparison/FitComparisonWidget1D.h index d9de7f27361..582f15eb180 100644 --- a/GUI/View/PlotComparison/FitComparisonWidget1D.h +++ b/GUI/View/PlotComparison/FitComparisonWidget1D.h @@ -33,7 +33,7 @@ class FitComparisonWidget1D : public DataAccessWidget { public: explicit FitComparisonWidget1D(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/PlotComparison/FitFlowWidget.cpp b/GUI/View/PlotComparison/FitFlowWidget.cpp index 5770f5474e5..16bd1dabdd6 100644 --- a/GUI/View/PlotComparison/FitFlowWidget.cpp +++ b/GUI/View/PlotComparison/FitFlowWidget.cpp @@ -31,7 +31,7 @@ FitFlowWidget::FitFlowWidget(QWidget* parent) setLayout(layout); } -void FitFlowWidget::setJobOrRealItem(JobRealBase* job_item) +void FitFlowWidget::setJobOrRealItem(QObject* job_item) { DataAccessWidget::setJobOrRealItem(job_item); ASSERT(jobItem()); diff --git a/GUI/View/PlotComparison/FitFlowWidget.h b/GUI/View/PlotComparison/FitFlowWidget.h index 61af4630d48..3426dccab4e 100644 --- a/GUI/View/PlotComparison/FitFlowWidget.h +++ b/GUI/View/PlotComparison/FitFlowWidget.h @@ -28,7 +28,7 @@ class FitFlowWidget : public DataAccessWidget { public: explicit FitFlowWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_item) override; + void setJobOrRealItem(QObject* job_item) override; private: void onIterationCountChanged(int iter); diff --git a/GUI/View/PlotSpecular/SpecularDataCanvas.cpp b/GUI/View/PlotSpecular/SpecularDataCanvas.cpp index d266b064884..d25405b075d 100644 --- a/GUI/View/PlotSpecular/SpecularDataCanvas.cpp +++ b/GUI/View/PlotSpecular/SpecularDataCanvas.cpp @@ -40,7 +40,7 @@ SpecularDataCanvas::SpecularDataCanvas(QWidget* parent) enableDeprecatedOnMousePress(true); // true for legacy reasons } -void SpecularDataCanvas::setJobOrRealItem(JobRealBase* job_or_real_Item) +void SpecularDataCanvas::setJobOrRealItem(QObject* job_or_real_Item) { DataAccessWidget::setJobOrRealItem(job_or_real_Item); m_plot_canvas->setSpecularItems({currentSpecularDataItem()}); diff --git a/GUI/View/PlotSpecular/SpecularDataCanvas.h b/GUI/View/PlotSpecular/SpecularDataCanvas.h index e192588e5c2..1b969e3fca1 100644 --- a/GUI/View/PlotSpecular/SpecularDataCanvas.h +++ b/GUI/View/PlotSpecular/SpecularDataCanvas.h @@ -27,7 +27,7 @@ class SpecularDataCanvas : public DataAccessWidget { public: explicit SpecularDataCanvas(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_Item) override; + void setJobOrRealItem(QObject* job_or_real_Item) override; QSize sizeHint() const override; QSize minimumSizeHint() const override; diff --git a/GUI/View/PlotSpecular/SpecularDataWidget.cpp b/GUI/View/PlotSpecular/SpecularDataWidget.cpp index 5551979da96..fef672c8dae 100644 --- a/GUI/View/PlotSpecular/SpecularDataWidget.cpp +++ b/GUI/View/PlotSpecular/SpecularDataWidget.cpp @@ -43,7 +43,7 @@ SpecularDataWidget::SpecularDataWidget(QWidget* parent) m_propertyWidget->setVisible(false); } -void SpecularDataWidget::setJobOrRealItem(JobRealBase* job_or_real_Item) +void SpecularDataWidget::setJobOrRealItem(QObject* job_or_real_Item) { DataAccessWidget::setJobOrRealItem(job_or_real_Item); m_specular_canvas->setJobOrRealItem(job_or_real_Item); diff --git a/GUI/View/PlotSpecular/SpecularDataWidget.h b/GUI/View/PlotSpecular/SpecularDataWidget.h index 33ca2ad0070..16d985738d5 100644 --- a/GUI/View/PlotSpecular/SpecularDataWidget.h +++ b/GUI/View/PlotSpecular/SpecularDataWidget.h @@ -27,7 +27,7 @@ class SpecularDataWidget : public DataAccessWidget { public: SpecularDataWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_Item) override; + void setJobOrRealItem(QObject* job_or_real_Item) override; QList<QAction*> actionList() override; diff --git a/GUI/View/PlotUtil/DataPropertyWidget.cpp b/GUI/View/PlotUtil/DataPropertyWidget.cpp index b497ce325dc..0f6c0965c1a 100644 --- a/GUI/View/PlotUtil/DataPropertyWidget.cpp +++ b/GUI/View/PlotUtil/DataPropertyWidget.cpp @@ -27,7 +27,7 @@ DataPropertyWidget::DataPropertyWidget(QWidget* parent) m_mainLayout->setSpacing(5); } -void DataPropertyWidget::setJobOrRealItem(JobRealBase* job_or_real_Item) +void DataPropertyWidget::setJobOrRealItem(QObject* job_or_real_Item) { DataAccessWidget::setJobOrRealItem(job_or_real_Item); createPanelElements(); diff --git a/GUI/View/PlotUtil/DataPropertyWidget.h b/GUI/View/PlotUtil/DataPropertyWidget.h index bd3e2e51a5f..7d8ed32d407 100644 --- a/GUI/View/PlotUtil/DataPropertyWidget.h +++ b/GUI/View/PlotUtil/DataPropertyWidget.h @@ -26,7 +26,7 @@ class DataPropertyWidget : public DataAccessWidget { public: explicit DataPropertyWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_Item) override; + void setJobOrRealItem(QObject* job_or_real_Item) override; signals: void axesRangeResetRequested(); diff --git a/GUI/View/Projection/IntensityDataProjectionsWidget.cpp b/GUI/View/Projection/IntensityDataProjectionsWidget.cpp index cb88ce449ee..405dcfb65e5 100644 --- a/GUI/View/Projection/IntensityDataProjectionsWidget.cpp +++ b/GUI/View/Projection/IntensityDataProjectionsWidget.cpp @@ -53,7 +53,7 @@ IntensityDataProjectionsWidget::IntensityDataProjectionsWidget(QWidget* parent) setup_connections(); } -void IntensityDataProjectionsWidget::setJobOrRealItem(JobRealBase* job_or_real_item) +void IntensityDataProjectionsWidget::setJobOrRealItem(QObject* job_or_real_item) { DataAccessWidget::setJobOrRealItem(job_or_real_item); m_propertyPanel->setJobOrRealItem(job_or_real_item); diff --git a/GUI/View/Projection/IntensityDataProjectionsWidget.h b/GUI/View/Projection/IntensityDataProjectionsWidget.h index 4426a65acdb..f4025cbeb8c 100644 --- a/GUI/View/Projection/IntensityDataProjectionsWidget.h +++ b/GUI/View/Projection/IntensityDataProjectionsWidget.h @@ -32,7 +32,7 @@ class IntensityDataProjectionsWidget : public DataAccessWidget { public: IntensityDataProjectionsWidget(QWidget* parent = nullptr); - void setJobOrRealItem(JobRealBase* job_or_real_item) override; + void setJobOrRealItem(QObject* job_or_real_item) override; QList<QAction*> actionList() override; -- GitLab