From 643e391d362490c300144c77ee849bc6258e5f90 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Nov 2023 22:33:50 +0100
Subject: [PATCH] mv ProjectionsEditorActions', 'ProjectionActions

---
 GUI/Model/Job/ParameterTreeBuilder.h          |  6 ++---
 GUI/View/Data/RealDataPresenter.cpp           |  2 +-
 GUI/View/Frame/Plot2DWithProjectionFrame.cpp  | 12 +++++-----
 GUI/View/Frame/Plot2DWithProjectionFrame.h    | 10 ++++-----
 GUI/View/Job/JobResultsPresenter.cpp          |  2 +-
 .../ProjectionActions.cpp}                    | 22 +++++++++----------
 .../ProjectionActions.h}                      | 14 ++++++------
 GUI/View/Setup/ProjectionsToolbar.cpp         |  8 +++----
 GUI/View/Setup/ProjectionsToolbar.h           |  6 ++---
 ...lot2DScaleEditor.cpp => Scale2DEditor.cpp} |  2 +-
 10 files changed, 42 insertions(+), 42 deletions(-)
 rename GUI/View/{Projection/ProjectionsEditorActions.cpp => Setup/ProjectionActions.cpp} (79%)
 rename GUI/View/{Projection/ProjectionsEditorActions.h => Setup/ProjectionActions.h} (72%)
 rename GUI/View/Setup/{Plot2DScaleEditor.cpp => Scale2DEditor.cpp} (99%)

diff --git a/GUI/Model/Job/ParameterTreeBuilder.h b/GUI/Model/Job/ParameterTreeBuilder.h
index b88e59d6ab7..1e40ed42661 100644
--- a/GUI/Model/Job/ParameterTreeBuilder.h
+++ b/GUI/Model/Job/ParameterTreeBuilder.h
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODEL_MODEL_PARAMETERTREEBUILDER_H
-#define BORNAGAIN_GUI_MODEL_MODEL_PARAMETERTREEBUILDER_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEBUILDER_H
+#define BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEBUILDER_H
 
 #include <QPair>
 #include <QString>
@@ -80,4 +80,4 @@ private:
     bool m_recreateBackupValues;
 };
 
-#endif // BORNAGAIN_GUI_MODEL_MODEL_PARAMETERTREEBUILDER_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEBUILDER_H
diff --git a/GUI/View/Data/RealDataPresenter.cpp b/GUI/View/Data/RealDataPresenter.cpp
index e9857a23474..99e6adb475b 100644
--- a/GUI/View/Data/RealDataPresenter.cpp
+++ b/GUI/View/Data/RealDataPresenter.cpp
@@ -16,7 +16,7 @@
 #include "Base/Util/Assert.h"
 #include "GUI/Model/Device/DatafileItem.h"
 #include "GUI/View/Frame/MaskEditingFrame.h"
-#include "GUI/View/Frame/Plot2+ProjnFrame.h"
+#include "GUI/View/Frame/Plot2DWithProjectionFrame.h"
 #include "GUI/View/Frame/Plot2DFrame.h"
 #include "GUI/View/Frame/SpecularFrame.h"
 
diff --git a/GUI/View/Frame/Plot2DWithProjectionFrame.cpp b/GUI/View/Frame/Plot2DWithProjectionFrame.cpp
index b8aeb73662a..1d209236a7d 100644
--- a/GUI/View/Frame/Plot2DWithProjectionFrame.cpp
+++ b/GUI/View/Frame/Plot2DWithProjectionFrame.cpp
@@ -15,8 +15,8 @@
 #include "Base/Util/Assert.h"
 #include "GUI/Model/Data/Data2DItem.h"
 #include "GUI/Model/Mask/ProjectionItems.h"
-#include "GUI/View/Frame/Plot2+ProjnFrame.h"
-#include "GUI/View/Projection/ProjectionsEditorActions.h"
+#include "GUI/View/Frame/Plot2DWithProjectionFrame.h"
+#include "GUI/View/Setup/ProjectionActions.h"
 #include "GUI/View/Projection/ProjectionsEditorCanvas.h"
 #include "GUI/View/Projection/ProjectionsWidget.h"
 #include "GUI/View/Setup/ProjectionsToolbar.h"
@@ -26,7 +26,7 @@
 
 Plot2DWithProjectionFrame::Plot2DWithProjectionFrame(QWidget* parent)
     : DataAccessWidget(parent)
-    , m_editorActions(new ProjectionsEditorActions(this))
+    , m_editorActions(new ProjectionActions(this))
     , m_toolbar(new ProjectionsToolbar(m_editorActions))
     , m_projectionsCanvas(new ProjectionsEditorCanvas)
     , m_projectionsWidget(new ProjectionsWidget)
