Skip to content
Snippets Groups Projects
Commit 6b34481f authored by Gemma Guest's avatar Gemma Guest
Browse files

Reorganise files into subdirectories

MainWindow and Batch subdirectories have been created for these GUI components.
A Common subdirectory has been created for miscellaneous shared utilities.
Unused files have been removed
parent 3812eaa8
No related merge requests found
Showing
with 67 additions and 93 deletions
......@@ -40,16 +40,13 @@ set ( TEST_FILES
test/EnggVanadiumCorrectionsModelTest.h
test/IO_MuonGroupingTest.h
test/MDFLogValueFinderTest.h
test/MeasurementItemTest.h
test/MuonAnalysisDataLoaderTest.h
test/MuonAnalysisFitDataPresenterTest.h
test/MuonAnalysisFitFunctionPresenterTest.h
test/MuonAnalysisHelperTest.h
test/MuonAnalysisResultTableCreatorTest.h
test/ReflNexusMeasurementItemSourceTest.h
test/RunMapTest.h
test/UserInputValidatorTest.h
test/ISISReflectometry/Reduction/GroupTest.h
test/ISISReflectometry/Reduction/ValidateRowTest.h
test/ISISReflectometry/Reduction/ParseReflectometryStringsTest.h
......
......@@ -6,84 +6,33 @@ FUNCTION(PREPEND var prefix)
SET(${var} ${listVar} PARENT_SCOPE)
ENDFUNCTION(PREPEND)
add_subdirectory(Common)
add_subdirectory(GUI)
add_subdirectory(Reduction)
message(${GUI_SRC_FILES})
set ( SRC_FILES
${COMMON_SRC_FILES}
${GUI_SRC_FILES}
${REDUCTION_SRC_FILES}
MeasurementItem.cpp
InstrumentOptionDefaults.cpp
InstrumentParameters.cpp
ExperimentOptionDefaults.cpp
QtReflMainWindowView.cpp
QtReflBatchView.cpp
ReflCatalogSearcher.cpp
ReflAsciiSaver.cpp
IReflAsciiSaver.cpp
ReflAutoreduction.cpp
ReflFromStdStringMap.cpp
ReflMainWindowPresenter.cpp
ReflBatchPresenter.cpp
ReflNexusMeasurementItemSource.cpp
ReflSearchModel.cpp
ReflTableSchema.cpp
Parse.cpp
TransferResults.cpp
GetInstrumentParameter.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
${COMMON_INC_FILES}
${GUI_INC_FILES}
${REDUCTION_INC_FILES}
DllConfig.h
InstrumentParameters.h
IReflAutoreduction.h
IReflMainWindowPresenter.h
IReflBatchPresenter.h
IReflMainWindowView.h
IReflBatchView.h
IReflMessageHandler.h
IReflSearcher.h
MeasurementItem.h
PrecompiledHeader.h
QtReflMainWindowView.h
QtReflBatchView.h
QWidgetGroup.h
ReflAutoreduction.h
ReflCatalogSearcher.h
ReflAsciiSaver.h
IReflAsciiSaver.h
ReflFromStdStringMap.h
ReflMainWindowPresenter.h
ReflBatchPresenter.h
ReflMeasurementItemSource.h
ReflNexusMeasurementItemSource.h
ReflSearchModel.h
ReflTableSchema.h
TransferResults.h
GetInstrumentParameter.h
ExperimentOptionDefaults.h
InstrumentOptionDefaults.h
First.h
)
set ( MOC_FILES
${GUI_MOC_FILES}
ReflSearchModel.h
QtReflMainWindowView.h
QtReflBatchView.h
)
set ( UI_FILES
${GUI_UI_FILES}
ReflMainWindowWidget.ui
ReflBatchWidget.ui
ReflWindow.ui
)
......
set ( COMMON_SRC_FILES
Parse.cpp
GetInstrumentParameter.cpp
InstrumentParameters.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 ( COMMON_INC_FILES
DllConfig.h
First.h
GetInstrumentParameter.h
IndexOf.h
InstrumentParameters.h
Map.h
IMessageHandler.h
Parse.h
QWidgetGroup.h
ValidationResult.h
ValueOr.h
ZipRange.h
)
PREPEND( COMMON_SRC_FILES Common ${COMMON_SRC_FILES})
PREPEND( COMMON_INC_FILES Common ${COMMON_INC_FILES})
set (COMMON_SRC_FILES ${COMMON_SRC_FILES} PARENT_SCOPE)
set (COMMON_INC_FILES ${COMMON_INC_FILES} PARENT_SCOPE)
......@@ -4,20 +4,19 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTID_ISISREFLECTOMETRY_IREFLMESSAGEHANDLER_H
#define MANTID_ISISREFLECTOMETRY_IREFLMESSAGEHANDLER_H
#ifndef MANTID_ISISREFLECTOMETRY_IMESSAGEHANDLER_H
#define MANTID_ISISREFLECTOMETRY_IMESSAGEHANDLER_H
#include <string>
namespace MantidQt {
namespace CustomInterfaces {
/** @class IReflMessageHandler
/** @class IMessageHandler
IReflMessageHandler is an interface for passing messages to the user
IMessageHandler is an interface for passing messages to the user
*/
class IReflMessageHandler {
class IMessageHandler {
public:
virtual ~IReflMessageHandler(){};
virtual ~IMessageHandler(){};
virtual void giveUserCritical(const std::string &prompt,
const std::string &title) = 0;
virtual void giveUserInfo(const std::string &prompt,
......
......@@ -6,9 +6,9 @@
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTID_ISISREFLECTOMETRY_INSTRUMENTPARAMETERS_H
#define MANTID_ISISREFLECTOMETRY_INSTRUMENTPARAMETERS_H
#include "First.h"
#include "Common/First.h"
#include "Common/ValueOr.h"
#include "GetInstrumentParameter.h"
#include "ValueOr.h"
#include <boost/optional.hpp>
#include <vector>
......
......@@ -7,6 +7,7 @@
#ifndef MANTID_ISISREFLECTOMETRY_ZIPRANGE_H
#define MANTID_ISISREFLECTOMETRY_ZIPRANGE_H
#include <boost/iterator/zip_iterator.hpp>
#include <boost/range/iterator_range.hpp>
namespace MantidQt {
namespace CustomInterfaces {
......
......@@ -4,13 +4,13 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include "ReflBatchPresenter.h"
#include "BatchPresenter.h"
#include "GUI/Event/IEventPresenter.h"
#include "GUI/Experiment/IExperimentPresenter.h"
#include "GUI/Instrument/IInstrumentPresenter.h"
#include "GUI/Runs/IRunsPresenter.h"
#include "GUI/Save/ISavePresenter.h"
#include "IReflBatchView.h"
#include "IBatchView.h"
#include "MantidKernel/ConfigService.h"
#include "MantidQtWidgets/Common/HelpWindow.h"
......@@ -35,8 +35,8 @@ Mantid::Kernel::Logger g_log("Reflectometry GUI");
* presenter
* @param savePresenter :: [input] A pointer to the 'Save ASCII' tab presenter
*/
ReflBatchPresenter::ReflBatchPresenter(
IReflBatchView *view, std::unique_ptr<IRunsPresenter> runsPresenter,
BatchPresenter::BatchPresenter(
IBatchView *view, std::unique_ptr<IRunsPresenter> runsPresenter,
std::unique_ptr<IEventPresenter> eventPresenter,
std::unique_ptr<IExperimentPresenter> experimentPresenter,
std::unique_ptr<IInstrumentPresenter> instrumentPresenter,
......@@ -57,40 +57,40 @@ ReflBatchPresenter::ReflBatchPresenter(
m_runsPresenter->acceptMainPresenter(this);
}
bool ReflBatchPresenter::requestClose() const { return true; }
bool BatchPresenter::requestClose() const { return true; }
void ReflBatchPresenter::notifyInstrumentChanged(
void BatchPresenter::notifyInstrumentChanged(
const std::string &instrumentName) {
instrumentChanged(instrumentName);
}
void ReflBatchPresenter::notifySettingsChanged() { settingsChanged(); }
void BatchPresenter::notifySettingsChanged() { settingsChanged(); }
void ReflBatchPresenter::notifyReductionResumed() { reductionResumed(); }
void BatchPresenter::notifyReductionResumed() { reductionResumed(); }
void ReflBatchPresenter::notifyReductionPaused() { reductionPaused(); }
void BatchPresenter::notifyReductionPaused() { reductionPaused(); }
void ReflBatchPresenter::notifyReductionCompletedForGroup(
void BatchPresenter::notifyReductionCompletedForGroup(
GroupData const &group, std::string const &workspaceName) {
reductionCompletedForGroup(group, workspaceName);
}
void ReflBatchPresenter::notifyReductionCompletedForRow(
void BatchPresenter::notifyReductionCompletedForRow(
GroupData const &group, std::string const &workspaceName) {
reductionCompletedForRow(group, workspaceName);
}
void ReflBatchPresenter::notifyAutoreductionResumed() {
void BatchPresenter::notifyAutoreductionResumed() {
autoreductionResumed();
}
void ReflBatchPresenter::notifyAutoreductionPaused() { autoreductionPaused(); }
void BatchPresenter::notifyAutoreductionPaused() { autoreductionPaused(); }
void ReflBatchPresenter::notifyAutoreductionCompleted() {
void BatchPresenter::notifyAutoreductionCompleted() {
autoreductionCompleted();
}
void ReflBatchPresenter::reductionResumed() {
void BatchPresenter::reductionResumed() {
m_isProcessing = true;
m_savePresenter->reductionResumed();
m_eventPresenter->reductionResumed();
......@@ -99,7 +99,7 @@ void ReflBatchPresenter::reductionResumed() {
m_runsPresenter->reductionResumed();
}
void ReflBatchPresenter::reductionPaused() {
void BatchPresenter::reductionPaused() {
m_isProcessing = false;
m_savePresenter->reductionPaused();
m_eventPresenter->reductionPaused();
......@@ -111,17 +111,17 @@ void ReflBatchPresenter::reductionPaused() {
autoreductionPaused();
}
void ReflBatchPresenter::reductionCompletedForGroup(
void BatchPresenter::reductionCompletedForGroup(
GroupData const &group, std::string const &workspaceName) {
m_savePresenter->reductionCompletedForGroup(group, workspaceName);
}
void ReflBatchPresenter::reductionCompletedForRow(
void BatchPresenter::reductionCompletedForRow(
GroupData const &group, std::string const &workspaceName) {
m_savePresenter->reductionCompletedForRow(group, workspaceName);
}
void ReflBatchPresenter::autoreductionResumed() {
void BatchPresenter::autoreductionResumed() {
m_isAutoreducing = true;
m_savePresenter->autoreductionResumed();
m_eventPresenter->autoreductionResumed();
......@@ -130,7 +130,7 @@ void ReflBatchPresenter::autoreductionResumed() {
m_runsPresenter->autoreductionResumed();
}
void ReflBatchPresenter::autoreductionPaused() {
void BatchPresenter::autoreductionPaused() {
m_isAutoreducing = false;
m_savePresenter->autoreductionPaused();
m_eventPresenter->autoreductionPaused();
......@@ -139,9 +139,9 @@ void ReflBatchPresenter::autoreductionPaused() {
m_runsPresenter->autoreductionPaused();
}
void ReflBatchPresenter::autoreductionCompleted() {}
void BatchPresenter::autoreductionCompleted() {}
void ReflBatchPresenter::instrumentChanged(const std::string &instrumentName) {
void BatchPresenter::instrumentChanged(const std::string &instrumentName) {
Mantid::Kernel::ConfigService::Instance().setString("default.instrument",
instrumentName);
g_log.information() << "Instrument changed to " << instrumentName;
......@@ -149,7 +149,7 @@ void ReflBatchPresenter::instrumentChanged(const std::string &instrumentName) {
m_instrumentPresenter->instrumentChanged(instrumentName);
}
void ReflBatchPresenter::settingsChanged() {
void BatchPresenter::settingsChanged() {
m_runsPresenter->settingsChanged();
}
......@@ -160,14 +160,14 @@ void ReflBatchPresenter::settingsChanged() {
* @return :: Values passed for 'Transmission run(s)'
*/
OptionsQMap
ReflBatchPresenter::getOptionsForAngle(const double /*angle*/) const {
BatchPresenter::getOptionsForAngle(const double /*angle*/) const {
return OptionsQMap(); // TODO m_settingsPresenter->getOptionsForAngle(angle);
}
/** Returns whether there are per-angle transmission runs specified
* @return :: true if there are per-angle transmission runs
* */
bool ReflBatchPresenter::hasPerAngleOptions() const {
bool BatchPresenter::hasPerAngleOptions() const {
return false; // TODO m_settingsPresenter->hasPerAngleOptions();
}
......@@ -175,13 +175,13 @@ bool ReflBatchPresenter::hasPerAngleOptions() const {
Checks whether or not data is currently being processed in this batch
* @return : Bool on whether data is being processed
*/
bool ReflBatchPresenter::isProcessing() const { return m_isProcessing; }
bool BatchPresenter::isProcessing() const { return m_isProcessing; }
/**
Checks whether or not autoprocessing is currently running in this batch
* i.e. whether we are polling for new runs
* @return : Bool on whether data is being processed
*/
bool ReflBatchPresenter::isAutoreducing() const { return m_isAutoreducing; }
bool BatchPresenter::isAutoreducing() const { return m_isAutoreducing; }
} // namespace CustomInterfaces
} // namespace MantidQt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment