From 96d6c4006cea7704b1a7239b8a17bf4c0cb6f8f6 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de>
Date: Thu, 7 Dec 2023 10:47:37 +0100
Subject: [PATCH] rnm MaskRoot --> MaskObject

---
 GUI/Model/Data/Data2DItem.h                   |  6 +++---
 GUI/Model/Mask/MaskContainerItem.h            |  4 ++--
 GUI/Model/Mask/MaskContainerModel.cpp         |  2 +-
 GUI/Model/Mask/MaskContainerModel.h           |  4 ++--
 GUI/Model/Mask/MaskItems.h                    |  6 +++---
 .../Mask/{MaskRoot.cpp => MaskObject.cpp}     | 10 +++++-----
 GUI/Model/Mask/{MaskRoot.h => MaskObject.h}   | 20 +++++++++----------
 GUI/View/Canvas/ProjectionsEditorCanvas.cpp   |  2 +-
 GUI/View/Canvas/ProjectionsEditorCanvas.h     |  4 ++--
 GUI/View/Plotter/ProjectionsPlot.cpp          |  6 +++---
 GUI/View/Plotter/ProjectionsPlot.h            | 10 +++++-----
 GUI/View/Scene/MaskGraphicsScene.cpp          | 16 +++++++--------
 GUI/View/Scene/MaskGraphicsScene.h            | 14 ++++++-------
 GUI/View/Scene/MaskViewFactory.cpp            |  2 +-
 GUI/View/Scene/MaskViewFactory.h              |  4 ++--
 GUI/View/Setup/ProjectionsSaver.cpp           |  4 ++--
 GUI/View/Shape/AllMasksDisplay.cpp            |  2 +-
 GUI/View/Shape/AllMasksDisplay.h              |  2 +-
 GUI/View/Shape/EllipseDisplay.cpp             |  2 +-
 GUI/View/Shape/EllipseDisplay.h               |  2 +-
 GUI/View/Shape/IShapeDisplay.cpp              |  8 ++++----
 GUI/View/Shape/IShapeDisplay.h                |  6 +++---
 GUI/View/Shape/LineDisplays.cpp               |  4 ++--
 GUI/View/Shape/LineDisplays.h                 |  4 ++--
 GUI/View/Shape/MaskContainerDisplay.cpp       |  2 +-
 GUI/View/Shape/MaskContainerDisplay.h         |  2 +-
 GUI/View/Shape/PolygonDisplay.cpp             |  2 +-
 GUI/View/Shape/PolygonDisplay.h               |  2 +-
 GUI/View/Shape/PolygonPointDisplay.cpp        |  2 +-
 GUI/View/Shape/PolygonPointDisplay.h          |  2 +-
 GUI/View/Shape/RectangleBaseDisplay.cpp       |  2 +-
 GUI/View/Shape/RectangleBaseDisplay.h         |  2 +-
 GUI/View/Shape/RectangleDisplay.cpp           |  2 +-
 GUI/View/Shape/RectangleDisplay.h             |  2 +-
 34 files changed, 82 insertions(+), 82 deletions(-)
 rename GUI/Model/Mask/{MaskRoot.cpp => MaskObject.cpp} (74%)
 rename GUI/Model/Mask/{MaskRoot.h => MaskObject.h} (59%)

diff --git a/GUI/Model/Data/Data2DItem.h b/GUI/Model/Data/Data2DItem.h
index f57cb491487..6ddd915207a 100644
--- a/GUI/Model/Data/Data2DItem.h
+++ b/GUI/Model/Data/Data2DItem.h
@@ -20,7 +20,7 @@
 class AmplitudeAxisItem;
 class MaskContainerItem;
 class MaskContainerModel;
-class MaskRoot;
+class MaskObject;
 class ProjectionContainerItem;
 class QCPColorGradient;
 
@@ -104,8 +104,8 @@ signals:
     void gradientChanged();
     void interpolationChanged(bool isInterpol);
     void projectionCreated();
-    void projectionPositionChanged(MaskRoot* projection);
-    void projectionGone(MaskRoot* projection);
+    void projectionPositionChanged(MaskObject* projection);
+    void projectionGone(MaskObject* projection);
     void alignRanges();
 
 private:
diff --git a/GUI/Model/Mask/MaskContainerItem.h b/GUI/Model/Mask/MaskContainerItem.h
index 131cc0198e8..1e5ea8ef5d4 100644
--- a/GUI/Model/Mask/MaskContainerItem.h
+++ b/GUI/Model/Mask/MaskContainerItem.h
@@ -17,7 +17,7 @@
 
 #include "GUI/Model/Descriptor/SelectionProperty.h"
 #include "GUI/Model/Mask/MaskItemCatalog.h"
