From 824d7c22e9797948a5b954af84a74cf514731d56 Mon Sep 17 00:00:00 2001
From: Roman Tolchenov <roman.tolchenov@stfc.ac.uk>
Date: Tue, 1 Aug 2017 14:40:47 +0100
Subject: [PATCH] Moved ISIS SANS interface.

---
 MantidPlot/CMakeLists.txt                     |  1 -
 qt/scientific_interfaces/CMakeLists.txt       |  1 +
 .../ISISSANS/CMakeLists.txt                   | 79 +++++++++++++++++++
 qt/scientific_interfaces/ISISSANS/DllConfig.h | 39 +++++++++
 .../ISISSANS/PrecompiledHeader.h              | 20 +++++
 .../ISISSANS/{src => }/SANSAddFiles.cpp       |  6 +-
 .../{inc/ISISSANS => }/SANSAddFiles.h         |  4 +-
 .../SANSBackgroundCorrectionSettings.cpp      |  2 +-
 .../SANSBackgroundCorrectionSettings.h        |  4 +-
 .../SANSBackgroundCorrectionWidget.cpp        |  4 +-
 .../SANSBackgroundCorrectionWidget.h          |  4 +-
 .../SANSBackgroundCorrectionWidget.ui         |  0
 .../ISISSANS/{src => }/SANSConstants.cpp      |  2 +-
 .../{inc/ISISSANS => }/SANSConstants.h        |  0
 .../ISISSANS/{src => }/SANSDiagnostics.cpp    |  2 +-
 .../{inc/ISISSANS => }/SANSDiagnostics.h      |  2 +-
 .../ISISSANS/{src => }/SANSEventSlicing.cpp   |  2 +-
 .../{inc/ISISSANS => }/SANSEventSlicing.h     |  2 +-
 .../{inc/ISISSANS => }/SANSEventSlicing.ui    |  2 +-
 .../ISISSANS/{src => }/SANSPlotSpecial.cpp    |  4 +-
 .../{inc/ISISSANS => }/SANSPlotSpecial.h      |  0
 .../{inc/ISISSANS => }/SANSPlotSpecial.ui     |  2 +-
 .../ISISSANS/{src => }/SANSRunWindow.cpp      | 12 +--
 .../{inc/ISISSANS => }/SANSRunWindow.h        | 12 +--
 .../{inc/ISISSANS => }/SANSRunWindow.ui       |  6 +-
 .../MultiDatasetFit/CMakeLists.txt            |  5 +-
 qt/scientific_interfaces/Muon/CMakeLists.txt  |  4 +-
 27 files changed, 178 insertions(+), 43 deletions(-)
 create mode 100644 qt/scientific_interfaces/ISISSANS/CMakeLists.txt
 create mode 100644 qt/scientific_interfaces/ISISSANS/DllConfig.h
 create mode 100644 qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSAddFiles.cpp (99%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSAddFiles.h (97%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSBackgroundCorrectionSettings.cpp (95%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSBackgroundCorrectionSettings.h (94%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSBackgroundCorrectionWidget.cpp (98%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSBackgroundCorrectionWidget.h (95%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSBackgroundCorrectionWidget.ui (100%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSConstants.cpp (98%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSConstants.h (100%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSDiagnostics.cpp (99%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSDiagnostics.h (99%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSEventSlicing.cpp (98%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSEventSlicing.h (96%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSEventSlicing.ui (98%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSPlotSpecial.cpp (99%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSPlotSpecial.h (100%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSPlotSpecial.ui (99%)
 rename qt/scientific_interfaces/ISISSANS/{src => }/SANSRunWindow.cpp (99%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSRunWindow.h (98%)
 rename qt/scientific_interfaces/ISISSANS/{inc/ISISSANS => }/SANSRunWindow.ui (99%)

diff --git a/MantidPlot/CMakeLists.txt b/MantidPlot/CMakeLists.txt
index a0719b2f00e..65264fb961d 100644
--- a/MantidPlot/CMakeLists.txt
+++ b/MantidPlot/CMakeLists.txt
@@ -662,7 +662,6 @@ qt4_add_resources ( RES_FILES ${PROJECT_SOURCE_DIR}/images/MantidWidgets.qrc )
 qt4_add_resources ( RES_FILES ${PROJECT_SOURCE_DIR}/images//fonts/fonts.qrc )
 qt4_add_resources ( RES_FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/icons.qrc )
 qt4_add_resources ( RES_FILES ${PROJECT_SOURCE_DIR}/qt/widgets/sliceviewer/icons/SliceViewerIcons.qrc )
-qt4_add_resources ( RES_FILES ${PROJECT_SOURCE_DIR}/qt/scientific_interfaces/icons/CustomInterfacesIcons.qrc )
 qt4_add_resources ( RES_FILES ${PROJECT_SOURCE_DIR}/qt/paraview_ext/VatesSimpleGui/ViewWidgets/icons/ViewWidgetsIcons.qrc )
 
 ###########################################################################
diff --git a/qt/scientific_interfaces/CMakeLists.txt b/qt/scientific_interfaces/CMakeLists.txt
index f1789dec0f2..6ae324a481e 100644
--- a/qt/scientific_interfaces/CMakeLists.txt
+++ b/qt/scientific_interfaces/CMakeLists.txt
@@ -12,6 +12,7 @@ endif ( ${Boost_VERSION} GREATER 104799 AND ${qt_version} VERSION_GREATER 4.7.3
 ###########################################################################
 add_subdirectory ( Muon )
 add_subdirectory ( MultiDatasetFit )
+add_subdirectory ( ISISSANS )
 
 ###########################################################################
 # Testing
diff --git a/qt/scientific_interfaces/ISISSANS/CMakeLists.txt b/qt/scientific_interfaces/ISISSANS/CMakeLists.txt
new file mode 100644
index 00000000000..2c1e77ae210
--- /dev/null
+++ b/qt/scientific_interfaces/ISISSANS/CMakeLists.txt
@@ -0,0 +1,79 @@
+set ( SRC_FILES
+	SANSAddFiles.cpp
+	SANSBackgroundCorrectionSettings.cpp
+	SANSBackgroundCorrectionWidget.cpp
+	SANSConstants.cpp
+	SANSDiagnostics.cpp
+	SANSEventSlicing.cpp
+	SANSPlotSpecial.cpp
+	SANSRunWindow.cpp
+)
+
+# Include files aren't required, but this makes them appear in Visual Studio
+# IMPORTANT: Include files are required in the MOC_FILES set. Scroll down to find it.
+set ( INC_FILES
+	SANSAddFiles.h
+	SANSBackgroundCorrectionSettings.h
+	SANSBackgroundCorrectionWidget.h
+	SANSConstants.h
+	SANSDiagnostics.h
+	SANSEventSlicing.h
+	SANSPlotSpecial.h
+	SANSRunWindow.h
+)
+
+set ( MOC_FILES 
+    SANSBackgroundCorrectionWidget.h
+    SANSAddFiles.h
+    SANSPlotSpecial.h
+    SANSRunWindow.h
+    SANSEventSlicing.h
+    SANSDiagnostics.h
+)
+
+set ( UI_FILES
+    SANSBackgroundCorrectionWidget.ui
+    SANSPlotSpecial.ui
+    SANSRunWindow.ui
+    SANSEventSlicing.ui
+)
+
+qt4_wrap_cpp ( MOCCED_FILES ${MOC_FILES} OPTIONS ${extra_options} )
+
+qt4_wrap_ui ( UI_HDRS ${UI_FILES} )
+include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
+
+set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES})
+
+# Use a precompiled header where they are supported
+enable_precompiled_headers( PrecompiledHeader.h  ALL_SRC )
+add_library ( MantidScientificInterfacesISISSANS ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )
+
+# Set the name of the generated library
+set_target_properties ( MantidScientificInterfacesISISSANS PROPERTIES COMPILE_DEFINITIONS IN_MANTIDQT_ISISSANS )
+if ( MSVC_IDE )
+#  # Add to the 'ScientificInterfaces' group in VS
+  set_property ( TARGET MantidScientificInterfacesISISSANS PROPERTY FOLDER "ScientificInterfaces" )
+endif()
+
+if (OSX_VERSION VERSION_GREATER 10.8)
+  set_target_properties ( MantidScientificInterfacesISISSANS PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/MacOS")
+endif ()
+
+find_Package(Threads)
+
+target_link_libraries ( MantidScientificInterfacesISISSANS LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME}
+            qtwidgetscommon
+            ${CORE_MANTIDLIBS}
+            ${QT_LIBRARIES}
+            ${QWT_LIBRARIES}
+            ${POCO_LIBRARIES}
+            ${Boost_LIBRARIES}
+            ${JSONCPP_LIBRARIES}
+            ${CMAKE_THREAD_LIBS_INIT})
+
+###########################################################################
+# Installation settings
+###########################################################################
+
+install ( TARGETS MantidScientificInterfacesISISSANS ${SYSTEM_PACKAGE_TARGET} DESTINATION ${PLUGINS_DIR}/qtplugins/mantid )
diff --git a/qt/scientific_interfaces/ISISSANS/DllConfig.h b/qt/scientific_interfaces/ISISSANS/DllConfig.h
new file mode 100644
index 00000000000..874f9c8e008
--- /dev/null
+++ b/qt/scientific_interfaces/ISISSANS/DllConfig.h
@@ -0,0 +1,39 @@
+#ifndef MANTIDQT_ISISSANS_DLLCONFIG_H_
+#define MANTIDQT_ISISSANS_DLLCONFIG_H_
+
+#include "MantidKernel/System.h"
+
+/*
+    This file contains the DLLExport/DLLImport linkage configuration for the
+    MantidQt CustomInterfaces library
+
+    Copyright &copy; 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
+   National Laboratory & European Spallation Source
+
+    This file is part of Mantid.
+
+    Mantid is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3 of the License, or
+    (at your option) any later version.
+
+    Mantid is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    File change history is stored at: <https://github.com/mantidproject/mantid>.
+    Code Documentation is available at: <http://doxygen.mantidproject.org>
+*/
+#ifdef IN_MANTIDQT_ISISSANS
+#define MANTIDQT_ISISSANS_DLL DLLExport
+#define EXTERN_MANTIDQT_ISISSANS
+#else
+#define MANTIDQT_ISISSANS_DLL DLLImport
+#define EXTERN_MANTIDQT_ISISSANS EXTERN_IMPORT
+#endif
+
+#endif // MANTIDQT_ISISSANS_DLLCONFIG_H_
diff --git a/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h b/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h
new file mode 100644
index 00000000000..adab264ffb1
--- /dev/null
+++ b/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h
@@ -0,0 +1,20 @@
+#ifndef MANTIDQT_CUSTOMINTERFACES_PRECOMPILEDHEADER_H_
+#define MANTIDQT_CUSTOMINTERFACES_PRECOMPILEDHEADER_H_
+
+// Mantid
+#include "MantidKernel/System.h"
+#include "MantidAPI/Algorithm.h"
+#include "MantidAPI/MatrixWorkspace_fwd.h"
+
+// Qt
+#include <QWidget>
+#include <QDialog>
+#include <QString>
+
+// STL
+#include <vector>
+#include <map>
+#include <set>
+#include <string>
+
+#endif // MANTIDQT_CUSTOMINTERFACES_PRECOMPILEDHEADER_H_
\ No newline at end of file
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSAddFiles.cpp b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/src/SANSAddFiles.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp
index 179631a96d6..c3f4fc1fea8 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSAddFiles.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp
@@ -1,6 +1,6 @@
-#include "MantidQtCustomInterfaces/SANSAddFiles.h"
-#include "MantidQtCustomInterfaces/SANSRunWindow.h"
-#include "MantidQtAPI/ManageUserDirectories.h"
+#include "SANSAddFiles.h"
+#include "SANSRunWindow.h"
+#include "MantidQtWidgets/Common/ManageUserDirectories.h"
 #include "MantidKernel/ConfigService.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidKernel/ArrayProperty.h"
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSAddFiles.h b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h
similarity index 97%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSAddFiles.h
rename to qt/scientific_interfaces/ISISSANS/SANSAddFiles.h
index e584a338330..ade2aa1a847 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSAddFiles.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h
@@ -2,8 +2,8 @@
 #define MANTIDQTCUSTOMINTERFACES_SANSADDFILES_H_
 
 #include "ui_SANSRunWindow.h"
-#include "MantidQtCustomInterfaces/SANSConstants.h"
-#include "MantidQtAPI/UserSubWindow.h"
+#include "SANSConstants.h"
+#include "MantidQtWidgets/Common/UserSubWindow.h"
 #include "MantidKernel/ConfigService.h"
 #include <Poco/NObserver.h>
 #include <QString>
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionSettings.cpp b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp
similarity index 95%
rename from qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionSettings.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp
index 0458c653e9e..166e9994666 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionSettings.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp
@@ -1,4 +1,4 @@
-#include "MantidQtCustomInterfaces/SANSBackgroundCorrectionSettings.h"
+#include "SANSBackgroundCorrectionSettings.h"
 
 namespace MantidQt {
 namespace CustomInterfaces {
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionSettings.h b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h
similarity index 94%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionSettings.h
rename to qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h
index 0614b447a70..627f3a734a7 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionSettings.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h
@@ -2,7 +2,7 @@
 #define MANTIDQT_CUSTOMINTERFACES_SANSBACKGROUNDCORRECTIONSETTINGS_H_
 
 #include "MantidKernel/System.h"
-#include "MantidQtCustomInterfaces/DllConfig.h"
+#include "DllConfig.h"
 
 #include <QString>
 #include <boost/optional.hpp>
@@ -33,7 +33,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 File change history is stored at: <https://github.com/mantidproject/mantid>
 Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class MANTIDQT_CUSTOMINTERFACES_DLL SANSBackgroundCorrectionSettings {
+class MANTIDQT_ISISSANS_DLL SANSBackgroundCorrectionSettings {
 public:
   SANSBackgroundCorrectionSettings(QString runNumber, bool useMean, bool useMon,
                                    QString monNumber);
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionWidget.cpp b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp
similarity index 98%
rename from qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionWidget.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp
index 7ffdc7dcf2b..268a811227e 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSBackgroundCorrectionWidget.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp
@@ -1,6 +1,6 @@
 #include "MantidKernel/Logger.h"
-#include "MantidQtCustomInterfaces/SANSBackgroundCorrectionSettings.h"
-#include "MantidQtCustomInterfaces/SANSBackgroundCorrectionWidget.h"
+#include "SANSBackgroundCorrectionSettings.h"
+#include "SANSBackgroundCorrectionWidget.h"
 namespace {
 bool convertQtInt(int state) { return state == 2 ? true : false; }
 }
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionWidget.h b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h
similarity index 95%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionWidget.h
rename to qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h
index bf1244eafd0..afd4e57f18e 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionWidget.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h
@@ -2,7 +2,7 @@
 #define MANTIDQT_CUSTOMINTERFACES_SANSBACKGROUNDCORRECTIONWIDGET_H_
 
 #include "MantidKernel/System.h"
-#include "MantidQtCustomInterfaces/DllConfig.h"
+#include "DllConfig.h"
 #include "ui_SANSBackgroundCorrectionWidget.h"
 
 #include <QWidget>
@@ -36,7 +36,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 File change history is stored at: <https://github.com/mantidproject/mantid>
 Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class MANTIDQT_CUSTOMINTERFACES_DLL SANSBackgroundCorrectionWidget
+class MANTIDQT_ISISSANS_DLL SANSBackgroundCorrectionWidget
     : public QWidget {
   Q_OBJECT
 public:
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionWidget.ui b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.ui
similarity index 100%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSBackgroundCorrectionWidget.ui
rename to qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.ui
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSConstants.cpp b/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp
similarity index 98%
rename from qt/scientific_interfaces/ISISSANS/src/SANSConstants.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSConstants.cpp
index 33f3a8c9253..94c76001420 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSConstants.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp
@@ -1,4 +1,4 @@
-#include "MantidQtCustomInterfaces/SANSConstants.h"
+#include "SANSConstants.h"
 #include <limits>
 
 namespace MantidQt {
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSConstants.h b/qt/scientific_interfaces/ISISSANS/SANSConstants.h
similarity index 100%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSConstants.h
rename to qt/scientific_interfaces/ISISSANS/SANSConstants.h
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSDiagnostics.cpp b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/src/SANSDiagnostics.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp
index 56a518d9ba7..e1f69e042e5 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSDiagnostics.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp
@@ -1,4 +1,4 @@
-#include "MantidQtCustomInterfaces/SANSDiagnostics.h"
+#include "SANSDiagnostics.h"
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/UserStringParser.h"
 #include "MantidKernel/EmptyValues.h"
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSDiagnostics.h b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSDiagnostics.h
rename to qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h
index ea1016b1182..349d1e85b99 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSDiagnostics.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h
@@ -2,7 +2,7 @@
 #define MANTIDQTCUSTOMINTERFACES_SANSDIAGNOSTICS_H_
 
 #include "ui_SANSRunWindow.h"
-#include "MantidQtAPI/UserSubWindow.h"
+#include "MantidQtWidgets/Common/UserSubWindow.h"
 #include "MantidAPI/Workspace_fwd.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidGeometry/IDetector.h"
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSEventSlicing.cpp b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp
similarity index 98%
rename from qt/scientific_interfaces/ISISSANS/src/SANSEventSlicing.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp
index a7cda3c46d8..32423e21fc7 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSEventSlicing.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp
@@ -1,4 +1,4 @@
-#include "MantidQtCustomInterfaces/SANSEventSlicing.h"
+#include "SANSEventSlicing.h"
 #include "MantidAPI/AlgorithmManager.h"
 #include "ui_SANSEventSlicing.h"
 #include <QSettings>
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.h b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h
similarity index 96%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.h
rename to qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h
index a026b261b9e..3b7f190b1c3 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h
@@ -2,7 +2,7 @@
 #define MANTIDQTCUSTOMINTERFACES_SANSEVENTSLICING_H_
 
 #include "ui_SANSEventSlicing.h"
-#include "MantidQtAPI/UserSubWindow.h"
+#include "MantidQtWidgets/Common/UserSubWindow.h"
 #include <QString>
 
 namespace MantidQt {
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.ui b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.ui
similarity index 98%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.ui
rename to qt/scientific_interfaces/ISISSANS/SANSEventSlicing.ui
index 35dd6727ced..10391ce263c 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSEventSlicing.ui
+++ b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.ui
@@ -221,7 +221,7 @@
   <customwidget>
    <class>MantidQt::MantidWidgets::WorkspaceSelector</class>
    <extends>QComboBox</extends>
-   <header>MantidQtMantidWidgets/WorkspaceSelector.h</header>
+   <header>MantidQtWidgets/Common/WorkspaceSelector.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSPlotSpecial.cpp b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/src/SANSPlotSpecial.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp
index 4c3cbbf8c30..4ad1284f4b9 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSPlotSpecial.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp
@@ -1,11 +1,11 @@
-#include "MantidQtCustomInterfaces/SANSPlotSpecial.h"
+#include "SANSPlotSpecial.h"
 
 #include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/IFunction.h"
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidKernel/PhysicalConstants.h"
 
-#include "MantidQtMantidWidgets/RangeSelector.h"
+#include "MantidQtWidgets/Common/RangeSelector.h"
 
 #include "qwt_plot_curve.h"
 #include <QLineEdit>
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSPlotSpecial.h b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h
similarity index 100%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSPlotSpecial.h
rename to qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSPlotSpecial.ui b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.ui
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSPlotSpecial.ui
rename to qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.ui
index 00d7bb1372a..c5ca037a215 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSPlotSpecial.ui
+++ b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.ui
@@ -403,7 +403,7 @@
   <customwidget>
    <class>MantidQt::MantidWidgets::WorkspaceSelector</class>
    <extends>QComboBox</extends>
-   <header>MantidQtMantidWidgets/WorkspaceSelector.h</header>
+   <header>MantidQtWidgets/Common/WorkspaceSelector.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
diff --git a/qt/scientific_interfaces/ISISSANS/src/SANSRunWindow.cpp b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/src/SANSRunWindow.cpp
rename to qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp
index 7e975d5c446..b66230ab5af 100644
--- a/qt/scientific_interfaces/ISISSANS/src/SANSRunWindow.cpp
+++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp
@@ -1,4 +1,4 @@
-#include "MantidQtCustomInterfaces/SANSRunWindow.h"
+#include "SANSRunWindow.h"
 
 #include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/DetectorInfo.h"
@@ -20,11 +20,11 @@
 #include "MantidKernel/PropertyWithValue.h"
 #include "MantidKernel/V3D.h"
 
-#include "MantidQtAPI/ManageUserDirectories.h"
-#include "MantidQtAPI/MantidDesktopServices.h"
-#include "MantidQtCustomInterfaces/SANSAddFiles.h"
-#include "MantidQtCustomInterfaces/SANSBackgroundCorrectionSettings.h"
-#include "MantidQtCustomInterfaces/SANSEventSlicing.h"
+#include "MantidQtWidgets/Common/ManageUserDirectories.h"
+#include "MantidQtWidgets/Common/MantidDesktopServices.h"
+#include "SANSAddFiles.h"
+#include "SANSBackgroundCorrectionSettings.h"
+#include "SANSEventSlicing.h"
 
 #include <QClipboard>
 #include <QFileDialog>
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.h b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h
similarity index 98%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.h
rename to qt/scientific_interfaces/ISISSANS/SANSRunWindow.h
index ba473525914..7b2e2921e33 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.h
+++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h
@@ -4,12 +4,12 @@
 //----------------------
 // Includes
 //----------------------
-#include "MantidQtAPI/UserSubWindow.h"
-#include "MantidQtCustomInterfaces/SANSAddFiles.h"
-#include "MantidQtCustomInterfaces/SANSConstants.h"
-#include "MantidQtCustomInterfaces/SANSDiagnostics.h"
-#include "MantidQtCustomInterfaces/SANSPlotSpecial.h"
-#include "MantidQtMantidWidgets/SaveWorkspaces.h"
+#include "MantidQtWidgets/Common/UserSubWindow.h"
+#include "SANSAddFiles.h"
+#include "SANSConstants.h"
+#include "SANSDiagnostics.h"
+#include "SANSPlotSpecial.h"
+#include "MantidQtWidgets/Common/SaveWorkspaces.h"
 #include "ui_SANSRunWindow.h"
 
 #include "MantidAPI/AnalysisDataService.h"
diff --git a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.ui b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.ui
similarity index 99%
rename from qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.ui
rename to qt/scientific_interfaces/ISISSANS/SANSRunWindow.ui
index 3e7227a7cb2..42847d3c15d 100644
--- a/qt/scientific_interfaces/ISISSANS/inc/ISISSANS/SANSRunWindow.ui
+++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.ui
@@ -4684,17 +4684,17 @@ p, li { white-space: pre-wrap; }
   <customwidget>
    <class>MantidQt::API::MWRunFiles</class>
    <extends>QWidget</extends>
-   <header>MantidQtAPI/MWRunFiles.h</header>
+   <header>MantidQtWidgets/Common/MWRunFiles.h</header>
   </customwidget>
   <customwidget>
    <class>MantidQt::MantidWidgets::MessageDisplay</class>
    <extends>QWidget</extends>
-   <header>MantidQtMantidWidgets/MessageDisplay.h</header>
+   <header>MantidQtWidgets/Common/MessageDisplay.h</header>
   </customwidget>
   <customwidget>
    <class>MantidQt::CustomInterfaces::SANSBackgroundCorrectionWidget</class>
    <extends>QWidget</extends>
-   <header>MantidQtCustomInterfaces/SANSBackgroundCorrectionWidget.h</header>
+   <header>SANSBackgroundCorrectionWidget.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>
diff --git a/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt b/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt
index 02ab52716fa..ae1b85fd54e 100644
--- a/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt
+++ b/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt
@@ -46,10 +46,9 @@ set ( UI_FILES
 include_directories ( ../../qt/widgets/common/inc )
 
 qt4_wrap_cpp ( MOCCED_FILES ${MOC_FILES} OPTIONS ${extra_options} )
+qt4_add_resources ( RES_FILES_MULTIDATASETFIT ../icons/CustomInterfacesIcons.qrc )
 
-#qt4_add_resources ( RES_FILES icons/CustomInterfacesIcons.qrc )
-
-set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} )#${RES_FILES})
+set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ${RES_FILES_MULTIDATASETFIT})
 
 qt4_wrap_ui ( UI_HDRS ${UI_FILES} )
 include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
diff --git a/qt/scientific_interfaces/Muon/CMakeLists.txt b/qt/scientific_interfaces/Muon/CMakeLists.txt
index 4584cd1c233..ae13681da1b 100644
--- a/qt/scientific_interfaces/Muon/CMakeLists.txt
+++ b/qt/scientific_interfaces/Muon/CMakeLists.txt
@@ -90,9 +90,7 @@ include_directories ( ../../qt/widgets/common/inc )
 
 qt4_wrap_cpp ( MOCCED_FILES ${MOC_FILES} OPTIONS ${extra_options} )
 
-#qt4_add_resources ( RES_FILES icons/CustomInterfacesIcons.qrc )
-
-set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} )#${RES_FILES})
+set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} )
 
 qt4_wrap_ui ( UI_HDRS ${UI_FILES} )
 include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
-- 
GitLab