From 5defb79fdf0d3412319dfb26f9427d7b4f42b167 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <svechnikovmv@gmail.com>
Date: Mon, 13 Feb 2023 14:48:56 +0100
Subject: [PATCH] use fwd declarations in DataItemBundleWidget

---
 GUI/View/Common/DataItemBundleWidget.cpp        | 2 ++
 GUI/View/Common/DataItemBundleWidget.h          | 5 +++--
 GUI/View/Mask/ColorMapSceneAdaptor.cpp          | 1 +
 GUI/View/Plot2D/ColorMapCanvas.cpp              | 1 +
 GUI/View/Plot2D/IntensityDataCanvas.cpp         | 2 ++
 GUI/View/PlotComparison/FitComparisonWidget.cpp | 2 ++
 GUI/View/PlotSpecular/SpecularPlot.h            | 4 ++++
 GUI/View/PlotUtil/ColorMap.cpp                  | 1 +
 GUI/View/PlotUtil/ColorMap.h                    | 4 ++++
 GUI/View/PlotUtil/SavePlotAssistant.cpp         | 1 +
 GUI/View/Projection/ProjectionsPlot.h           | 3 +++
 11 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/GUI/View/Common/DataItemBundleWidget.cpp b/GUI/View/Common/DataItemBundleWidget.cpp
index 2f47c0663e1..b5e024738ad 100644
--- a/GUI/View/Common/DataItemBundleWidget.cpp
+++ b/GUI/View/Common/DataItemBundleWidget.cpp
@@ -13,6 +13,8 @@
 //  ************************************************************************************************
 
 #include "GUI/View/Common/DataItemBundleWidget.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
 
 DataItemBundleWidget::DataItemBundleWidget(QWidget* parent)
     : QWidget(parent)
diff --git a/GUI/View/Common/DataItemBundleWidget.h b/GUI/View/Common/DataItemBundleWidget.h
index bbee50cb68d..b3acafa0ed0 100644
--- a/GUI/View/Common/DataItemBundleWidget.h
+++ b/GUI/View/Common/DataItemBundleWidget.h
@@ -15,10 +15,11 @@
 #ifndef BORNAGAIN_GUI_VIEW_COMMON_DATAITEMBUNDLEWIDGET_H
 #define BORNAGAIN_GUI_VIEW_COMMON_DATAITEMBUNDLEWIDGET_H
 
-#include "GUI/Model/Data/IntensityDataItem.h"
-#include "GUI/Model/Data/SpecularDataItem.h"
 #include <QWidget>
 
+class IntensityDataItem;
+class SpecularDataItem;
+
 //! The DataItemBundleWidget class is a base for widgets, representing the SpecularDataItem and
 //! IntensityDataItem. It may store a list of SpecularDataItems that are required for
 //! simultaneous, synchronous work while plotting and changing their properties.
diff --git a/GUI/View/Mask/ColorMapSceneAdaptor.cpp b/GUI/View/Mask/ColorMapSceneAdaptor.cpp
index c2d16793fa3..ddec1be5a63 100644
--- a/GUI/View/Mask/ColorMapSceneAdaptor.cpp
+++ b/GUI/View/Mask/ColorMapSceneAdaptor.cpp
@@ -14,6 +14,7 @@
 
 #include "GUI/View/Mask/ColorMapSceneAdaptor.h"
 #include "GUI/View/PlotUtil/ColorMap.h"
+#include <QEvent>
 
 ColorMapSceneAdaptor::ColorMapSceneAdaptor()
     : m_plot(nullptr)
diff --git a/GUI/View/Plot2D/ColorMapCanvas.cpp b/GUI/View/Plot2D/ColorMapCanvas.cpp
index 7e8aa92c621..8f1d08c184a 100644
--- a/GUI/View/Plot2D/ColorMapCanvas.cpp
+++ b/GUI/View/Plot2D/ColorMapCanvas.cpp
@@ -17,6 +17,7 @@
 #include "GUI/View/PlotUtil/ColorMap.h"
 #include "GUI/View/PlotUtil/FontScalingEvent.h"
 #include "GUI/View/PlotUtil/PlotStatusLabel.h"
+#include <QVBoxLayout>
 
 ColorMapCanvas::ColorMapCanvas(QWidget* parent)
     : QWidget(parent)
diff --git a/GUI/View/Plot2D/IntensityDataCanvas.cpp b/GUI/View/Plot2D/IntensityDataCanvas.cpp
index b1b8473977e..07a317dc37e 100644
--- a/GUI/View/Plot2D/IntensityDataCanvas.cpp
+++ b/GUI/View/Plot2D/IntensityDataCanvas.cpp
@@ -20,6 +20,8 @@
 #include "GUI/View/Plot2D/ColorMapCanvas.h"
 #include "GUI/View/PlotUtil/ColorMap.h"
 #include "GUI/View/PlotUtil/SavePlotAssistant.h"