-#include "GUI/Model/Mask/MaskRoot.h"
+#include "GUI/Model/Mask/MaskObject.h"
 #include <QModelIndex>
 
 class MaskContainerModel;
@@ -27,7 +27,7 @@ class RegionOfInterestItem;
 
 //! Container holding various masks as children
 
-class MaskContainerItem : public MaskRoot {
+class MaskContainerItem : public MaskObject {
 public:
     MaskContainerItem();
     ~MaskContainerItem();
diff --git a/GUI/Model/Mask/MaskContainerModel.cpp b/GUI/Model/Mask/MaskContainerModel.cpp
index db4628b5fbc..a78c60acb5a 100644
--- a/GUI/Model/Mask/MaskContainerModel.cpp
+++ b/GUI/Model/Mask/MaskContainerModel.cpp
@@ -82,7 +82,7 @@ void MaskContainerModel::removeMask(MaskItem* item)
     removeMaskAt(row);
 }
 
-QModelIndex MaskContainerModel::indexOfItem(const MaskRoot* item) const
+QModelIndex MaskContainerModel::indexOfItem(const MaskObject* item) const
 {
     if (const auto* ii = dynamic_cast<const MaskItem*>(item)) {
         const int row = m_maskContItem->indexOfItem(ii);
diff --git a/GUI/Model/Mask/MaskContainerModel.h b/GUI/Model/Mask/MaskContainerModel.h
index a7f12aaf117..bd50687b459 100644
--- a/GUI/Model/Mask/MaskContainerModel.h
+++ b/GUI/Model/Mask/MaskContainerModel.h
@@ -22,7 +22,7 @@
 
 class MaskContainerItem;
 class MaskItem;
-class MaskRoot;
+class MaskObject;
 class ProjectionContainerItem;
 class RegionOfInterestItem;
 
@@ -52,7 +52,7 @@ public:
     void moveMask(int from_row, int to_row);
     void removeMaskAt(int row);
 
-    QModelIndex indexOfItem(const MaskRoot* item) const; // TODO: change this to MaskItem*
+    QModelIndex indexOfItem(const MaskObject* item) const; // TODO: change this to MaskItem*
     MaskItem* itemForIndex(const QModelIndex& index) const;
 
     QItemSelectionModel* maskSelectionModel() { return m_selectionModel.get(); }
diff --git a/GUI/Model/Mask/MaskItems.h b/GUI/Model/Mask/MaskItems.h
index 8cb95708bcd..497b2b1b001 100644
--- a/GUI/Model/Mask/MaskItems.h
+++ b/GUI/Model/Mask/MaskItems.h
@@ -17,13 +17,13 @@
 
 #include "Base/Types/OwningVector.h"
 #include "GUI/Model/Descriptor/SelectionProperty.h"
-#include "GUI/Model/Mask/MaskRoot.h"
+#include "GUI/Model/Mask/MaskObject.h"
 
 class IShape2D;
 
 //! A base class for mask items that describe one specific shape.
 
-class MaskItem : public MaskRoot {
+class MaskItem : public MaskObject {
 public:
     ~MaskItem() override;
 
@@ -85,7 +85,7 @@ public:
     std::unique_ptr<IShape2D> createShape() const override;
 };
 
-class PolygonPointItem : public MaskRoot {
+class PolygonPointItem : public MaskObject {
 public:
     static constexpr auto M_TYPE{"PolygonPoint"};
 
diff --git a/GUI/Model/Mask/MaskRoot.cpp b/GUI/Model/Mask/MaskObject.cpp
similarity index 74%
rename from GUI/Model/Mask/MaskRoot.cpp
rename to GUI/Model/Mask/MaskObject.cpp
index b489f26feee..0ca46027c6d 100644
--- a/GUI/Model/Mask/MaskRoot.cpp
+++ b/GUI/Model/Mask/MaskObject.cpp
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Model/Mask/MaskRoot.cpp
-//! @brief     Implements class MaskRoot.
+//! @file      GUI/Model/Mask/MaskObject.cpp
+//! @brief     Implements class MaskObject.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Model/Mask/MaskRoot.h"
+#include "GUI/Model/Mask/MaskObject.h"
 
-MaskRoot::MaskRoot() = default;
+MaskObject::MaskObject() = default;
 
-MaskRoot::~MaskRoot()
+MaskObject::~MaskObject()
 {
     emit maskToBeDestroyed(this);
 }
diff --git a/GUI/Model/Mask/MaskRoot.h b/GUI/Model/Mask/MaskObject.h
similarity index 59%
rename from GUI/Model/Mask/MaskRoot.h
rename to GUI/Model/Mask/MaskObject.h
index 0b53fc5e106..a9d27b7f6d8 100644
--- a/GUI/Model/Mask/MaskRoot.h
+++ b/GUI/Model/Mask/MaskObject.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Model/Mask/MaskRoot.h
-//! @brief     Defines class MaskRoot.
+//! @file      GUI/Model/Mask/MaskObject.h
+//! @brief     Defines class MaskObject.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,23 +12,23 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODEL_MASK_MASKROOT_H
-#define BORNAGAIN_GUI_MODEL_MASK_MASKROOT_H
+#ifndef BORNAGAIN_GUI_MODEL_MASK_MASKOBJECT_H
+#define BORNAGAIN_GUI_MODEL_MASK_MASKOBJECT_H
 
 #include <QObject>
 
 //! QObject with signals used in masks
 
-class MaskRoot : public QObject {
+class MaskObject : public QObject {
     Q_OBJECT
 public:
-    explicit MaskRoot();
-    virtual ~MaskRoot();
+    explicit MaskObject();
+    virtual ~MaskObject();
 
 signals:
-    void maskGeometryChanged(MaskRoot* sender = nullptr);
+    void maskGeometryChanged(MaskObject* sender = nullptr);
     void maskVisibilityChanged();
-    void maskToBeDestroyed(MaskRoot* sender = nullptr);
+    void maskToBeDestroyed(MaskObject* sender = nullptr);
 };
 
-#endif // BORNAGAIN_GUI_MODEL_MASK_MASKROOT_H
+#endif // BORNAGAIN_GUI_MODEL_MASK_MASKOBJECT_H
diff --git a/GUI/View/Canvas/ProjectionsEditorCanvas.cpp b/GUI/View/Canvas/ProjectionsEditorCanvas.cpp
index c2bba349db2..aa520158624 100644
--- a/GUI/View/Canvas/ProjectionsEditorCanvas.cpp
+++ b/GUI/View/Canvas/ProjectionsEditorCanvas.cpp
@@ -157,7 +157,7 @@ void ProjectionsEditorCanvas::onActivityChanged(MaskEditorFlags::Activity value)
     onLeavingColorMap();
 }
 
-void ProjectionsEditorCanvas::onLineItemMoved(MaskRoot* sender)
+void ProjectionsEditorCanvas::onLineItemMoved(MaskObject* sender)
 {
     if (dynamic_cast<HorizontalLineItem*>(sender)
         && (m_currentActivity != MaskEditorFlags::VERTICAL_LINE_MODE))
diff --git a/GUI/View/Canvas/ProjectionsEditorCanvas.h b/GUI/View/Canvas/ProjectionsEditorCanvas.h
index 83867f7fbb9..c1776e28ebe 100644
--- a/GUI/View/Canvas/ProjectionsEditorCanvas.h
+++ b/GUI/View/Canvas/ProjectionsEditorCanvas.h
@@ -24,7 +24,7 @@ class Data2DItem;
 class MaskGraphicsScene;
 class MaskGraphicsView;
 class MaskItem;
-class MaskRoot;
+class MaskObject;
 class PlotStatusLabel;
 
 //! Holds a graphics scene to draw projections on top of ColorMap. Being a part
@@ -56,7 +56,7 @@ public slots:
     void onActivityChanged(MaskEditorFlags::Activity value);
 
 private:
-    void onLineItemMoved(MaskRoot* sender);
+    void onLineItemMoved(MaskObject* sender);
     void setColorMap(ColorMap* colorMap);
     void setConnected(bool isConnected);
 
diff --git a/GUI/View/Plotter/ProjectionsPlot.cpp b/GUI/View/Plotter/ProjectionsPlot.cpp
index 869a4a40791..302d2ce4812 100644
--- a/GUI/View/Plotter/ProjectionsPlot.cpp
+++ b/GUI/View/Plotter/ProjectionsPlot.cpp
@@ -139,7 +139,7 @@ bool ProjectionsPlot::isCorrectProjectionType(MaskItem* item)
     return dynamic_cast<VerticalLineItem*>(item);
 }
 
-QCPGraph* ProjectionsPlot::graphForItem(MaskRoot* item)
+QCPGraph* ProjectionsPlot::graphForItem(MaskObject* item)
 {
     if (!m_data2DItem)
         return nullptr;
@@ -186,7 +186,7 @@ void ProjectionsPlot::updateProjections()
     replot();
 }
 
-void ProjectionsPlot::onProjectionPropertyChanged(MaskRoot* item)
+void ProjectionsPlot::onProjectionPropertyChanged(MaskObject* item)
 {
     auto* projection = dynamic_cast<MaskItem*>(item);
     if (!projection)
@@ -225,7 +225,7 @@ void ProjectionsPlot::updateAxesTitle()
 
 //! Removes plot corresponding to given projection item.
 
-void ProjectionsPlot::clearProjection(MaskRoot* item)
+void ProjectionsPlot::clearProjection(MaskObject* item)
 {
     if (auto* graph = graphForItem(item)) {
         m_plot->removePlottable(graph);
diff --git a/GUI/View/Plotter/ProjectionsPlot.h b/GUI/View/Plotter/ProjectionsPlot.h
index a02b27a0207..001144984fc 100644
--- a/GUI/View/Plotter/ProjectionsPlot.h
+++ b/GUI/View/Plotter/ProjectionsPlot.h
@@ -22,7 +22,7 @@
 class Data2DItem;
 class Datafield;
 class MaskItem;
-class MaskRoot;
+class MaskObject;
 class QCPGraph;
 class QCustomPlot;
 
@@ -43,14 +43,14 @@ public slots:
 
 private:
     bool isCorrectProjectionType(MaskItem* item);
-    QCPGraph* graphForItem(MaskRoot* item);
+    QCPGraph* graphForItem(MaskObject* item);
 
     void updateProjectionsData();
     void updateProjections();
-    void onProjectionPropertyChanged(MaskRoot* item);
+    void onProjectionPropertyChanged(MaskObject* item);
     void updateAxesRange();
     void updateAxesTitle();
-    void clearProjection(MaskRoot* item);
+    void clearProjection(MaskObject* item);
     void clearAll();
 
     void setGraphFromItem(QCPGraph* graph, MaskItem* item);
@@ -63,7 +63,7 @@ private:
     Data2DItem* m_data2DItem = nullptr;
     const Qt::Orientation m_orientation;
     QCustomPlot* m_plot;
-    QMap<MaskRoot*, QCPGraph*> m_item_to_graph;
+    QMap<MaskObject*, QCPGraph*> m_item_to_graph;
 };
 
 #endif // BORNAGAIN_GUI_VIEW_PLOTTER_PROJECTIONSPLOT_H
diff --git a/GUI/View/Scene/MaskGraphicsScene.cpp b/GUI/View/Scene/MaskGraphicsScene.cpp
index 0caac8928b3..c578a2d32b7 100644
--- a/GUI/View/Scene/MaskGraphicsScene.cpp
+++ b/GUI/View/Scene/MaskGraphicsScene.cpp
@@ -399,7 +399,7 @@ void MaskGraphicsScene::updateViews()
 
 //! Creates a view for given item.
 
-IShapeDisplay* MaskGraphicsScene::addViewForItem(MaskRoot* item)
+IShapeDisplay* MaskGraphicsScene::addViewForItem(MaskObject* item)
 {
     ASSERT(item);
     subscribeMaskItem(item);
@@ -416,7 +416,7 @@ IShapeDisplay* MaskGraphicsScene::addViewForItem(MaskRoot* item)
 
 //! Removes single view from scene.
 
-void MaskGraphicsScene::removeItemViewFromScene(MaskRoot* item)
+void MaskGraphicsScene::removeItemViewFromScene(MaskObject* item)
 {
     if (auto it = m_ItemToView.find(item); it != m_ItemToView.end()) {
         // at first, delete views for the points of the PolygonItem
@@ -495,7 +495,7 @@ bool MaskGraphicsScene::isValidForRectangleShapeDrawing(QGraphicsSceneMouseEvent
         return false;
     if (m_activity == MaskEditorFlags::ROI_MODE)
         // only one ROI is allowed
-        for (MaskRoot* item : m_ItemToView.keys())
+        for (MaskObject* item : m_ItemToView.keys())
             if (dynamic_cast<RegionOfInterestItem*>(item))
                 return false;
     return true;
@@ -537,7 +537,7 @@ bool MaskGraphicsScene::isValidForMaskAllDrawing(QGraphicsSceneMouseEvent*) cons
     if (m_activity != MaskEditorFlags::MASKALL_MODE)
         return false;
 
-    for (MaskRoot* item : m_ItemToView.keys())
+    for (MaskObject* item : m_ItemToView.keys())
         if (dynamic_cast<MaskAllItem*>(item))
             return false;
     return true;
@@ -739,16 +739,16 @@ void MaskGraphicsScene::processMaskAllItem(QGraphicsSceneMouseEvent* event)
     setDrawingInProgress(false);
 }
 
-void MaskGraphicsScene::subscribeMaskItem(MaskRoot* item)
+void MaskGraphicsScene::subscribeMaskItem(MaskObject* item)
 {
     if (!item)
         return;
 
-    connect(item, &MaskRoot::maskGeometryChanged, this, &MaskGraphicsScene::lineItemMoved,
+    connect(item, &MaskObject::maskGeometryChanged, this, &MaskGraphicsScene::lineItemMoved,
             Qt::UniqueConnection);
-    connect(item, &MaskRoot::maskGeometryChanged, this, &MaskGraphicsScene::onMaskMove,
+    connect(item, &MaskObject::maskGeometryChanged, this, &MaskGraphicsScene::onMaskMove,
             Qt::UniqueConnection);
-    connect(item, &MaskRoot::maskToBeDestroyed, this, &MaskGraphicsScene::lineItemDeleted,
+    connect(item, &MaskObject::maskToBeDestroyed, this, &MaskGraphicsScene::lineItemDeleted,
             Qt::UniqueConnection);
 }
 
diff --git a/GUI/View/Scene/MaskGraphicsScene.h b/GUI/View/Scene/MaskGraphicsScene.h
index 4babe322268..e149786ae82 100644
--- a/GUI/View/Scene/MaskGraphicsScene.h
+++ b/GUI/View/Scene/MaskGraphicsScene.h
@@ -29,7 +29,7 @@ class MaskContainerModel;
 class MaskEditorAction;
 class MaskGraphicsProxy;
 class MaskItem;
-class MaskRoot;
+class MaskObject;
 class PolygonDisplay;
 class SceneAdaptor;
 
@@ -53,8 +53,8 @@ public:
 signals:
     void itemContextMenuRequest(const QPoint& point);
     void lineItemProcessed();
-    void lineItemMoved(MaskRoot* sender);
-    void lineItemDeleted(MaskRoot* sender);
+    void lineItemMoved(MaskObject* sender);
+    void lineItemDeleted(MaskObject* sender);
 
 public slots:
     void onActivityChanged(MaskEditorFlags::Activity value);
@@ -80,8 +80,8 @@ private:
 
     void updateProxyWidget();
     void updateViews();
-    IShapeDisplay* addViewForItem(MaskRoot* item);
-    void removeItemViewFromScene(MaskRoot* item);
+    IShapeDisplay* addViewForItem(MaskObject* item);
+    void removeItemViewFromScene(MaskObject* item);
 
     void connectMaskContainer(MaskContainerModel* maskContainerModel);
     void disconnectMaskContainer(MaskContainerModel* maskContainerModel);
@@ -105,7 +105,7 @@ private:
     void processVerticalLineItem(const QPointF& pos);
     void processHorizontalLineItem(const QPointF& pos);
     void processMaskAllItem(QGraphicsSceneMouseEvent* event);
-    void subscribeMaskItem(MaskRoot* item);
+    void subscribeMaskItem(MaskObject* item);
 
     void setZValues();
     PolygonDisplay* currentPolygon() const;
@@ -113,7 +113,7 @@ private:
     ColorMap* m_colorMap;
     MaskContainerModel* m_maskContainerModel = nullptr;
     QItemSelectionModel* m_selectionModel = nullptr;
-    QMap<MaskRoot*, IShapeDisplay*> m_ItemToView;
+    QMap<MaskObject*, IShapeDisplay*> m_ItemToView;
     MaskGraphicsProxy* m_proxy = nullptr;
     std::shared_ptr<SceneAdaptor> m_adaptor;
     bool m_block_selection = false;
diff --git a/GUI/View/Scene/MaskViewFactory.cpp b/GUI/View/Scene/MaskViewFactory.cpp
index 68d94e31924..fc5c6a28205 100644
--- a/GUI/View/Scene/MaskViewFactory.cpp
+++ b/GUI/View/Scene/MaskViewFactory.cpp
@@ -24,7 +24,7 @@
 #include "GUI/View/Shape/PolygonDisplay.h"
 #include "GUI/View/Shape/PolygonPointDisplay.h"
 
-IShapeDisplay* MaskViewFactory::createMaskView(MaskRoot* item)
+IShapeDisplay* MaskViewFactory::createMaskView(MaskObject* item)
 {
     if (auto* mask = dynamic_cast<MaskContainerItem*>(item))
         // includes ProjectionContainerItem
diff --git a/GUI/View/Scene/MaskViewFactory.h b/GUI/View/Scene/MaskViewFactory.h
index 264ba7f37ab..e49f4a6778b 100644
--- a/GUI/View/Scene/MaskViewFactory.h
+++ b/GUI/View/Scene/MaskViewFactory.h
@@ -16,12 +16,12 @@
 #define BORNAGAIN_GUI_VIEW_SCENE_MASKVIEWFACTORY_H
 
 class IShapeDisplay;
-class MaskRoot;
+class MaskObject;
 
 namespace MaskViewFactory {
 
 //! Factory to construct views out of MaskItems for MaskGraphicsScene
-IShapeDisplay* createMaskView(MaskRoot* item);
+IShapeDisplay* createMaskView(MaskObject* item);
 
 } // namespace MaskViewFactory
 
diff --git a/GUI/View/Setup/ProjectionsSaver.cpp b/GUI/View/Setup/ProjectionsSaver.cpp
index 6cfb05227ae..173473ae3ba 100644
--- a/GUI/View/Setup/ProjectionsSaver.cpp
+++ b/GUI/View/Setup/ProjectionsSaver.cpp
@@ -43,13 +43,13 @@ QString to_double_str(double value)
     return QString("%1").arg(QString::fromStdString(str), -bin_centers_colwidth);
 }
 
-bool vert_less_posx(MaskRoot* item1, MaskRoot* item2)
+bool vert_less_posx(MaskObject* item1, MaskObject* item2)
 {
     return polymorphic_downcast<VerticalLineItem*>(item1)->posX()
            < polymorphic_downcast<VerticalLineItem*>(item2)->posX();
 }
 
-bool horiz_less_posy(MaskRoot* item1, MaskRoot* item2)
+bool horiz_less_posy(MaskObject* item1, MaskObject* item2)
 {
     return polymorphic_downcast<HorizontalLineItem*>(item1)->posY()
            < polymorphic_downcast<HorizontalLineItem*>(item2)->posY();
diff --git a/GUI/View/Shape/AllMasksDisplay.cpp b/GUI/View/Shape/AllMasksDisplay.cpp
index f0aeaa77d60..8e4a6021259 100644
--- a/GUI/View/Shape/AllMasksDisplay.cpp
+++ b/GUI/View/Shape/AllMasksDisplay.cpp
@@ -26,7 +26,7 @@ AllMasksDisplay::AllMasksDisplay(MaskAllItem* item)
     setFlag(QGraphicsItem::ItemIsSelectable);
 }
 
-MaskRoot* AllMasksDisplay::parameterizedItem() const
+MaskObject* AllMasksDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/AllMasksDisplay.h b/GUI/View/Shape/AllMasksDisplay.h
index 977da2a6d9a..310cb064d1c 100644
--- a/GUI/View/Shape/AllMasksDisplay.h
+++ b/GUI/View/Shape/AllMasksDisplay.h
@@ -28,7 +28,7 @@ public:
 
     explicit AllMasksDisplay(MaskAllItem* item);
 
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 protected slots:
     void update_view() override;
diff --git a/GUI/View/Shape/EllipseDisplay.cpp b/GUI/View/Shape/EllipseDisplay.cpp
index 90c4fb7c49b..bb6ef08d1af 100644
--- a/GUI/View/Shape/EllipseDisplay.cpp
+++ b/GUI/View/Shape/EllipseDisplay.cpp
@@ -96,7 +96,7 @@ QPainterPath EllipseDisplay::shape() const
     return path;
 }
 
-MaskRoot* EllipseDisplay::parameterizedItem() const
+MaskObject* EllipseDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/EllipseDisplay.h b/GUI/View/Shape/EllipseDisplay.h
index 574f9ff6037..657bd509a50 100644
--- a/GUI/View/Shape/EllipseDisplay.h
+++ b/GUI/View/Shape/EllipseDisplay.h
@@ -29,7 +29,7 @@ public:
 
     explicit EllipseDisplay(EllipseItem* item);
 
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 private slots:
     void onChangedX() override;
diff --git a/GUI/View/Shape/IShapeDisplay.cpp b/GUI/View/Shape/IShapeDisplay.cpp
index 17662ec50cb..9ee3245af43 100644
--- a/GUI/View/Shape/IShapeDisplay.cpp
+++ b/GUI/View/Shape/IShapeDisplay.cpp
@@ -23,7 +23,7 @@
 
 namespace {
 
-bool itemMaskValue(const MaskRoot* item)
+bool itemMaskValue(const MaskObject* item)
 {
     if (const auto* maskItem = dynamic_cast<const MaskItem*>(item))
         return maskItem->maskValue();
@@ -32,7 +32,7 @@ bool itemMaskValue(const MaskRoot* item)
 
 } // namespace
 
-IShapeDisplay::IShapeDisplay(MaskRoot* item)
+IShapeDisplay::IShapeDisplay(MaskObject* item)
     : m_adaptor(nullptr)
     , m_block_on_property_change(false)
 {
@@ -41,9 +41,9 @@ IShapeDisplay::IShapeDisplay(MaskRoot* item)
     connect(this, &IShapeDisplay::xChanged, this, &IShapeDisplay::onChangedX, Qt::UniqueConnection);
     connect(this, &IShapeDisplay::yChanged, this, &IShapeDisplay::onChangedY, Qt::UniqueConnection);
 
-    connect(item, &MaskRoot::maskGeometryChanged, this, &IShapeDisplay::onGeometryChange,
+    connect(item, &MaskObject::maskGeometryChanged, this, &IShapeDisplay::onGeometryChange,
             Qt::UniqueConnection);
-    connect(item, &MaskRoot::maskVisibilityChanged, this, &IShapeDisplay::onVisibilityChange,
+    connect(item, &MaskObject::maskVisibilityChanged, this, &IShapeDisplay::onVisibilityChange,
             Qt::UniqueConnection);
 }
 
diff --git a/GUI/View/Shape/IShapeDisplay.h b/GUI/View/Shape/IShapeDisplay.h
index 242d9bc2d8d..05929fb3203 100644
--- a/GUI/View/Shape/IShapeDisplay.h
+++ b/GUI/View/Shape/IShapeDisplay.h
@@ -19,7 +19,7 @@
 #include <QGraphicsObject>
 #include <QPainter>
 
-class MaskRoot;
+class MaskObject;
 class SceneAdaptor;
 
 //! Main interface class for views representing MaskItems, Projections on graphics scene.
@@ -31,7 +31,7 @@ public:
 
     QRectF boundingRect() const override;
 
-    virtual MaskRoot* parameterizedItem() const = 0;
+    virtual MaskObject* parameterizedItem() const = 0;
 
     void setSceneAdaptor(const SceneAdaptor* adaptor);
 
@@ -45,7 +45,7 @@ protected slots:
     virtual void onPropertyChange() {}
 
 protected:
-    explicit IShapeDisplay(MaskRoot* item);
+    explicit IShapeDisplay(MaskObject* item);
 
     void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) override;
 
diff --git a/GUI/View/Shape/LineDisplays.cpp b/GUI/View/Shape/LineDisplays.cpp
index bf3f7cb8c89..d3f7fb98154 100644
--- a/GUI/View/Shape/LineDisplays.cpp
+++ b/GUI/View/Shape/LineDisplays.cpp
@@ -44,7 +44,7 @@ QPainterPath VerticalLineDisplay::shape() const
     return p;
 }
 
-MaskRoot* VerticalLineDisplay::parameterizedItem() const
+MaskObject* VerticalLineDisplay::parameterizedItem() const
 {
     return m_item;
 }
@@ -122,7 +122,7 @@ QPainterPath HorizontalLineDisplay::shape() const
     return path;
 }
 
-MaskRoot* HorizontalLineDisplay::parameterizedItem() const
+MaskObject* HorizontalLineDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/LineDisplays.h b/GUI/View/Shape/LineDisplays.h
index 3e25f2132b4..74cf720d823 100644
--- a/GUI/View/Shape/LineDisplays.h
+++ b/GUI/View/Shape/LineDisplays.h
@@ -30,7 +30,7 @@ public:
     explicit VerticalLineDisplay(VerticalLineItem* item);
 
     QPainterPath shape() const override;
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 protected slots:
     void update_view() override;
@@ -56,7 +56,7 @@ public:
     explicit HorizontalLineDisplay(HorizontalLineItem* item);
 
     QPainterPath shape() const override;
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 protected slots:
     void update_view() override;
diff --git a/GUI/View/Shape/MaskContainerDisplay.cpp b/GUI/View/Shape/MaskContainerDisplay.cpp
index a31c0a0688c..f6ddcd58a8c 100644
--- a/GUI/View/Shape/MaskContainerDisplay.cpp
+++ b/GUI/View/Shape/MaskContainerDisplay.cpp
@@ -28,7 +28,7 @@ MaskContainerDisplay::MaskContainerDisplay(MaskContainerItem* item)
     setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
 }
 
-MaskRoot* MaskContainerDisplay::parameterizedItem() const
+MaskObject* MaskContainerDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/MaskContainerDisplay.h b/GUI/View/Shape/MaskContainerDisplay.h
index fa4a1f7ba71..3a939271dab 100644
--- a/GUI/View/Shape/MaskContainerDisplay.h
+++ b/GUI/View/Shape/MaskContainerDisplay.h
@@ -35,7 +35,7 @@ public:
 
     MaskContainerDisplay(MaskContainerItem* item);
 
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 private slots:
     void update_view() override;
diff --git a/GUI/View/Shape/PolygonDisplay.cpp b/GUI/View/Shape/PolygonDisplay.cpp
index 768da6fafbc..4f8519f22d4 100644
--- a/GUI/View/Shape/PolygonDisplay.cpp
+++ b/GUI/View/Shape/PolygonDisplay.cpp
@@ -36,7 +36,7 @@ PolygonDisplay::PolygonDisplay(PolygonItem* item)
     m_item->maskVisibilityChanged();
 }
 
-MaskRoot* PolygonDisplay::parameterizedItem() const
+MaskObject* PolygonDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/PolygonDisplay.h b/GUI/View/Shape/PolygonDisplay.h
index cad2408bde9..c64f16e50b9 100644
--- a/GUI/View/Shape/PolygonDisplay.h
+++ b/GUI/View/Shape/PolygonDisplay.h
@@ -29,7 +29,7 @@ public:
 
     explicit PolygonDisplay(PolygonItem* item);
 
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
     void addView(IShapeDisplay* childView) override;
     bool isClosedPolygon();
diff --git a/GUI/View/Shape/PolygonPointDisplay.cpp b/GUI/View/Shape/PolygonPointDisplay.cpp
index 5e8cf02ad12..90cfdab35bf 100644
--- a/GUI/View/Shape/PolygonPointDisplay.cpp
+++ b/GUI/View/Shape/PolygonPointDisplay.cpp
@@ -32,7 +32,7 @@ QRectF PolygonPointDisplay::boundingRect() const
     return QRectF(-4, -4, 8, 8);
 }
 
-MaskRoot* PolygonPointDisplay::parameterizedItem() const
+MaskObject* PolygonPointDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/PolygonPointDisplay.h b/GUI/View/Shape/PolygonPointDisplay.h
index eb2b452c82a..dbc04402d51 100644
--- a/GUI/View/Shape/PolygonPointDisplay.h
+++ b/GUI/View/Shape/PolygonPointDisplay.h
@@ -30,7 +30,7 @@ public:
 
     QRectF boundingRect() const override;
 
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
     void updateParameterizedItem(const QPointF& pos);
 
diff --git a/GUI/View/Shape/RectangleBaseDisplay.cpp b/GUI/View/Shape/RectangleBaseDisplay.cpp
index 0562154c55f..bcfe20eaec1 100644
--- a/GUI/View/Shape/RectangleBaseDisplay.cpp
+++ b/GUI/View/Shape/RectangleBaseDisplay.cpp
@@ -27,7 +27,7 @@ const QList<SizeHandleElement::EHandleLocation> points{
 } // namespace
 
 
-RectangleBaseDisplay::RectangleBaseDisplay(MaskRoot* item)
+RectangleBaseDisplay::RectangleBaseDisplay(MaskObject* item)
     : IShapeDisplay(item)
     , m_activeHandleElement(nullptr)
 {
diff --git a/GUI/View/Shape/RectangleBaseDisplay.h b/GUI/View/Shape/RectangleBaseDisplay.h
index a819cd7e7ad..aeea41d90f7 100644
--- a/GUI/View/Shape/RectangleBaseDisplay.h
+++ b/GUI/View/Shape/RectangleBaseDisplay.h
@@ -26,7 +26,7 @@ class RectangleBaseDisplay : public IShapeDisplay {
 public:
     int type() const override { return MaskType::RECTANGLEBASE; }
 
-    explicit RectangleBaseDisplay(MaskRoot* item);
+    explicit RectangleBaseDisplay(MaskObject* item);
 
 private slots:
     void onSizeHandleElementRequest(bool going_to_resize);
diff --git a/GUI/View/Shape/RectangleDisplay.cpp b/GUI/View/Shape/RectangleDisplay.cpp
index 9578de3175d..75dfb454ce2 100644
--- a/GUI/View/Shape/RectangleDisplay.cpp
+++ b/GUI/View/Shape/RectangleDisplay.cpp
@@ -31,7 +31,7 @@ QPainterPath RectangleDisplay::shape() const
     return path;
 }
 
-MaskRoot* RectangleDisplay::parameterizedItem() const
+MaskObject* RectangleDisplay::parameterizedItem() const
 {
     return m_item;
 }
diff --git a/GUI/View/Shape/RectangleDisplay.h b/GUI/View/Shape/RectangleDisplay.h
index 806e9ea2820..66a09f0fcae 100644
--- a/GUI/View/Shape/RectangleDisplay.h
+++ b/GUI/View/Shape/RectangleDisplay.h
@@ -30,7 +30,7 @@ public:
     explicit RectangleDisplay(RectangleItem* item);
 
     QPainterPath shape() const override;
-    MaskRoot* parameterizedItem() const override;
+    MaskObject* parameterizedItem() const override;
 
 private slots:
     void onChangedX() override;
-- 
GitLab