From 2e669a20c68aa3fa346bdc576ba44e322d1251b0 Mon Sep 17 00:00:00 2001 From: Gemma Guest <gemma.guest@stfc.ac.uk> Date: Tue, 2 Oct 2018 13:28:32 +0100 Subject: [PATCH] Renaming to make spelling of polarization consistent Re #22263 --- .../GUI/Experiment/ExperimentPresenter.cpp | 6 +++--- .../GUI/Experiment/ExperimentView.cpp | 18 +++++++++--------- .../GUI/Experiment/ExperimentView.h | 12 ++++++------ .../GUI/Experiment/IExperimentView.h | 12 ++++++------ .../Experiment/ExperimentPresenterTest.h | 4 ++-- .../Experiment/MockExperimentView.h | 12 ++++++------ 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp index 8a5226a1ff5..50d06f563e6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp @@ -56,7 +56,7 @@ void ExperimentPresenter::onReductionResumed() { m_view->disableAll(); } PolarizationCorrections ExperimentPresenter::polarizationCorrectionsFromView() { auto const correctionType = polarizationCorrectionTypeFromString( - m_view->getPolarisationCorrectionType()); + m_view->getPolarizationCorrectionType()); auto const cRho = m_view->getCRho(); auto const cAlpha = m_view->getCAlpha(); auto const cAp = m_view->getCAp(); @@ -64,9 +64,9 @@ PolarizationCorrections ExperimentPresenter::polarizationCorrectionsFromView() { auto corrections = PolarizationCorrections(correctionType, cRho, cAlpha, cAp, cPp); if (corrections.enableInputs()) - m_view->enablePolarisationCorrectionInputs(); + m_view->enablePolarizationCorrectionInputs(); else - m_view->disablePolarisationCorrectionInputs(); + m_view->disablePolarizationCorrectionInputs(); return corrections; } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.cpp index daa9d7484ae..029b52fdde4 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.cpp @@ -300,15 +300,15 @@ void ExperimentView::setChecked(QCheckBox &checkBox, bool checked) { checkBox.setCheckState(checkedAsCheckState); } -void ExperimentView::enablePolarisationCorrections() { +void ExperimentView::enablePolarizationCorrections() { m_ui.polCorrComboBox->setEnabled(true); - enablePolarisationCorrectionInputs(); + enablePolarizationCorrectionInputs(); } -void ExperimentView::disablePolarisationCorrections() { +void ExperimentView::disablePolarizationCorrections() { m_ui.polCorrComboBox->setEnabled(false); - disablePolarisationCorrectionInputs(); - // Set polarisation corrections text to 'None' when disabled + disablePolarizationCorrectionInputs(); + // Set polarization corrections text to 'None' when disabled setSelected(*m_ui.polCorrComboBox, "None"); // Clear all parameters as well m_ui.CRhoEdit->clear(); @@ -317,14 +317,14 @@ void ExperimentView::disablePolarisationCorrections() { m_ui.CPpEdit->clear(); } -void ExperimentView::enablePolarisationCorrectionInputs() { +void ExperimentView::enablePolarizationCorrectionInputs() { m_ui.CRhoEdit->setEnabled(true); m_ui.CAlphaEdit->setEnabled(true); m_ui.CApEdit->setEnabled(true); m_ui.CPpEdit->setEnabled(true); } -void ExperimentView::disablePolarisationCorrectionInputs() { +void ExperimentView::disablePolarizationCorrectionInputs() { m_ui.CRhoEdit->setEnabled(false); m_ui.CAlphaEdit->setEnabled(false); m_ui.CApEdit->setEnabled(false); @@ -531,11 +531,11 @@ void ExperimentView::setTransmissionEndOverlap(double end) { m_ui.endOverlapEdit->setValue(end); } -void ExperimentView::setPolarisationCorrectionType(std::string const &type) { +void ExperimentView::setPolarizationCorrectionType(std::string const &type) { setSelected(*m_ui.polCorrComboBox, type); } -std::string ExperimentView::getPolarisationCorrectionType() const { +std::string ExperimentView::getPolarizationCorrectionType() const { return getText(*m_ui.polCorrComboBox); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.h index 1127341c42d..e69a9150f02 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentView.h @@ -70,8 +70,8 @@ public: void showTransmissionRangeInvalid() override; void showTransmissionRangeValid() override; - std::string getPolarisationCorrectionType() const override; - void setPolarisationCorrectionType(std::string const &type) override; + std::string getPolarizationCorrectionType() const override; + void setPolarizationCorrectionType(std::string const &type) override; double getCRho() const override; void setCRho(double cRho) override; double getCAlpha() const override; @@ -97,10 +97,10 @@ public: void enableReductionType() override; void disableReductionType() override; - void enablePolarisationCorrections() override; - void disablePolarisationCorrections() override; - void enablePolarisationCorrectionInputs() override; - void disablePolarisationCorrectionInputs() override; + void enablePolarizationCorrections() override; + void disablePolarizationCorrections() override; + void enablePolarizationCorrectionInputs() override; + void disablePolarizationCorrectionInputs() override; void addPerThetaDefaultsRow() override; void removePerThetaDefaultsRow(int rowIndex) override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h index 5cae4955fe7..344fa8b6c71 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h @@ -77,10 +77,10 @@ public: virtual void showStitchParametersValid() = 0; virtual void showStitchParametersInvalid() = 0; - virtual void enablePolarisationCorrections() = 0; - virtual void disablePolarisationCorrections() = 0; - virtual void enablePolarisationCorrectionInputs() = 0; - virtual void disablePolarisationCorrectionInputs() = 0; + virtual void enablePolarizationCorrections() = 0; + virtual void disablePolarizationCorrections() = 0; + virtual void enablePolarizationCorrectionInputs() = 0; + virtual void disablePolarizationCorrectionInputs() = 0; virtual double getTransmissionStartOverlap() const = 0; virtual void setTransmissionStartOverlap(double start) = 0; @@ -89,8 +89,8 @@ public: virtual void showTransmissionRangeInvalid() = 0; virtual void showTransmissionRangeValid() = 0; - virtual std::string getPolarisationCorrectionType() const = 0; - virtual void setPolarisationCorrectionType(std::string const &type) = 0; + virtual std::string getPolarizationCorrectionType() const = 0; + virtual void setPolarizationCorrectionType(std::string const &type) = 0; virtual double getCRho() const = 0; virtual void setCRho(double cRho) = 0; virtual double getCAlpha() const = 0; diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h index 0cb2f1127ad..69814b3ea28 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h @@ -104,7 +104,7 @@ public: expectViewReturnsDefaultAnalysisMode(); expectViewReturnsSumInLambdaDefaults(); - EXPECT_CALL(m_view, getPolarisationCorrectionType()).WillOnce(Return("PA")); + EXPECT_CALL(m_view, getPolarizationCorrectionType()).WillOnce(Return("PA")); EXPECT_CALL(m_view, getCRho()).WillOnce(Return(polCorr.cRho().get())); EXPECT_CALL(m_view, getCAlpha()).WillOnce(Return(polCorr.cAlpha().get())); EXPECT_CALL(m_view, getCAp()).WillOnce(Return(polCorr.cAp().get())); @@ -299,7 +299,7 @@ private: } void expectViewReturnsDefaultPolarizationCorrectionType() { - EXPECT_CALL(m_view, getPolarisationCorrectionType()) + EXPECT_CALL(m_view, getPolarizationCorrectionType()) .WillOnce(Return(std::string("None"))); } diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h index 44e5c26313b..64feecfa51f 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h @@ -27,18 +27,18 @@ public: MOCK_METHOD0(showAllPerAngleOptionsAsValid, void()); MOCK_METHOD0(showStitchParametersValid, void()); MOCK_METHOD0(showStitchParametersInvalid, void()); - MOCK_METHOD0(enablePolarisationCorrections, void()); - MOCK_METHOD0(disablePolarisationCorrections, void()); - MOCK_METHOD0(enablePolarisationCorrectionInputs, void()); - MOCK_METHOD0(disablePolarisationCorrectionInputs, void()); + MOCK_METHOD0(enablePolarizationCorrections, void()); + MOCK_METHOD0(disablePolarizationCorrections, void()); + MOCK_METHOD0(enablePolarizationCorrectionInputs, void()); + MOCK_METHOD0(disablePolarizationCorrectionInputs, void()); MOCK_CONST_METHOD0(getTransmissionStartOverlap, double()); MOCK_METHOD1(setTransmissionStartOverlap, void(double)); MOCK_CONST_METHOD0(getTransmissionEndOverlap, double()); MOCK_METHOD1(setTransmissionEndOverlap, void(double)); MOCK_METHOD0(showTransmissionRangeValid, void(void)); MOCK_METHOD0(showTransmissionRangeInvalid, void(void)); - MOCK_CONST_METHOD0(getPolarisationCorrectionType, std::string()); - MOCK_METHOD1(setPolarisationCorrectionType, void(std::string const &)); + MOCK_CONST_METHOD0(getPolarizationCorrectionType, std::string()); + MOCK_METHOD1(setPolarizationCorrectionType, void(std::string const &)); MOCK_CONST_METHOD0(getCRho, double()); MOCK_METHOD1(setCRho, void(double)); MOCK_CONST_METHOD0(getCAlpha, double()); -- GitLab