@@ -93,11 +93,11 @@ QList<QAction*> Plot2DWithProjectionFrame::actionList()
 void Plot2DWithProjectionFrame::setup_connections()
 {
     // tool panel request is propagated from editorActions to this MaskEditor
-    connect(m_editorActions, &ProjectionsEditorActions::resetViewRequest, m_projectionsCanvas,
+    connect(m_editorActions, &ProjectionActions::resetViewRequest, m_projectionsCanvas,
             &ProjectionsEditorCanvas::onResetViewRequest, Qt::UniqueConnection);
 
     // tool panel request is propagated from editorActions to this MaskEditor
-    connect(m_editorActions, &ProjectionsEditorActions::propertyPanelRequest,
+    connect(m_editorActions, &ProjectionActions::propertyPanelRequest,
             [this]() { m_propertyPanel->setHidden(!m_propertyPanel->isHidden()); });
 
     // selection/drawing activity is propagated from Toolbar to graphics scene
@@ -114,7 +114,7 @@ void Plot2DWithProjectionFrame::setup_connections()
 
     // Delete request is propagated from canvas to actions
     connect(m_projectionsCanvas, &ProjectionsEditorCanvas::deleteSelectedRequest, m_editorActions,
-            &ProjectionsEditorActions::onDeleteAction, Qt::UniqueConnection);
+            &ProjectionActions::onDeleteAction, Qt::UniqueConnection);
 
     // moving projection automatically switches projections tab
     connect(m_projectionsCanvas, &ProjectionsEditorCanvas::changeProjectionsTabRequest,
diff --git a/GUI/View/Frame/Plot2DWithProjectionFrame.h b/GUI/View/Frame/Plot2DWithProjectionFrame.h
index 5264bb66f17..53fb95e0577 100644
--- a/GUI/View/Frame/Plot2DWithProjectionFrame.h
+++ b/GUI/View/Frame/Plot2DWithProjectionFrame.h
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEW_FRAME_PLOT2 + PROJNFRAME_H
-#define BORNAGAIN_GUI_VIEW_FRAME_PLOT2 +PROJNFRAME_H
+#ifndef BORNAGAIN_GUI_VIEW_FRAME_PLOT2DWITHPROJECTIONFRAME_H
+#define BORNAGAIN_GUI_VIEW_FRAME_PLOT2DWITHPROJECTIONFRAME_H
 
 #include "GUI/View/Access/DataAccessWidget.h"
 
 class Scale2DEditor;
-class ProjectionsEditorActions;
+class ProjectionActions;
 class ProjectionsEditorCanvas;
 class ProjectionsToolbar;
 class ProjectionsWidget;
@@ -40,11 +40,11 @@ private:
     void hideEvent(QHideEvent*) override;
     void setup_connections();
 
-    ProjectionsEditorActions* m_editorActions;
+    ProjectionActions* m_editorActions;
     ProjectionsToolbar* m_toolbar;                //! main tool bar with buttons at the right
     ProjectionsEditorCanvas* m_projectionsCanvas; //! canvas with color map at the top
     ProjectionsWidget* m_projectionsWidget;       //! bottom widget to draw projections plot
     Scale2DEditor* m_propertyPanel;               //! panel at the right with properties
 };
 
-#endif // BORNAGAIN_GUI_VIEW_FRAME_PLOT2+PROJNFRAME_H
+#endif // BORNAGAIN_GUI_VIEW_FRAME_PLOT2DWITHPROJECTIONFRAME_H
diff --git a/GUI/View/Job/JobResultsPresenter.cpp b/GUI/View/Job/JobResultsPresenter.cpp
index e7ed9898034..0230516bc44 100644
--- a/GUI/View/Job/JobResultsPresenter.cpp
+++ b/GUI/View/Job/JobResultsPresenter.cpp
@@ -16,7 +16,7 @@
 #include "GUI/Model/Job/JobItem.h"
 #include "GUI/View/Frame/Fit1DFrame.h"
 #include "GUI/View/Frame/Fit2DFrame.h"
-#include "GUI/View/Frame/Plot2+ProjnFrame.h"
+#include "GUI/View/Frame/Plot2DWithProjectionFrame.h"
 #include "GUI/View/Frame/Plot2DFrame.h"
 #include "GUI/View/Frame/SpecularFrame.h"
 #include "GUI/View/Job/JobViewActivities.h"
diff --git a/GUI/View/Projection/ProjectionsEditorActions.cpp b/GUI/View/Setup/ProjectionActions.cpp
similarity index 79%
rename from GUI/View/Projection/ProjectionsEditorActions.cpp
rename to GUI/View/Setup/ProjectionActions.cpp
index fbd0622e511..8a543814927 100644
--- a/GUI/View/Projection/ProjectionsEditorActions.cpp
+++ b/GUI/View/Setup/ProjectionActions.cpp
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/View/Projection/ProjectionsEditorActions.cpp
-//! @brief     Implements class ProjectionsEditorActions.
+//! @file      GUI/View/Setup/ProjectionActions.cpp
+//! @brief     Implements class ProjectionActions.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/View/Projection/ProjectionsEditorActions.h"
+#include "GUI/View/Setup/ProjectionActions.h"
 #include "GUI/Model/Data/Data2DItem.h"
 #include "GUI/Model/Mask/MaskContainerModel.h"
 #include "GUI/Model/Mask/ProjectionItems.h"
@@ -25,7 +25,7 @@
 
 class MaskItem;
 
-ProjectionsEditorActions::ProjectionsEditorActions(QWidget* parent)
+ProjectionActions::ProjectionActions(QWidget* parent)
     : QObject(parent)
     , m_resetViewAction(new QAction(this))
     , m_togglePanelAction(new QAction(this))
@@ -38,20 +38,20 @@ ProjectionsEditorActions::ProjectionsEditorActions(QWidget* parent)
     m_resetViewAction->setToolTip("Reset view\n"
                                   "x,y,z axes range will be set to default");
     connect(m_resetViewAction, &QAction::triggered, this,
-            &ProjectionsEditorActions::resetViewRequest, Qt::UniqueConnection);
+            &ProjectionActions::resetViewRequest, Qt::UniqueConnection);
 
     m_togglePanelAction->setText("Properties");
     m_togglePanelAction->setIcon(QIcon(":/images/dock-right.svg"));
     m_togglePanelAction->setToolTip("Toggle property panel");
     connect(m_togglePanelAction, &QAction::triggered, this,
-            &ProjectionsEditorActions::propertyPanelRequest, Qt::UniqueConnection);
+            &ProjectionActions::propertyPanelRequest, Qt::UniqueConnection);
 
     m_deleteAction->setToolTip("Remove selected (Del)");
     m_deleteAction->setShortcuts(QKeySequence::Delete);
