diff --git a/Doc/graph/mask-classes.gv b/Doc/graph/mask-classes.gv index a2e1031188aed813de0a7cc48d065e094d06fb0e..8d1d8491910808aed972dd9c12afa063b4475d4e 100644 --- a/Doc/graph/mask-classes.gv +++ b/Doc/graph/mask-classes.gv @@ -3,68 +3,69 @@ digraph maskClasses { -node[shape = box]; + node[shape = box]; -MaskEditingFrame->MaskEditorActions; -MaskEditingFrame->MaskPanel; -MaskEditingFrame->MaskEditorCanvas; -MaskEditingFrame->MaskToolbox[style = dashed color = blue] + MaskEditingFrame->MaskEditorActions; + MaskEditingFrame->MaskPanel; + MaskEditingFrame->MaskEditorCanvas; + MaskEditingFrame + ->MaskToolbox[style = dashed color = blue] -MaskEditorActions->MaskListModel; + MaskEditorActions->MaskeditorListmodel; -MaskListModel->MaskContainerItem; + MaskeditorListmodel->MaskContainerItem; -MaskItem->OverlayItem[arrowhead = onormal color = chocolate4]; + MaskItem->OverlayItem[arrowhead = onormal color = chocolate4]; -EllipseItem->MaskItem[arrowhead = onormal color = chocolate4]; -EllipseItem->DoubleProperty; + EllipseItem->MaskItem[arrowhead = onormal color = chocolate4]; + EllipseItem->DoubleProperty; -MaskPanel->MaskListModel; -MaskPanel->MaskItem; -MaskPanel->DoubleSpinBox[style = dashed color = blue] -MaskPanel->EllipseItem[style = dotted color = magenta]; + MaskPanel->MaskeditorListmodel; + MaskPanel->MaskItem; + MaskPanel->DoubleSpinBox[style = dashed color = blue] MaskPanel + ->EllipseItem[style = dotted color = magenta]; -DoubleSpinBox->DoubleProperty; + DoubleSpinBox->DoubleProperty; -MaskEditorCanvas->MaskGraphicsScene; -MaskEditorCanvas->MaskGraphicsView; -MaskEditorCanvas->Data2DItem; -MaskEditorCanvas->MaskResultsPresenter; + MaskEditorCanvas->MaskGraphicsScene; + MaskEditorCanvas->MaskGraphicsView; + MaskEditorCanvas->Data2DItem; + MaskEditorCanvas->MaskResultsPresenter; -MaskGraphicsView->QGraphicsView[arrowhead = onormal color = chocolate4]; -MaskGraphicsView->MaskGraphicsScene; + MaskGraphicsView->QGraphicsView[arrowhead = onormal color = chocolate4]; + MaskGraphicsView->MaskGraphicsScene; -MaskGraphicsScene->QGraphicsScene[arrowhead = onormal color = chocolate4]; -MaskGraphicsScene->ColorMap; -MaskGraphicsScene->MaskListModel; -MaskGraphicsScene->IOverlay; -MaskGraphicsScene->MaskGraphicsProxy; -MaskGraphicsScene->Data2DItem; -MaskGraphicsScene->OverlayFactory[style = dashed color = blue]; + MaskGraphicsScene->QGraphicsScene[arrowhead = onormal color = chocolate4]; + MaskGraphicsScene->ColorMap; + MaskGraphicsScene->MaskeditorListmodel; + MaskGraphicsScene->IOverlay; + MaskGraphicsScene->MaskGraphicsProxy; + MaskGraphicsScene->Data2DItem; + MaskGraphicsScene->OverlayFactory[style = dashed color = blue]; -OverlayFactory->EllipseOverlay[style = dashed color = blue]; -OverlayFactory->EllipseItem[style = dotted color = magenta]; + OverlayFactory->EllipseOverlay[style = dashed color = blue]; + OverlayFactory->EllipseItem[style = dotted color = magenta]; -MaskGraphicsProxy->QGraphicsProxyWidget[arrowhead = onormal color = chocolate4]; -QGraphicsProxyWidget->QGraphicsWidget[arrowhead = onormal color = chocolate4]; -QGraphicsWidget->QGraphicsObject[arrowhead = onormal color = chocolate4]; -QGraphicsObject->QGraphicsItem[arrowhead = onormal color = chocolate4]; + MaskGraphicsProxy->QGraphicsProxyWidget[arrowhead = onormal color = chocolate4]; + QGraphicsProxyWidget->QGraphicsWidget[arrowhead = onormal color = chocolate4]; + QGraphicsWidget->QGraphicsObject[arrowhead = onormal color = chocolate4]; + QGraphicsObject->QGraphicsItem[arrowhead = onormal color = chocolate4]; -ColorMap->Data2DItem; + ColorMap->Data2DItem; -MaskResultsPresenter->Data2DItem; + MaskResultsPresenter->Data2DItem; -MaskToolbox->MaskEditorActions[style = dotted color = magenta]; + MaskToolbox->MaskEditorActions[style = dotted color = magenta]; #SpecularPlot->ScientificPlot[arrowhead = onormal]; -Data2DItem->MaskContainerItem; + Data2DItem->MaskContainerItem; -EllipseOverlay->EllipseItem; -EllipseOverlay->IRectangularOverlay[arrowhead = onormal color = chocolate4]; + EllipseOverlay->EllipseItem; + EllipseOverlay->IRectangularOverlay[arrowhead = onormal color = chocolate4]; -IRectangularOverlay->IMaskOverlay[arrowhead = onormal color = chocolate4]; -IMaskOverlay->IOverlay[arrowhead = onormal color = chocolate4]; + IRectangularOverlay->IMaskOverlay[arrowhead = onormal color = chocolate4]; + IMaskOverlay->IOverlay[arrowhead = onormal color = chocolate4]; -IOverlay->QGraphicsObject[arrowhead = onormal color = chocolate4]; + IOverlay->QGraphicsObject[arrowhead = onormal color = chocolate4]; } \ No newline at end of file diff --git a/GUI/Model/Data/Data2DItem.cpp b/GUI/Model/Data/Data2DItem.cpp index 0ae43aeaadf356d8c2b24e9affbb9e992c9db66d..39301a7f266db5ce98b0b044d487116b4bea7e62 100644 --- a/GUI/Model/Data/Data2DItem.cpp +++ b/GUI/Model/Data/Data2DItem.cpp @@ -19,7 +19,7 @@ #include "Device/Data/Datafield.h" #include "GUI/Model/Axis/AmplitudeAxisItem.h" #include "GUI/Model/Axis/BasicAxisItem.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Mask/ProjectionContainerItem.h" #include "GUI/Support/Style/QCP_Util.h" #include "GUI/Support/XML/UtilXML.h" @@ -357,10 +357,10 @@ const MaskContainerItem* Data2DItem::maskContainerItem() const return m_mask_model ? m_mask_model->maskContItem() : nullptr; } -MaskListModel* Data2DItem::getOrCreateMaskModel() +MaskeditorListmodel* Data2DItem::getOrCreateMaskModel() { if (!m_mask_model) - m_mask_model = std::make_unique<MaskListModel>(new MaskContainerItem); + m_mask_model = std::make_unique<MaskeditorListmodel>(new MaskContainerItem); return m_mask_model.get(); } @@ -375,10 +375,10 @@ const ProjectionContainerItem* Data2DItem::projectionContainerItem() const return m_proj_model ? m_proj_model->projnItem() : nullptr; } -MaskListModel* Data2DItem::getOrCreateProjectionModel() +MaskeditorListmodel* Data2DItem::getOrCreateProjectionModel() { if (!m_proj_model) - m_proj_model = std::make_unique<MaskListModel>(new ProjectionContainerItem); + m_proj_model = std::make_unique<MaskeditorListmodel>(new ProjectionContainerItem); return m_proj_model.get(); } diff --git a/GUI/Model/Data/Data2DItem.h b/GUI/Model/Data/Data2DItem.h index 39cacc70fc5d500f7ae919cf5347bedbc5a24c71..47e4119cc89220dc644fb02398288d29bf484bc8 100644 --- a/GUI/Model/Data/Data2DItem.h +++ b/GUI/Model/Data/Data2DItem.h @@ -20,7 +20,7 @@ class AmplitudeAxisItem; class LineItem; class MaskContainerItem; -class MaskListModel; +class MaskeditorListmodel; class ProjectionContainerItem; class QCPColorGradient; @@ -77,11 +77,11 @@ public: MaskContainerItem* maskContainerItem(); const MaskContainerItem* maskContainerItem() const; - MaskListModel* getOrCreateMaskModel(); + MaskeditorListmodel* getOrCreateMaskModel(); ProjectionContainerItem* projectionContainerItem(); const ProjectionContainerItem* projectionContainerItem() const; - MaskListModel* getOrCreateProjectionModel(); + MaskeditorListmodel* getOrCreateProjectionModel(); void clearMasks(); @@ -116,8 +116,8 @@ private: bool m_isInterpolated; ComboProperty m_gradient; std::unique_ptr<AmplitudeAxisItem> m_zAxis; - std::unique_ptr<MaskListModel> m_mask_model; - std::unique_ptr<MaskListModel> m_proj_model; + std::unique_ptr<MaskeditorListmodel> m_mask_model; + std::unique_ptr<MaskeditorListmodel> m_proj_model; }; #endif // BORNAGAIN_GUI_MODEL_DATA_DATA2DITEM_H diff --git a/GUI/Model/Mask/MaskListModel.cpp b/GUI/Model/Mask/MaskeditorListmodel.cpp similarity index 71% rename from GUI/Model/Mask/MaskListModel.cpp rename to GUI/Model/Mask/MaskeditorListmodel.cpp index 5faaeda241d0312665c48424980004a6f86ae993..3fb59abd450faef29539de6b7c974a36351eade8 100644 --- a/GUI/Model/Mask/MaskListModel.cpp +++ b/GUI/Model/Mask/MaskeditorListmodel.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Model/Mask/MaskListModel.cpp -//! @brief Implements class MaskListModel. +//! @file GUI/Model/Mask/MaskeditorListmodel.cpp +//! @brief Implements class MaskeditorListmodel. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,25 +12,25 @@ // // ************************************************************************************************ -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "Base/Util/Assert.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskItems.h" #include "GUI/Model/Mask/ProjectionContainerItem.h" -// Implementation of MaskListModel is based on the Qt source code for QStringListModel +// Implementation of MaskeditorListmodel is based on the Qt source code for QStringListModel -MaskListModel::MaskListModel(MaskContainerItem* item) +MaskeditorListmodel::MaskeditorListmodel(MaskContainerItem* item) : m_mask_container_item(item) , m_selection_model(new QItemSelectionModel(this)) { } -MaskListModel::~MaskListModel() = default; +MaskeditorListmodel::~MaskeditorListmodel() = default; // Begin overridden methods from QAbstractListModel -int MaskListModel::rowCount(const QModelIndex& parent) const +int MaskeditorListmodel::rowCount(const QModelIndex& parent) const { if (parent.isValid()) return 0; @@ -38,7 +38,7 @@ int MaskListModel::rowCount(const QModelIndex& parent) const return m_mask_container_item->size(); } -QVariant MaskListModel::data(const QModelIndex& index, int role) const +QVariant MaskeditorListmodel::data(const QModelIndex& index, int role) const { const qsizetype row = index.row(); @@ -53,7 +53,7 @@ QVariant MaskListModel::data(const QModelIndex& index, int role) const // End overridden methods from QAbstractListModel -void MaskListModel::insertMask(int row, MaskItem* item) +void MaskeditorListmodel::insertMask(int row, MaskItem* item) { QAbstractListModel::beginInsertRows(m_mask_container_item->rootIndex, row, row); m_mask_container_item->insertMask(row, item); @@ -61,7 +61,7 @@ void MaskListModel::insertMask(int row, MaskItem* item) } //! Move mask to a given row -void MaskListModel::moveMask(int from_row, int to_row) +void MaskeditorListmodel::moveMask(int from_row, int to_row) { emit QAbstractListModel::beginMoveRows(m_mask_container_item->rootIndex, from_row, from_row, m_mask_container_item->rootIndex, to_row); @@ -69,20 +69,20 @@ void MaskListModel::moveMask(int from_row, int to_row) emit QAbstractListModel::endMoveRows(); } -void MaskListModel::removeMaskAt(int row) +void MaskeditorListmodel::removeMaskAt(int row) { QAbstractListModel::beginRemoveRows(m_mask_container_item->rootIndex, row, row); m_mask_container_item->removeMaskAt(row); QAbstractListModel::endRemoveRows(); } -void MaskListModel::removeMask(MaskItem* item) +void MaskeditorListmodel::removeMask(MaskItem* item) { const int row = m_mask_container_item->indexOfItem(item); removeMaskAt(row); } -QModelIndex MaskListModel::indexOfItem(const OverlayItem* item) const +QModelIndex MaskeditorListmodel::indexOfItem(const OverlayItem* item) const { if (const auto* ii = dynamic_cast<const MaskItem*>(item)) { const int row = m_mask_container_item->indexOfItem(ii); @@ -91,7 +91,7 @@ QModelIndex MaskListModel::indexOfItem(const OverlayItem* item) const return {}; } -MaskItem* MaskListModel::itemForIndex(const QModelIndex& index) const +MaskItem* MaskeditorListmodel::itemForIndex(const QModelIndex& index) const { if (index.isValid()) return m_mask_container_item->at(index.row()); @@ -99,19 +99,19 @@ MaskItem* MaskListModel::itemForIndex(const QModelIndex& index) const return nullptr; } -void MaskListModel::clear() +void MaskeditorListmodel::clear() { QAbstractListModel::beginResetModel(); m_mask_container_item->clear(); QAbstractListModel::endResetModel(); } -ProjectionContainerItem* MaskListModel::projnItem() +ProjectionContainerItem* MaskeditorListmodel::projnItem() { return dynamic_cast<ProjectionContainerItem*>(m_mask_container_item); } -const ProjectionContainerItem* MaskListModel::projnItem() const +const ProjectionContainerItem* MaskeditorListmodel::projnItem() const { return dynamic_cast<const ProjectionContainerItem*>(m_mask_container_item); } diff --git a/GUI/Model/Mask/MaskListModel.h b/GUI/Model/Mask/MaskeditorListmodel.h similarity index 82% rename from GUI/Model/Mask/MaskListModel.h rename to GUI/Model/Mask/MaskeditorListmodel.h index 6d426faf632574d0be08ad55c92a884df14addbb..deaa1d19b195321ece8b80a6d5f892b551e3e6ed 100644 --- a/GUI/Model/Mask/MaskListModel.h +++ b/GUI/Model/Mask/MaskeditorListmodel.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/Model/Mask/MaskListModel.h -//! @brief Defines class MaskListModel. +//! @file GUI/Model/Mask/MaskeditorListmodel.h +//! @brief Defines class MaskeditorListmodel. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_MODEL_MASK_MASKLISTMODEL_H -#define BORNAGAIN_GUI_MODEL_MASK_MASKLISTMODEL_H +#ifndef BORNAGAIN_GUI_MODEL_MASK_MASKEDITORLISTMODEL_H +#define BORNAGAIN_GUI_MODEL_MASK_MASKEDITORLISTMODEL_H #include <QAbstractListModel> #include <QItemSelectionModel> @@ -29,11 +29,11 @@ class RegionOfInterestItem; //! Provides interfaces to a MaskContainerItem, allowing its contents to be displayed and modified //! using the Qt mechanisms. -class MaskListModel : public QAbstractListModel { +class MaskeditorListmodel : public QAbstractListModel { Q_OBJECT public: - MaskListModel(MaskContainerItem* item); - ~MaskListModel(); + MaskeditorListmodel(MaskContainerItem* item); + ~MaskeditorListmodel(); //... Override functions from QAbstractListModel @@ -67,4 +67,4 @@ private: std::unique_ptr<QItemSelectionModel> m_selection_model; }; -#endif // BORNAGAIN_GUI_MODEL_MASK_MASKLISTMODEL_H +#endif // BORNAGAIN_GUI_MODEL_MASK_MASKEDITORLISTMODEL_H diff --git a/GUI/View/Canvas/MaskEditorActions.cpp b/GUI/View/Canvas/MaskEditorActions.cpp index af7bef2e8aa6a3470c09f7761d4e888c0df746ac..dd2be87e7dfc818023e0e937ed5285ddec289e2a 100644 --- a/GUI/View/Canvas/MaskEditorActions.cpp +++ b/GUI/View/Canvas/MaskEditorActions.cpp @@ -15,7 +15,7 @@ #include "GUI/View/Canvas/MaskEditorActions.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Tool/ActionFactory.h" @@ -64,7 +64,7 @@ MaskEditorActions::MaskEditorActions(QWidget* parent) &MaskEditorActions::propertyPanelRequest); } -void MaskEditorActions::setModels(MaskListModel* mask_list_model, +void MaskEditorActions::setModels(MaskeditorListmodel* mask_list_model, QItemSelectionModel* selectionModel) { ASSERT(mask_list_model); diff --git a/GUI/View/Canvas/MaskEditorActions.h b/GUI/View/Canvas/MaskEditorActions.h index 317eafb60133da15e05e40d7984d61dafad3b6e2..82e0c724141a5a233229a89980424cfff3d9e89b 100644 --- a/GUI/View/Canvas/MaskEditorActions.h +++ b/GUI/View/Canvas/MaskEditorActions.h @@ -23,7 +23,7 @@ #include <QModelIndex> #include <QObject> -class MaskListModel; +class MaskeditorListmodel; //! Defines actions for MaskEditor which are related to selected MaskItem (toggle mask value, //! lower/rize mask in the stack, delete mask). If more than one MaskItem is selected, @@ -34,7 +34,7 @@ class MaskEditorActions : public QObject { public: MaskEditorActions(QWidget* parent); - void setModels(MaskListModel* mask_list_model, QItemSelectionModel* selectionModel); + void setModels(MaskeditorListmodel* mask_list_model, QItemSelectionModel* selectionModel); QAction* sendToBackAction() { return m_sendToBackAction; } QAction* bringToFrontAction() { return m_bringToFrontAction; } @@ -69,7 +69,7 @@ private: QAction* m_savePlotAction; QAction* m_togglePanelAction; - MaskListModel* m_mask_list_model; + MaskeditorListmodel* m_mask_list_model; QItemSelectionModel* m_selectionModel; }; diff --git a/GUI/View/Canvas/ProjectionsEditorCanvas.cpp b/GUI/View/Canvas/ProjectionsEditorCanvas.cpp index b644f7a141009d87b02115acafc19cef437508a7..799ba8632ff7d6cb62c290f228a7416112060db3 100644 --- a/GUI/View/Canvas/ProjectionsEditorCanvas.cpp +++ b/GUI/View/Canvas/ProjectionsEditorCanvas.cpp @@ -15,7 +15,7 @@ #include "GUI/View/Canvas/ProjectionsEditorCanvas.h" #include "GUI/Model/Data/Data2DItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Mask/ProjectionContainerItem.h" #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Plotter/ColorMap.h" @@ -55,7 +55,7 @@ ProjectionsEditorCanvas::~ProjectionsEditorCanvas() = default; void ProjectionsEditorCanvas::updateProjsCanvas(Data2DItem* data2DItem) { - MaskListModel* mask_list_model = data2DItem->getOrCreateProjectionModel(); + MaskeditorListmodel* mask_list_model = data2DItem->getOrCreateProjectionModel(); ASSERT(mask_list_model); m_scene->associateItems(data2DItem, mask_list_model, mask_list_model->maskSelectionModel()); diff --git a/GUI/View/Frame/MaskEditingFrame.cpp b/GUI/View/Frame/MaskEditingFrame.cpp index 146045d027d5cfbf53a05fe41476a72518b2911b..045b9191b5abe918128ace4140b00c8033b90430 100644 --- a/GUI/View/Frame/MaskEditingFrame.cpp +++ b/GUI/View/Frame/MaskEditingFrame.cpp @@ -15,7 +15,7 @@ #include "GUI/View/Frame/MaskEditingFrame.h" #include "GUI/Model/Data/Data2DItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/View/Canvas/MaskEditorActions.h" #include "GUI/View/Canvas/MaskEditorCanvas.h" #include "GUI/View/Canvas/MaskToolbox.h" @@ -119,7 +119,7 @@ void MaskEditingFrame::updateMaskFrame() { ASSERT(currentData2DItem()); - MaskListModel* mask_list_model = currentData2DItem()->getOrCreateMaskModel(); + MaskeditorListmodel* mask_list_model = currentData2DItem()->getOrCreateMaskModel(); ASSERT(mask_list_model); m_panel->updateMaskPanel(mask_list_model); diff --git a/GUI/View/Scene/MaskGraphicsScene.cpp b/GUI/View/Scene/MaskGraphicsScene.cpp index 1f6212a38fe141eb7b01a19dd29ebbe1a68315c0..3c9eaa5c3b8dadfca7e62d6eacd3e962b5b11035 100644 --- a/GUI/View/Scene/MaskGraphicsScene.cpp +++ b/GUI/View/Scene/MaskGraphicsScene.cpp @@ -16,7 +16,7 @@ #include "GUI/Model/Data/Data2DItem.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Mask/PointItem.h" #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Overlay/LineOverlays.h" @@ -68,7 +68,7 @@ MaskGraphicsScene::MaskGraphicsScene() MaskGraphicsScene::~MaskGraphicsScene() = default; -void MaskGraphicsScene::associateItems(Data2DItem* data_item, MaskListModel* mask_list_model, +void MaskGraphicsScene::associateItems(Data2DItem* data_item, MaskeditorListmodel* mask_list_model, QItemSelectionModel* selectionModel) { ASSERT(selectionModel); diff --git a/GUI/View/Scene/MaskGraphicsScene.h b/GUI/View/Scene/MaskGraphicsScene.h index c1ce917d086240ca5fad245197ce072b6c9d6d2a..96b94ff0cc1a9c324315e68cec730ad093870ee0 100644 --- a/GUI/View/Scene/MaskGraphicsScene.h +++ b/GUI/View/Scene/MaskGraphicsScene.h @@ -28,7 +28,7 @@ class LineItem; class MaskEditorAction; class MaskGraphicsProxy; class MaskItem; -class MaskListModel; +class MaskeditorListmodel; class OverlayItem; class PolygonOverlay; @@ -40,7 +40,7 @@ public: MaskGraphicsScene(); ~MaskGraphicsScene() override; - void associateItems(Data2DItem* data_item, MaskListModel* mask_list_model, + void associateItems(Data2DItem* data_item, MaskeditorListmodel* mask_list_model, QItemSelectionModel* selectionModel); void dissociateItems(); void updateSize(const QSize& newSize); @@ -98,7 +98,7 @@ private: PolygonOverlay* currentPolygon() const; ColorMap* m_plot; - MaskListModel* m_mask_list_model = nullptr; + MaskeditorListmodel* m_mask_list_model = nullptr; QItemSelectionModel* m_selection_model = nullptr; QMap<const OverlayItem*, IOverlay*> m_mask2overlay; MaskGraphicsProxy* m_proxy = nullptr; diff --git a/GUI/View/Setup/MaskPanel.cpp b/GUI/View/Setup/MaskPanel.cpp index 189851e4233cce2f46e554af65b407318d477515..ea2e1481b43af7e44fb78801b83759e2caf17337 100644 --- a/GUI/View/Setup/MaskPanel.cpp +++ b/GUI/View/Setup/MaskPanel.cpp @@ -16,7 +16,7 @@ #include "Fit/Param/RealLimits.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Numeric/DoubleSpinBox.h" #include "GUI/View/Tool/LayoutUtil.h" @@ -83,7 +83,7 @@ QSize MaskPanel::minimumSizeHint() const return {128, 128}; } -void MaskPanel::updateMaskPanel(MaskListModel* mask_list_model) +void MaskPanel::updateMaskPanel(MaskeditorListmodel* mask_list_model) { m_mask_list_model = mask_list_model; diff --git a/GUI/View/Setup/MaskPanel.h b/GUI/View/Setup/MaskPanel.h index b0f56bd457fb675a8ec41a64c0ffdab6de15ca1a..83af012709cb021acee0d699468e5438f6806aed 100644 --- a/GUI/View/Setup/MaskPanel.h +++ b/GUI/View/Setup/MaskPanel.h @@ -25,7 +25,7 @@ class Data2DItem; class MaskItem; -class MaskListModel; +class MaskeditorListmodel; //! Panel with list of masks and parameter editor for one selected mask. @@ -37,7 +37,7 @@ public: QSize sizeHint() const override; QSize minimumSizeHint() const override; - void updateMaskPanel(MaskListModel* mask_list_model); + void updateMaskPanel(MaskeditorListmodel* mask_list_model); void resetMaskPanel(); void setPanelHidden(bool hidden); @@ -59,7 +59,7 @@ private: std::function<void(bool)> setter); QListView* m_listView; - MaskListModel* m_mask_list_model; + MaskeditorListmodel* m_mask_list_model; QFormLayout* m_editor_layout; MaskItem* m_currentMaskItem; //!< the mask item whose properties shall be edited bool m_inhibitSelectionChange = false; diff --git a/GUI/View/Setup/ProjectionActions.cpp b/GUI/View/Setup/ProjectionActions.cpp index 26e4670f6e022fe2d3a40313659c1b9b72b2e0fd..4d002232315d2050f65db6120628d2b3d76eb171 100644 --- a/GUI/View/Setup/ProjectionActions.cpp +++ b/GUI/View/Setup/ProjectionActions.cpp @@ -14,7 +14,7 @@ #include "GUI/View/Setup/ProjectionActions.h" #include "GUI/Model/Data/Data2DItem.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Mask/ProjectionContainerItem.h" #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Setup/ProjectionsSaver.h" diff --git a/GUI/View/Setup/ProjectionActions.h b/GUI/View/Setup/ProjectionActions.h index c95cc0ea35c869d5851232599d96db1e16ae0cdc..5b5e8259b46becb7e30213f2d0da4e50da6f3d36 100644 --- a/GUI/View/Setup/ProjectionActions.h +++ b/GUI/View/Setup/ProjectionActions.h @@ -18,7 +18,7 @@ #include <QAction> class Data2DItem; -class MaskListModel; +class MaskeditorListmodel; class ProjectionContainerItem; //! Provides various actions for ProjectionsEditor. @@ -44,7 +44,7 @@ private: QAction* m_resetViewAction; QAction* m_togglePanelAction; QAction* m_deleteAction; - MaskListModel* m_mask_list_model; + MaskeditorListmodel* m_mask_list_model; Data2DItem* m_data2DItem; QWidget* m_parent; }; diff --git a/Tests/Unit/GUI/TestJobModel.cpp b/Tests/Unit/GUI/TestJobModel.cpp index 5962eed3c869b613f5a6c2175a6a34adf1324afd..594c5ac62031719d8a3cce7159916558bd3525a1 100644 --- a/Tests/Unit/GUI/TestJobModel.cpp +++ b/Tests/Unit/GUI/TestJobModel.cpp @@ -9,7 +9,7 @@ #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Mask/MaskContainerItem.h" #include "GUI/Model/Mask/MaskItems.h" -#include "GUI/Model/Mask/MaskListModel.h" +#include "GUI/Model/Mask/MaskeditorListmodel.h" #include "GUI/Model/Model/JobModel.h" #include "Tests/GTestWrapper/google_test.h" #include "Tests/Unit/GUI/Utils.h"