+#include "qcustomplot.h"
+#include <QVBoxLayout>
 
 namespace {
 
diff --git a/GUI/View/PlotComparison/FitComparisonWidget.cpp b/GUI/View/PlotComparison/FitComparisonWidget.cpp
index 27c906dbb75..e56b2160d44 100644
--- a/GUI/View/PlotComparison/FitComparisonWidget.cpp
+++ b/GUI/View/PlotComparison/FitComparisonWidget.cpp
@@ -15,6 +15,7 @@
 #include "GUI/View/PlotComparison/FitComparisonWidget.h"
 #include "Device/Histo/DiffUtil.h"
 #include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
 #include "GUI/Model/Job/FitSuiteItem.h"
 #include "GUI/Model/Project/ProjectDocument.h"
 #include "GUI/Util/ActionFactory.h"
@@ -25,6 +26,7 @@
 #include "GUI/View/PlotUtil/PlotStatusLabel.h"
 #include "GUI/View/PlotUtil/RangeUtils.h"
 #include <QAction>
+#include <QVBoxLayout>
 
 FitComparisonWidget::FitComparisonWidget(QWidget* parent)
     : DataAccessWidget(parent)
diff --git a/GUI/View/PlotSpecular/SpecularPlot.h b/GUI/View/PlotSpecular/SpecularPlot.h
index 443b60b4608..1c3be99b6b0 100644
--- a/GUI/View/PlotSpecular/SpecularPlot.h
+++ b/GUI/View/PlotSpecular/SpecularPlot.h
@@ -19,6 +19,10 @@
 #include <memory>
 
 class BasicAxisItem;
+class QCPAxis;
+class QCPErrorBars;
+class QCPGraph;
+class QCPRange;
 class SpecularDataItem;
 class UpdateTimer;
 
diff --git a/GUI/View/PlotUtil/ColorMap.cpp b/GUI/View/PlotUtil/ColorMap.cpp
index b2228aa194e..9c1d0904bd9 100644
--- a/GUI/View/PlotUtil/ColorMap.cpp
+++ b/GUI/View/PlotUtil/ColorMap.cpp
@@ -20,6 +20,7 @@
 #include "GUI/View/PlotUtil/PlotEventInfo.h"
 #include "GUI/View/PlotUtil/RangeUtils.h"
 #include "GUI/View/Tool/UpdateTimer.h"
+#include "qcustomplot.h"
 
 namespace {
 
diff --git a/GUI/View/PlotUtil/ColorMap.h b/GUI/View/PlotUtil/ColorMap.h
index 02953ba9cc6..adedc8bc499 100644
--- a/GUI/View/PlotUtil/ColorMap.h
+++ b/GUI/View/PlotUtil/ColorMap.h
@@ -18,6 +18,10 @@
 #include "GUI/View/PlotUtil/ScientificPlot.h"
 
 class IntensityDataItem;
+class QCPRange;
+class QCPColorScale;
+class QCPColorMap;
+class QCPLayoutGrid;
 class UpdateTimer;
 
 //! The ColorMap class presents 2D intensity data from IntensityDataItem as color map.
diff --git a/GUI/View/PlotUtil/SavePlotAssistant.cpp b/GUI/View/PlotUtil/SavePlotAssistant.cpp
index f6ff9ecc8fe..5df2bbfb166 100644
--- a/GUI/View/PlotUtil/SavePlotAssistant.cpp
+++ b/GUI/View/PlotUtil/SavePlotAssistant.cpp
@@ -17,6 +17,7 @@
 #include "Device/IO/IOFactory.h"
 #include "GUI/Application/ApplicationSettings.h"
 #include "GUI/View/PlotUtil/ColorMap.h"
+#include "qcustomplot.h"
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QVector>
diff --git a/GUI/View/Projection/ProjectionsPlot.h b/GUI/View/Projection/ProjectionsPlot.h
index e1ea23ad3b2..16fd81388bf 100644
--- a/GUI/View/Projection/ProjectionsPlot.h
+++ b/GUI/View/Projection/ProjectionsPlot.h
@@ -23,7 +23,10 @@
 class Datafield;
 class IntensityDataItem;
 class MaskItem;
+class MaskItemObject;
 class ProjectionContainerItem;
+class QCPGraph;
+class QCustomPlot;
 
 //! A customplot based widget to display projections of IntensityDataItem on X,Y axes.
 
-- 
GitLab