-    connect(m_deleteAction, &QAction::triggered, this, &ProjectionsEditorActions::onDeleteAction);
+    connect(m_deleteAction, &QAction::triggered, this, &ProjectionActions::onDeleteAction);
 }
 
-void ProjectionsEditorActions::setContextPEA(Data2DItem* data2DItem)
+void ProjectionActions::setContextPEA(Data2DItem* data2DItem)
 {
     ASSERT(data2DItem);
     m_data2DItem = data2DItem;
@@ -60,12 +60,12 @@ void ProjectionsEditorActions::setContextPEA(Data2DItem* data2DItem)
     ASSERT(m_maskContainerModel);
 }
 
-QList<QAction*> ProjectionsEditorActions::topToolbarActions()
+QList<QAction*> ProjectionActions::topToolbarActions()
 {
     return QList<QAction*>() << m_resetViewAction << m_togglePanelAction;
 }
 
-void ProjectionsEditorActions::onDeleteAction()
+void ProjectionActions::onDeleteAction()
 {
     ASSERT(m_maskContainerModel);
     auto* selectionModel = m_maskContainerModel->maskSelectionModel();
@@ -80,7 +80,7 @@ void ProjectionsEditorActions::onDeleteAction()
 }
 
 //! Performs saving of projections in ascii file
