From daf9cd74b1b9fde39d93a7c6abcd17423d20b85a Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Thu, 9 Mar 2023 13:16:57 +0100
Subject: [PATCH] rm Q_OBJECT, copy edit - ctd

---
 GUI/View/Fit/FitSessionManager.h                     | 2 --
 GUI/View/Fit/FitSessionWidget.h                      | 8 +++-----
 GUI/View/Fit/JobMessagePanel.h                       | 4 +---
 GUI/View/Item/DataItemBundleWidget.h                 | 1 -
 GUI/View/Item/ItemStackWidget.h                      | 2 --
 GUI/View/Item/ItemViewOverlayButtons.h               | 4 +---
 GUI/View/MaterialEditor/MaterialEditorDialog.h       | 2 --
 GUI/View/PlotComparison/FitComparisonWidget.h        | 7 ++-----
 GUI/View/PlotComparison/FitComparisonWidget1D.h      | 9 ++++-----
 GUI/View/PlotComparison/FitFlowWidget.h              | 5 ++---
 GUI/View/Projection/IntensityDataProjectionsWidget.h | 5 ++---
 GUI/View/SampleView/RealspacePanel.h                 | 2 --
 GUI/View/Toplevel/ProjectsView.h                     | 1 -
 GUI/View/Toplevel/SimulationView.h                   | 4 +---
 14 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/GUI/View/Fit/FitSessionManager.h b/GUI/View/Fit/FitSessionManager.h
index 4d4790d72f2..7ee7c1ad802 100644
--- a/GUI/View/Fit/FitSessionManager.h
+++ b/GUI/View/Fit/FitSessionManager.h
@@ -18,14 +18,12 @@
 #include <QMap>
 #include <QObject>
 
