diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp index 47c6ffb2db7956e3d60f573aca7d3c07132d6e5e..ec7693099a5398de8cb9075eb2c409de749d3765 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp @@ -75,9 +75,9 @@ void BatchPresenter::initInstrumentList() { bool BatchPresenter::requestClose() const { return true; } -void BatchPresenter::notifyInstrumentChangedRequested( +void BatchPresenter::notifyChangeInstrumentRequested( const std::string &instrumentName) { - m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); + m_mainPresenter->notifyChangeInstrumentRequested(instrumentName); } void BatchPresenter::notifyInstrumentChanged( diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h index 211ef6204176793fcc824a8e24334484feb247de..3312f52c30aadd1ed8f9e45ca4021772b03f7001 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h @@ -62,7 +62,7 @@ public: void notifyAutoreductionPaused() override; void notifyAutoreductionCompleted() override; void - notifyInstrumentChangedRequested(const std::string &instrumentName) override; + notifyChangeInstrumentRequested(const std::string &instrumentName) override; void notifyInstrumentChanged(const std::string &instrumentName) override; void notifyUpdateInstrumentRequested() override; void notifySettingsChanged() override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h index 3196b64433e9da4ad791945ae07341ebd072eb63..77cc53b080422b067b1dd5a6073eca3898abfed2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h @@ -38,7 +38,7 @@ public: virtual void notifyAutoreductionPaused() = 0; virtual void notifyAutoreductionCompleted() = 0; virtual void - notifyInstrumentChangedRequested(const std::string &instrumentName) = 0; + notifyChangeInstrumentRequested(const std::string &instrumentName) = 0; virtual void notifyInstrumentChanged(const std::string &instrumentName) = 0; virtual void notifyUpdateInstrumentRequested() = 0; virtual void notifySettingsChanged() = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h index cadb4fab3ffe9fdc2f308e6dc1fb5231e9cb5b72..d1441b424c4a0e0bde330a38dc89c83a4c214083 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h @@ -29,7 +29,7 @@ public: virtual void reductionResumed() = 0; virtual void reductionPaused() = 0; virtual void - notifyInstrumentChangedRequested(std::string const &instrumentName) = 0; + notifyChangeInstrumentRequested(std::string const &instrumentName) = 0; virtual void notifyUpdateInstrumentRequested() = 0; virtual Mantid::Geometry::Instrument_const_sptr instrument() const = 0; virtual std::string instrumentName() const = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp index 3fa244e4874d7901ed0b94b2e51c50e7e31e1ed5..edc022fe7871b91bb6ba8c3efa2e9c3c43fd7262 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp @@ -95,7 +95,7 @@ void MainWindowPresenter::reductionResumed() { disableSaveAndLoadBatch(); } // Called on autoreduction normal reduction void MainWindowPresenter::reductionPaused() { enableSaveAndLoadBatch(); } -void MainWindowPresenter::notifyInstrumentChangedRequested( +void MainWindowPresenter::notifyChangeInstrumentRequested( std::string const &instrumentName) { // Re-load instrument with the new name updateInstrument(instrumentName); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h index 89c4e491cdf7a4c167880d19e1a1d79265e10609..7effdf92ed76cf6c5ed0ee75693f347a4c608efa 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h @@ -49,7 +49,7 @@ public: void reductionResumed() override; void reductionPaused() override; void - notifyInstrumentChangedRequested(std::string const &instrumentName) override; + notifyChangeInstrumentRequested(std::string const &instrumentName) override; void notifyUpdateInstrumentRequested() override; Mantid::Geometry::Instrument_const_sptr instrument() const override; std::string instrumentName() const override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h index 1d874ad4afd66595203c0db3a9439a2f3291099e..204c70874253404aff229e817d85543942a3f1e5 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h @@ -30,7 +30,7 @@ public: virtual RunsTable &mutableRunsTable() = 0; virtual void - notifyInstrumentChangedRequested(std::string const &instrumentName) = 0; + notifyChangeInstrumentRequested(std::string const &instrumentName) = 0; virtual void notifyReductionResumed() = 0; virtual void notifyReductionPaused() = 0; virtual void notifyRowStateChanged() = 0; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h index cccfd0b683704775530f435f1a2a58b6b9f94062..811c36cd2d06dee0515fea7afb973d28567f5574 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 notifyInstrumentChangedRequested() = 0; + virtual void notifyChangeInstrumentRequested() = 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 f891cede32d207c67e33b4e8f8d99332f3b03f86..3c42ac07548ca352aadd58e94f3afec6d6bdf25a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp @@ -271,7 +271,7 @@ void QtRunsView::onShowSearchContextMenuRequested(const QPoint &pos) { void QtRunsView::onInstrumentChanged(int index) { UNUSED_ARG(index); m_ui.textSearch->clear(); - m_notifyee->notifyInstrumentChangedRequested(); + m_notifyee->notifyChangeInstrumentRequested(); } /** diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp index 9cbf9d2dcb3ce335884adda129db435c5546b1ad..2ca2849ff700acdc8209b8efd2a68986311f7f28 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp @@ -120,14 +120,14 @@ void RunsPresenter::notifyTransfer() { notifyRowStateChanged(); } -void RunsPresenter::notifyInstrumentChangedRequested() { +void RunsPresenter::notifyChangeInstrumentRequested() { auto const instrumentName = m_view->getSearchInstrument(); - m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); + m_mainPresenter->notifyChangeInstrumentRequested(instrumentName); } -void RunsPresenter::notifyInstrumentChangedRequested( +void RunsPresenter::notifyChangeInstrumentRequested( std::string const &instrumentName) { - m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); + m_mainPresenter->notifyChangeInstrumentRequested(instrumentName); } void RunsPresenter::notifyReductionResumed() { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h index 25233dadf10d17e644feae155da9532f09daf2ea..32072ea58d3f64beb3ca24308c4327dda967e0be 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h @@ -76,7 +76,7 @@ public: bool isAutoreducing() const override; int percentComplete() const override; void - notifyInstrumentChangedRequested(std::string const &instrumentName) override; + notifyChangeInstrumentRequested(std::string const &instrumentName) override; void notifyReductionResumed() override; void notifyReductionPaused() override; void notifyRowStateChanged() override; @@ -100,7 +100,7 @@ public: void notifyAutoreductionResumed() override; void notifyAutoreductionPaused() override; void notifyTransfer() override; - void notifyInstrumentChangedRequested() override; + void notifyChangeInstrumentRequested() override; void notifyStartMonitor() override; void notifyStopMonitor() override; void notifyStartMonitorComplete() override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h index 1be22316e1bf3ae5de97c077ae3d340edc713518..792b9dafc07f762898c7f608e5fe3468d9bebc0f 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 notifyInstrumentChangedRequested() = 0; + virtual void notifyChangeInstrumentRequested() = 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 008490c75bedcd3f48e3b12ca1931b89d2db9e50..369bae47eb3dce667fd81db20e5effe3dbb1a8ee 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp @@ -85,7 +85,7 @@ void QtRunsTableView::onFilterChanged(QString const &filter) { void QtRunsTableView::onInstrumentChanged(int index) { UNUSED_ARG(index); - m_notifyee->notifyInstrumentChangedRequested(); + m_notifyee->notifyChangeInstrumentRequested(); } 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 0d4a3e9e0b73b0dfa4d57a743b73cb4427dc7974..150460227ea044c6753c5f319ff1a3a9624c4d6c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp @@ -237,9 +237,9 @@ void RunsTablePresenter::notifyFilterChanged(std::string const &filterString) { } } -void RunsTablePresenter::notifyInstrumentChangedRequested() { +void RunsTablePresenter::notifyChangeInstrumentRequested() { auto const instrumentName = m_view->getInstrumentName(); - m_mainPresenter->notifyInstrumentChangedRequested(instrumentName); + m_mainPresenter->notifyChangeInstrumentRequested(instrumentName); } void RunsTablePresenter::notifyFilterReset() { m_view->resetFilterBox(); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h index e9c7f6ae91b99b9fdecfffc41480b496fb8ff3d0..4bd7fa6672c6e2317b85c5f60f3c3ca1f42db27b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h @@ -49,7 +49,7 @@ public: void notifyDeleteRowRequested() override; void notifyDeleteGroupRequested() override; void notifyFilterChanged(std::string const &filterValue) override; - void notifyInstrumentChangedRequested() override; + void notifyChangeInstrumentRequested() 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 d6fd51685b406b2b7e8f912e43744608e6ec5e4b..3331be1cd2bb0362923ec6b60faf69177676e4f9 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h @@ -64,9 +64,9 @@ public: void testMainPresenterUpdatedWhenInstrumentChangedRequested() { auto presenter = makePresenter(); auto const instrument = std::string("POLREF"); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + EXPECT_CALL(m_mainPresenter, notifyChangeInstrumentRequested(instrument)) .Times(1); - presenter.notifyInstrumentChangedRequested(instrument); + presenter.notifyChangeInstrumentRequested(instrument); verifyAndClear(); } diff --git a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h index fd46fcb305fc806050ebe945b3272510ee2bbba9..23d6a8ea6c4ca2ba7ca7c9308c5918d7a82ea24e 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h @@ -191,7 +191,7 @@ public: void testInstrumentChangedRequestedUpdatesInstrumentInModel() { auto presenter = makePresenter(); auto const instrument = std::string("POLREF"); - presenter.notifyInstrumentChangedRequested(instrument); + presenter.notifyChangeInstrumentRequested(instrument); TS_ASSERT_EQUALS(presenter.instrumentName(), instrument); verifyAndClear(); } @@ -203,14 +203,14 @@ public: .Times(1); EXPECT_CALL(*m_batchPresenters[1], notifyInstrumentChanged(instrument)) .Times(1); - presenter.notifyInstrumentChangedRequested(instrument); + presenter.notifyChangeInstrumentRequested(instrument); verifyAndClear(); } void testUpdateInstrumentRequestedUpdatesInstrumentInChildPresenters() { auto presenter = makePresenter(); // must set the instrument to something valid first - presenter.notifyInstrumentChangedRequested("POLREF"); + presenter.notifyChangeInstrumentRequested("POLREF"); auto const instrument = presenter.instrumentName(); EXPECT_CALL(*m_batchPresenters[0], notifyInstrumentChanged(instrument)) .Times(1); @@ -223,7 +223,7 @@ public: void testUpdateInstrumentRequestedDoesNotChangeInstrumentName() { auto presenter = makePresenter(); // must set the instrument to something valid first - presenter.notifyInstrumentChangedRequested("POLREF"); + presenter.notifyChangeInstrumentRequested("POLREF"); auto const instrument = presenter.instrumentName(); presenter.notifyUpdateInstrumentRequested(); TS_ASSERT_EQUALS(presenter.instrumentName(), instrument); diff --git a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h index d5a0fb68d952faa1f9387729fed4792d5efd2db2..2a9580837d19a73b8f7f480666fe834ea09fd9aa 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h @@ -22,7 +22,7 @@ public: MOCK_METHOD0(notifyAutoreductionPaused, void()); MOCK_METHOD0(reductionResumed, void()); MOCK_METHOD0(reductionPaused, void()); - MOCK_METHOD1(notifyInstrumentChangedRequested, void(std::string const &)); + MOCK_METHOD1(notifyChangeInstrumentRequested, void(std::string const &)); MOCK_METHOD0(notifyUpdateInstrumentRequested, void()); MOCK_CONST_METHOD0(instrument, Mantid::Geometry::Instrument_const_sptr()); MOCK_CONST_METHOD0(instrumentName, std::string()); diff --git a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h index 76d85c9a488816a86c6a1e8e60dd30258fa169e6..a3ab6aaf7d020e246e1b71e0405533f2731e7bcb 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h @@ -65,7 +65,7 @@ public: MOCK_METHOD0(anyBatchAutoreductionPaused, void()); MOCK_METHOD0(reductionPaused, void()); - MOCK_METHOD1(notifyInstrumentChangedRequested, void(const std::string &)); + MOCK_METHOD1(notifyChangeInstrumentRequested, void(const std::string &)); MOCK_METHOD1(notifyInstrumentChanged, void(const std::string &)); MOCK_METHOD0(notifyUpdateInstrumentRequested, void()); MOCK_METHOD0(notifyRestoreDefaultsRequested, void()); @@ -86,7 +86,7 @@ public: MOCK_METHOD0(initInstrumentList, void()); MOCK_CONST_METHOD0(runsTable, RunsTable const &()); MOCK_METHOD0(mutableRunsTable, RunsTable &()); - MOCK_METHOD1(notifyInstrumentChangedRequested, void(std::string const &)); + MOCK_METHOD1(notifyChangeInstrumentRequested, void(std::string const &)); MOCK_METHOD0(notifyReductionResumed, void()); MOCK_METHOD0(notifyReductionPaused, void()); MOCK_METHOD0(notifyRowStateChanged, void()); diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h index b09ebf9e819a5e0949efc42d16d7d70a27b14ab6..2a093d3a7d9315960cfd8212c4e9202698fc028b 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h @@ -415,18 +415,18 @@ public: auto presenter = makePresenter(); auto const instrument = std::string("TEST-instrumnet"); expectSearchInstrument(instrument); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + EXPECT_CALL(m_mainPresenter, notifyChangeInstrumentRequested(instrument)) .Times(1); - presenter.notifyInstrumentChangedRequested(); + presenter.notifyChangeInstrumentRequested(); verifyAndClear(); } void testInstrumentChangedRequestedWithGivenNameNotifiesMainPresenter() { auto presenter = makePresenter(); auto const instrument = std::string("TEST-instrumnet"); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + EXPECT_CALL(m_mainPresenter, notifyChangeInstrumentRequested(instrument)) .Times(1); - presenter.notifyInstrumentChangedRequested(instrument); + presenter.notifyChangeInstrumentRequested(instrument); verifyAndClear(); } diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h index aa126613d49b8604788f32b003d7e9e57bb1f448..79eda5db93e3d9335b120b097f770e760020b90d 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h @@ -56,9 +56,9 @@ public: EXPECT_CALL(m_view, getInstrumentName()) .Times(1) .WillOnce(Return(instrument)); - EXPECT_CALL(m_mainPresenter, notifyInstrumentChangedRequested(instrument)) + EXPECT_CALL(m_mainPresenter, notifyChangeInstrumentRequested(instrument)) .Times(1); - presenter.notifyInstrumentChangedRequested(); + presenter.notifyChangeInstrumentRequested(); verifyAndClearExpectations(); }