diff --git a/GUI/View/Frame/MaskEditingFrame.cpp b/GUI/View/Frame/MaskEditingFrame.cpp index 239cb86683437308375d0ed2508d80e40f312621..9885a1a85f6b5905297865a8428ff9370ab68a99 100644 --- a/GUI/View/Frame/MaskEditingFrame.cpp +++ b/GUI/View/Frame/MaskEditingFrame.cpp @@ -93,10 +93,9 @@ MaskEditingFrame::MaskEditingFrame(QWidget* parent) m_editorActions, &MaskEditorActions::onItemContextMenuRequest); } -void MaskEditingFrame::setJobOrDatafileItem(QObject* job_or_real_item) +void MaskEditingFrame::setJobOrDatafileItem(QObject* item) { - setBaseItem(job_or_real_item); - m_editorPropertyPanel->setJobOrDatafileItem(job_or_real_item); + setBaseItem(item); setContextMW(); } diff --git a/GUI/View/Setup/MaskEditorPropertyPanel.cpp b/GUI/View/Setup/MaskEditorPropertyPanel.cpp index bce1fbde25ee17857880f0925f280fb39aee2b80..af89ce25f2a85470bbe1b2a92ec5e6353e8c118a 100644 --- a/GUI/View/Setup/MaskEditorPropertyPanel.cpp +++ b/GUI/View/Setup/MaskEditorPropertyPanel.cpp @@ -13,7 +13,6 @@ // ************************************************************************************************ #include "GUI/View/Setup/MaskEditorPropertyPanel.h" -#include "GUI/Model/Data/Data2DItem.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskContainerModel.h" #include "GUI/Model/Mask/MaskItems.h" @@ -23,18 +22,16 @@ #include "GUI/View/Tool/LayoutUtil.h" #include "GUI/View/Widget/GroupBoxes.h" #include <QCheckBox> -#include <QLineEdit> #include <QFormLayout> +#include <QLineEdit> #include <QListView> #include <QModelIndex> using std::function; -MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent) - : DataAccessWidget(parent) - , m_listView(new QListView) +MaskEditorPropertyPanel::MaskEditorPropertyPanel() + : m_listView(new QListView) , m_maskContainerModel(nullptr) - , m_data2DItem(nullptr) , m_currentMaskItem(nullptr) , m_inhibitSelectionChange(false) { @@ -65,11 +62,6 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent) m_maskPropertiesLayout->setContentsMargins(0, 0, 0, 0); } -void MaskEditorPropertyPanel::setJobOrDatafileItem(QObject* job_or_real_item) -{ - setBaseItem(job_or_real_item); -} - QSize MaskEditorPropertyPanel::sizeHint() const { return {128, 128}; @@ -95,7 +87,6 @@ void MaskEditorPropertyPanel::setContextMPP(MaskContainerModel* containerModel) void MaskEditorPropertyPanel::resetContextMPP() { m_maskContainerModel = nullptr; - m_data2DItem = nullptr; m_listView->setModel(nullptr); setCurrentMaskItem(nullptr); } diff --git a/GUI/View/Setup/MaskEditorPropertyPanel.h b/GUI/View/Setup/MaskEditorPropertyPanel.h index 6fb655b075a31f68a9a476a291d8db4f6f417381..e0853c3d9947fe50d523b7d9989ed695572d71ff 100644 --- a/GUI/View/Setup/MaskEditorPropertyPanel.h +++ b/GUI/View/Setup/MaskEditorPropertyPanel.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_SETUP_MASKEDITORPROPERTYPANEL_H #define BORNAGAIN_GUI_VIEW_SETUP_MASKEDITORPROPERTYPANEL_H -#include "GUI/View/Access/DataAccessWidget.h" +#include <QWidget> #include <functional> class Data2DItem; @@ -30,12 +30,10 @@ class RealLimits; //! Tool widget for MaskEditor -class MaskEditorPropertyPanel : public DataAccessWidget { +class MaskEditorPropertyPanel : public QWidget { Q_OBJECT public: - MaskEditorPropertyPanel(QWidget* parent = nullptr); - - void setJobOrDatafileItem(QObject* job_or_real_item) override; + MaskEditorPropertyPanel(); QSize sizeHint() const override; QSize minimumSizeHint() const override; @@ -73,7 +71,6 @@ private: QListView* m_listView; MaskContainerModel* m_maskContainerModel; - Data2DItem* m_data2DItem; QFormLayout* m_maskPropertiesLayout; MaskItem* m_currentMaskItem; //!< the mask item whose properties shall be edited bool m_inhibitSelectionChange = false; diff --git a/GUI/View/Tuning/SliderSettingsWidget.cpp b/GUI/View/Tuning/SliderSettingsWidget.cpp index 5954aba4e18362abf9c2aabf8977b06e23201e96..22ec53d55dc2debfd91464d1f3a810b8847e8b0d 100644 --- a/GUI/View/Tuning/SliderSettingsWidget.cpp +++ b/GUI/View/Tuning/SliderSettingsWidget.cpp @@ -16,8 +16,8 @@ #include "GUI/Model/Data/Data2DItem.h" #include "GUI/Model/Project/ProjectDocument.h" #include <QCheckBox> -#include <QRadioButton> #include <QLabel> +#include <QRadioButton> #include <QVBoxLayout> SliderSettingsWidget::SliderSettingsWidget()