-class JobModel;
 class JobItem;
 class FitSessionController;
 
 //! Handles all activity related to the simultaneous running of fitting jobs.
 
 class FitSessionManager : public QObject {
-    Q_OBJECT
 public:
     FitSessionManager(QObject* parent = nullptr);
     ~FitSessionManager();
diff --git a/GUI/View/Fit/FitSessionWidget.h b/GUI/View/Fit/FitSessionWidget.h
index a26e2e264ad..1aa619faa26 100644
--- a/GUI/View/Fit/FitSessionWidget.h
+++ b/GUI/View/Fit/FitSessionWidget.h
@@ -17,20 +17,18 @@
 
 #include <QWidget>
 
-class RunFitControlWidget;
-class JobItem;
 class FitParameterWidget;
+class FitSessionController;
+class JobItem;
 class MinimizerSettingsWidget;
 class ParameterTuningWidget;
-class FitSessionController;
 class QTabWidget;
+class RunFitControlWidget;
 
 //! Contains all fit settings for given JobItem (fit parameters,
 //! minimizer settings). Controlled by FitActivityPanel.
 
 class FitSessionWidget : public QWidget {
-    Q_OBJECT
-
 public:
     FitSessionWidget(QWidget* parent = nullptr);
     ~FitSessionWidget();
diff --git a/GUI/View/Fit/JobMessagePanel.h b/GUI/View/Fit/JobMessagePanel.h
index a338d2b4651..eb2f631e2dc 100644
--- a/GUI/View/Fit/JobMessagePanel.h
+++ b/GUI/View/Fit/JobMessagePanel.h
@@ -18,11 +18,9 @@
 #include "GUI/View/Fit/FitLog.h"
 #include <QTextEdit>
 
-//! The JobMessagePanel class shows log messages from FitActivityPanel at the
-//! bottom part of JobView.
+//! Shows log messages from FitActivityPanel at the bottom part of JobView.
 
 class JobMessagePanel : public QTextEdit {
-    Q_OBJECT
 public:
     JobMessagePanel(QWidget* parent = nullptr);
     ~JobMessagePanel();
diff --git a/GUI/View/Item/DataItemBundleWidget.h b/GUI/View/Item/DataItemBundleWidget.h
index 6e82f9a0a60..b51282d0e9b 100644
--- a/GUI/View/Item/DataItemBundleWidget.h
+++ b/GUI/View/Item/DataItemBundleWidget.h
@@ -25,7 +25,6 @@ class SpecularDataItem;
 //! simultaneous, synchronous work while plotting and changing their properties.
 
 class DataItemBundleWidget : public QWidget {
-    Q_OBJECT
 public:
     explicit DataItemBundleWidget(QWidget* parent = nullptr);
     ~DataItemBundleWidget() override;
diff --git a/GUI/View/Item/ItemStackWidget.h b/GUI/View/Item/ItemStackWidget.h
index eaab811b2a1..5a38d5a2e36 100644
--- a/GUI/View/Item/ItemStackWidget.h
+++ b/GUI/View/Item/ItemStackWidget.h
@@ -25,8 +25,6 @@
 //! currently selected items.
 
 class ItemStackWidget : public QWidget {
-    Q_OBJECT
-
 public:
     ItemStackWidget(QWidget* parent = nullptr);
 
diff --git a/GUI/View/Item/ItemViewOverlayButtons.h b/GUI/View/Item/ItemViewOverlayButtons.h
index baeb88aee78..e64544bd422 100644
--- a/GUI/View/Item/ItemViewOverlayButtons.h
+++ b/GUI/View/Item/ItemViewOverlayButtons.h
@@ -22,16 +22,14 @@ class QAction;
 class QAbstractItemView;
 
 class ItemViewOverlayButtons : public QObject {
-    Q_OBJECT
 public:
     using FnGetActions = std::function<QList<QAction*>(const QModelIndex&, bool)>;
 
     static void install(QAbstractItemView* view, FnGetActions fnGetActions);
 
-protected:
+private:
     bool eventFilter(QObject* obj, QEvent* event) override;
 
-private:
     ItemViewOverlayButtons(QObject* parent);
     void updateRecursive(const QModelIndex& index);
     void update();
diff --git a/GUI/View/MaterialEditor/MaterialEditorDialog.h b/GUI/View/MaterialEditor/MaterialEditorDialog.h
index a8c5c0a0ee4..e3f23a731dc 100644
--- a/GUI/View/MaterialEditor/MaterialEditorDialog.h
+++ b/GUI/View/MaterialEditor/MaterialEditorDialog.h
@@ -24,7 +24,6 @@ class MaterialEditorModel;
 class SampleItem;
 
 namespace Ui {
-
 class MaterialEditorDialog;
 }
 
@@ -34,7 +33,6 @@ class MaterialEditorDialog;
 //! Use this dialog only with the two static methods to edit the list, or to choose a material
 class MaterialEditorDialog : public QDialog {
     Q_OBJECT
-
 public:
     //! Use this to choose a material. identifierOfPreviousMaterial is the material which should be
     //! selected when opening the dialog. Returns the identifier of the newly selected material.
diff --git a/GUI/View/PlotComparison/FitComparisonWidget.h b/GUI/View/PlotComparison/FitComparisonWidget.h
index 640330302a2..c18ac81b314 100644
--- a/GUI/View/PlotComparison/FitComparisonWidget.h
+++ b/GUI/View/PlotComparison/FitComparisonWidget.h
@@ -19,16 +19,13 @@
 
 class ColorMapCanvas;
 class FitFlowWidget;
+class IntensityDataPropertyWidget;
 class PlotStatusLabel;
 class QAction;
-class IntensityDataPropertyWidget;
 
-//! The FitComparisonWidget class plots realdata, simulated data and relative difference map
-//! during the course of the fit.
+//! Plots realdata, simulated data and relative difference map during the course of the fit.
 
 class FitComparisonWidget : public DataAccessWidget {
-    Q_OBJECT
-
 public:
     explicit FitComparisonWidget(QWidget* parent = nullptr);
 
diff --git a/GUI/View/PlotComparison/FitComparisonWidget1D.h b/GUI/View/PlotComparison/FitComparisonWidget1D.h
index 582f15eb180..e07068b5d2b 100644
--- a/GUI/View/PlotComparison/FitComparisonWidget1D.h
+++ b/GUI/View/PlotComparison/FitComparisonWidget1D.h
@@ -17,19 +17,18 @@
 
 #include "GUI/View/Common/DataAccessWidget.h"
 
-class SpecularDataItem;
 class FitFlowWidget;
-class SpecularDataPropertyWidget;
-class SpecularPlotCanvas;
+class JobRealBase;
 class PlotStatusLabel;
 class QAction;
-class JobRealBase;
+class SpecularDataItem;
+class SpecularDataPropertyWidget;
+class SpecularPlotCanvas;
 
 //! The FitComparisonWidget class plots real data, simulated data and their relative difference
 //! during the course of the fit.
 
 class FitComparisonWidget1D : public DataAccessWidget {
-    Q_OBJECT
 public:
     explicit FitComparisonWidget1D(QWidget* parent = nullptr);
 
diff --git a/GUI/View/PlotComparison/FitFlowWidget.h b/GUI/View/PlotComparison/FitFlowWidget.h
index 3426dccab4e..d1e2efd874a 100644
--- a/GUI/View/PlotComparison/FitFlowWidget.h
+++ b/GUI/View/PlotComparison/FitFlowWidget.h
@@ -17,14 +17,13 @@
 
 #include "GUI/View/Common/DataAccessWidget.h"
 
-class HistogramPlot;
 class FitSuiteItem;
+class HistogramPlot;
 
-//! The FitFlowWidget class is intended for showing chi2 .vs interation count dependency.
+//! Intended for showing chi2 .vs interation count dependency.
 //! The main goal is to fill vacant place in FitComparisonWidget.
 
 class FitFlowWidget : public DataAccessWidget {
-    Q_OBJECT
 public:
     explicit FitFlowWidget(QWidget* parent = nullptr);
 
diff --git a/GUI/View/Projection/IntensityDataProjectionsWidget.h b/GUI/View/Projection/IntensityDataProjectionsWidget.h
index f4025cbeb8c..7144d6d5e59 100644
--- a/GUI/View/Projection/IntensityDataProjectionsWidget.h
+++ b/GUI/View/Projection/IntensityDataProjectionsWidget.h
@@ -17,18 +17,17 @@
 
 #include "GUI/View/Common/DataAccessWidget.h"
 
-class ProjectionsToolbar;
+class IntensityDataPropertyWidget;
 class ProjectionsEditorActions;
 class ProjectionsEditorCanvas;
+class ProjectionsToolbar;
 class ProjectionsWidget;
 class QItemSelectionModel;
-class IntensityDataPropertyWidget;
 
 //! Main widget to embed projections editor for IntensityDataItem.
 //! Part of RealDataPresenter and JobResultsPresenter.
 
 class IntensityDataProjectionsWidget : public DataAccessWidget {
-    Q_OBJECT
 public:
     IntensityDataProjectionsWidget(QWidget* parent = nullptr);
 
diff --git a/GUI/View/SampleView/RealspacePanel.h b/GUI/View/SampleView/RealspacePanel.h
index eb8cdd15ffd..8ca6d75e6d6 100644
--- a/GUI/View/SampleView/RealspacePanel.h
+++ b/GUI/View/SampleView/RealspacePanel.h
@@ -22,8 +22,6 @@ class RealspaceWidget;
 //! Panel to show 3D view of sample. Contains toolbar and RealspaceWidget
 
 class RealspacePanel : public QWidget {
-    Q_OBJECT
-
 public:
     RealspacePanel(QWidget* parent);
 
diff --git a/GUI/View/Toplevel/ProjectsView.h b/GUI/View/Toplevel/ProjectsView.h
index b7efa2f8c83..bd320e2005f 100644
--- a/GUI/View/Toplevel/ProjectsView.h
+++ b/GUI/View/Toplevel/ProjectsView.h
@@ -20,7 +20,6 @@
 class ProjectManager;
 
 namespace Ui {
-
 class ProjectsView;
 }
 
diff --git a/GUI/View/Toplevel/SimulationView.h b/GUI/View/Toplevel/SimulationView.h
index 6a89a1af982..df7dd4cb55f 100644
--- a/GUI/View/Toplevel/SimulationView.h
+++ b/GUI/View/Toplevel/SimulationView.h
@@ -36,18 +36,16 @@ class SimulationView;
 //! * Buttons to run simulation or to export as a Python script
 class SimulationView : public QWidget {
     Q_OBJECT
-
 public:
     SimulationView(QWidget* parent, ProjectDocument* document);
 
     void simulate();
     void exportPythonScript();
 
-protected:
+private:
     void showEvent(QShowEvent*) override;
     void hideEvent(QHideEvent*) override;
 
-private:
     //! Read the entries in the UI and modify document.
     void updateStateFromUI();
 
-- 
GitLab