diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp index 01c307bce06f3e174713c4a026ac11edf39b3c17..2e83543df2121779416985b6fcf2cff00d6d0c82 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp @@ -82,9 +82,9 @@ void BatchPresenter::acceptMainPresenter(IMainWindowPresenter *mainPresenter) { bool BatchPresenter::requestClose() const { return true; } -void BatchPresenter::notifyInstrumentChanged( +void BatchPresenter::notifyInstrumentChangedRequested( const std::string &instrumentName) { - instrumentChanged(instrumentName); + notifyInstrumentChanged(instrumentName); } void BatchPresenter::notifyRestoreDefaultsRequested() { @@ -263,11 +263,12 @@ void BatchPresenter::anyBatchAutoreductionPaused() { m_runsPresenter->anyBatchAutoreductionPaused(); } -void BatchPresenter::instrumentChanged(const std::string &instrumentName) { +void BatchPresenter::notifyInstrumentChanged( + const std::string &instrumentName) { updateInstrument(instrumentName); - m_runsPresenter->instrumentChanged(instrumentName); - m_experimentPresenter->instrumentChanged(instrumentName); - m_instrumentPresenter->instrumentChanged(instrumentName); + m_runsPresenter->notifyInstrumentChanged(instrumentName); + m_experimentPresenter->notifyInstrumentChanged(instrumentName); + m_instrumentPresenter->notifyInstrumentChanged(instrumentName); } void BatchPresenter::updateInstrument(const std::string &instrumentName) { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h index e64d4e40caf0cf6bdcc1d304312e8bb76cc87588..36d29b86827323bf5736c5370fea8fae80ea37e4 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h @@ -61,7 +61,7 @@ public: void notifyAutoreductionResumed() override; void notifyAutoreductionPaused() override; void notifyAutoreductionCompleted() override; - void notifyInstrumentChanged(const std::string &instName) override; + void notifyInstrumentChangedRequested(const std::string &instName) override; void notifyRestoreDefaultsRequested() override; void notifySettingsChanged() override; void anyBatchAutoreductionResumed() override; @@ -93,7 +93,7 @@ private: void pauseAutoreduction(); void autoreductionPaused(); void autoreductionCompleted(); - void instrumentChanged(const std::string &instName); + void notifyInstrumentChanged(const std::string &instName); void updateInstrument(const std::string &instName); void settingsChanged(); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h index 439668b7b4fe7105236f7333ed6f782ccf194cd1..1ca16ba26574d85936c4017b573b623c0e5e551c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h @@ -36,7 +36,8 @@ public: virtual void notifyAutoreductionResumed() = 0; virtual void notifyAutoreductionPaused() = 0; virtual void notifyAutoreductionCompleted() = 0; - virtual void notifyInstrumentChanged(const std::string &instName) = 0; + virtual void + notifyInstrumentChangedRequested(const std::string &instName) = 0; virtual void notifyRestoreDefaultsRequested() = 0; virtual void notifySettingsChanged() = 0; virtual void anyBatchAutoreductionResumed() = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp index e1631fa98643535ed506e2489230cbbd6c041028..30980dcf88c7f1ac38a640f41c5d7a545a26c821 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp @@ -113,7 +113,8 @@ void ExperimentPresenter::autoreductionPaused() { updateWidgetEnabledState(); } void ExperimentPresenter::autoreductionResumed() { updateWidgetEnabledState(); } -void ExperimentPresenter::instrumentChanged(std::string const &instrumentName) { +void ExperimentPresenter::notifyInstrumentChanged( + std::string const &instrumentName) { UNUSED_ARG(instrumentName); restoreDefaults(); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h index d168015e4ec0cdad3ab99ca8bce46f358039f759..d25d388b1f47db25738a9c2bee6ab575bee6a86f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h @@ -67,7 +67,7 @@ public: void reductionResumed() override; void autoreductionPaused() override; void autoreductionResumed() override; - void instrumentChanged(std::string const &instrumentName) override; + void notifyInstrumentChanged(std::string const &instrumentName) override; void restoreDefaults() override; protected: diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h index 12fed381e6fca4f593156bfff868323efad03798..3b02ed219c0a95fcbdd8c1fa2898f2dc0506de55 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h @@ -27,7 +27,7 @@ public: virtual void reductionResumed() = 0; virtual void autoreductionPaused() = 0; virtual void autoreductionResumed() = 0; - virtual void instrumentChanged(std::string const &instrumentName) = 0; + virtual void notifyInstrumentChanged(std::string const &instrumentName) = 0; virtual void restoreDefaults() = 0; }; } // namespace ISISReflectometry diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h index 8411d910f3ceb3031dd63913e86f128846da4c28..4b74dcb931d9ec08374aeb17f577f554645818f3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h @@ -32,7 +32,7 @@ public: virtual void reductionResumed() = 0; virtual void autoreductionPaused() = 0; virtual void autoreductionResumed() = 0; - virtual void instrumentChanged(std::string const &instrumentName) = 0; + virtual void notifyInstrumentChanged(std::string const &instrumentName) = 0; virtual void restoreDefaults() = 0; }; } // namespace ISISReflectometry diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp index 279b851932a98a8e80e2928cf8646d052d3812d6..cae48f22badc668165292d20a709527bc28e0277 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp @@ -108,7 +108,8 @@ void InstrumentPresenter::autoreductionPaused() { updateWidgetEnabledState(); } void InstrumentPresenter::autoreductionResumed() { updateWidgetEnabledState(); } -void InstrumentPresenter::instrumentChanged(std::string const &instrumentName) { +void InstrumentPresenter::notifyInstrumentChanged( + std::string const &instrumentName) { UNUSED_ARG(instrumentName); restoreDefaults(); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h index e9c40ec3d939fe6925430bbd44a6aab6178fed31..44a9a64d4ded224aa89ba7afaf135e6e4ff60af2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h @@ -40,7 +40,7 @@ public: void reductionResumed() override; void autoreductionPaused() override; void autoreductionResumed() override; - void instrumentChanged(std::string const &instrumentName) override; + void notifyInstrumentChanged(std::string const &instrumentName) override; void restoreDefaults() override; // InstrumentViewSubscriber overrides diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h index ecb3baa61e31f5ce084b42ba63a370d9ac1ffeb0..4411d07bdf7b654f75f5507dd3eda4bc1f884f43 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h @@ -28,7 +28,8 @@ public: virtual RunsTable const &runsTable() const = 0; virtual RunsTable &mutableRunsTable() = 0; - virtual void notifyInstrumentChanged(std::string const &instrumentName) = 0; + virtual void + notifyInstrumentChangedRequested(std::string const &instrumentName) = 0; virtual void notifyReductionResumed() = 0; virtual void notifyReductionPaused() = 0; virtual void notifyRowStateChanged() = 0; @@ -44,7 +45,7 @@ public: virtual void autoreductionResumed() = 0; virtual void anyBatchAutoreductionResumed() = 0; virtual void anyBatchAutoreductionPaused() = 0; - virtual void instrumentChanged(std::string const &instrumentName) = 0; + virtual void notifyInstrumentChanged(std::string const &instrumentName) = 0; virtual void settingsChanged() = 0; virtual bool isProcessing() const = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h index 6d915f37f3dd5df5616e771d157e324f8e6c1fe5..9f3fe08b875c34c5d6a96bd33f4587803aef9728 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h @@ -36,7 +36,7 @@ public: virtual void notifyAutoreductionResumed() = 0; virtual void notifyAutoreductionPaused() = 0; virtual void notifyTransfer() = 0; - virtual void notifyInstrumentChanged() = 0; + virtual void notifyInstrumentChangedRequested() = 0; virtual void notifyStartMonitor() = 0; virtual void notifyStopMonitor() = 0; virtual void notifyStartMonitorComplete() = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp index 3e5595258b3a3a89f0d75657902dd437ef6e304b..1ef925f3c2ccf338c99cab1fa9bb5e0d70f75e1f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp @@ -11,7 +11,6 @@ #include "MantidQtWidgets/Common/FileDialogHandler.h" #include "MantidQtWidgets/Common/HelpWindow.h" #include "MantidQtWidgets/Common/HintingLineEditFactory.h" -#include "MantidQtWidgets/Common/SlitCalculator.h" #include <QMenu> #include <QMessageBox> @@ -30,8 +29,7 @@ using namespace MantidQt::Icons; QtRunsView::QtRunsView(QWidget *parent, RunsTableViewFactory makeRunsTableView) : MantidWidget(parent), m_notifyee(nullptr), m_timerNotifyee(nullptr), m_searchNotifyee(nullptr), m_searchModel(), - m_calculator(new SlitCalculator(this)), m_tableView(makeRunsTableView()), - m_timer() { + m_tableView(makeRunsTableView()), m_timer() { initLayout(); m_ui.tableSearchResults->setModel(&m_searchModel); } @@ -254,15 +252,6 @@ This slot notifies the presenter that the "transfer" button has been pressed */ void QtRunsView::on_actionTransfer_triggered() { m_notifyee->notifyTransfer(); } -/** -This slot shows the slit calculator -*/ -void QtRunsView::onShowSlitCalculatorRequested() { - m_calculator->setCurrentInstrumentName( - m_ui.comboSearchInstrument->currentText().toStdString()); - m_calculator->show(); -} - /** This slot is triggered when the user right clicks on the search results table @param pos : The position of the right click within the table @@ -282,11 +271,9 @@ void QtRunsView::onShowSearchContextMenuRequested(const QPoint &pos) { * @param index : The index of the combo box */ void QtRunsView::onInstrumentChanged(int index) { + UNUSED_ARG(index); m_ui.textSearch->clear(); - m_calculator->setCurrentInstrumentName( - m_ui.comboSearchInstrument->itemText(index).toStdString()); - m_calculator->processInstrumentHasBeenChanged(); - m_notifyee->notifyInstrumentChanged(); + m_notifyee->notifyInstrumentChangedRequested(); } /** diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h index ca197ceaee03b3d93b3fdb12e57f650fdaa5914b..ba51abd1bb9fc5e02061565c90ca01b59a9f4b04 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h @@ -20,7 +20,6 @@ namespace MantidQt { namespace MantidWidgets { -class SlitCalculator; } // namespace MantidWidgets namespace API { class AlgorithmRunner; @@ -29,8 +28,6 @@ class AlgorithmRunner; namespace CustomInterfaces { namespace ISISReflectometry { -using MantidWidgets::SlitCalculator; - /** QtRunsView : Provides an interface for the "Runs" tab in the ISIS Reflectometry interface. */ @@ -108,8 +105,6 @@ private: // the interface Ui::RunsWidget m_ui; - // the slit calculator - SlitCalculator *m_calculator; QtRunsTableView *m_tableView; @@ -130,7 +125,6 @@ private slots: void onStartMonitorComplete(); void onSearchComplete(); void onInstrumentChanged(int index); - void onShowSlitCalculatorRequested(); void onShowSearchContextMenuRequested(const QPoint &pos); }; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp index 5542cd6bb8e68f671917c89a4084c8293054826e..4c59039aa866460f6dbfcd731b75ea7ee9a7d5ec 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp @@ -123,15 +123,16 @@ void RunsPresenter::notifyTransfer() { notifyRowStateChanged(); } -void RunsPresenter::notifyInstrumentChanged() { +void RunsPresenter::notifyInstrumentChangedRequested() { auto const instrumentName = m_view->getSearchInstrument(); m_searcher->reset(); if (m_mainPresenter) - m_mainPresenter->notifyInstrumentChanged(instrumentName); + m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); } -void RunsPresenter::notifyInstrumentChanged(std::string const &instrumentName) { - m_mainPresenter->notifyInstrumentChanged(instrumentName); +void RunsPresenter::notifyInstrumentChangedRequested( + std::string const &instrumentName) { + m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); } void RunsPresenter::notifyReductionResumed() { @@ -243,9 +244,9 @@ void RunsPresenter::autoreductionCompleted() { updateWidgetEnabledState(); } -void RunsPresenter::instrumentChanged(std::string const &instrumentName) { +void RunsPresenter::notifyInstrumentChanged(std::string const &instrumentName) { m_view->setSearchInstrument(instrumentName); - tablePresenter()->instrumentChanged(instrumentName); + tablePresenter()->notifyInstrumentChanged(instrumentName); } void RunsPresenter::settingsChanged() { tablePresenter()->settingsChanged(); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h index c8e0cad7a59b23886a6a7c73c9c08c77243068bd..3634bb95cdb8f17a9bf4d26bf52548b077d72616 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h @@ -74,7 +74,8 @@ public: bool isProcessing() const override; bool isAutoreducing() const override; int percentComplete() const override; - void notifyInstrumentChanged(std::string const &instrumentName) override; + void + notifyInstrumentChangedRequested(std::string const &instrumentName) override; void notifyReductionResumed() override; void notifyReductionPaused() override; void notifyRowStateChanged() override; @@ -90,7 +91,7 @@ public: void autoreductionCompleted() override; void anyBatchAutoreductionResumed() override; void anyBatchAutoreductionPaused() override; - void instrumentChanged(std::string const &instrumentName) override; + void notifyInstrumentChanged(std::string const &instrumentName) override; void settingsChanged() override; // RunsViewSubscriber overrides @@ -98,7 +99,7 @@ public: void notifyAutoreductionResumed() override; void notifyAutoreductionPaused() override; void notifyTransfer() override; - void notifyInstrumentChanged() override; + void notifyInstrumentChangedRequested() override; void notifyStartMonitor() override; void notifyStopMonitor() override; void notifyStartMonitorComplete() override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h index c7e245ea2f910a465ca6c21897f9d5ae2a21dd82..997f11e24d0f743d2be18d006e25e19f1330543c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h @@ -43,7 +43,7 @@ public: virtual void reductionResumed() = 0; virtual void autoreductionPaused() = 0; virtual void autoreductionResumed() = 0; - virtual void instrumentChanged(std::string const &instrumentName) = 0; + virtual void notifyInstrumentChanged(std::string const &instrumentName) = 0; virtual void settingsChanged() = 0; }; } // namespace ISISReflectometry diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h index 01c53342512688692dcac91d9ebb16650581960f..1be22316e1bf3ae5de97c077ae3d340edc713518 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h @@ -24,7 +24,7 @@ public: virtual void notifyDeleteRowRequested() = 0; virtual void notifyDeleteGroupRequested() = 0; virtual void notifyFilterChanged(std::string const &filterValue) = 0; - virtual void notifyInstrumentChanged() = 0; + virtual void notifyInstrumentChangedRequested() = 0; virtual void notifyExpandAllRequested() = 0; virtual void notifyCollapseAllRequested() = 0; virtual void notifyPlotSelectedPressed() = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp index 70b5a6dc309533208a7a3b2350f26315c6335527..3e133f1afc36fe9b6852954cf8e788e093deaeb1 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp @@ -87,7 +87,7 @@ void QtRunsTableView::onFilterChanged(QString const &filter) { void QtRunsTableView::onInstrumentChanged(int index) { UNUSED_ARG(index); - m_notifyee->notifyInstrumentChanged(); + m_notifyee->notifyInstrumentChangedRequested(); } std::string QtRunsTableView::getInstrumentName() const { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp index 866987eb3c329681708153540b362e6830ac0b59..71bd5251b1ce308a184223f1ee19ef702c5f5cda 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp @@ -237,10 +237,10 @@ void RunsTablePresenter::notifyFilterChanged(std::string const &filterString) { } } -void RunsTablePresenter::notifyInstrumentChanged() { +void RunsTablePresenter::notifyInstrumentChangedRequested() { auto const instrumentName = m_view->getInstrumentName(); if (m_mainPresenter) - m_mainPresenter->notifyInstrumentChanged(instrumentName); + m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); } void RunsTablePresenter::notifyFilterReset() { m_view->resetFilterBox(); } @@ -280,7 +280,8 @@ void RunsTablePresenter::autoreductionResumed() { reductionResumed(); } void RunsTablePresenter::autoreductionPaused() { reductionPaused(); } -void RunsTablePresenter::instrumentChanged(std::string const &instrumentName) { +void RunsTablePresenter::notifyInstrumentChanged( + std::string const &instrumentName) { m_view->setInstrumentName(instrumentName); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h index 26c38ccef795a717f3d795d1b33114daf7324ebd..e9c7f6ae91b99b9fdecfffc41480b496fb8ff3d0 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h @@ -38,7 +38,7 @@ public: RunsTable const &runsTable() const override; RunsTable &mutableRunsTable() override; void mergeAdditionalJobs(ReductionJobs const &jobs) override; - void instrumentChanged(std::string const &instrumentName) override; + void notifyInstrumentChanged(std::string const &instrumentName) override; void settingsChanged() override; // RunsTableViewSubscriber overrides @@ -49,7 +49,7 @@ public: void notifyDeleteRowRequested() override; void notifyDeleteGroupRequested() override; void notifyFilterChanged(std::string const &filterValue) override; - void notifyInstrumentChanged() override; + void notifyInstrumentChangedRequested() override; void notifyExpandAllRequested() override; void notifyCollapseAllRequested() override; void notifyPlotSelectedPressed() override; diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h index 9e3767a302b7130e3c8146b006a3949db5471609..d33be4f20634023a99654d644c7df32697dba49d 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h @@ -57,10 +57,12 @@ public: void testChildPresentersUpdatedWhenInstrumentChanged() { auto presenter = makePresenter(); auto const instrument = std::string("POLREF"); - EXPECT_CALL(*m_runsPresenter, instrumentChanged(instrument)).Times(1); - EXPECT_CALL(*m_experimentPresenter, instrumentChanged(instrument)).Times(1); - EXPECT_CALL(*m_instrumentPresenter, instrumentChanged(instrument)).Times(1); - presenter.notifyInstrumentChanged(instrument); + EXPECT_CALL(*m_runsPresenter, notifyInstrumentChanged(instrument)).Times(1); + EXPECT_CALL(*m_experimentPresenter, notifyInstrumentChanged(instrument)) + .Times(1); + EXPECT_CALL(*m_instrumentPresenter, notifyInstrumentChanged(instrument)) + .Times(1); + presenter.notifyInstrumentChangedRequested(instrument); verifyAndClear(); } diff --git a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h index 520b5f20d15a0329b616cdbee21b7d7ea3f294c7..6cbca70fd637580997ee78c0975b057378f83dec 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h @@ -64,7 +64,7 @@ public: MOCK_METHOD0(anyBatchAutoreductionPaused, void()); MOCK_METHOD0(reductionPaused, void()); - MOCK_METHOD1(notifyInstrumentChanged, void(const std::string &)); + MOCK_METHOD1(notifyInstrumentChangedRequested, void(const std::string &)); MOCK_METHOD0(notifyRestoreDefaultsRequested, void()); MOCK_METHOD0(notifySettingsChanged, void()); MOCK_CONST_METHOD0(isProcessing, bool()); @@ -82,7 +82,7 @@ public: MOCK_METHOD1(acceptMainPresenter, void(IBatchPresenter *)); MOCK_CONST_METHOD0(runsTable, RunsTable const &()); MOCK_METHOD0(mutableRunsTable, RunsTable &()); - MOCK_METHOD1(notifyInstrumentChanged, void(std::string const &)); + MOCK_METHOD1(notifyInstrumentChangedRequested, void(std::string const &)); MOCK_METHOD0(notifyReductionResumed, void()); MOCK_METHOD0(notifyReductionPaused, void()); MOCK_METHOD0(notifyRowStateChanged, void()); @@ -97,7 +97,7 @@ public: MOCK_METHOD0(autoreductionCompleted, void()); MOCK_METHOD0(anyBatchAutoreductionPaused, void()); MOCK_METHOD0(anyBatchAutoreductionResumed, void()); - MOCK_METHOD1(instrumentChanged, void(std::string const &)); + MOCK_METHOD1(notifyInstrumentChanged, void(std::string const &)); MOCK_METHOD0(settingsChanged, void()); MOCK_CONST_METHOD0(isProcessing, bool()); MOCK_CONST_METHOD0(isAutoreducing, bool()); @@ -123,7 +123,7 @@ public: MOCK_METHOD0(reductionResumed, void()); MOCK_METHOD0(autoreductionPaused, void()); MOCK_METHOD0(autoreductionResumed, void()); - MOCK_METHOD1(instrumentChanged, void(std::string const &)); + MOCK_METHOD1(notifyInstrumentChanged, void(std::string const &)); MOCK_METHOD0(restoreDefaults, void()); }; @@ -135,7 +135,7 @@ public: MOCK_METHOD0(reductionResumed, void()); MOCK_METHOD0(autoreductionPaused, void()); MOCK_METHOD0(autoreductionResumed, void()); - MOCK_METHOD1(instrumentChanged, void(std::string const &)); + MOCK_METHOD1(notifyInstrumentChanged, void(std::string const &)); MOCK_METHOD0(restoreDefaults, void()); }; diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h index 430241257159b7ee99f7fd78dd526828e95e7198..3385d1c1329dd0e216d3733ada4024bf765b1c8c 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h @@ -102,7 +102,7 @@ public: void testInstrumentChangedClearsPreviousResults() { auto presenter = makePresenter(); EXPECT_CALL(*m_searcher, reset()).Times(AtLeast(1)); - presenter.notifyInstrumentChanged(); + presenter.notifyInstrumentChangedRequested(); verifyAndClear(); } @@ -424,8 +424,9 @@ public: auto presenter = makePresenter(); auto const instrument = std::string("TEST-instrumnet"); expectSearchInstrument(instrument); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChanged(instrument)).Times(1); - presenter.notifyInstrumentChanged(); + EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + .Times(1); + presenter.notifyInstrumentChangedRequested(); verifyAndClear(); } diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h index 7bf1d8c9b7e3e2418afb921c585bc4e21daf0bca..9383e7e5b03e7aaab9f5b59cc3e5eaeb7ad0f098 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h @@ -32,7 +32,7 @@ public: MOCK_METHOD0(reductionResumed, void()); MOCK_METHOD0(autoreductionPaused, void()); MOCK_METHOD0(autoreductionResumed, void()); - MOCK_METHOD1(instrumentChanged, void(std::string const &)); + MOCK_METHOD1(notifyInstrumentChanged, void(std::string const &)); MOCK_METHOD0(settingsChanged, void()); }; } // namespace ISISReflectometry diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h index 4808e3180c78c80b84cc4c7f7d26448fef8645a3..aa126613d49b8604788f32b003d7e9e57bb1f448 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h @@ -56,8 +56,9 @@ public: EXPECT_CALL(m_view, getInstrumentName()) .Times(1) .WillOnce(Return(instrument)); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChanged(instrument)).Times(1); - presenter.notifyInstrumentChanged(); + EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + .Times(1); + presenter.notifyInstrumentChangedRequested(); verifyAndClearExpectations(); }