From 315a133257d0f49c7f23f1d937a3ee62cb20a254 Mon Sep 17 00:00:00 2001 From: Edward Brown <edward.brown@stfc.ac.uk> Date: Thu, 28 Jun 2018 14:12:00 +0100 Subject: [PATCH] Re-arranged reflectometry sub-folders + cmake config. Re #22263 --- .../ISISReflectometry/CMakeLists.txt | 39 +++++++++---------- .../ISISReflectometry/GUI/CMakeLists.txt | 16 ++++++++ .../Experiment}/ReflExperimentWidget.ui | 0 .../Instrument}/ReflInstrumentWidget.ui | 0 .../GUI/RunsTable/CMakeLists.txt | 32 +++++++++++++++ .../{Views => GUI/RunsTable}/IRunsTableView.h | 2 +- .../RunsTable}/JobsViewUpdater.h | 0 .../RunsTable}/RegexRowFilter.cpp | 0 .../RunsTable}/RegexRowFilter.h | 0 .../RunsTable}/RowLocation.cpp | 0 .../RunsTable}/RowLocation.h | 0 .../RunsTable}/RunsTablePresenter.cpp | 0 .../RunsTable}/RunsTablePresenter.h | 2 +- .../RunsTable}/RunsTablePresenterFactory.cpp | 0 .../RunsTable}/RunsTablePresenterFactory.h | 0 .../RunsTable}/RunsTableView.cpp | 2 +- .../{Views => GUI/RunsTable}/RunsTableView.h | 0 .../{Views => GUI/RunsTable}/RunsTableView.ui | 0 .../ISISReflectometry/IReflRunsTabView.h | 2 +- .../ISISReflectometry/QtReflRunsTabView.h | 2 +- .../Reduction/CMakeLists.txt | 30 ++++++++++++++ .../ReflRunsPresenterFactory.h | 2 +- .../ISISReflectometry/ReflRunsTabPresenter.h | 4 +- 23 files changed, 104 insertions(+), 29 deletions(-) create mode 100644 qt/scientific_interfaces/ISISReflectometry/GUI/CMakeLists.txt rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/Experiment}/ReflExperimentWidget.ui (100%) rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/Instrument}/ReflInstrumentWidget.ui (100%) create mode 100644 qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/CMakeLists.txt rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/RunsTable}/IRunsTableView.h (98%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/JobsViewUpdater.h (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RegexRowFilter.cpp (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RegexRowFilter.h (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RowLocation.cpp (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RowLocation.h (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RunsTablePresenter.cpp (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RunsTablePresenter.h (99%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RunsTablePresenterFactory.cpp (100%) rename qt/scientific_interfaces/ISISReflectometry/{Presenters => GUI/RunsTable}/RunsTablePresenterFactory.h (100%) rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/RunsTable}/RunsTableView.cpp (99%) rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/RunsTable}/RunsTableView.h (100%) rename qt/scientific_interfaces/ISISReflectometry/{Views => GUI/RunsTable}/RunsTableView.ui (100%) create mode 100644 qt/scientific_interfaces/ISISReflectometry/Reduction/CMakeLists.txt diff --git a/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt b/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt index 88ca29959d7..651734c724e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt +++ b/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt @@ -1,16 +1,17 @@ +FUNCTION(PREPEND var prefix) + SET(listVar "") + FOREACH(f ${ARGN}) + LIST(APPEND listVar "${prefix}/${f}") + ENDFOREACH(f) + SET(${var} "${listVar}" PARENT_SCOPE) +ENDFUNCTION(PREPEND) + +add_subdirectory(GUI) +add_subdirectory(Reduction) + set ( SRC_FILES - Reduction/Group.cpp - Reduction/RangeInQ.cpp - Reduction/ReductionWorkspaces.cpp - Reduction/Row.cpp - Reduction/SlicedReductionWorkspaces.cpp - Reduction/ReductionJobs.cpp - Reduction/ValidateRow.cpp - Presenters/RunsTablePresenter.cpp - Presenters/RunsTablePresenterFactory.cpp - Presenters/RegexRowFilter.cpp - Presenters/RowLocation.cpp - Views/RunsTableView.cpp + ${GUI_SRC_FILES} + ${REDUCTION_SRC_FILES} MeasurementItem.cpp InstrumentOptionDefaults.cpp InstrumentParameters.cpp @@ -36,7 +37,6 @@ set ( SRC_FILES ReflSettingsTabPresenter.cpp ReflTableSchema.cpp Parse.cpp - Reduction/Slicing.cpp TransferResults.cpp GetInstrumentParameter.cpp ) @@ -44,13 +44,9 @@ set ( SRC_FILES # 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 + ${GUI_INC_FILES} + ${REDUCTION_INC_FILES} DllConfig.h - Views/IRunsTableView.h - Views/RunsTableView.h - Presenters/RegexRowFilter.h - Presenters/RowLocation.h - Presenters/RunsTablePresenter.h - Presenters/RunsTablePresenterFactory.h InstrumentParameters.h IReflEventTabPresenter.h IReflMainWindowPresenter.h @@ -95,6 +91,7 @@ set ( INC_FILES ) set ( MOC_FILES + ${GUI_MOC_FILES} ReflSearchModel.h QtReflEventTabView.h QtReflRunsTabView.h @@ -102,10 +99,10 @@ set ( MOC_FILES QtReflSettingsTabView.h QtReflMainWindowView.h QtReflBatchView.h - Views/RunsTableView.h ) set ( UI_FILES + ${GUI_UI_FILES} ReflEventTabWidget.ui ReflMainWindowWidget.ui ReflBatchWidget.ui @@ -113,9 +110,9 @@ set ( UI_FILES ReflSaveTabWidget.ui ReflSettingsTabWidget.ui ReflWindow.ui - Views/RunsTableView.ui ) + mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesISISReflectometry QT_VERSION 4 SRC ${SRC_FILES} diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/CMakeLists.txt b/qt/scientific_interfaces/ISISReflectometry/GUI/CMakeLists.txt new file mode 100644 index 00000000000..014d3bed08e --- /dev/null +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/CMakeLists.txt @@ -0,0 +1,16 @@ +#add_subdirectory(Event) +#add_subdirectory(Experiment) +#add_subdirectory(Instrument) +#add_subdirectory(Runs) +add_subdirectory( RunsTable ) +#add_subdirectory(Save) + +PREPEND( RUNS_TABLE_SRC_FILES GUI/RunsTable ${RUNS_TABLE_SRC_FILES}) +PREPEND( RUNS_TABLE_INC_FILES GUI/RunsTable ${RUNS_TABLE_INC_FILES}) +PREPEND( RUNS_TABLE_MOC_FILES GUI/RunsTable ${RUNS_TABLE_MOC_FILES}) +PREPEND( RUNS_TABLE_UI_FILES GUI/RunsTable ${RUNS_TABLE_UI_FILES}) + +set ( GUI_SRC_FILES ${RUNS_TABLE_SRC_FILES} PARENT_SCOPE ) +set ( GUI_INC_FILES ${RUNS_TABLE_INC_FILES} PARENT_SCOPE ) +set ( GUI_MOC_FILES ${RUNS_TABLE_MOC_FILES} PARENT_SCOPE ) +set ( GUI_UI_FILES ${RUNS_TABLE_UI_FILES} PARENT_SCOPE ) diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/ReflExperimentWidget.ui b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ReflExperimentWidget.ui similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Views/ReflExperimentWidget.ui rename to qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ReflExperimentWidget.ui diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/ReflInstrumentWidget.ui b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/ReflInstrumentWidget.ui similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Views/ReflInstrumentWidget.ui rename to qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/ReflInstrumentWidget.ui diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/CMakeLists.txt b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/CMakeLists.txt new file mode 100644 index 00000000000..d6779462f1b --- /dev/null +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/CMakeLists.txt @@ -0,0 +1,32 @@ +set ( RUNS_TABLE_SRC_FILES + RunsTablePresenter.cpp + RunsTablePresenterFactory.cpp + RegexRowFilter.cpp + RowLocation.cpp + RunsTableView.cpp + IRunsTableView.h + RunsTableView.h + PARENT_SCOPE +) + +# 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 ( RUNS_TABLE_INC_FILES + IRunsTableView.h + RunsTableView.h + RegexRowFilter.h + RowLocation.h + RunsTablePresenter.h + RunsTablePresenterFactory.h + PARENT_SCOPE +) + +set ( RUNS_TABLE_MOC_FILES + RunsTableView.h + PARENT_SCOPE +) + +set ( RUNS_TABLE_UI_FILES + RunsTableView.ui + PARENT_SCOPE +) diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/IRunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h similarity index 98% rename from qt/scientific_interfaces/ISISReflectometry/Views/IRunsTableView.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h index d5dc5a11b52..d24976f6355 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Views/IRunsTableView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h @@ -22,7 +22,7 @@ Code Documentation is available at: <http://doxygen.mantidproject.org> */ #ifndef MANTID_CUSTOMINTERFACES_IBATCHVIEW_H_ #define MANTID_CUSTOMINTERFACES_IBATCHVIEW_H_ -#include "../DllConfig.h" +#include "../../DllConfig.h" #include "MantidQtWidgets/Common/Batch/IJobTreeView.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/JobsViewUpdater.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/JobsViewUpdater.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RegexRowFilter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RegexRowFilter.cpp rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RegexRowFilter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RegexRowFilter.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RowLocation.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RowLocation.cpp similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RowLocation.cpp rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RowLocation.cpp diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RowLocation.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RowLocation.h similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RowLocation.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RowLocation.h diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenter.cpp rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h similarity index 99% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenter.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h index afb2f430367..14242333017 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h @@ -24,7 +24,7 @@ Code Documentation is available at: <http://doxygen.mantidproject.org> #define MANTID_CUSTOMINTERFACES_RUNSTABLEPRESENTER_H_ #include "DllConfig.h" #include <memory> -#include "Views/IRunsTableView.h" +#include "IRunsTableView.h" #include "MantidQtWidgets/Common/Batch/IJobTreeView.h" #include "Reduction/Group.h" #include "Reduction/ReductionJobs.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenterFactory.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenterFactory.cpp rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp diff --git a/qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Presenters/RunsTablePresenterFactory.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.cpp similarity index 99% rename from qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.cpp rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.cpp index 53cf6d42090..7a37e549add 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.cpp @@ -1,5 +1,5 @@ #include "RunsTableView.h" -#include "../IndexOf.h" +#include "../../IndexOf.h" #include "MantidKernel/make_unique.h" #include "MantidKernel/ConfigService.h" #include "MantidQtWidgets/Common/AlgorithmHintStrategy.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.h similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.h rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.h diff --git a/qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.ui b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.ui similarity index 100% rename from qt/scientific_interfaces/ISISReflectometry/Views/RunsTableView.ui rename to qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTableView.ui diff --git a/qt/scientific_interfaces/ISISReflectometry/IReflRunsTabView.h b/qt/scientific_interfaces/ISISReflectometry/IReflRunsTabView.h index 7b83f77bbbd..cd1ee30979b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/IReflRunsTabView.h +++ b/qt/scientific_interfaces/ISISReflectometry/IReflRunsTabView.h @@ -4,7 +4,7 @@ #include <set> #include <string> #include <boost/shared_ptr.hpp> -#include "Views/IRunsTableView.h" +#include "GUI/RunsTable/IRunsTableView.h" #include "DllConfig.h" #include "MantidQtWidgets/Common/ProgressableView.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/QtReflRunsTabView.h b/qt/scientific_interfaces/ISISReflectometry/QtReflRunsTabView.h index 5740282c888..8e64910f062 100644 --- a/qt/scientific_interfaces/ISISReflectometry/QtReflRunsTabView.h +++ b/qt/scientific_interfaces/ISISReflectometry/QtReflRunsTabView.h @@ -6,7 +6,7 @@ #include "DllConfig.h" #include "IReflRunsTabView.h" #include "MantidQtWidgets/Common/DataProcessorUI/QtCommandAdapter.h" -#include "Views/RunsTableView.h" +#include "GUI/RunsTable/RunsTableView.h" #include "ui_ReflRunsTabWidget.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/CMakeLists.txt b/qt/scientific_interfaces/ISISReflectometry/Reduction/CMakeLists.txt new file mode 100644 index 00000000000..e6250049b6c --- /dev/null +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/CMakeLists.txt @@ -0,0 +1,30 @@ +set ( REDUCTION_SRC_FILES + Group.cpp + RangeInQ.cpp + ReductionWorkspaces.cpp + Row.cpp + SlicedReductionWorkspaces.cpp + ReductionJobs.cpp + ValidateRow.cpp + Slicing.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 ( REDUCTION_INC_FILES + Group.h + RangeInQ.h + ReductionJobs.h + ReductionWorkspaces.h + Row.h + SlicedReductionWorkspaces.h + Slicing.h + ValidateRow.h + WorkspaceNamesFactory.h +) + +PREPEND( REDUCTION_SRC_FILES Reduction ${REDUCTION_SRC_FILES}) +PREPEND( REDUCTION_INC_FILES Reduction ${REDUCTION_INC_FILES}) + +set ( REDUCTION_SRC_FILES ${REDUCTION_SRC_FILES} PARENT_SCOPE) +set ( REDUCTION_INC_FILES ${REDUCTION_INC_FILES} PARENT_SCOPE) diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflRunsPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/ReflRunsPresenterFactory.h index 36814587ac4..91030abcfea 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflRunsPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/ReflRunsPresenterFactory.h @@ -6,7 +6,7 @@ #include "IReflRunsTabView.h" #include "ReflRunsTabPresenter.h" #include "MantidQtWidgets/Common/ProgressableView.h" -#include "Presenters/RunsTablePresenterFactory.h" +#include "GUI/RunsTable/RunsTablePresenterFactory.h" #include "../General/IReflSearcher.h" #include <memory> diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflRunsTabPresenter.h b/qt/scientific_interfaces/ISISReflectometry/ReflRunsTabPresenter.h index e3fcc4b2e32..f416b641069 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflRunsTabPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/ReflRunsTabPresenter.h @@ -6,8 +6,8 @@ #include "IReflBatchPresenter.h" #include "MantidAPI/IAlgorithm.h" #include "MantidQtWidgets/Common/DataProcessorUI/TreeData.h" -#include "Presenters/RunsTablePresenter.h" -#include "Presenters/RunsTablePresenterFactory.h" +#include "GUI/RunsTable/RunsTablePresenter.h" +#include "GUI/RunsTable/RunsTablePresenterFactory.h" #include "ReflAutoreduction.h" #include <boost/shared_ptr.hpp> #include "SearchResult.h" -- GitLab