-void ProjectionsEditorActions::onSaveAction()
+void ProjectionActions::onSaveAction()
 {
     if (!m_data2DItem)
         return;
diff --git a/GUI/View/Projection/ProjectionsEditorActions.h b/GUI/View/Setup/ProjectionActions.h
similarity index 72%
rename from GUI/View/Projection/ProjectionsEditorActions.h
rename to GUI/View/Setup/ProjectionActions.h
index 42cf2da7c99..a79b7a1bceb 100644
--- a/GUI/View/Projection/ProjectionsEditorActions.h
+++ b/GUI/View/Setup/ProjectionActions.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/View/Projection/ProjectionsEditorActions.h
-//! @brief     Defines class ProjectionsEditorActions.
+//! @file      GUI/View/Setup/ProjectionActions.h
+//! @brief     Defines class ProjectionActions.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
-#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
+#ifndef BORNAGAIN_GUI_VIEW_SETUP_PROJECTIONACTIONS_H
+#define BORNAGAIN_GUI_VIEW_SETUP_PROJECTIONACTIONS_H
 
 #include <QAction>
 
@@ -23,10 +23,10 @@ class ProjectionContainerItem;
 
 //! Provides various actions for ProjectionsEditor.
 
-class ProjectionsEditorActions : public QObject {
+class ProjectionActions : public QObject {
     Q_OBJECT
 public:
-    ProjectionsEditorActions(QWidget* parent = nullptr);
+    ProjectionActions(QWidget* parent = nullptr);
 
     void setContextPEA(Data2DItem* data2DItem);
 
@@ -49,4 +49,4 @@ private:
     QWidget* m_parent;
 };
 
-#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
+#endif // BORNAGAIN_GUI_VIEW_SETUP_PROJECTIONACTIONS_H
diff --git a/GUI/View/Setup/ProjectionsToolbar.cpp b/GUI/View/Setup/ProjectionsToolbar.cpp
index 3915239617b..f9822e1081e 100644
--- a/GUI/View/Setup/ProjectionsToolbar.cpp
+++ b/GUI/View/Setup/ProjectionsToolbar.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/View/Setup/ProjectionsToolbar.h"
 #include "GUI/Support/Tool/mainwindow_constants.h"
-#include "GUI/View/Projection/ProjectionsEditorActions.h"
+#include "GUI/View/Setup/ProjectionActions.h"
 #include <QButtonGroup>
 #include <QLabel>
 #include <QToolButton>
@@ -37,7 +37,7 @@ const QString vertical_mode_tooltip =
 
 } // namespace
 
-ProjectionsToolbar::ProjectionsToolbar(ProjectionsEditorActions* editorActions, QWidget* parent)
+ProjectionsToolbar::ProjectionsToolbar(ProjectionActions* editorActions, QWidget* parent)
     : QToolBar(parent)
     , m_editorActions(editorActions)
     , m_activityButtonGroup(new QButtonGroup(this))
@@ -94,7 +94,7 @@ void ProjectionsToolbar::setup_selection_group()
     resetViewButton->setToolTip(reset_view_tooltip);
     addWidget(resetViewButton);
     connect(resetViewButton, &QToolButton::clicked, m_editorActions,
-            &ProjectionsEditorActions::resetViewRequest);
+            &ProjectionActions::resetViewRequest);
 
     add_separator();
 
@@ -135,7 +135,7 @@ void ProjectionsToolbar::setup_extratools_group()
     saveButton->setToolTip("Save created projections in multi-column ASCII file.");
     addWidget(saveButton);
     connect(saveButton, &QToolButton::clicked, m_editorActions,
-            &ProjectionsEditorActions::onSaveAction);
+            &ProjectionActions::onSaveAction);
 }
 
 void ProjectionsToolbar::add_separator()
diff --git a/GUI/View/Setup/ProjectionsToolbar.h b/GUI/View/Setup/ProjectionsToolbar.h
index 692361d023d..d509ba023d4 100644
--- a/GUI/View/Setup/ProjectionsToolbar.h
+++ b/GUI/View/Setup/ProjectionsToolbar.h
@@ -18,7 +18,7 @@
 #include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QToolBar>
 
-class ProjectionsEditorActions;
+class ProjectionActions;
 class QButtonGroup;
 
 //! Toolbar with projections buttons (horizontal projections, vertical projections, select, zoom)
@@ -27,7 +27,7 @@ class QButtonGroup;
 class ProjectionsToolbar : public QToolBar {
     Q_OBJECT
 public:
-    ProjectionsToolbar(ProjectionsEditorActions* editorActions, QWidget* parent = nullptr);
+    ProjectionsToolbar(ProjectionActions* editorActions, QWidget* parent = nullptr);
 
 public slots:
     void onChangeActivityRequest(MaskEditorFlags::Activity value);
@@ -47,7 +47,7 @@ private:
     MaskEditorFlags::Activity currentActivity() const;
     void setCurrentActivity(MaskEditorFlags::Activity value);
 
-    ProjectionsEditorActions* m_editorActions;
+    ProjectionActions* m_editorActions;
     QButtonGroup* m_activityButtonGroup;
     MaskEditorFlags::Activity m_previousActivity;
 };
diff --git a/GUI/View/Setup/Plot2DScaleEditor.cpp b/GUI/View/Setup/Scale2DEditor.cpp
similarity index 99%
rename from GUI/View/Setup/Plot2DScaleEditor.cpp
rename to GUI/View/Setup/Scale2DEditor.cpp
index 63b34fcc661..c8063a818eb 100644
--- a/GUI/View/Setup/Plot2DScaleEditor.cpp
+++ b/GUI/View/Setup/Scale2DEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/View/Setup/Plot2DScaleEditor.cpp
+//! @file      GUI/View/Setup/Scale2DEditor.cpp
 //! @brief     Implements class Scale2DEditor.
 //!
 //! @homepage  http://www.bornagainproject.org
-- 
GitLab