diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h index 1a6f5ed49a678b843d848762b035463180966135..72c27060220b94ba7cf4ea003a3e0b5bc658aabd 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.h @@ -2,6 +2,7 @@ #define MANTIDQTCUSTOMINTERFACESIDA_APPLYCORR_H_ #include "MantidAPI/MatrixWorkspace.h" +#include "ui_ApplyCorr.h" #include "IDATab.h" namespace MantidQt @@ -34,6 +35,8 @@ namespace IDA bool validateScaleInput(); ///< validate input for Scale option. /// ask the user if they wish to rebin the can bool requireCanRebin(); + + Ui::ApplyCorr m_uiForm; /// Pointer to the result workspace (for plotting) Mantid::API::MatrixWorkspace_sptr outputWs; diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui index db8c395fa2fca6801e931aa2f4c4bed729bbc3a0..1d98b6799c64011659c901b50ab1695d85e90e61 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ApplyCorr.ui @@ -345,7 +345,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h index 9845fa67d11b153e85afae01f0785a206c511536..106a4eeea1b94a9cae5dcd256f4a48d4c380eabc 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_CALCCORR_H_ #define MANTIDQTCUSTOMINTERFACESIDA_CALCCORR_H_ +#include "ui_CalcCorr.ui" #include "IDATab.h" namespace MantidQt @@ -30,8 +31,10 @@ namespace IDA void getBeamWidthFromWorkspace(const QString& wsname); private: + Ui::CalcCorr m_uiForm; QDoubleValidator * m_dblVal; QDoubleValidator * m_posDblVal; + }; } // namespace IDA } // namespace CustomInterfaces diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.ui index bd1778cd8ed93daf9b10d470e82a0a830b341686..41eb7b5190f79a68895409ce804c8d87f6cbc703 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/CalcCorr.ui @@ -1050,7 +1050,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h index c396eae1bee0819da47d077bf5a5987be37de30e..2d9edc4946e095657b56e6613430001e989c5ba1 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_CONVFIT_H_ #define MANTIDQTCUSTOMINTERFACESIDA_CONVFIT_H_ +#include "ui_ConvFit.h" #include "IDATab.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/CompositeFunction.h" @@ -57,12 +58,14 @@ namespace IDA QString fitTypeString() const; QString backgroundString() const; + Ui::ConvFit m_uiForm; QtStringPropertyManager* m_stringManager; QtTreePropertyBrowser* m_cfTree; QMap<QtProperty*, QtProperty*> m_fixedProps; boost::shared_ptr<const Mantid::API::MatrixWorkspace> m_cfInputWS; QString m_cfInputWSName; bool m_confitResFileType; + }; } // namespace IDA } // namespace CustomInterfaces diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.ui index 198b12c7f014b9a90023b7b5f87765b8cb7ae7f0..a6c07beef55f0f3e151464c0028b95c38dd9a4c8 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/ConvFit.ui @@ -19,7 +19,7 @@ <property name="title"> <string>Input</string> </property> - <layout class="QGridLayout" name="confit_layoutFiles"> + <layout class="QGridLayout" name="layoutFiles"> <item row="0" column="0"> <widget class="QLabel" name="label_42"> <property name="sizePolicy"> @@ -47,7 +47,7 @@ </widget> </item> <item row="0" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="confit_dsSampleInput" native="true"> + <widget class="MantidQt::MantidWidgets::DataSelector" name="dsSampleInput" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -77,7 +77,7 @@ </widget> </item> <item row="1" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="confit_dsResInput" native="true"> + <widget class="MantidQt::MantidWidgets::DataSelector" name="dsResInput" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -148,7 +148,7 @@ <item> <layout class="QHBoxLayout" name="loBackground"> <item> - <widget class="QLabel" name="confit_lbBackground"> + <widget class="QLabel" name="lbBackground"> <property name="text"> <string>Background</string> </property> @@ -434,7 +434,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h index 7e860508075e0434563c7fd32e9389fe38156410..117b6194e6860a9ceae8df86d7b4247b1cafbaac 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_ELWIN_H_ #define MANTIDQTCUSTOMINTERFACESIDA_ELWIN_H_ +#include "ui_Elwin.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidQtCustomInterfaces/Indirect/IDATab.h" @@ -37,6 +38,8 @@ namespace IDA private: void addSaveAlgorithm(QString workspaceName, QString filename=""); + + Ui::Elwin m_uiForm; QtTreePropertyBrowser* m_elwTree; }; diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui index f03b188a0750c79041dbb1c48f023f547c8f5522..147dea816d511368c9f9d0bbbd22f0a49273eca3 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Elwin.ui @@ -21,7 +21,7 @@ </property> <layout class="QHBoxLayout" name="horizontalLayout_16"> <item> - <widget class="MantidQt::MantidWidgets::MWRunFiles" name="elwin_inputFile" native="true"> + <widget class="MantidQt::MantidWidgets::MWRunFiles" name="dsInputFiles" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -51,21 +51,21 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_7"> <item> - <layout class="QVBoxLayout" name="elwin_properties"/> + <layout class="QVBoxLayout" name="properties"/> </item> <item> - <layout class="QVBoxLayout" name="elwin_loPlotAndOptions"> + <layout class="QVBoxLayout" name="loPlotAndOptions"> <item> - <layout class="QHBoxLayout" name="elwin_loPreviewSelection"> + <layout class="QHBoxLayout" name="loPreviewSelection"> <item> - <widget class="QLabel" name="elwin_lbPreviewFile"> + <widget class="QLabel" name="lbPreviewFile"> <property name="text"> <string>Preview file:</string> </property> </widget> </item> <item> - <widget class="QComboBox" name="elwin_cbPreviewFile"> + <widget class="QComboBox" name="cbPreviewFile"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -75,14 +75,14 @@ </widget> </item> <item> - <widget class="QLabel" name="elwin_lbPreviewSpec"> + <widget class="QLabel" name="lbPreviewSpec"> <property name="text"> <string>Spectrum:</string> </property> </widget> </item> <item> - <widget class="QSpinBox" name="elwin_spPreviewSpec"> + <widget class="QSpinBox" name="spPreviewSpec"> <property name="maximum"> <number>0</number> </property> @@ -91,7 +91,7 @@ </layout> </item> <item> - <layout class="QHBoxLayout" name="elwin_plot"/> + <layout class="QHBoxLayout" name="plot"/> </item> </layout> </item> @@ -183,7 +183,7 @@ <customwidget> <class>MantidQt::MantidWidgets::MWRunFiles</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::mwrunfiles.h</header> + <header>MantidQtMantidWidgets/MWRunFiles.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.h index 3de4cc76674079e1c57f7d8496a694277d11407b..d67bcef60978eed7947cc420dd29a4ff932c1666 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_FURY_H_ #define MANTIDQTCUSTOMINTERFACESIDA_FURY_H_ +#include "ui_Fury.h" #include "IDATab.h" namespace MantidQt @@ -29,8 +30,9 @@ namespace IDA void updateRS(QtProperty* prop, double val); void updatePropertyValues(QtProperty* prop, double val); void calculateBinning(); - + private: + Ui::Fury m_uiForm; QtTreePropertyBrowser* m_furTree; bool m_furyResFileType; diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.ui index d9dc49b2230d684e3d1ae7fcb9162e061b2747d4..a9f91fc7f6fc0521a22a3bc4e883bbc75bc44083 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/Fury.ui @@ -19,7 +19,7 @@ <property name="title"> <string>Input</string> </property> - <layout class="QGridLayout" name="fury_layoutFiles"> + <layout class="QGridLayout" name="layoutFiles"> <item row="2" column="0"> <widget class="QLabel" name="lbResolution"> <property name="sizePolicy"> @@ -185,7 +185,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.h index c11edb0f0cbadcba3d9f9225501494f7679161eb..94a6e1fa13d622eda5bea5a62df97b0846f68c95 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_FURYFIT_H_ #define MANTIDQTCUSTOMINTERFACESIDA_FURYFIT_H_ +#include "ui_FuryFit.h" #include "IDATab.h" #include "MantidAPI/CompositeFunction.h" #include "MantidAPI/MatrixWorkspace.h" @@ -61,6 +62,7 @@ namespace IDA QString fitTypeString() const; void constrainIntensities(Mantid::API::CompositeFunction_sptr func); + Ui::FuryFit m_uiForm; QtStringPropertyManager* m_stringManager; QtTreePropertyBrowser* m_ffTree; ///< FuryFit Property Browser QtDoublePropertyManager* m_ffRangeManager; ///< StartX and EndX for FuryFit diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.ui index d8b2d65731c192f7a346839bce1223cee59a401b..df6577a0f9f10c1b41cb908f67191359bfa99cf1 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/FuryFit.ui @@ -19,7 +19,7 @@ <property name="title"> <string>Input</string> </property> - <layout class="QHBoxLayout" name="furyfit_layoutInput"> + <layout class="QHBoxLayout" name="layoutInput"> <item> <widget class="MantidQt::MantidWidgets::DataSelector" name="dsSampleInput" native="true"> <property name="sizePolicy"> @@ -52,11 +52,11 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_25"> <item> - <layout class="QVBoxLayout" name="furyfit_vlTreeProp"> + <layout class="QVBoxLayout" name="vlTreeProp"> <item> <layout class="QVBoxLayout" name="verticalLayout_8"> <item> - <widget class="QLabel" name="furyfit_lbFitType"> + <widget class="QLabel" name="lbFitType"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <horstretch>0</horstretch> @@ -69,7 +69,7 @@ </widget> </item> <item> - <widget class="QComboBox" name="furyfit_cbFitType"> + <widget class="QComboBox" name="cbFitType"> <item> <property name="text"> <string>1 Exponential</string> @@ -97,7 +97,7 @@ <item> <layout class="QGridLayout" name="gridLayout_5"> <item row="0" column="1"> - <widget class="QCheckBox" name="furyfit_ckPlotGuess"> + <widget class="QCheckBox" name="ckPlotGuess"> <property name="text"> <string>Plot Guess</string> </property> @@ -107,7 +107,7 @@ </widget> </item> <item row="0" column="0"> - <widget class="QCheckBox" name="furyfit_ckConstrainIntensities"> + <widget class="QCheckBox" name="ckConstrainIntensities"> <property name="text"> <string>Constrain Intensities</string> </property> @@ -117,7 +117,7 @@ </widget> </item> <item row="1" column="0"> - <widget class="QCheckBox" name="furyfit_ckConstrainBeta"> + <widget class="QCheckBox" name="ckConstrainBeta"> <property name="enabled"> <bool>false</bool> </property> @@ -129,26 +129,26 @@ </layout> </item> <item> - <layout class="QHBoxLayout" name="furyfit_properties"/> + <layout class="QHBoxLayout" name="properties"/> </item> </layout> </item> <item> <layout class="QVBoxLayout" name="verticalLayout_6"> <item> - <layout class="QVBoxLayout" name="furyfit_vlPlot"/> + <layout class="QVBoxLayout" name="vlPlot"/> </item> <item> - <layout class="QHBoxLayout" name="furyfit_gpLegend"> + <layout class="QHBoxLayout" name="gpLegend"> <item> - <widget class="QPushButton" name="furyfit_pbSingle"> + <widget class="QPushButton" name="pbSingle"> <property name="text"> <string>Fit Single Spectrum</string> </property> </widget> </item> <item> - <spacer name="furyfit_spLegendSpace"> + <spacer name="spLegendSpace"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -161,14 +161,14 @@ </spacer> </item> <item> - <widget class="QLabel" name="furyfit_lbLegendSample"> + <widget class="QLabel" name="lbLegendSample"> <property name="text"> <string>Sample</string> </property> </widget> </item> <item> - <widget class="QLabel" name="furyfit_lbLegendFit"> + <widget class="QLabel" name="lbLegendFit"> <property name="styleSheet"> <string notr="true">color: rgb(255, 0, 0);</string> </property> @@ -182,14 +182,14 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout_27"> <item> - <widget class="QLabel" name="furyfit_lbSpectra"> + <widget class="QLabel" name="lbSpectra"> <property name="text"> <string>Plot Spectrum:</string> </property> </widget> </item> <item> - <widget class="QSpinBox" name="furyfit_spPlotSpectrum"> + <widget class="QSpinBox" name="spPlotSpectrum"> <property name="minimum"> <number>0</number> </property> @@ -219,7 +219,7 @@ </widget> </item> <item> - <widget class="QSpinBox" name="furyfit_spSpectraMin"> + <widget class="QSpinBox" name="spSpectraMin"> <property name="minimum"> <number>0</number> </property> @@ -236,7 +236,7 @@ </widget> </item> <item> - <widget class="QSpinBox" name="furyfit_spSpectraMax"> + <widget class="QSpinBox" name="spSpectraMax"> <property name="minimum"> <number>0</number> </property> @@ -345,7 +345,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h index 3349a0d61683e19181870d7c47e3e3f0f47d0728..c1a1e2b4369fb72c8961cdd6bfb1ade39380788a 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IDATab.h @@ -66,14 +66,9 @@ namespace IDA /// Function to run a string as python code void runPythonScript(const QString& pyInput); /// Check the binning between two workspaces match - bool checkWorkspaceBinningMatches(Mantid::API::MatrixWorkspace_const_sptr left, + bool checkWorkspaceBinningMatches(Mantid::API::MatrixWorkspace_const_sptr left, Mantid::API::MatrixWorkspace_const_sptr right); - /// Returns a handle to the UI form object stored in the IndirectDataAnalysis class. - Ui::IndirectDataAnalysis & uiForm(); - /// Returns a const handle to the UI form object stored in the IndirectDataAnalysis class. - const Ui::IndirectDataAnalysis & uiForm() const; - /// Returns a handle to the DoubleEditorFactory object stored in the IndirectDataAnalysis class. DoubleEditorFactory * doubleEditorFactory(); /// Returns a handle to the QtCheckBoxFactory object stored in the IndirectDataAnalysis class. diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui index 7ce758a0ddd125dbae84bf54deb8fe652f88450d..0f388f5847ed87ec7df6b8a37ea21b26e4574239 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDataAnalysis.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>807</width> - <height>638</height> + <width>850</width> + <height>700</height> </rect> </property> <property name="windowTitle"> @@ -30,2740 +30,36 @@ <attribute name="title"> <string>Elwin</string> </attribute> - <layout class="QVBoxLayout" name="layoutElwin"> - <item> - <widget class="QGroupBox" name="elwin_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_16"> - <item> - <widget class="MantidQt::MantidWidgets::MWRunFiles" name="elwin_inputFile" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>41</verstretch> - </sizepolicy> - </property> - <property name="findRunFiles" stdset="0"> - <bool>false</bool> - </property> - <property name="label" stdset="0"> - <string>Input File</string> - </property> - <property name="multipleFiles" stdset="0"> - <bool>true</bool> - </property> - <property name="fileExtensions" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <item> - <layout class="QVBoxLayout" name="elwin_properties"/> - </item> - <item> - <layout class="QVBoxLayout" name="elwin_loPlotAndOptions"> - <item> - <layout class="QHBoxLayout" name="elwin_loPreviewSelection"> - <item> - <widget class="QLabel" name="elwin_lbPreviewFile"> - <property name="text"> - <string>Preview file:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="elwin_cbPreviewFile"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="elwin_lbPreviewSpec"> - <property name="text"> - <string>Spectrum:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="elwin_spPreviewSpec"> - <property name="maximum"> - <number>0</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="elwin_plot"/> - </item> - </layout> - </item> - </layout> - </item> - <item> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="3"> - <spacer name="horizontalSpacer_28"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>SE log name: </string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLineEdit" name="leLogName"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="2"> - <spacer name="horizontalSpacer_29"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <widget class="QGroupBox" name="elwin_gbOutput"> - <property name="title"> - <string>Output</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <item> - <spacer name="horizontalSpacer_8"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="elwin_ckPlot"> - <property name="text"> - <string>Plot Result</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_10"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="elwin_ckSave"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> </widget> <widget class="QWidget" name="tabMSD"> <attribute name="title"> <string>MSD Fit</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <item> - <widget class="QGroupBox" name="msd_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_18"> - <item> - <widget class="MantidQt::MantidWidgets::DataSelector" name="msd_dsSampleInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_eq2</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_eq2.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <layout class="QVBoxLayout" name="msd_properties"/> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_41"> - <item> - <layout class="QVBoxLayout" name="msd_plot"/> - </item> - <item> - <layout class="QHBoxLayout" name="msd_gpLegend"> - <item> - <widget class="QPushButton" name="msd_pbSingle"> - <property name="text"> - <string>Fit Single Spectrum</string> - </property> - </widget> - </item> - <item> - <spacer name="msd_spLegendSpace"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="msd_lbLegendSample"> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="msd_lbLegendFit"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>Fit</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="label_51"> - <property name="text"> - <string>Plot Spectrum:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="msd_spPlotSpectrum"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_24"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="label_31"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Spectra Range:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="msd_spSpectraMin"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_41"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="msd_spSpectraMax"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </item> - <item> - <widget class="QGroupBox" name="msd_gbOutput"> - <property name="title"> - <string>Output</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <item> - <widget class="QCheckBox" name="msd_ckVerbose"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_22"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="msd_ckPlot"> - <property name="text"> - <string>Plot Result</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_23"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="msd_ckSave"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> </widget> <widget class="QWidget" name="tabFury"> <attribute name="title"> <string>Fury</string> </attribute> - <layout class="QVBoxLayout" name="layoutFury"> - <item> - <widget class="QGroupBox" name="fury_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QGridLayout" name="fury_layoutFiles"> - <item row="2" column="0"> - <widget class="QLabel" name="label_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Resolution</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_52"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item row="1" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="fury_dsInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="loadLabelText" stdset="0"> - <string>Plot Input</string> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="2" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="fury_dsResInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_res</string> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_res.nxs</string> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_22"> - <item> - <layout class="QVBoxLayout" name="fury_TreeSpace"/> - </item> - <item> - <layout class="QVBoxLayout" name="fury_PlotSpace"/> - </item> - </layout> - </item> - <item> - <widget class="QGroupBox" name="fury_gbOutput"> - <property name="title"> - <string>Output</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <item> - <widget class="QCheckBox" name="fury_ckVerbose"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_7"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="fury_ckPlot"> - <property name="text"> - <string>Plot Result</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_18"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="fury_ckSave"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> </widget> <widget class="QWidget" name="tabFuryFit"> <attribute name="title"> <string>FuryFit</string> </attribute> - <layout class="QVBoxLayout" name="layoutFuryFit"> - <item> - <widget class="QGroupBox" name="furyfit_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QHBoxLayout" name="furyfit_layoutInput"> - <item> - <widget class="MantidQt::MantidWidgets::DataSelector" name="furyfit_dsSampleInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_iqt</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_iqt.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_25"> - <item> - <layout class="QVBoxLayout" name="furyfit_vlTreeProp"> - <item> - <layout class="QVBoxLayout" name="verticalLayout_8"> - <item> - <widget class="QLabel" name="furyfit_lbFitType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Fit Type:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="furyfit_cbFitType"> - <item> - <property name="text"> - <string>1 Exponential</string> - </property> - </item> - <item> - <property name="text"> - <string>2 Exponentials</string> - </property> - </item> - <item> - <property name="text"> - <string>1 Stretched Exponential</string> - </property> - </item> - <item> - <property name="text"> - <string>1 Stretched Exponential and 1 Exponential</string> - </property> - </item> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QGridLayout" name="gridLayout_5"> - <item row="0" column="1"> - <widget class="QCheckBox" name="furyfit_ckPlotGuess"> - <property name="text"> - <string>Plot Guess</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="furyfit_ckConstrainIntensities"> - <property name="text"> - <string>Constrain Intensities</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="furyfit_ckConstrainBeta"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Constrain Beta Over All Q</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="furyfit_properties"/> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <item> - <layout class="QVBoxLayout" name="furyfit_vlPlot"/> - </item> - <item> - <layout class="QHBoxLayout" name="furyfit_gpLegend"> - <item> - <widget class="QPushButton" name="furyfit_pbSingle"> - <property name="text"> - <string>Fit Single Spectrum</string> - </property> - </widget> - </item> - <item> - <spacer name="furyfit_spLegendSpace"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="furyfit_lbLegendSample"> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="furyfit_lbLegendFit"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>Fit</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_27"> - <item> - <widget class="QLabel" name="furyfit_lbSpectra"> - <property name="text"> - <string>Plot Spectrum:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="furyfit_spPlotSpectrum"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_13"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Spectra Range:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="furyfit_spSpectraMin"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="furyfit_spSpectraMax"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </item> - <item> - <widget class="QGroupBox" name="furyfit_gbOutput"> - <property name="title"> - <string>Output</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QCheckBox" name="furyfit_ckVerbose"> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="furyfit_lbPlotOutputSeq"> - <property name="text"> - <string>Plot Output: </string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="furyfit_cbPlotOutput"> - <item> - <property name="text"> - <string>None</string> - </property> - </item> - <item> - <property name="text"> - <string>All</string> - </property> - </item> - <item> - <property name="text"> - <string>Intensity</string> - </property> - </item> - <item> - <property name="text"> - <string>Tau</string> - </property> - </item> - <item> - <property name="text"> - <string>Beta</string> - </property> - </item> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_20"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="furyfit_ckSaveSeq"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> </widget> - <widget class="QWidget" name="tabConFit"> + <widget class="QWidget" name="tabConvFit"> <attribute name="title"> <string>ConvFit</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_42"> - <item> - <widget class="QGroupBox" name="confit_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QGridLayout" name="confit_layoutFiles"> - <item row="0" column="0"> - <widget class="QLabel" name="label_42"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_32"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Resolution</string> - </property> - </widget> - </item> - <item row="0" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="confit_dsSampleInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - <string>.sqw</string> - <string>.red</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="1" colspan="2"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="confit_dsResInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>false</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_res</string> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_res.nxs</string> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="confit_layoutPlotArea"> - <item> - <layout class="QVBoxLayout" name="confit_layoutProperties"> - <item> - <layout class="QVBoxLayout" name="confit_layoutOptions"> - <item> - <layout class="QHBoxLayout" name="confit_layoutFitType"> - <item> - <widget class="QLabel" name="confit_lbFitType"> - <property name="text"> - <string>Fit Type:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="confit_cbFitType"> - <item> - <property name="text"> - <string>Zero Lorentzians</string> - </property> - </item> - <item> - <property name="text"> - <string>One Lorentzian</string> - </property> - </item> - <item> - <property name="text"> - <string>Two Lorentzians</string> - </property> - </item> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="confit_layoutBackground"> - <item> - <widget class="QLabel" name="confit_lbBackground"> - <property name="text"> - <string>Background</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="confit_cbBackground"> - <item> - <property name="text"> - <string>Fixed Flat</string> - </property> - </item> - <item> - <property name="text"> - <string>Fit Flat</string> - </property> - </item> - <item> - <property name="text"> - <string>Fit Linear</string> - </property> - </item> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_28"> - <item> - <widget class="QCheckBox" name="confit_ckTempCorrection"> - <property name="text"> - <string>Temp. Correction</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="confit_leTempCorrection"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>If set, applies the correction x*temp / 1-exp(x*temp) to the lorentzian before convolution.</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_30"> - <item> - <widget class="QCheckBox" name="confit_ckPlotGuess"> - <property name="text"> - <string>Plot Guess</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="confit_ckTieCentres"> - <property name="text"> - <string>Tie Centres</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="confit_properties"/> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="confit_layoutMiniPlot"> - <item> - <layout class="QHBoxLayout" name="confit_plot"/> - </item> - <item> - <layout class="QHBoxLayout" name="confit_gpLegend"> - <item> - <widget class="QPushButton" name="confit_pbSingle"> - <property name="text"> - <string>Fit Single Spectrum</string> - </property> - </widget> - </item> - <item> - <spacer name="confit_spLegendSpace"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="confit_lbLegendSample"> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="confit_lbLegendFit"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>Fit</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="confit_layoutSpectra"> - <item> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Plot Spectrum:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="confit_spPlotSpectrum"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_15"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="confit_lbSpecNo"> - <property name="text"> - <string>Spectra Range:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="confit_spSpectraMin"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="confit_lbTo"> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="confit_spSpectraMax"> - <property name="maximum"> - <number>0</number> - </property> - <property name="minimum"> - <number>0</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </item> - <item> - <widget class="QGroupBox" name="confit_gbOutput"> - <property name="title"> - <string>Output</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <item> - <widget class="QCheckBox" name="confit_ckVerbose"> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_21"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="confit_lbPlotSeq"> - <property name="text"> - <string>Plot Output:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="confit_cbPlotOutput"> - <item> - <property name="text"> - <string>None</string> - </property> - </item> - <item> - <property name="text"> - <string>All</string> - </property> - </item> - <item> - <property name="text"> - <string>Amplitude</string> - </property> - </item> - <item> - <property name="text"> - <string>FWHM</string> - </property> - </item> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="confit_ckSaveSeq"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> </widget> - <widget class="QWidget" name="tabAbsF2P"> + <widget class="QWidget" name="tabCalcCorr"> <attribute name="title"> <string>Calculate Corrections</string> </attribute> - <layout class="QVBoxLayout" name="layoutAbsF2P"> - <item> - <widget class="QGroupBox" name="absp_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QGridLayout" name="gridLayout_11"> - <item row="1" column="1"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="absp_dsCanInput" native="true"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="absp_ckUseCan"> - <property name="text"> - <string>Use Can:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="absp_dsSampleInput" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Input type:</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="absp_gbShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Shape Details</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_9"> - <item> - <layout class="QGridLayout" name="gridLayout_2"> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbSampleShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Sample Shape:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QComboBox" name="absp_cbShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <item> - <property name="text"> - <string>Flat</string> - </property> - </item> - <item> - <property name="text"> - <string>Cylinder</string> - </property> - </item> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="absp_lbWidth"> - <property name="text"> - <string>Beam Width:</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="absp_leavar"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="absp_lbAvar"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Sample Angle:</string> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLabel" name="absp_valAvar"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="absp_lewidth"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLabel" name="absp_valWidth"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> - <widget class="QStackedWidget" name="absp_swShapeDetails"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="lineWidth"> - <number>1</number> - </property> - <property name="currentIndex"> - <number>0</number> - </property> - <widget class="QWidget" name="absp_page_Flat"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_5_thickness" columnminimumwidth="97,0,0,0,0,0,0,0,0"> - <item row="0" column="2"> - <widget class="QLabel" name="absp_valts"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QLabel" name="absp_valtc1"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>9</width> - <height>24</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="8"> - <widget class="QLabel" name="absp_valtc2"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>9</width> - <height>24</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="7"> - <widget class="QLineEdit" name="absp_letc2"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="6"> - <widget class="QLabel" name="absp_lbtc2"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Can Back Thickness:</string> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="absp_lbtc1"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Can Front Thickness:</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbts"> - <property name="text"> - <string>Thickness:</string> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLineEdit" name="absp_letc1"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLineEdit" name="absp_lets"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="absp_pageCylinder"> - <layout class="QVBoxLayout" name="absp_cylinder_layout"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_3" columnminimumwidth="0,97,0,0,0,0,0,0,0,0"> - <item row="0" column="1"> - <widget class="QLabel" name="absp_lbR1"> - <property name="text"> - <string>Radius 1:</string> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="absp_lbR2"> - <property name="text"> - <string>Radius 2:</string> - </property> - </widget> - </item> - <item row="0" column="8"> - <widget class="QLineEdit" name="absp_ler3"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="6"> - <widget class="QLabel" name="absp_valR2"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="absp_valR1"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLineEdit" name="absp_ler1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="9"> - <widget class="QLabel" name="absp_valR3"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>9</width> - <height>0</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="7"> - <widget class="QLabel" name="absp_lbR3"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Can Radius:</string> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QLineEdit" name="absp_ler2"> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="absp_gbSample"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Sample Details</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_13"> - <item> - <layout class="QGridLayout" name="gridLayout_9" columnminimumwidth="0,0,0,0,0,9"> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbsamden"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Number Density:</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="abs_lblSampleInputType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Cross Sections From:</string> - </property> - </widget> - </item> - <item row="1" column="4" colspan="2"> - <widget class="QStackedWidget" name="absp_swSampleInputType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="currentIndex"> - <number>0</number> - </property> - <widget class="QWidget" name="page"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QVBoxLayout" name="verticalLayout_16"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_8" columnminimumwidth="0,0,0,0,0,9"> - <item row="0" column="4"> - <widget class="QLineEdit" name="absp_lesamsiga"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbsamsigs"> - <property name="text"> - <string>Scattering cross-section:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLineEdit" name="absp_lesamsigs"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="absp_lbsamsiga"> - <property name="text"> - <string>Absorption cross-section:</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="absp_valSamsigs"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QLabel" name="absp_valSamsiga"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="page_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QVBoxLayout" name="verticalLayout_17"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_12" columnminimumwidth="0,9"> - <item row="0" column="0"> - <widget class="QLineEdit" name="absp_leSampleFormula"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="absp_valSampleFormula"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - <item row="0" column="5"> - <widget class="QLabel" name="absp_valSamden"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="1" colspan="4"> - <widget class="QLineEdit" name="absp_lesamden"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="1" column="1" colspan="3"> - <widget class="QComboBox" name="absp_cbSampleInputType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <item> - <property name="text"> - <string>Input</string> - </property> - </item> - <item> - <property name="text"> - <string>Formula</string> - </property> - </item> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="absp_gbCan"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Can Details</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_12"> - <item> - <layout class="QGridLayout" name="gridLayout_6" columnminimumwidth="0,0,0,0,9"> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbCanden"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Number Density:</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="absp_lblInputType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Cross Sections From:</string> - </property> - </widget> - </item> - <item row="1" column="3" colspan="2"> - <widget class="QStackedWidget" name="absp_swCanInputType"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="currentIndex"> - <number>0</number> - </property> - <widget class="QWidget" name="page_3"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QVBoxLayout" name="verticalLayout_14"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_7" columnminimumwidth="0,0,0,0,0,0,9"> - <item row="0" column="0"> - <widget class="QLabel" name="absp_lbCansigs"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Scattering cross-section:</string> - </property> - </widget> - </item> - <item row="0" column="1" colspan="2"> - <widget class="QLineEdit" name="absp_lecansigs"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="absp_valCansigs"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QLineEdit" name="absp_lecansiga"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="6"> - <widget class="QLabel" name="absp_valCansiga"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="absp_lbCansiga"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Absorption cross-section:</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="page_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QVBoxLayout" name="verticalLayout_15"> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QGridLayout" name="gridLayout_10" columnminimumwidth="0,9"> - <item row="0" column="0"> - <widget class="QLineEdit" name="absp_leCanFormula"/> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="absp_valCanFormula"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="absp_valCanden"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>*</string> - </property> - </widget> - </item> - <item row="0" column="1" colspan="3"> - <widget class="QLineEdit" name="absp_lecanden"> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="1" column="1" colspan="2"> - <widget class="QComboBox" name="absp_cbCanInputType"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <item> - <property name="text"> - <string>Input</string> - </property> - </item> - <item> - <property name="text"> - <string>Formula</string> - </property> - </item> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="absp_gbOutputOptions"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Output Options</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_11"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <item> - <widget class="QCheckBox" name="absp_ckVerbose"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_6"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="absp_lbPlotOutput"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Plot Output</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="absp_cbPlotOutput"> - <item> - <property name="text"> - <string>None</string> - </property> - </item> - <item> - <property name="text"> - <string>Wavelength</string> - </property> - </item> - <item> - <property name="text"> - <string>Angle</string> - </property> - </item> - <item> - <property name="text"> - <string>Both</string> - </property> - </item> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_12"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="absp_ckSave"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> </widget> - <widget class="QWidget" name="tabApplyAbsorptionCorrections"> + <widget class="QWidget" name="tabApplyCorr"> <attribute name="title"> <string>Apply Corrections</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QGroupBox" name="abscor_gbInput"> - <property name="title"> - <string>Input</string> - </property> - <layout class="QVBoxLayout" name="abscor_loInput"> - - <item> - <widget class="MantidQt::MantidWidgets::DataSelector" name="abscor_dsSample" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - - </layout> - </widget> - </item> - - <item> - <widget class="QGroupBox" name="abscor_gbOptions"> - <property name="title"> - <string>Options</string> - </property> - <layout class="QHBoxLayout" name="abscor_loOptions"> - <item> - <layout class="QGridLayout" name="gridLayout_4"> - <item row="0" column="0"> - <widget class="QLabel" name="abscor_lbGeometry"> - <property name="text"> - <string>Geometry:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QComboBox" name="abscor_cbGeometry"> - <item> - <property name="text"> - <string>Flat</string> - </property> - </item> - <item> - <property name="text"> - <string>Cylinder</string> - </property> - </item> - </widget> - </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="abscor_ckUseCan"> - <property name="text"> - <string>Use Can:</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="abscor_dsContainer" native="true"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>true</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_red</string> - <string>_sqw</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_red.nxs</string> - <string>_sqw.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QCheckBox" name="abscor_ckScaleMultiplier"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Scale Can By:</string> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="abscor_leScaleMultiplier"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>1.0</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="3" column="0"> - <widget class="QCheckBox" name="abscor_ckUseCorrections"> - <property name="text"> - <string>Use Corrections:</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="MantidQt::MantidWidgets::DataSelector" name="abscor_dsCorrections" native="true"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="autoLoad" stdset="0"> - <bool>false</bool> - </property> - <property name="workspaceSuffixes" stdset="0"> - <stringlist> - <string>_flt_abs</string> - </stringlist> - </property> - <property name="fileBrowserSuffixes" stdset="0"> - <stringlist> - <string>_flt_abs.nxs</string> - </stringlist> - </property> - <property name="showLoad" stdset="0"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - - - <item> - <widget class="QGroupBox" name="abscor_gbPreview"> - <property name="title"> - <string>Preview</string> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <item> - <layout class="QVBoxLayout" name="abscor_plotPreview"/> - </item> - <item> - <layout class="QVBoxLayout" name="abscor_plotLegend"> - <item> - <widget class="QLabel" name="abscor_plotLSample"> - <property name="text"> - <string>Sample</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="abscor_plotLCan"> - <property name="styleSheet"> - <string notr="true">color: rgb(255, 0, 0);</string> - </property> - <property name="text"> - <string>Can</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="abscor_plotLCorr"> - <property name="styleSheet"> - <string notr="true">color: rgb(0, 255, 0);</string> - </property> - <property name="text"> - <string>Corrected</string> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="abscor_lbPreviewSPec"> - <property name="text"> - <string>Spectrum:</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="abscor_spPreviewSpec"/> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Output Options</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <item> - <layout class="QHBoxLayout" name="abscor_layoutPlotOutput"> - <item> - <widget class="QCheckBox" name="abscor_ckVerbose"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Verbose</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_16"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="abscor_lbPlotOutput"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Plot Output:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="abscor_cbPlotOutput"> - <item> - <property name="text"> - <string>None</string> - </property> - </item> - <item> - <property name="text"> - <string>Contour</string> - </property> - </item> - <item> - <property name="text"> - <string>Spectra</string> - </property> - </item> - <item> - <property name="text"> - <string>Both</string> - </property> - </item> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_26"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="abscor_ckSave"> - <property name="text"> - <string>Save Result</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> </widget> </widget> </item> @@ -2864,98 +160,9 @@ </layout> </widget> </widget> - <customwidgets> - <customwidget> - <class>MantidQt::MantidWidgets::MWRunFiles</class> - <extends>QWidget</extends> - <header>MantidQtMantidWidgets/MWRunFiles.h</header> - </customwidget> - <customwidget> - <class>MantidQt::MantidWidgets::WorkspaceSelector</class> - <extends>QComboBox</extends> - <header>MantidQtMantidWidgets/WorkspaceSelector.h</header> - </customwidget> - <customwidget> - <class>MantidQt::MantidWidgets::DataSelector</class> - <extends>QWidget</extends> - <header>MantidQtMantidWidgets/DataSelector.h</header> - </customwidget> - </customwidgets> + <customwidgets/> <tabstops> <tabstop>tabWidget</tabstop> - <tabstop>elwin_inputFile</tabstop> - <tabstop>leLogName</tabstop> - <tabstop>elwin_cbPreviewFile</tabstop> - <tabstop>elwin_spPreviewSpec</tabstop> - <tabstop>elwin_ckPlot</tabstop> - <tabstop>elwin_ckSave</tabstop> - <tabstop>msd_spPlotSpectrum</tabstop> - <tabstop>msd_spSpectraMin</tabstop> - <tabstop>msd_spSpectraMax</tabstop> - <tabstop>msd_ckVerbose</tabstop> - <tabstop>msd_ckPlot</tabstop> - <tabstop>msd_ckSave</tabstop> - <tabstop>fury_ckVerbose</tabstop> - <tabstop>fury_ckPlot</tabstop> - <tabstop>fury_ckSave</tabstop> - <tabstop>furyfit_dsSampleInput</tabstop> - <tabstop>furyfit_cbFitType</tabstop> - <tabstop>furyfit_ckConstrainIntensities</tabstop> - <tabstop>furyfit_ckPlotGuess</tabstop> - <tabstop>furyfit_ckConstrainBeta</tabstop> - <tabstop>furyfit_spPlotSpectrum</tabstop> - <tabstop>furyfit_spSpectraMin</tabstop> - <tabstop>furyfit_spSpectraMax</tabstop> - <tabstop>furyfit_pbSingle</tabstop> - <tabstop>furyfit_ckVerbose</tabstop> - <tabstop>furyfit_cbPlotOutput</tabstop> - <tabstop>furyfit_ckSaveSeq</tabstop> - <tabstop>confit_dsSampleInput</tabstop> - <tabstop>confit_dsResInput</tabstop> - <tabstop>confit_cbFitType</tabstop> - <tabstop>confit_cbBackground</tabstop> - <tabstop>confit_ckTempCorrection</tabstop> - <tabstop>confit_leTempCorrection</tabstop> - <tabstop>confit_ckPlotGuess</tabstop> - <tabstop>confit_ckTieCentres</tabstop> - <tabstop>confit_spPlotSpectrum</tabstop> - <tabstop>confit_spSpectraMin</tabstop> - <tabstop>confit_spSpectraMax</tabstop> - <tabstop>confit_pbSingle</tabstop> - <tabstop>confit_ckVerbose</tabstop> - <tabstop>confit_cbPlotOutput</tabstop> - <tabstop>confit_ckSaveSeq</tabstop> - <tabstop>absp_ckUseCan</tabstop> - <tabstop>absp_cbShape</tabstop> - <tabstop>absp_lets</tabstop> - <tabstop>absp_letc1</tabstop> - <tabstop>absp_letc2</tabstop> - <tabstop>absp_ler1</tabstop> - <tabstop>absp_ler2</tabstop> - <tabstop>absp_ler3</tabstop> - <tabstop>absp_leavar</tabstop> - <tabstop>absp_lewidth</tabstop> - <tabstop>absp_lesamden</tabstop> - <tabstop>absp_cbSampleInputType</tabstop> - <tabstop>absp_lesamsigs</tabstop> - <tabstop>absp_lesamsiga</tabstop> - <tabstop>absp_leSampleFormula</tabstop> - <tabstop>absp_lecanden</tabstop> - <tabstop>absp_cbCanInputType</tabstop> - <tabstop>absp_lecansigs</tabstop> - <tabstop>absp_lecansiga</tabstop> - <tabstop>absp_leCanFormula</tabstop> - <tabstop>absp_ckVerbose</tabstop> - <tabstop>absp_cbPlotOutput</tabstop> - <tabstop>absp_ckSave</tabstop> - <tabstop>abscor_cbGeometry</tabstop> - <tabstop>abscor_ckUseCan</tabstop> - <tabstop>abscor_ckScaleMultiplier</tabstop> - <tabstop>abscor_leScaleMultiplier</tabstop> - <tabstop>abscor_ckUseCorrections</tabstop> - <tabstop>abscor_ckVerbose</tabstop> - <tabstop>abscor_cbPlotOutput</tabstop> - <tabstop>abscor_ckSave</tabstop> <tabstop>pbHelp</tabstop> <tabstop>pbRun</tabstop> <tabstop>pbManageDirs</tabstop> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h index bd23d836b3d47965e9d59932e5f9dc9cbec938fa..9a107edf0509f1cbb6a7eb13aba47f2e24e70f24 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.h @@ -1,6 +1,7 @@ #ifndef MANTIDQTCUSTOMINTERFACESIDA_MSDFIT_H_ #define MANTIDQTCUSTOMINTERFACESIDA_MSDFIT_H_ +#include "ui_MSDFit.h" #include "IDATab.h" namespace MantidQt @@ -35,6 +36,7 @@ namespace IDA void updateRS(QtProperty* prop, double val); private: + Ui::MSDFit m_uiForm; QString m_currentWsName; QtTreePropertyBrowser* m_msdTree; diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.ui index 084729eabb1b8e2ce7d2644f281f7b3c4cb083d9..942a71ebe321edf46cd94af31c0b19842d069c75 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.ui +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/MSDFit.ui @@ -255,7 +255,7 @@ <customwidget> <class>MantidQt::MantidWidgets::DataSelector</class> <extends>QWidget</extends> - <header>mantidqt::mantidwidgets::dataselector.h</header> + <header>MantidQtMantidWidgets/DataSelector.h</header> </customwidget> </customwidgets> <resources/> diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ApplyCorr.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ApplyCorr.cpp index 138fe1c3e9d98cb7b9e3f69b1aefb94ded671925..a79f3ff98750951bd18388407d2a25809d3f07a4 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ApplyCorr.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ApplyCorr.cpp @@ -17,58 +17,27 @@ namespace CustomInterfaces { namespace IDA { - ApplyCorr::ApplyCorr(QWidget * parent) : + ApplyCorr::ApplyCorr(QWidget * parent) : IDATab(parent) { + m_uiForm.setupUi(parent); } void ApplyCorr::setup() { - connect(uiForm().abscor_ckUseCan, SIGNAL(toggled(bool)), uiForm().abscor_dsContainer, SLOT(setEnabled(bool))); - connect(uiForm().abscor_ckUseCan, SIGNAL(toggled(bool)), uiForm().abscor_ckScaleMultiplier, SLOT(setEnabled(bool))); - connect(uiForm().abscor_ckUseCan, SIGNAL(toggled(bool)), this, SLOT(scaleMultiplierCheck(bool))); - connect(uiForm().abscor_ckUseCorrections, SIGNAL(toggled(bool)), uiForm().abscor_dsCorrections, SLOT(setEnabled(bool))); - connect(uiForm().abscor_ckScaleMultiplier, SIGNAL(toggled(bool)), this, SLOT(scaleMultiplierCheck(bool))); - connect(uiForm().abscor_cbGeometry, SIGNAL(currentIndexChanged(int)), this, SLOT(handleGeometryChange(int))); - connect(uiForm().abscor_dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(newData(const QString&))); - connect(uiForm().abscor_spPreviewSpec, SIGNAL(valueChanged(int)), this, SLOT(plotPreview(int))); - - // Create a validator for input box of the Scale option. - const double tolerance = 0.00001; // Tolerance chosen arbitrarily. - m_valPosDbl->setBottom(tolerance); - - // Apply the validator to the input box for the Scale option. - uiForm().abscor_leScaleMultiplier->setValidator(m_valPosDbl); + connect(m_uiForm.cbGeometry, SIGNAL(currentIndexChanged(int)), this, SLOT(handleGeometryChange(int))); + connect(m_uiForm.dsSample, SIGNAL(dataReady(const QString&)), this, SLOT(newData(const QString&))); + connect(m_uiForm.spPreviewSpec, SIGNAL(valueChanged(int)), this, SLOT(plotPreview(int))); // Create the plot m_plots["ApplyCorrPlot"] = new QwtPlot(m_parentWidget); m_plots["ApplyCorrPlot"]->setCanvasBackground(Qt::white); m_plots["ApplyCorrPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); m_plots["ApplyCorrPlot"]->setAxisFont(QwtPlot::yLeft, m_parentWidget->font()); - uiForm().abscor_plotPreview->addWidget(m_plots["ApplyCorrPlot"]); + m_uiForm.plotPreview->addWidget(m_plots["ApplyCorrPlot"]); - uiForm().abscor_spPreviewSpec->setMinimum(0); - uiForm().abscor_spPreviewSpec->setMaximum(0); - } - - /** - * Disables/enables the relevant parts of the UI when user checks/unchecks the 'Scale: Multiply Container by' option - * abscor_ckScaleMultiplier checkbox. - * @param state :: state of the checkbox - */ - void ApplyCorr::scaleMultiplierCheck(bool state) - { - // Scale input should be disabled if we're not using a can - if(!uiForm().abscor_ckUseCan->isChecked()) - { - uiForm().abscor_leScaleMultiplier->setEnabled(false); - } - else - { - // Else it should be whatever the scale checkbox is - state = uiForm().abscor_ckScaleMultiplier->isChecked(); - uiForm().abscor_leScaleMultiplier->setEnabled(state); - } + m_uiForm.spPreviewSpec->setMinimum(0); + m_uiForm.spPreviewSpec->setMaximum(0); } /** @@ -85,7 +54,7 @@ namespace IDA plotMiniPlot(dataName, 0, "ApplyCorrPlot", "ApplyCorrSampleCurve"); MatrixWorkspace_const_sptr sampleWs = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(dataName.toStdString()); - uiForm().abscor_spPreviewSpec->setMaximum(static_cast<int>(sampleWs->getNumberHistograms()) - 1); + m_uiForm.spPreviewSpec->setMaximum(static_cast<int>(sampleWs->getNumberHistograms()) - 1); } bool ApplyCorr::validateScaleInput() @@ -94,10 +63,10 @@ namespace IDA int dummyPos = 0; // scale multiplier - QString scaleMultiplierText = uiForm().abscor_leScaleMultiplier->text(); - QValidator::State fieldState = uiForm().abscor_leScaleMultiplier->validator()->validate(scaleMultiplierText, dummyPos); + QString scaleMultiplierText = m_uiForm.spCanScale->text(); + QValidator::State fieldState = m_uiForm.spCanScale->validator()->validate(scaleMultiplierText, dummyPos); - if ( uiForm().abscor_ckScaleMultiplier->isChecked() && fieldState != QValidator::Acceptable ) + if ( m_uiForm.ckScaleMultiplier->isChecked() && fieldState != QValidator::Acceptable ) { valid = false; } @@ -112,7 +81,7 @@ namespace IDA return; } - QString geom = uiForm().abscor_cbGeometry->currentText(); + QString geom = m_uiForm.cbGeometry->currentText(); if ( geom == "Flat" ) { geom = "flt"; @@ -124,17 +93,17 @@ namespace IDA QString pyInput = "from IndirectDataAnalysis import abscorFeeder, loadNexus\n"; - QString sample = uiForm().abscor_dsSample->getCurrentDataName(); + QString sample = m_uiForm.dsSample->getCurrentDataName(); MatrixWorkspace_const_sptr sampleWs = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(sample.toStdString()); pyInput += "sample = '"+sample+"'\n"; pyInput += "rebin_can = False\n"; bool noContainer = false; - bool useCan = uiForm().abscor_ckUseCan->isChecked(); + bool useCan = m_uiForm.ckUseCan->isChecked(); if(useCan) { - QString container = uiForm().abscor_dsContainer->getCurrentDataName(); + QString container = m_uiForm.dsContainer->getCurrentDataName(); MatrixWorkspace_const_sptr canWs = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(container.toStdString()); if (!checkWorkspaceBinningMatches(sampleWs, canWs)) @@ -160,14 +129,14 @@ namespace IDA pyInput += "geom = '" + geom + "'\n"; - if( uiForm().abscor_ckUseCorrections->isChecked() ) + if( m_uiForm.ckUseCorrections->isChecked() ) { pyInput += "useCor = True\n"; - QString corrections = uiForm().abscor_dsCorrections->getCurrentDataName(); + QString corrections = m_uiForm.dsCorrections->getCurrentDataName(); if ( !Mantid::API::AnalysisDataService::Instance().doesExist(corrections.toStdString()) ) { pyInput += - "corrections = loadNexus(r'" + uiForm().abscor_dsCorrections->getFullFilePath() + "')\n"; + "corrections = loadNexus(r'" + m_uiForm.dsCorrections->getFullFilePath() + "')\n"; } else { @@ -187,29 +156,29 @@ namespace IDA return; } } - + QString ScalingFactor = "1.0\n"; QString ScaleOrNot = "False\n"; - pyInput += uiForm().abscor_ckScaleMultiplier->isChecked() ? "True\n" : "False\n"; + pyInput += m_uiForm.ckScaleMultiplier->isChecked() ? "True\n" : "False\n"; - if ( uiForm().abscor_ckScaleMultiplier->isChecked() ) + if ( m_uiForm.ckScaleMultiplier->isChecked() ) { - ScalingFactor = uiForm().abscor_leScaleMultiplier->text(); + ScalingFactor = m_uiForm.spCanScale->text(); ScaleOrNot = "True\n"; } pyInput += "scale = " + ScaleOrNot + "\n"; - pyInput += "scaleFactor = " + ScalingFactor + "\n"; + pyInput += "scaleFactor = " + ScalingFactor + "\n"; - if ( uiForm().abscor_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; - if ( uiForm().abscor_ckSave->isChecked() ) pyInput += "save = True\n"; + if ( m_uiForm.ckSave->isChecked() ) pyInput += "save = True\n"; else pyInput += "save = False\n"; - QString plotResult = uiForm().abscor_cbPlotOutput->currentText(); + QString plotResult = m_uiForm.cbPlotOutput->currentText(); if ( plotResult == "Contour" ) { plotResult = "Contour"; @@ -222,14 +191,14 @@ namespace IDA { plotResult = "Both"; } - + pyInput += "plotResult = '" + plotResult + "'\n"; pyInput += "print abscorFeeder(sample, container, geom, useCor, corrections, Verbose=verbose, RebinCan=rebin_can, ScaleOrNotToScale=scale, factor=scaleFactor, Save=save, PlotResult=plotResult)\n"; QString pyOutput = runPythonCode(pyInput).trimmed(); outputWs = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(pyOutput.toStdString()); - plotPreview(uiForm().abscor_spPreviewSpec->value()); + plotPreview(m_uiForm.spPreviewSpec->value()); // Set the result workspace for Python script export m_pythonExportWsName = pyOutput.toStdString(); @@ -242,21 +211,21 @@ namespace IDA bool ApplyCorr::requireCanRebin() { QString message = "The sample and can energy ranges do not match, this is not recommended." - "\n\n Click OK to rebin the can to match the sample and continue or Cancel to abort applying corrections."; - QMessageBox::StandardButton reply = QMessageBox::warning(m_parentWidget, "Energy Ranges Do Not Match", - message, QMessageBox::Ok|QMessageBox::Cancel); + "\n\n Click OK to rebin the can to match the sample and continue or Cancel to abort applying corrections."; + QMessageBox::StandardButton reply = QMessageBox::warning(m_parentWidget, "Energy Ranges Do Not Match", + message, QMessageBox::Ok|QMessageBox::Cancel); return (reply == QMessageBox::Ok); } bool ApplyCorr::validate() { - bool useCan = uiForm().abscor_ckUseCan->isChecked(); + bool useCan = m_uiForm.ckUseCan->isChecked(); if(useCan) { - QString sample = uiForm().abscor_dsSample->getCurrentDataName(); + QString sample = m_uiForm.dsSample->getCurrentDataName(); QString sampleType = sample.right(sample.length() - sample.lastIndexOf("_")); - QString container = uiForm().abscor_dsContainer->getCurrentDataName(); + QString container = m_uiForm.dsContainer->getCurrentDataName(); QString containerType = container.right(container.length() - container.lastIndexOf("_")); g_log.debug() << "Sample type is: " << sampleType.toStdString() << std::endl; @@ -274,14 +243,14 @@ namespace IDA void ApplyCorr::loadSettings(const QSettings & settings) { - uiForm().abscor_dsCorrections->readSettings(settings.group()); - uiForm().abscor_dsContainer->readSettings(settings.group()); - uiForm().abscor_dsSample->readSettings(settings.group()); + m_uiForm.dsCorrections->readSettings(settings.group()); + m_uiForm.dsContainer->readSettings(settings.group()); + m_uiForm.dsSample->readSettings(settings.group()); } /** * Handles when the type of geometry changes - * + * * Updates the file extension to search for */ void ApplyCorr::handleGeometryChange(int index) @@ -292,18 +261,18 @@ namespace IDA case 0: // Geomtry is flat ext = "_flt_abs"; - uiForm().abscor_dsCorrections->setWSSuffixes(QStringList(ext)); - uiForm().abscor_dsCorrections->setFBSuffixes(QStringList(ext + ".nxs")); + m_uiForm.dsCorrections->setWSSuffixes(QStringList(ext)); + m_uiForm.dsCorrections->setFBSuffixes(QStringList(ext + ".nxs")); break; case 1: // Geomtry is cylinder ext = "_cyl_abs"; - uiForm().abscor_dsCorrections->setWSSuffixes(QStringList(ext)); - uiForm().abscor_dsCorrections->setFBSuffixes(QStringList(ext + ".nxs")); + m_uiForm.dsCorrections->setWSSuffixes(QStringList(ext)); + m_uiForm.dsCorrections->setFBSuffixes(QStringList(ext + ".nxs")); break; } } - + /** * Replots the preview plot. * @@ -311,10 +280,10 @@ namespace IDA */ void ApplyCorr::plotPreview(int specIndex) { - bool useCan = uiForm().abscor_ckUseCan->isChecked(); + bool useCan = m_uiForm.ckUseCan->isChecked(); // Plot sample - QString sample = uiForm().abscor_dsSample->getCurrentDataName(); + QString sample = m_uiForm.dsSample->getCurrentDataName(); if(AnalysisDataService::Instance().doesExist(sample.toStdString())) { MatrixWorkspace_const_sptr sampleWs = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(sample.toStdString()); @@ -331,7 +300,7 @@ namespace IDA // Plot can if(useCan) { - QString container = uiForm().abscor_dsContainer->getCurrentDataName(); + QString container = m_uiForm.dsContainer->getCurrentDataName(); MatrixWorkspace_const_sptr canWs = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(container.toStdString()); plotMiniPlot(canWs, specIndex, "ApplyCorrPlot", "CanCurve"); m_curves["CanCurve"]->setPen(QColor(Qt::red)); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/CalcCorr.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/CalcCorr.cpp index ea58f2f06cb1d2c988b038a5922a173140926dba..bb0e785d176ac1fea8862bf250b03c7cd102179c 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/CalcCorr.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/CalcCorr.cpp @@ -33,7 +33,7 @@ public: * Returns Acceptable if the string input contains a double that is within at least one * of the ranges and is in the correct format. * - * Else returns Intermediate if input contains a double that is outside the ranges or is in + * Else returns Intermediate if input contains a double that is outside the ranges or is in * the wrong format; e.g. with too many digits after the decimal point or is empty. * * Else returns Invalid - i.e. the input is not a double. @@ -44,10 +44,10 @@ public: virtual QValidator::State validate( QString & input, int & pos ) const { UNUSED_ARG(pos); - + if( m_ranges.empty() ) return Intermediate; - + bool acceptable = false; bool intermediate = false; @@ -95,9 +95,11 @@ namespace CustomInterfaces { namespace IDA { - CalcCorr::CalcCorr(QWidget * parent) : - IDATab(parent), m_dblVal(NULL), m_posDblVal(NULL) + CalcCorr::CalcCorr(QWidget * parent) : + IDATab(parent), m_dblVal(NULL), m_posDblVal(NULL) { + m_uiForm.setupUi(parent); + m_dblVal = new QDoubleValidator(this); m_posDblVal = new QDoubleValidator(this); m_posDblVal->setBottom(0.0); @@ -106,12 +108,12 @@ namespace IDA void CalcCorr::setup() { // set signals and slot connections for F2Py Absorption routine - connect(uiForm().absp_cbShape, SIGNAL(currentIndexChanged(int)), this, SLOT(shape(int))); - connect(uiForm().absp_ckUseCan, SIGNAL(toggled(bool)), this, SLOT(useCanChecked(bool))); - connect(uiForm().absp_letc1, SIGNAL(editingFinished()), this, SLOT(tcSync())); - connect(uiForm().absp_cbSampleInputType, SIGNAL(currentIndexChanged(int)), uiForm().absp_swSampleInputType, SLOT(setCurrentIndex(int))); - connect(uiForm().absp_cbCanInputType, SIGNAL(currentIndexChanged(int)), uiForm().absp_swCanInputType, SLOT(setCurrentIndex(int))); - connect(uiForm().absp_dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(getBeamWidthFromWorkspace(const QString&))); + connect(m_uiForm.cbShape, SIGNAL(currentIndexChanged(int)), this, SLOT(shape(int))); + connect(m_uiForm.ckUseCan, SIGNAL(toggled(bool)), this, SLOT(useCanChecked(bool))); + connect(m_uiForm.letc1, SIGNAL(editingFinished()), this, SLOT(tcSync())); + connect(m_uiForm.cbSampleInputType, SIGNAL(currentIndexChanged(int)), m_uiForm.swSampleInputType, SLOT(setCurrentIndex(int))); + connect(m_uiForm.cbCanInputType, SIGNAL(currentIndexChanged(int)), m_uiForm.swCanInputType, SLOT(setCurrentIndex(int))); + connect(m_uiForm.dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(getBeamWidthFromWorkspace(const QString&))); // Sort the fields into various lists. @@ -119,23 +121,23 @@ namespace IDA QList<QLineEdit*> doubleFields; QList<QLineEdit*> positiveDoubleFields; - positiveDoubleFields += uiForm().absp_lets; // Thickness - positiveDoubleFields += uiForm().absp_letc1; // Front Thickness - positiveDoubleFields += uiForm().absp_letc2; // Back Thickness - - positiveDoubleFields += uiForm().absp_ler1; // Radius 1 - positiveDoubleFields += uiForm().absp_ler2; // Radius 2 - positiveDoubleFields += uiForm().absp_ler3; // Radius 3 - - positiveDoubleFields += uiForm().absp_lewidth; // Beam Width - - positiveDoubleFields += uiForm().absp_lesamden; // Sample Number Density - positiveDoubleFields += uiForm().absp_lesamsigs; // Sample Scattering Cross-Section - positiveDoubleFields += uiForm().absp_lesamsiga; // Sample Absorption Cross-Section - - positiveDoubleFields += uiForm().absp_lecanden; // Can Number Density - positiveDoubleFields += uiForm().absp_lecansigs; // Can Scattering Cross-Section - positiveDoubleFields += uiForm().absp_lecansiga; // Can Absorption Cross-Section + positiveDoubleFields += m_uiForm.lets; // Thickness + positiveDoubleFields += m_uiForm.letc1; // Front Thickness + positiveDoubleFields += m_uiForm.letc2; // Back Thickness + + positiveDoubleFields += m_uiForm.ler1; // Radius 1 + positiveDoubleFields += m_uiForm.ler2; // Radius 2 + positiveDoubleFields += m_uiForm.ler3; // Radius 3 + + positiveDoubleFields += m_uiForm.lewidth; // Beam Width + + positiveDoubleFields += m_uiForm.lesamden; // Sample Number Density + positiveDoubleFields += m_uiForm.lesamsigs; // Sample Scattering Cross-Section + positiveDoubleFields += m_uiForm.lesamsiga; // Sample Absorption Cross-Section + + positiveDoubleFields += m_uiForm.lecanden; // Can Number Density + positiveDoubleFields += m_uiForm.lecansigs; // Can Scattering Cross-Section + positiveDoubleFields += m_uiForm.lecansiga; // Can Absorption Cross-Section // Set appropriate validators. foreach(QLineEdit * positiveDoubleField, positiveDoubleFields) @@ -149,113 +151,113 @@ namespace IDA angleRanges.insert(std::make_pair(-80, 80)); angleRanges.insert(std::make_pair(100, 180)); QDoubleMultiRangeValidator * angleValidator = new QDoubleMultiRangeValidator(angleRanges, this); - uiForm().absp_leavar->setValidator(angleValidator); // Can Angle to Beam + m_uiForm.leavar->setValidator(angleValidator); // Can Angle to Beam allFields = positiveDoubleFields; - allFields += uiForm().absp_leavar; + allFields += m_uiForm.leavar; QRegExp regex("[A-Za-z0-9\\-\\(\\)]*"); QValidator *formulaValidator = new QRegExpValidator(regex, this); - uiForm().absp_leSampleFormula->setValidator(formulaValidator); - uiForm().absp_leCanFormula->setValidator(formulaValidator); + m_uiForm.leSampleFormula->setValidator(formulaValidator); + m_uiForm.leCanFormula->setValidator(formulaValidator); // "Nudge" color of title of QGroupBox to change. - useCanChecked(uiForm().absp_ckUseCan->isChecked()); + useCanChecked(m_uiForm.ckUseCan->isChecked()); } void CalcCorr::run() { QString pyInput = "import IndirectAbsCor\n"; - + QString geom; QString size; - if ( uiForm().absp_cbShape->currentText() == "Flat" ) + if ( m_uiForm.cbShape->currentText() == "Flat" ) { geom = "flt"; - if ( uiForm().absp_ckUseCan->isChecked() ) + if ( m_uiForm.ckUseCan->isChecked() ) { - size = "[" + uiForm().absp_lets->text() + ", " + - uiForm().absp_letc1->text() + ", " + - uiForm().absp_letc2->text() + "]"; + size = "[" + m_uiForm.lets->text() + ", " + + m_uiForm.letc1->text() + ", " + + m_uiForm.letc2->text() + "]"; } else { - size = "[" + uiForm().absp_lets->text() + ", 0.0, 0.0]"; + size = "[" + m_uiForm.lets->text() + ", 0.0, 0.0]"; } } - else if ( uiForm().absp_cbShape->currentText() == "Cylinder" ) + else if ( m_uiForm.cbShape->currentText() == "Cylinder" ) { geom = "cyl"; // R3 only populated when using can. R4 is fixed to 0.0 - if ( uiForm().absp_ckUseCan->isChecked() ) + if ( m_uiForm.ckUseCan->isChecked() ) { - size = "[" + uiForm().absp_ler1->text() + ", " + - uiForm().absp_ler2->text() + ", " + - uiForm().absp_ler3->text() + ", 0.0 ]"; + size = "[" + m_uiForm.ler1->text() + ", " + + m_uiForm.ler2->text() + ", " + + m_uiForm.ler3->text() + ", 0.0 ]"; } else { - size = "[" + uiForm().absp_ler1->text() + ", " + - uiForm().absp_ler2->text() + ", 0.0, 0.0 ]"; + size = "[" + m_uiForm.ler1->text() + ", " + + m_uiForm.ler2->text() + ", 0.0, 0.0 ]"; } } //get beam width - QString width = uiForm().absp_lewidth->text(); + QString width = m_uiForm.lewidth->text(); if (width.isEmpty()) { width = "None"; } //get sample workspace. Load from if needed. - QString sampleWs = uiForm().absp_dsSampleInput->getCurrentDataName(); + QString sampleWs = m_uiForm.dsSampleInput->getCurrentDataName(); pyInput += "inputws = '" + sampleWs + "'\n"; //sample absorption and scattering x sections. - QString sampleScatteringXSec = uiForm().absp_lesamsigs->text(); - QString sampleAbsorptionXSec = uiForm().absp_lesamsiga->text(); + QString sampleScatteringXSec = m_uiForm.lesamsigs->text(); + QString sampleAbsorptionXSec = m_uiForm.lesamsiga->text(); if ( sampleScatteringXSec.isEmpty() ) { sampleScatteringXSec = "0.0"; } if ( sampleAbsorptionXSec.isEmpty() ) { sampleAbsorptionXSec = "0.0"; } //can and sample formulas - QString sampleFormula = uiForm().absp_leSampleFormula->text(); - QString canFormula = uiForm().absp_leCanFormula->text(); + QString sampleFormula = m_uiForm.leSampleFormula->text(); + QString canFormula = m_uiForm.leCanFormula->text(); - if ( sampleFormula.isEmpty() ) - { + if ( sampleFormula.isEmpty() ) + { sampleFormula = "None"; } - else + else { sampleFormula = "'" + sampleFormula + "'"; } - if ( canFormula.isEmpty() ) - { + if ( canFormula.isEmpty() ) + { canFormula = "None"; } - else + else { canFormula = "'" + canFormula + "'"; } //create python string to execute - if ( uiForm().absp_ckUseCan->isChecked() ) + if ( m_uiForm.ckUseCan->isChecked() ) { //get sample workspace. Load from if needed. - QString canWs = uiForm().absp_dsCanInput->getCurrentDataName(); + QString canWs = m_uiForm.dsCanInput->getCurrentDataName(); pyInput += "canws = '" + canWs + "'\n"; //can absoprtion and scattering x section. - QString canScatteringXSec = uiForm().absp_lecansigs->text(); - QString canAbsorptionXSec = uiForm().absp_lecansiga->text(); + QString canScatteringXSec = m_uiForm.lecansigs->text(); + QString canAbsorptionXSec = m_uiForm.lecansiga->text(); if ( canScatteringXSec.isEmpty() ) { canScatteringXSec = "0.0"; } if ( canAbsorptionXSec.isEmpty() ) { canAbsorptionXSec = "0.0"; } pyInput += "ncan = 2\n" - "density = [" + uiForm().absp_lesamden->text() + ", " + uiForm().absp_lecanden->text() + ", " + uiForm().absp_lecanden->text() + "]\n" + "density = [" + m_uiForm.lesamden->text() + ", " + m_uiForm.lecanden->text() + ", " + m_uiForm.lecanden->text() + "]\n" "sigs = [" + sampleScatteringXSec + "," + canScatteringXSec + "," + canScatteringXSec + "]\n" "siga = [" + sampleAbsorptionXSec + "," + canAbsorptionXSec + "," + canAbsorptionXSec + "]\n"; } @@ -263,25 +265,25 @@ namespace IDA { pyInput += "ncan = 1\n" - "density = [" + uiForm().absp_lesamden->text() + ", 0.0, 0.0 ]\n" + "density = [" + m_uiForm.lesamden->text() + ", 0.0, 0.0 ]\n" "sigs = [" + sampleScatteringXSec + ", 0.0, 0.0]\n" "siga = [" + sampleAbsorptionXSec + ", 0.0, 0.0]\n" "canws = None\n"; } //Output options - if ( uiForm().absp_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; - if ( uiForm().absp_ckSave->isChecked() ) pyInput += "save = True\n"; + if ( m_uiForm.ckSave->isChecked() ) pyInput += "save = True\n"; else pyInput += "save = False\n"; pyInput += "geom = '" + geom + "'\n" "beam = " + width + "\n" "size = " + size + "\n" - "avar = " + uiForm().absp_leavar->text() + "\n" - "plotOpt = '" + uiForm().absp_cbPlotOutput->currentText() + "'\n" + "avar = " + m_uiForm.leavar->text() + "\n" + "plotOpt = '" + m_uiForm.cbPlotOutput->currentText() + "'\n" "sampleFormula = " + sampleFormula + "\n" "canFormula = " + canFormula + "\n" "print IndirectAbsCor.AbsRunFeeder(inputws, canws, geom, ncan, size, avar, density, beam, sampleFormula, canFormula, sigs, siga, plot_opt=plotOpt, save=save, verbose=verbose)\n"; @@ -295,17 +297,17 @@ namespace IDA bool CalcCorr::validate() { UserInputValidator uiv; - bool useCan = uiForm().absp_ckUseCan->isChecked(); + bool useCan = m_uiForm.ckUseCan->isChecked(); // Input files/workspaces - uiv.checkDataSelectorIsValid("Sample", uiForm().absp_dsSampleInput); + uiv.checkDataSelectorIsValid("Sample", m_uiForm.dsSampleInput); if (useCan) { - uiv.checkDataSelectorIsValid("Can", uiForm().absp_dsCanInput); + uiv.checkDataSelectorIsValid("Can", m_uiForm.dsCanInput); - QString sample = uiForm().absp_dsSampleInput->getCurrentDataName(); + QString sample = m_uiForm.dsSampleInput->getCurrentDataName(); QString sampleType = sample.right(sample.length() - sample.lastIndexOf("_")); - QString container = uiForm().absp_dsCanInput->getCurrentDataName(); + QString container = m_uiForm.dsCanInput->getCurrentDataName(); QString containerType = container.right(container.length() - container.lastIndexOf("_")); g_log.debug() << "Sample type is: " << sampleType.toStdString() << std::endl; @@ -317,89 +319,89 @@ namespace IDA } } - uiv.checkFieldIsValid("Beam Width", uiForm().absp_lewidth, uiForm().absp_valWidth); + uiv.checkFieldIsValid("Beam Width", m_uiForm.lewidth, m_uiForm.valWidth); - if ( uiForm().absp_cbShape->currentText() == "Flat" ) + if ( m_uiForm.cbShape->currentText() == "Flat" ) { // Flat Geometry - uiv.checkFieldIsValid("Thickness", uiForm().absp_lets, uiForm().absp_valts); + uiv.checkFieldIsValid("Thickness", m_uiForm.lets, m_uiForm.valts); if ( useCan ) { - uiv.checkFieldIsValid("Front Thickness", uiForm().absp_letc1, uiForm().absp_valtc1); - uiv.checkFieldIsValid("Back Thickness", uiForm().absp_letc2, uiForm().absp_valtc2); + uiv.checkFieldIsValid("Front Thickness", m_uiForm.letc1, m_uiForm.valtc1); + uiv.checkFieldIsValid("Back Thickness", m_uiForm.letc2, m_uiForm.valtc2); } - uiv.checkFieldIsValid("Can Angle to Beam must be in the range [-180 to -100], [-80 to 80] or [100 to 180].", uiForm().absp_leavar, uiForm().absp_valAvar); + uiv.checkFieldIsValid("Can Angle to Beam must be in the range [-180 to -100], [-80 to 80] or [100 to 180].", m_uiForm.leavar, m_uiForm.valAvar); } - if ( uiForm().absp_cbShape->currentText() == "Cylinder" ) + if ( m_uiForm.cbShape->currentText() == "Cylinder" ) { // Cylinder geometry - uiv.checkFieldIsValid("Radius 1", uiForm().absp_ler1, uiForm().absp_valR1); - uiv.checkFieldIsValid("Radius 2", uiForm().absp_ler2, uiForm().absp_valR2); - - double radius1 = uiForm().absp_ler1->text().toDouble(); - double radius2 = uiForm().absp_ler2->text().toDouble(); + uiv.checkFieldIsValid("Radius 1", m_uiForm.ler1, m_uiForm.valR1); + uiv.checkFieldIsValid("Radius 2", m_uiForm.ler2, m_uiForm.valR2); + + double radius1 = m_uiForm.ler1->text().toDouble(); + double radius2 = m_uiForm.ler2->text().toDouble(); if( radius1 >= radius2 ) uiv.addErrorMessage("Radius 1 should be less than Radius 2."); // R3 only relevant when using can if ( useCan ) { - uiv.checkFieldIsValid("Radius 3", uiForm().absp_ler3, uiForm().absp_valR3); - - double radius3 = uiForm().absp_ler3->text().toDouble(); + uiv.checkFieldIsValid("Radius 3", m_uiForm.ler3, m_uiForm.valR3); + + double radius3 = m_uiForm.ler3->text().toDouble(); if( radius2 >= radius3 ) uiv.addErrorMessage("Radius 2 should be less than Radius 3."); } - uiv.checkFieldIsValid("Step Size", uiForm().absp_leavar, uiForm().absp_valAvar); + uiv.checkFieldIsValid("Step Size", m_uiForm.leavar, m_uiForm.valAvar); - double stepSize = uiForm().absp_leavar->text().toDouble(); + double stepSize = m_uiForm.leavar->text().toDouble(); if( stepSize >= (radius2 - radius1) ) uiv.addErrorMessage("Step size should be less than (Radius 2 - Radius 1)."); } // Sample details - uiv.checkFieldIsValid("Sample Number Density", uiForm().absp_lesamden, uiForm().absp_valSamden); + uiv.checkFieldIsValid("Sample Number Density", m_uiForm.lesamden, m_uiForm.valSamden); - switch(uiForm().absp_cbSampleInputType->currentIndex()) + switch(m_uiForm.cbSampleInputType->currentIndex()) { case 0: //using direct input - uiv.checkFieldIsValid("Sample Scattering Cross-Section", uiForm().absp_lesamsigs, uiForm().absp_valSamsigs); - uiv.checkFieldIsValid("Sample Absorption Cross-Section", uiForm().absp_lesamsiga, uiForm().absp_valSamsiga); + uiv.checkFieldIsValid("Sample Scattering Cross-Section", m_uiForm.lesamsigs, m_uiForm.valSamsigs); + uiv.checkFieldIsValid("Sample Absorption Cross-Section", m_uiForm.lesamsiga, m_uiForm.valSamsiga); break; case 1: //input using formula - uiv.checkFieldIsValid("Sample Formula", uiForm().absp_leSampleFormula, uiForm().absp_valSampleFormula); + uiv.checkFieldIsValid("Sample Formula", m_uiForm.leSampleFormula, m_uiForm.valSampleFormula); break; } // Can details (only test if "Use Can" is checked) - if ( uiForm().absp_ckUseCan->isChecked() ) + if ( m_uiForm.ckUseCan->isChecked() ) { - QString canFile = uiForm().absp_dsCanInput->getCurrentDataName(); + QString canFile = m_uiForm.dsCanInput->getCurrentDataName(); if(canFile.isEmpty()) { uiv.addErrorMessage("You must select a Sample file or workspace."); } - uiv.checkFieldIsValid("Can Number Density",uiForm().absp_lecanden,uiForm().absp_valCanden); + uiv.checkFieldIsValid("Can Number Density",m_uiForm.lecanden,m_uiForm.valCanden); - switch(uiForm().absp_cbCanInputType->currentIndex()) + switch(m_uiForm.cbCanInputType->currentIndex()) { case 0: // using direct input - uiv.checkFieldIsValid("Can Scattering Cross-Section", uiForm().absp_lecansigs, uiForm().absp_valCansigs); - uiv.checkFieldIsValid("Can Absorption Cross-Section", uiForm().absp_lecansiga, uiForm().absp_valCansiga); + uiv.checkFieldIsValid("Can Scattering Cross-Section", m_uiForm.lecansigs, m_uiForm.valCansigs); + uiv.checkFieldIsValid("Can Absorption Cross-Section", m_uiForm.lecansiga, m_uiForm.valCansiga); break; case 1: //input using formula - uiv.checkFieldIsValid("Can Formula", uiForm().absp_leCanFormula, uiForm().absp_valCanFormula); + uiv.checkFieldIsValid("Can Formula", m_uiForm.leCanFormula, m_uiForm.valCanFormula); break; } } @@ -412,79 +414,79 @@ namespace IDA void CalcCorr::loadSettings(const QSettings & settings) { - uiForm().absp_dsSampleInput->readSettings(settings.group()); - uiForm().absp_dsCanInput->readSettings(settings.group()); + m_uiForm.dsSampleInput->readSettings(settings.group()); + m_uiForm.dsCanInput->readSettings(settings.group()); } void CalcCorr::shape(int index) { - uiForm().absp_swShapeDetails->setCurrentIndex(index); + m_uiForm.swShapeDetails->setCurrentIndex(index); // Meaning of the "avar" variable changes depending on shape selection - if ( index == 0 ) { uiForm().absp_lbAvar->setText("Sample Angle:"); } - else if ( index == 1 ) { uiForm().absp_lbAvar->setText("Step Size:"); } + if ( index == 0 ) { m_uiForm.lbAvar->setText("Sample Angle:"); } + else if ( index == 1 ) { m_uiForm.lbAvar->setText("Step Size:"); } } void CalcCorr::useCanChecked(bool checked) { // Disable "Can Details" group and asterisks. - uiForm().absp_gbCan->setEnabled(checked); - uiForm().absp_valCanden->setVisible(checked); - uiForm().absp_lbtc1->setEnabled(checked); - uiForm().absp_lbtc2->setEnabled(checked); - uiForm().absp_letc1->setEnabled(checked); - uiForm().absp_letc2->setEnabled(checked); - uiForm().absp_lbR3->setEnabled(checked); - uiForm().absp_ler3->setEnabled(checked); - + m_uiForm.gbCan->setEnabled(checked); + m_uiForm.valCanden->setVisible(checked); + m_uiForm.lbtc1->setEnabled(checked); + m_uiForm.lbtc2->setEnabled(checked); + m_uiForm.letc1->setEnabled(checked); + m_uiForm.letc2->setEnabled(checked); + m_uiForm.lbR3->setEnabled(checked); + m_uiForm.ler3->setEnabled(checked); + QString value; (checked ? value = "*" : value = " "); - uiForm().absp_valCansigs->setText(value); - uiForm().absp_valCansiga->setText(value); - uiForm().absp_valCanFormula->setText(value); + m_uiForm.valCansigs->setText(value); + m_uiForm.valCansiga->setText(value); + m_uiForm.valCanFormula->setText(value); // Disable thickness fields/labels/asterisks. - uiForm().absp_valtc1->setText(value); - uiForm().absp_valtc2->setText(value); + m_uiForm.valtc1->setText(value); + m_uiForm.valtc2->setText(value); // // Disable R3 field/label/asterisk. - uiForm().absp_valR3->setText(value); - + m_uiForm.valR3->setText(value); + if (checked) - { + { UserInputValidator uiv; - uiv.checkFieldIsValid("",uiForm().absp_lecansigs, uiForm().absp_valCansigs); - uiv.checkFieldIsValid("",uiForm().absp_lecansiga, uiForm().absp_valCansiga); - uiv.checkFieldIsValid("",uiForm().absp_letc1, uiForm().absp_valtc1); - uiv.checkFieldIsValid("",uiForm().absp_letc2, uiForm().absp_valtc2); - uiv.checkFieldIsValid("",uiForm().absp_ler3, uiForm().absp_valR3); + uiv.checkFieldIsValid("",m_uiForm.lecansigs, m_uiForm.valCansigs); + uiv.checkFieldIsValid("",m_uiForm.lecansiga, m_uiForm.valCansiga); + uiv.checkFieldIsValid("",m_uiForm.letc1, m_uiForm.valtc1); + uiv.checkFieldIsValid("",m_uiForm.letc2, m_uiForm.valtc2); + uiv.checkFieldIsValid("",m_uiForm.ler3, m_uiForm.valR3); } - uiForm().absp_dsCanInput->setEnabled(checked); - + m_uiForm.dsCanInput->setEnabled(checked); + // Workaround for "disabling" title of the QGroupBox. QPalette palette; if(checked) palette.setColor( - QPalette::Disabled, + QPalette::Disabled, QPalette::WindowText, QApplication::palette().color(QPalette::Disabled, QPalette::WindowText)); else palette.setColor( - QPalette::Active, + QPalette::Active, QPalette::WindowText, QApplication::palette().color(QPalette::Active, QPalette::WindowText)); - uiForm().absp_gbCan->setPalette(palette); + m_uiForm.gbCan->setPalette(palette); } void CalcCorr::tcSync() { - if ( uiForm().absp_letc2->text() == "" ) + if ( m_uiForm.letc2->text() == "" ) { - QString val = uiForm().absp_letc1->text(); - uiForm().absp_letc2->setText(val); + QString val = m_uiForm.letc1->text(); + m_uiForm.letc2->setText(val); } } @@ -492,11 +494,11 @@ namespace IDA { using namespace Mantid::API; auto ws = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(wsname.toStdString()); - + if (!ws) { showMessageBox("Failed to find workspace " + wsname); - return; + return; } std::string paramName = "Workflow.beam-width"; @@ -504,11 +506,11 @@ namespace IDA if (instrument->hasParameter(paramName)) { std::string beamWidth = instrument->getStringParameter(paramName)[0]; - uiForm().absp_lewidth->setText(QString::fromUtf8(beamWidth.c_str())); + m_uiForm.lewidth->setText(QString::fromUtf8(beamWidth.c_str())); } else { - uiForm().absp_lewidth->setText(""); + m_uiForm.lewidth->setText(""); } } diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp index 897185cd9abc58f3c8df6c560c637087a37bc53d..086f9ce3291373c76c7b2810767d4d71d1a73619 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/ConvFit.cpp @@ -34,6 +34,7 @@ namespace IDA m_cfInputWS(), m_cfInputWSName(), m_confitResFileType() { + m_uiForm.setupUi(parent); } void ConvFit::setup() @@ -43,7 +44,7 @@ namespace IDA // Create TreeProperty Widget m_cfTree = new QtTreePropertyBrowser(); - uiForm().confit_properties->addWidget(m_cfTree); + m_uiForm.properties->addWidget(m_cfTree); // add factories to managers m_cfTree->setFactoryForManager(m_blnManager, qtCheckBoxFactory()); @@ -54,12 +55,12 @@ namespace IDA m_plots["ConvFitPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); m_plots["ConvFitPlot"]->setAxisFont(QwtPlot::yLeft, m_parentWidget->font()); m_plots["ConvFitPlot"]->setCanvasBackground(Qt::white); - uiForm().confit_plot->addWidget(m_plots["ConvFitPlot"]); + m_uiForm.plot->addWidget(m_plots["ConvFitPlot"]); // Create Range Selectors m_rangeSelectors["ConvFitRange"] = new MantidQt::MantidWidgets::RangeSelector(m_plots["ConvFitPlot"]); m_rangeSelectors["ConvFitBackRange"] = new MantidQt::MantidWidgets::RangeSelector(m_plots["ConvFitPlot"], - MantidQt::MantidWidgets::RangeSelector::YSINGLE); + MantidQt::MantidWidgets::RangeSelector::YSINGLE); m_rangeSelectors["ConvFitBackRange"]->setColour(Qt::darkGreen); m_rangeSelectors["ConvFitBackRange"]->setRange(0.0, 1.0); m_rangeSelectors["ConvFitHWHM"] = new MantidQt::MantidWidgets::RangeSelector(m_plots["ConvFitPlot"]); @@ -101,7 +102,7 @@ namespace IDA m_properties["Lorentzian1"] = createLorentzian("Lorentzian 1"); m_properties["Lorentzian2"] = createLorentzian("Lorentzian 2"); - uiForm().confit_leTempCorrection->setValidator(new QDoubleValidator(m_parentWidget)); + m_uiForm.leTempCorrection->setValidator(new QDoubleValidator(m_parentWidget)); // Connections connect(m_rangeSelectors["ConvFitRange"], SIGNAL(minValueChanged(double)), this, SLOT(minChanged(double))); @@ -112,34 +113,34 @@ namespace IDA connect(m_dblManager, SIGNAL(valueChanged(QtProperty*, double)), this, SLOT(updateRS(QtProperty*, double))); connect(m_blnManager, SIGNAL(valueChanged(QtProperty*, bool)), this, SLOT(checkBoxUpdate(QtProperty*, bool))); connect(m_dblManager, SIGNAL(propertyChanged(QtProperty*)), this, SLOT(plotGuess(QtProperty*))); - connect(uiForm().confit_ckTempCorrection, SIGNAL(toggled(bool)), uiForm().confit_leTempCorrection, SLOT(setEnabled(bool))); + connect(m_uiForm.ckTempCorrection, SIGNAL(toggled(bool)), m_uiForm.leTempCorrection, SLOT(setEnabled(bool))); // Have FWHM Range linked to Fit Start/End Range connect(m_rangeSelectors["ConvFitRange"], SIGNAL(rangeChanged(double, double)), m_rangeSelectors["ConvFitHWHM"], SLOT(setRange(double, double))); m_rangeSelectors["ConvFitHWHM"]->setRange(-1.0,1.0); hwhmUpdateRS(0.02); - typeSelection(uiForm().confit_cbFitType->currentIndex()); - bgTypeSelection(uiForm().confit_cbBackground->currentIndex()); + typeSelection(m_uiForm.cbFitType->currentIndex()); + bgTypeSelection(m_uiForm.cbBackground->currentIndex()); // Replot input automatically when file / spec no changes - connect(uiForm().confit_spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); - connect(uiForm().confit_dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); + connect(m_uiForm.spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); + connect(m_uiForm.dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); - connect(uiForm().confit_spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); - connect(uiForm().confit_spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); + connect(m_uiForm.spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); + connect(m_uiForm.spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); - connect(uiForm().confit_cbFitType, SIGNAL(currentIndexChanged(int)), this, SLOT(typeSelection(int))); - connect(uiForm().confit_cbBackground, SIGNAL(currentIndexChanged(int)), this, SLOT(bgTypeSelection(int))); - connect(uiForm().confit_pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); + connect(m_uiForm.cbFitType, SIGNAL(currentIndexChanged(int)), this, SLOT(typeSelection(int))); + connect(m_uiForm.cbBackground, SIGNAL(currentIndexChanged(int)), this, SLOT(bgTypeSelection(int))); + connect(m_uiForm.pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); // Context menu m_cfTree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_cfTree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(fitContextMenu(const QPoint &))); // Tie - connect(uiForm().confit_cbFitType,SIGNAL(currentIndexChanged(QString)),SLOT(showTieCheckbox(QString))); - showTieCheckbox( uiForm().confit_cbFitType->currentText() ); + connect(m_uiForm.cbFitType,SIGNAL(currentIndexChanged(QString)),SLOT(showTieCheckbox(QString))); + showTieCheckbox( m_uiForm.cbFitType->currentText() ); } void ConvFit::run() @@ -158,15 +159,15 @@ namespace IDA g_log.error("No fit type defined"); } - bool useTies = uiForm().confit_ckTieCentres->isChecked(); + bool useTies = m_uiForm.ckTieCentres->isChecked(); QString ties = (useTies ? "True" : "False"); Mantid::API::CompositeFunction_sptr func = createFunction(useTies); std::string function = std::string(func->asString()); QString stX = m_properties["StartX"]->valueText(); QString enX = m_properties["EndX"]->valueText(); - QString specMin = uiForm().confit_spSpectraMin->text(); - QString specMax = uiForm().confit_spSpectraMax->text(); + QString specMin = m_uiForm.spSpectraMin->text(); + QString specMax = m_uiForm.spSpectraMax->text(); QString pyInput = "from IndirectDataAnalysis import confitSeq\n" @@ -174,20 +175,20 @@ namespace IDA "func = r'" + QString::fromStdString(function) + "'\n" "startx = " + stX + "\n" "endx = " + enX + "\n" - "plot = '" + uiForm().confit_cbPlotOutput->currentText() + "'\n" + "plot = '" + m_uiForm.cbPlotType->currentText() + "'\n" "ties = " + ties + "\n" "specMin = " + specMin + "\n" "specMax = " + specMax + "\n" - "save = " + (uiForm().confit_ckSaveSeq->isChecked() ? "True\n" : "False\n"); + "save = " + (m_uiForm.ckSaveSeq->isChecked() ? "True\n" : "False\n"); if ( m_blnManager->value(m_properties["Convolve"]) ) pyInput += "convolve = True\n"; else pyInput += "convolve = False\n"; - if ( uiForm().confit_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; - QString temperature = uiForm().confit_leTempCorrection->text(); - bool useTempCorrection = (!temperature.isEmpty() && uiForm().confit_ckTempCorrection->isChecked()); + QString temperature = m_uiForm.leTempCorrection->text(); + bool useTempCorrection = (!temperature.isEmpty() && m_uiForm.ckTempCorrection->isChecked()); if ( useTempCorrection ) { pyInput += "temp=" + temperature + "\n"; @@ -219,15 +220,15 @@ namespace IDA UserInputValidator uiv; - uiv.checkDataSelectorIsValid("Sample", uiForm().confit_dsSampleInput); - uiv.checkDataSelectorIsValid("Resolution", uiForm().confit_dsResInput); + uiv.checkDataSelectorIsValid("Sample", m_uiForm.dsSampleInput); + uiv.checkDataSelectorIsValid("Resolution", m_uiForm.dsResInput); auto range = std::make_pair(m_dblManager->value(m_properties["StartX"]), m_dblManager->value(m_properties["EndX"])); uiv.checkValidRange("Fitting Range", range); // Enforce the rule that at least one fit is needed; either a delta function, one or two lorentzian functions, // or both. (The resolution function must be convolved with a model.) - if ( uiForm().confit_cbFitType->currentIndex() == 0 && ! m_blnManager->value(m_properties["UseDeltaFunc"]) ) + if ( m_uiForm.cbFitType->currentIndex() == 0 && ! m_blnManager->value(m_properties["UseDeltaFunc"]) ) uiv.addErrorMessage("No fit function has been selected."); QString error = uiv.generateErrorMessage(); @@ -238,8 +239,8 @@ namespace IDA void ConvFit::loadSettings(const QSettings & settings) { - uiForm().confit_dsSampleInput->readSettings(settings.group()); - uiForm().confit_dsResInput->readSettings(settings.group()); + m_uiForm.dsSampleInput->readSettings(settings.group()); + m_uiForm.dsResInput->readSettings(settings.group()); } /** @@ -256,16 +257,16 @@ namespace IDA int maxSpecIndex = static_cast<int>(m_cfInputWS->getNumberHistograms()) - 1; - uiForm().confit_spPlotSpectrum->setMaximum(maxSpecIndex); - uiForm().confit_spPlotSpectrum->setMinimum(0); - uiForm().confit_spPlotSpectrum->setValue(0); + m_uiForm.spPlotSpectrum->setMaximum(maxSpecIndex); + m_uiForm.spPlotSpectrum->setMinimum(0); + m_uiForm.spPlotSpectrum->setValue(0); - uiForm().confit_spSpectraMin->setMaximum(maxSpecIndex); - uiForm().confit_spSpectraMin->setMinimum(0); + m_uiForm.spSpectraMin->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMin->setMinimum(0); - uiForm().confit_spSpectraMax->setMaximum(maxSpecIndex); - uiForm().confit_spSpectraMax->setMinimum(0); - uiForm().confit_spSpectraMax->setValue(maxSpecIndex); + m_uiForm.spSpectraMax->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMax->setMinimum(0); + m_uiForm.spSpectraMax->setValue(maxSpecIndex); plotInput(); } @@ -323,14 +324,14 @@ namespace IDA * +-- Model (AT LEAST one delta function or one/two lorentzians.) * | * +-- DeltaFunction (yes/no) - * +-- ProductFunction - * | + * +-- ProductFunction + * | * +-- Lorentzian 1 (yes/no) - * +-- Temperature Correction (yes/no) - * +-- ProductFunction - * | + * +-- Temperature Correction (yes/no) + * +-- ProductFunction + * | * +-- Lorentzian 2 (yes/no) - * +-- Temperature Correction (yes/no) + * +-- Temperature Correction (yes/no) * * @param tieCentres :: whether to tie centres of the two lorentzians. * @@ -350,7 +351,7 @@ namespace IDA func = Mantid::API::FunctionFactory::Instance().createFunction("LinearBackground"); comp->addFunction(func); - const int bgType = uiForm().confit_cbBackground->currentIndex(); // 0 = Fixed Flat, 1 = Fit Flat, 2 = Fit all + const int bgType = m_uiForm.cbBackground->currentIndex(); // 0 = Fixed Flat, 1 = Fit Flat, 2 = Fit all if ( bgType == 0 || ! m_properties["BGA0"]->subProperties().isEmpty() ) { @@ -381,15 +382,15 @@ namespace IDA conv->addFunction(func); //add resolution file - if (uiForm().confit_dsResInput->isFileSelectorVisible()) + if (m_uiForm.dsResInput->isFileSelectorVisible()) { - std::string resfilename = uiForm().confit_dsResInput->getFullFilePath().toStdString(); + std::string resfilename = m_uiForm.dsResInput->getFullFilePath().toStdString(); Mantid::API::IFunction::Attribute attr(resfilename); func->setAttribute("FileName", attr); } else { - std::string resWorkspace = uiForm().confit_dsResInput->getCurrentDataName().toStdString(); + std::string resWorkspace = m_uiForm.dsResInput->getCurrentDataName().toStdString(); Mantid::API::IFunction::Attribute attr(resWorkspace); func->setAttribute("Workspace", attr); } @@ -406,9 +407,9 @@ namespace IDA if ( useDeltaFunc ) { func = Mantid::API::FunctionFactory::Instance().createFunction("DeltaFunction"); - index = model->addFunction(func); - std::string parName = createParName(index); - populateFunction(func, model, m_properties["DeltaFunction"], parName, false); + index = model->addFunction(func); + std::string parName = createParName(index); + populateFunction(func, model, m_properties["DeltaFunction"], parName, false); } // ------------------------------------------------------------ @@ -417,8 +418,8 @@ namespace IDA //create temperature correction function to multiply with the lorentzians Mantid::API::IFunction_sptr tempFunc; - QString temperature = uiForm().confit_leTempCorrection->text(); - bool useTempCorrection = (!temperature.isEmpty() && uiForm().confit_ckTempCorrection->isChecked()); + QString temperature = m_uiForm.leTempCorrection->text(); + bool useTempCorrection = (!temperature.isEmpty() && m_uiForm.ckTempCorrection->isChecked()); // ----------------------------------------------------- // --- Composite / Convolution / Model / Lorentzians --- @@ -426,7 +427,7 @@ namespace IDA std::string prefix1; std::string prefix2; - int fitTypeIndex = uiForm().confit_cbFitType->currentIndex(); + int fitTypeIndex = m_uiForm.cbFitType->currentIndex(); // Add 1st Lorentzian if(fitTypeIndex > 0) @@ -487,7 +488,7 @@ namespace IDA { //create temperature correction function to multiply with the lorentzians Mantid::API::IFunction_sptr tempFunc; - QString temperature = uiForm().confit_leTempCorrection->text(); + QString temperature = m_uiForm.leTempCorrection->text(); //create user function for the exponential correction // (x*temp) / 1-exp(-(x*temp)) @@ -511,7 +512,7 @@ namespace IDA try { Mantid::Geometry::Instrument_const_sptr inst = - AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(workspaceName)->getInstrument(); + AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(workspaceName)->getInstrument(); std::string analyser = inst->getStringParameter("analyser")[0]; std::string idfDirectory = Mantid::Kernel::ConfigService::Instance().getString("instrumentDefinition.directory"); @@ -582,10 +583,10 @@ namespace IDA { std::string propName = props[i]->propertyName().toStdString(); double propValue = props[i]->valueText().toDouble(); - if ( propValue ) - { - func->setParameter(propName, propValue); - } + if ( propValue ) + { + func->setParameter(propName, propValue); + } } } } @@ -606,14 +607,14 @@ namespace IDA if( m_blnManager->value(m_properties["UseDeltaFunc"]) ) fitType += "Delta"; - switch ( uiForm().confit_cbFitType->currentIndex() ) + switch ( m_uiForm.cbFitType->currentIndex() ) { - case 0: - break; - case 1: - fitType += "1L"; break; - case 2: - fitType += "2L"; break; + case 0: + break; + case 1: + fitType += "1L"; break; + case 2: + fitType += "2L"; break; } return fitType; @@ -630,16 +631,16 @@ namespace IDA */ QString ConvFit::backgroundString() const { - switch ( uiForm().confit_cbBackground->currentIndex() ) + switch ( m_uiForm.cbBackground->currentIndex() ) { - case 0: - return "FixF_s"; - case 1: - return "FitF_s"; - case 2: - return "FitL_s"; - default: - return ""; + case 0: + return "FixF_s"; + case 1: + return "FitF_s"; + case 2: + return "FitL_s"; + default: + return ""; } } @@ -650,18 +651,18 @@ namespace IDA switch ( index ) { - case 0: - m_rangeSelectors["ConvFitHWHM"]->setVisible(false); - break; - case 1: - m_cfTree->addProperty(m_properties["Lorentzian1"]); - m_rangeSelectors["ConvFitHWHM"]->setVisible(true); - break; - case 2: - m_cfTree->addProperty(m_properties["Lorentzian1"]); - m_cfTree->addProperty(m_properties["Lorentzian2"]); - m_rangeSelectors["ConvFitHWHM"]->setVisible(true); - break; + case 0: + m_rangeSelectors["ConvFitHWHM"]->setVisible(false); + break; + case 1: + m_cfTree->addProperty(m_properties["Lorentzian1"]); + m_rangeSelectors["ConvFitHWHM"]->setVisible(true); + break; + case 2: + m_cfTree->addProperty(m_properties["Lorentzian1"]); + m_cfTree->addProperty(m_properties["Lorentzian2"]); + m_rangeSelectors["ConvFitHWHM"]->setVisible(true); + break; } } @@ -687,17 +688,17 @@ namespace IDA return; } - const bool plotGuess = uiForm().confit_ckPlotGuess->isChecked(); - uiForm().confit_ckPlotGuess->setChecked(false); + const bool plotGuess = m_uiForm.ckPlotGuess->isChecked(); + m_uiForm.ckPlotGuess->setChecked(false); - int specNo = uiForm().confit_spPlotSpectrum->text().toInt(); + int specNo = m_uiForm.spPlotSpectrum->text().toInt(); plotMiniPlot(m_cfInputWS, specNo, "ConvFitPlot", "CFDataCurve"); try { const std::pair<double, double> range = getCurveRange("CFDataCurve"); m_rangeSelectors["ConvFitRange"]->setRange(range.first, range.second); - uiForm().confit_ckPlotGuess->setChecked(plotGuess); + m_uiForm.ckPlotGuess->setChecked(plotGuess); } catch(std::invalid_argument & exc) { @@ -719,12 +720,12 @@ namespace IDA void ConvFit::plotGuess(QtProperty*) { - if ( ! uiForm().confit_ckPlotGuess->isChecked() || m_curves["CFDataCurve"] == NULL ) + if ( ! m_uiForm.ckPlotGuess->isChecked() || m_curves["CFDataCurve"] == NULL ) { return; } - bool tieCentres = (uiForm().confit_cbFitType->currentIndex() > 1); + bool tieCentres = (m_uiForm.cbFitType->currentIndex() > 1); Mantid::API::CompositeFunction_sptr function = createFunction(tieCentres); if ( m_cfInputWS == NULL ) @@ -786,9 +787,9 @@ namespace IDA return; } - uiForm().confit_ckPlotGuess->setChecked(false); + m_uiForm.ckPlotGuess->setChecked(false); - Mantid::API::CompositeFunction_sptr function = createFunction(uiForm().confit_ckTieCentres->isChecked()); + Mantid::API::CompositeFunction_sptr function = createFunction(m_uiForm.ckTieCentres->isChecked()); // get output name QString fitType = fitTypeString(); @@ -800,14 +801,14 @@ namespace IDA } QString outputNm = runPythonCode(QString("from IndirectCommon import getWSprefix\nprint getWSprefix('") + m_cfInputWSName + QString("')\n")).trimmed(); - outputNm += QString("conv_") + fitType + bgType + uiForm().confit_spPlotSpectrum->text(); + outputNm += QString("conv_") + fitType + bgType + m_uiForm.spPlotSpectrum->text(); std::string output = outputNm.toStdString(); Mantid::API::IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().create("Fit"); alg->initialize(); alg->setPropertyValue("Function", function->asString()); alg->setPropertyValue("InputWorkspace", m_cfInputWSName.toStdString()); - alg->setProperty<int>("WorkspaceIndex", uiForm().confit_spPlotSpectrum->text().toInt()); + alg->setProperty<int>("WorkspaceIndex", m_uiForm.spPlotSpectrum->text().toInt()); alg->setProperty<double>("StartX", m_dblManager->value(m_properties["StartX"])); alg->setProperty<double>("EndX", m_dblManager->value(m_properties["EndX"])); alg->setProperty("Output", output); @@ -846,31 +847,31 @@ namespace IDA m_dblManager->setValue(m_properties["BGA0"], parameters["f0.A0"]); m_dblManager->setValue(m_properties["BGA1"], parameters["f0.A1"]); - int noLorentz = uiForm().confit_cbFitType->currentIndex(); + int noLorentz = m_uiForm.cbFitType->currentIndex(); int funcIndex = 0; - int subIndex = 0; + int subIndex = 0; - //check if we're using a temperature correction - if (uiForm().confit_ckTempCorrection->isChecked() && - !uiForm().confit_leTempCorrection->text().isEmpty()) - { - subIndex++; - } + //check if we're using a temperature correction + if (m_uiForm.ckTempCorrection->isChecked() && + !m_uiForm.leTempCorrection->text().isEmpty()) + { + subIndex++; + } - bool usingDeltaFunc = m_blnManager->value(m_properties["UseDeltaFunc"]); - bool usingCompositeFunc = ((usingDeltaFunc && noLorentz > 0) || noLorentz > 1); + bool usingDeltaFunc = m_blnManager->value(m_properties["UseDeltaFunc"]); + bool usingCompositeFunc = ((usingDeltaFunc && noLorentz > 0) || noLorentz > 1); QString prefBase = "f1.f1."; - if ( usingDeltaFunc ) + if ( usingDeltaFunc ) { QString key = prefBase; - if (usingCompositeFunc) - { - key += "f0."; - } + if (usingCompositeFunc) + { + key += "f0."; + } - key += "Height"; + key += "Height"; m_dblManager->setValue(m_properties["DeltaHeight"], parameters[key]); funcIndex++; @@ -879,16 +880,16 @@ namespace IDA if ( noLorentz > 0 ) { // One Lorentz - QString pref = prefBase; + QString pref = prefBase; - if ( usingCompositeFunc ) - { - pref += "f" + QString::number(funcIndex) + ".f" + QString::number(subIndex) + "."; - } - else - { - pref += "f" + QString::number(subIndex) + "."; - } + if ( usingCompositeFunc ) + { + pref += "f" + QString::number(funcIndex) + ".f" + QString::number(subIndex) + "."; + } + else + { + pref += "f" + QString::number(subIndex) + "."; + } m_dblManager->setValue(m_properties["Lorentzian 1.Amplitude"], parameters[pref+"Amplitude"]); m_dblManager->setValue(m_properties["Lorentzian 1.PeakCentre"], parameters[pref+"PeakCentre"]); @@ -899,8 +900,8 @@ namespace IDA if ( noLorentz > 1 ) { // Two Lorentz - QString pref = prefBase; - pref += "f" + QString::number(funcIndex) + ".f" + QString::number(subIndex) + "."; + QString pref = prefBase; + pref += "f" + QString::number(funcIndex) + ".f" + QString::number(subIndex) + "."; m_dblManager->setValue(m_properties["Lorentzian 2.Amplitude"], parameters[pref+"Amplitude"]); m_dblManager->setValue(m_properties["Lorentzian 2.PeakCentre"], parameters[pref+"PeakCentre"]); @@ -917,7 +918,7 @@ namespace IDA */ void ConvFit::specMinChanged(int value) { - uiForm().confit_spSpectraMax->setMinimum(value); + m_uiForm.spSpectraMax->setMinimum(value); } /** @@ -929,7 +930,7 @@ namespace IDA */ void ConvFit::specMaxChanged(int value) { - uiForm().confit_spSpectraMin->setMaximum(value); + m_uiForm.spSpectraMin->setMaximum(value); } void ConvFit::minChanged(double val) @@ -966,7 +967,7 @@ namespace IDA else if ( prop == m_properties["Lorentzian 1.FWHM"] ) { hwhmUpdateRS(val); } else if ( prop == m_properties["Lorentzian 1.PeakCentre"] ) { - hwhmUpdateRS(m_dblManager->value(m_properties["Lorentzian 1.FWHM"])); + hwhmUpdateRS(m_dblManager->value(m_properties["Lorentzian 1.FWHM"])); } } @@ -985,14 +986,14 @@ namespace IDA if ( checked ) { m_properties["DeltaFunction"]->addSubProperty(m_properties["DeltaHeight"]); - uiForm().confit_cbPlotOutput->addItem("Height"); - uiForm().confit_cbPlotOutput->addItem("EISF"); + m_uiForm.cbPlotType->addItem("Height"); + m_uiForm.cbPlotType->addItem("EISF"); } else { m_properties["DeltaFunction"]->removeSubProperty(m_properties["DeltaHeight"]); - uiForm().confit_cbPlotOutput->removeItem(uiForm().confit_cbPlotOutput->count()-1); - uiForm().confit_cbPlotOutput->removeItem(uiForm().confit_cbPlotOutput->count()-1); + m_uiForm.cbPlotType->removeItem(m_uiForm.cbPlotType->count()-1); + m_uiForm.cbPlotType->removeItem(m_uiForm.cbPlotType->count()-1); } } } @@ -1045,7 +1046,7 @@ namespace IDA // Determine what the property is. QtProperty* prop = item->property(); - QtProperty* fixedProp = m_stringManager->addProperty( prop->propertyName() ); + QtProperty* fixedProp = m_stringManager->addProperty( prop->propertyName() ); QtProperty* fprlbl = m_stringManager->addProperty("Fixed"); fixedProp->addSubProperty(fprlbl); m_stringManager->setValue(fixedProp, prop->valueText()); @@ -1078,7 +1079,7 @@ namespace IDA void ConvFit::showTieCheckbox(QString fitType) { - uiForm().confit_ckTieCentres->setVisible( fitType == "Two Lorentzians" ); + m_uiForm.ckTieCentres->setVisible( fitType == "Two Lorentzians" ); } } // namespace IDA diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp index ac1443964f0977734b4eb780f32ef055c675a2a7..38e487648b1fb1f967255be9a471ca94c63cb3c8 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Elwin.cpp @@ -21,16 +21,18 @@ namespace CustomInterfaces { namespace IDA { - Elwin::Elwin(QWidget * parent) : IDATab(parent), + Elwin::Elwin(QWidget * parent) : + IDATab(parent), m_elwTree(NULL) { + m_uiForm.setupUi(parent); } void Elwin::setup() { // Create QtTreePropertyBrowser object m_elwTree = new QtTreePropertyBrowser(); - uiForm().elwin_properties->addWidget(m_elwTree); + m_uiForm.properties->addWidget(m_elwTree); // Editor Factories m_elwTree->setFactoryForManager(m_dblManager, doubleEditorFactory()); @@ -65,7 +67,7 @@ namespace IDA m_plots["ElwinPlot"] = new QwtPlot(m_parentWidget); m_plots["ElwinPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); m_plots["ElwinPlot"]->setAxisFont(QwtPlot::yLeft, m_parentWidget->font()); - uiForm().elwin_plot->addWidget(m_plots["ElwinPlot"]); + m_uiForm.plot->addWidget(m_plots["ElwinPlot"]); m_plots["ElwinPlot"]->setCanvasBackground(Qt::white); // We always want one range selector... the second one can be controlled from // within the elwinTwoRanges(bool state) function @@ -86,9 +88,9 @@ namespace IDA connect(m_blnManager, SIGNAL(valueChanged(QtProperty*, bool)), this, SLOT(twoRanges(QtProperty*, bool))); twoRanges(m_properties["BackgroundSubtraction"], false); - connect(uiForm().elwin_inputFile, SIGNAL(filesFound()), this, SLOT(newInputFiles())); - connect(uiForm().elwin_cbPreviewFile, SIGNAL(currentIndexChanged(int)), this, SLOT(newPreviewFileSelected(int))); - connect(uiForm().elwin_spPreviewSpec, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); + connect(m_uiForm.dsInputFiles, SIGNAL(filesFound()), this, SLOT(newInputFiles())); + connect(m_uiForm.cbPreviewFile, SIGNAL(currentIndexChanged(int)), this, SLOT(newPreviewFileSelected(int))); + connect(m_uiForm.spPreviewSpec, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); // Set any default values m_dblManager->setValue(m_properties["IntegrationStart"], -0.02); @@ -100,7 +102,7 @@ namespace IDA void Elwin::run() { - QStringList inputFilenames = uiForm().elwin_inputFile->getFilenames(); + QStringList inputFilenames = m_uiForm.dsInputFiles->getFilenames(); inputFilenames.sort(); // Get workspace names @@ -144,13 +146,13 @@ namespace IDA IAlgorithm_sptr elwinMultAlg = AlgorithmManager::Instance().create("ElasticWindowMultiple"); elwinMultAlg->initialize(); - elwinMultAlg->setProperty("Plot", uiForm().elwin_ckPlot->isChecked()); + elwinMultAlg->setProperty("Plot", m_uiForm.ckPlot->isChecked()); elwinMultAlg->setProperty("OutputInQ", qWorkspace.toStdString()); elwinMultAlg->setProperty("OutputInQSquared", qSquaredWorkspace.toStdString()); elwinMultAlg->setProperty("OutputELF", elfWorkspace.toStdString()); - elwinMultAlg->setProperty("SampleEnvironmentLogName", uiForm().leLogName->text().toStdString()); + elwinMultAlg->setProperty("SampleEnvironmentLogName", m_uiForm.leLogName->text().toStdString()); elwinMultAlg->setProperty("Range1Start", m_dblManager->value(m_properties["IntegrationStart"])); elwinMultAlg->setProperty("Range1End", m_dblManager->value(m_properties["IntegrationEnd"])); @@ -172,7 +174,7 @@ namespace IDA m_batchAlgoRunner->addAlgorithm(elwinMultAlg, elwinInputProps); // Configure Save algorithms - if(uiForm().elwin_ckSave->isChecked()) + if(m_uiForm.ckSave->isChecked()) { addSaveAlgorithm(qWorkspace); addSaveAlgorithm(qSquaredWorkspace); @@ -216,7 +218,7 @@ namespace IDA { UserInputValidator uiv; - uiv.checkMWRunFilesIsValid("Input", uiForm().elwin_inputFile); + uiv.checkMWRunFilesIsValid("Input", m_uiForm.dsInputFiles); auto rangeOne = std::make_pair(m_dblManager->value(m_properties["IntegrationStart"]), m_dblManager->value(m_properties["IntegrationEnd"])); uiv.checkValidRange("Range One", rangeOne); @@ -237,7 +239,7 @@ namespace IDA void Elwin::loadSettings(const QSettings & settings) { - uiForm().elwin_inputFile->readSettings(settings.group()); + m_uiForm.dsInputFiles->readSettings(settings.group()); } void Elwin::setDefaultResolution(Mantid::API::MatrixWorkspace_const_sptr ws) @@ -274,7 +276,7 @@ namespace IDA logName = QString::fromStdString(log[0]); } - uiForm().leLogName->setText(logName); + m_uiForm.leLogName->setText(logName); } /** @@ -285,10 +287,10 @@ namespace IDA void Elwin::newInputFiles() { // Clear the existing list of files - uiForm().elwin_cbPreviewFile->clear(); + m_uiForm.cbPreviewFile->clear(); // Populate the combo box with the filenames - QStringList filenames = uiForm().elwin_inputFile->getFilenames(); + QStringList filenames = m_uiForm.dsInputFiles->getFilenames(); for(auto it = filenames.begin(); it != filenames.end(); ++it) { QString rawFilename = *it; @@ -296,11 +298,11 @@ namespace IDA QString sampleName = inputFileInfo.baseName(); // Add the item using the base filename as the display string and the raw filename as the data value - uiForm().elwin_cbPreviewFile->addItem(sampleName, rawFilename); + m_uiForm.cbPreviewFile->addItem(sampleName, rawFilename); } // Default to the first file - uiForm().elwin_cbPreviewFile->setCurrentIndex(0); + m_uiForm.cbPreviewFile->setCurrentIndex(0); } /** @@ -312,8 +314,8 @@ namespace IDA */ void Elwin::newPreviewFileSelected(int index) { - QString wsName = uiForm().elwin_cbPreviewFile->itemText(index); - QString filename = uiForm().elwin_cbPreviewFile->itemData(index).toString(); + QString wsName = m_uiForm.cbPreviewFile->itemText(index); + QString filename = m_uiForm.cbPreviewFile->itemData(index).toString(); // Ignore empty filenames (can happen when new files are loaded and the widget is being populated) if(filename.isEmpty()) @@ -328,8 +330,8 @@ namespace IDA auto ws = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(wsName.toStdString()); int numHist = static_cast<int>(ws->getNumberHistograms()) - 1; - uiForm().elwin_spPreviewSpec->setMaximum(numHist); - uiForm().elwin_spPreviewSpec->setValue(0); + m_uiForm.spPreviewSpec->setMaximum(numHist); + m_uiForm.spPreviewSpec->setValue(0); plotInput(); } @@ -339,7 +341,7 @@ namespace IDA */ void Elwin::plotInput() { - QString wsName = uiForm().elwin_cbPreviewFile->currentText(); + QString wsName = m_uiForm.cbPreviewFile->currentText(); if(!AnalysisDataService::Instance().doesExist(wsName.toStdString())) { @@ -355,7 +357,7 @@ namespace IDA return; } - int specNo = uiForm().elwin_spPreviewSpec->value(); + int specNo = m_uiForm.spPreviewSpec->value(); setDefaultResolution(ws); setDefaultSampleLog(ws); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Fury.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Fury.cpp index 6598db8fc9d48a42245b4a4cffb5d48bb7eb0d0b..a8302efe7d52ed0201ed6946d64d9562d0041d60 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Fury.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/Fury.cpp @@ -28,15 +28,16 @@ namespace IDA m_furTree(NULL), m_furyResFileType() { + m_uiForm.setupUi(parent); } void Fury::setup() { m_furTree = new QtTreePropertyBrowser(); - uiForm().fury_TreeSpace->addWidget(m_furTree); + m_uiForm.TreeSpace->addWidget(m_furTree); m_plots["FuryPlot"] = new QwtPlot(m_parentWidget); - uiForm().fury_PlotSpace->addWidget(m_plots["FuryPlot"]); + m_uiForm.PlotSpace->addWidget(m_plots["FuryPlot"]); m_plots["FuryPlot"]->setCanvasBackground(Qt::white); m_plots["FuryPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); m_plots["FuryPlot"]->setAxisFont(QwtPlot::yLeft, m_parentWidget->font()); @@ -80,8 +81,8 @@ namespace IDA connect(m_rangeSelectors["FuryRange"], SIGNAL(selectionChangedLazy(double, double)), this, SLOT(rsRangeChangedLazy(double, double))); connect(m_dblManager, SIGNAL(valueChanged(QtProperty*, double)), this, SLOT(updateRS(QtProperty*, double))); connect(m_dblManager, SIGNAL(valueChanged(QtProperty*, double)), this, SLOT(updatePropertyValues(QtProperty*, double))); - connect(uiForm().fury_dsInput, SIGNAL(dataReady(const QString&)), this, SLOT(plotInput(const QString&))); - connect(uiForm().fury_dsResInput, SIGNAL(dataReady(const QString&)), this, SLOT(calculateBinning())); + connect(m_uiForm.dsInput, SIGNAL(dataReady(const QString&)), this, SLOT(plotInput(const QString&))); + connect(m_uiForm.dsResInput, SIGNAL(dataReady(const QString&)), this, SLOT(calculateBinning())); } void Fury::run() @@ -90,16 +91,16 @@ namespace IDA calculateBinning(); - QString wsName = uiForm().fury_dsInput->getCurrentDataName(); - QString resName = uiForm().fury_dsResInput->getCurrentDataName(); + QString wsName = m_uiForm.dsInput->getCurrentDataName(); + QString resName = m_uiForm.dsResInput->getCurrentDataName(); double energyMin = m_dblManager->value(m_properties["ELow"]); double energyMax = m_dblManager->value(m_properties["EHigh"]); long numBins = static_cast<long>(m_dblManager->value(m_properties["SampleBinning"])); - bool plot = uiForm().fury_ckPlot->isChecked(); - bool verbose = uiForm().fury_ckVerbose->isChecked(); - bool save = uiForm().fury_ckSave->isChecked(); + bool plot = m_uiForm.ckPlot->isChecked(); + bool verbose = m_uiForm.ckVerbose->isChecked(); + bool save = m_uiForm.ckSave->isChecked(); IAlgorithm_sptr furyAlg = AlgorithmManager::Instance().create("Fury", -1); furyAlg->initialize(); @@ -119,7 +120,7 @@ namespace IDA runAlgorithm(furyAlg); // Set the result workspace for Python script export - QString sampleName = uiForm().fury_dsInput->getCurrentDataName(); + QString sampleName = m_uiForm.dsInput->getCurrentDataName(); m_pythonExportWsName = sampleName.left(sampleName.lastIndexOf("_")).toStdString() + "_iqt"; } @@ -133,8 +134,8 @@ namespace IDA { UserInputValidator uiv; - uiv.checkDataSelectorIsValid("Sample", uiForm().fury_dsInput); - uiv.checkDataSelectorIsValid("Resolution", uiForm().fury_dsResInput); + uiv.checkDataSelectorIsValid("Sample", m_uiForm.dsInput); + uiv.checkDataSelectorIsValid("Resolution", m_uiForm.dsResInput); QString message = uiv.generateErrorMessage(); showMessageBox(message); @@ -189,8 +190,8 @@ namespace IDA disconnect(m_dblManager, SIGNAL(valueChanged(QtProperty*, double)), this, SLOT(updatePropertyValues(QtProperty*, double))); - QString wsName = uiForm().fury_dsInput->getCurrentDataName(); - QString resName = uiForm().fury_dsResInput->getCurrentDataName(); + QString wsName = m_uiForm.dsInput->getCurrentDataName(); + QString resName = m_uiForm.dsResInput->getCurrentDataName(); if(wsName.isEmpty() || resName.isEmpty()) return; @@ -200,7 +201,7 @@ namespace IDA if(numBins == 0) return; - bool verbose = uiForm().fury_ckVerbose->isChecked(); + bool verbose = m_uiForm.ckVerbose->isChecked(); IAlgorithm_sptr furyAlg = AlgorithmManager::Instance().create("Fury"); furyAlg->initialize(); @@ -243,8 +244,8 @@ namespace IDA void Fury::loadSettings(const QSettings & settings) { - uiForm().fury_dsInput->readSettings(settings.group()); - uiForm().fury_dsResInput->readSettings(settings.group()); + m_uiForm.dsInput->readSettings(settings.group()); + m_uiForm.dsResInput->readSettings(settings.group()); } void Fury::plotInput(const QString& wsname) diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/FuryFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/FuryFit.cpp index d9e3a568d0190c9f0badf3866e86e951977a9c00..2eac2ea214d9e0e2a7eba30e98c12e4b2e495aa1 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/FuryFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/FuryFit.cpp @@ -37,6 +37,7 @@ namespace IDA m_ffInputWSName(), m_ties() { + m_uiForm.setupUi(parent); } void FuryFit::setup() @@ -44,13 +45,13 @@ namespace IDA m_stringManager = new QtStringPropertyManager(m_parentWidget); m_ffTree = new QtTreePropertyBrowser(m_parentWidget); - uiForm().furyfit_properties->addWidget(m_ffTree); + m_uiForm.properties->addWidget(m_ffTree); // Setup FuryFit Plot Window m_plots["FuryFitPlot"] = new QwtPlot(m_parentWidget); m_plots["FuryFitPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); m_plots["FuryFitPlot"]->setAxisFont(QwtPlot::yLeft, m_parentWidget->font()); - uiForm().furyfit_vlPlot->addWidget(m_plots["FuryFitPlot"]); + m_uiForm.vlPlot->addWidget(m_plots["FuryFitPlot"]); m_plots["FuryFitPlot"]->setCanvasBackground(QColor(255,255,255)); m_rangeSelectors["FuryFitRange"] = new MantidQt::MantidWidgets::RangeSelector(m_plots["FuryFitPlot"]); @@ -99,22 +100,22 @@ namespace IDA m_dblManager->setMinimum(m_properties["StretchedExp.Intensity"], 0); m_dblManager->setMaximum(m_properties["StretchedExp.Intensity"], 1); - typeSelection(uiForm().furyfit_cbFitType->currentIndex()); + typeSelection(m_uiForm.cbFitType->currentIndex()); // Connect to PlotGuess checkbox connect(m_dblManager, SIGNAL(propertyChanged(QtProperty*)), this, SLOT(plotGuess(QtProperty*))); // Signal/slot ui connections - connect(uiForm().furyfit_dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); - connect(uiForm().furyfit_cbFitType, SIGNAL(currentIndexChanged(int)), this, SLOT(typeSelection(int))); - connect(uiForm().furyfit_pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); + connect(m_uiForm.dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); + connect(m_uiForm.cbFitType, SIGNAL(currentIndexChanged(int)), this, SLOT(typeSelection(int))); + connect(m_uiForm.pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); - connect(uiForm().furyfit_dsSampleInput, SIGNAL(filesFound()), this, SLOT(plotInput())); + connect(m_uiForm.dsSampleInput, SIGNAL(filesFound()), this, SLOT(plotInput())); - connect(uiForm().furyfit_spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); + connect(m_uiForm.spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); - connect(uiForm().furyfit_spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); - connect(uiForm().furyfit_spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); + connect(m_uiForm.spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); + connect(m_uiForm.spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); // Set a custom handler for the QTreePropertyBrowser's ContextMenu event m_ffTree->setContextMenuPolicy(Qt::CustomContextMenu); @@ -128,8 +129,8 @@ namespace IDA return; } - const bool constrainBeta = uiForm().furyfit_ckConstrainBeta->isChecked(); - const bool constrainIntens = uiForm().furyfit_ckConstrainIntensities->isChecked(); + const bool constrainBeta = m_uiForm.ckConstrainBeta->isChecked(); + const bool constrainIntens = m_uiForm.ckConstrainIntensities->isChecked(); CompositeFunction_sptr func = createFunction(); func->tie("f0.A1", "0"); @@ -142,8 +143,8 @@ namespace IDA std::string function = std::string(func->asString()); QString fitType = fitTypeString(); - QString specMin = uiForm().furyfit_spSpectraMin->text(); - QString specMax = uiForm().furyfit_spSpectraMax->text(); + QString specMin = m_uiForm.spSpectraMin->text(); + QString specMax = m_uiForm.spSpectraMax->text(); QString pyInput = "from IndirectDataAnalysis import furyfitSeq, furyfitMult\n" "input = '" + m_ffInputWSName + "'\n" @@ -151,7 +152,7 @@ namespace IDA "ftype = '" + fitTypeString() + "'\n" "startx = " + m_properties["StartX"]->valueText() + "\n" "endx = " + m_properties["EndX"]->valueText() + "\n" - "plot = '" + uiForm().furyfit_cbPlotOutput->currentText() + "'\n" + "plot = '" + m_uiForm.cbPlotOutput->currentText() + "'\n" "spec_min = " + specMin + "\n" "spec_max = " + specMax + "\n" "spec_max = None\n"; @@ -159,10 +160,10 @@ namespace IDA if (constrainIntens) pyInput += "constrain_intens = True \n"; else pyInput += "constrain_intens = False \n"; - if ( uiForm().furyfit_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; - if ( uiForm().furyfit_ckSaveSeq->isChecked() ) pyInput += "save = True\n"; + if ( m_uiForm.ckSaveSeq->isChecked() ) pyInput += "save = True\n"; else pyInput += "save = False\n"; if( !constrainBeta ) @@ -186,7 +187,7 @@ namespace IDA { UserInputValidator uiv; - uiv.checkDataSelectorIsValid("Sample", uiForm().furyfit_dsSampleInput); + uiv.checkDataSelectorIsValid("Sample", m_uiForm.dsSampleInput); auto range = std::make_pair(m_ffRangeManager->value(m_properties["StartX"]), m_ffRangeManager->value(m_properties["EndX"])); uiv.checkValidRange("Ranges", range); @@ -199,7 +200,7 @@ namespace IDA void FuryFit::loadSettings(const QSettings & settings) { - uiForm().furyfit_dsSampleInput->readSettings(settings.group()); + m_uiForm.dsSampleInput->readSettings(settings.group()); } /** @@ -216,16 +217,16 @@ namespace IDA int maxSpecIndex = static_cast<int>(m_ffInputWS->getNumberHistograms()) - 1; - uiForm().furyfit_spPlotSpectrum->setMaximum(maxSpecIndex); - uiForm().furyfit_spPlotSpectrum->setMinimum(0); - uiForm().furyfit_spPlotSpectrum->setValue(0); + m_uiForm.spPlotSpectrum->setMaximum(maxSpecIndex); + m_uiForm.spPlotSpectrum->setMinimum(0); + m_uiForm.spPlotSpectrum->setValue(0); - uiForm().furyfit_spSpectraMin->setMaximum(maxSpecIndex); - uiForm().furyfit_spSpectraMin->setMinimum(0); + m_uiForm.spSpectraMin->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMin->setMinimum(0); - uiForm().furyfit_spSpectraMax->setMaximum(maxSpecIndex); - uiForm().furyfit_spSpectraMax->setMinimum(0); - uiForm().furyfit_spSpectraMax->setValue(maxSpecIndex); + m_uiForm.spSpectraMax->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMax->setMinimum(0); + m_uiForm.spSpectraMax->setValue(maxSpecIndex); plotInput(); } @@ -234,7 +235,7 @@ namespace IDA { CompositeFunction_sptr result( new CompositeFunction ); QString fname; - const int fitType = uiForm().furyfit_cbFitType->currentIndex(); + const int fitType = m_uiForm.cbFitType->currentIndex(); IFunction_sptr func = FunctionFactory::Instance().createFunction("LinearBackground"); func->setParameter("A0", m_ffRangeManager->value(m_properties["BackgroundA0"])); @@ -318,7 +319,7 @@ namespace IDA QString FuryFit::fitTypeString() const { - switch ( uiForm().furyfit_cbFitType->currentIndex() ) + switch ( m_uiForm.cbFitType->currentIndex() ) { case 0: return "1E_s"; @@ -342,10 +343,10 @@ namespace IDA m_ffTree->addProperty(m_properties["LinearBackground"]); //option should only be available with a single stretched exponential - uiForm().furyfit_ckConstrainBeta->setEnabled((index == 2)); - if (!uiForm().furyfit_ckConstrainBeta->isEnabled()) + m_uiForm.ckConstrainBeta->setEnabled((index == 2)); + if (!m_uiForm.ckConstrainBeta->isEnabled()) { - uiForm().furyfit_ckConstrainBeta->setChecked(false); + m_uiForm.ckConstrainBeta->setChecked(false); } switch ( index ) @@ -354,22 +355,22 @@ namespace IDA m_ffTree->addProperty(m_properties["Exponential1"]); //remove option to plot beta - uiForm().furyfit_cbPlotOutput->removeItem(4); + m_uiForm.cbPlotOutput->removeItem(4); break; case 1: m_ffTree->addProperty(m_properties["Exponential1"]); m_ffTree->addProperty(m_properties["Exponential2"]); //remove option to plot beta - uiForm().furyfit_cbPlotOutput->removeItem(4); + m_uiForm.cbPlotOutput->removeItem(4); break; case 2: m_ffTree->addProperty(m_properties["StretchedExp"]); //add option to plot beta - if(uiForm().furyfit_cbPlotOutput->count() == 4) + if(m_uiForm.cbPlotOutput->count() == 4) { - uiForm().furyfit_cbPlotOutput->addItem("Beta"); + m_uiForm.cbPlotOutput->addItem("Beta"); } break; @@ -378,9 +379,9 @@ namespace IDA m_ffTree->addProperty(m_properties["StretchedExp"]); //add option to plot beta - if(uiForm().furyfit_cbPlotOutput->count() == 4) + if(m_uiForm.cbPlotOutput->count() == 4) { - uiForm().furyfit_cbPlotOutput->addItem("Beta"); + m_uiForm.cbPlotOutput->addItem("Beta"); } break; @@ -397,7 +398,7 @@ namespace IDA return; } - int specNo = uiForm().furyfit_spPlotSpectrum->value(); + int specNo = m_uiForm.spPlotSpectrum->value(); plotMiniPlot(m_ffInputWS, specNo, "FuryFitPlot", "FF_DataCurve"); try @@ -448,7 +449,7 @@ namespace IDA */ void FuryFit::specMinChanged(int value) { - uiForm().furyfit_spSpectraMax->setMinimum(value); + m_uiForm.spSpectraMax->setMinimum(value); } /** @@ -460,7 +461,7 @@ namespace IDA */ void FuryFit::specMaxChanged(int value) { - uiForm().furyfit_spSpectraMin->setMaximum(value); + m_uiForm.spSpectraMin->setMaximum(value); } void FuryFit::xMinSelected(double val) @@ -514,7 +515,7 @@ namespace IDA std::string paramName = "f1.Intensity"; size_t index = func->parameterIndex(paramName); - switch ( uiForm().furyfit_cbFitType->currentIndex() ) + switch ( m_uiForm.cbFitType->currentIndex() ) { case 0: // 1 Exp case 2: // 1 Str @@ -553,8 +554,8 @@ namespace IDA // First create the function auto function = createFunction(); - const int fitType = uiForm().furyfit_cbFitType->currentIndex(); - if ( uiForm().furyfit_ckConstrainIntensities->isChecked() ) + const int fitType = m_uiForm.cbFitType->currentIndex(); + if ( m_uiForm.ckConstrainIntensities->isChecked() ) { switch ( fitType ) { @@ -581,7 +582,7 @@ namespace IDA QString pyInput = "from IndirectCommon import getWSprefix\nprint getWSprefix('%1')\n"; pyInput = pyInput.arg(m_ffInputWSName); QString outputNm = runPythonCode(pyInput).trimmed(); - outputNm += QString("fury_") + ftype + uiForm().furyfit_spPlotSpectrum->text(); + outputNm += QString("fury_") + ftype + m_uiForm.spPlotSpectrum->text(); std::string output = outputNm.toStdString(); // Create the Fit Algorithm @@ -589,7 +590,7 @@ namespace IDA alg->initialize(); alg->setPropertyValue("Function", function->asString()); alg->setPropertyValue("InputWorkspace", m_ffInputWSName.toStdString()); - alg->setProperty("WorkspaceIndex", uiForm().furyfit_spPlotSpectrum->text().toInt()); + alg->setProperty("WorkspaceIndex", m_uiForm.spPlotSpectrum->text().toInt()); alg->setProperty("StartX", m_ffRangeManager->value(m_properties["StartX"])); alg->setProperty("EndX", m_ffRangeManager->value(m_properties["EndX"])); alg->setProperty("Ties", m_ties.toStdString()); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp index 225408fc783d780eb9085b33a13e51fb16996081..f9e073c56f42d70960a31086e6000d827cea4d54 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IDATab.cpp @@ -8,7 +8,7 @@ #include <QString> using namespace Mantid::API; - + namespace MantidQt { namespace CustomInterfaces @@ -46,7 +46,7 @@ namespace IDA * @returns a QString containing the URL of the Mantid Wiki web page for the tab. */ QString IDATab::tabHelpURL() - { + { return "http://www.mantidproject.org/IDA:" + helpURL(); } @@ -79,37 +79,21 @@ namespace IDA throw std::runtime_error("IDATab: One of the operands is an invalid MatrixWorkspace pointer"); } } - - /** - * @returns a handle to the UI form object stored in the IndirectDataAnalysis class. - */ - Ui::IndirectDataAnalysis & IDATab::uiForm() - { - return m_parent->m_uiForm; - } - - /** - * @returns a const handle to the UI form object stored in the IndirectDataAnalysis class. - */ - const Ui::IndirectDataAnalysis & IDATab::uiForm() const - { - return m_parent->m_uiForm; - } /** * @returns a handle to the DoubleEditorFactory object stored in the IndirectDataAnalysis class. */ - DoubleEditorFactory * IDATab::doubleEditorFactory() - { - return m_parent->m_dblEdFac; + DoubleEditorFactory * IDATab::doubleEditorFactory() + { + return m_parent->m_dblEdFac; } /** * @returns a handle to the QtCheckBoxFactory object stored in the IndirectDataAnalysis class. */ - QtCheckBoxFactory * IDATab::qtCheckBoxFactory() - { - return m_parent->m_blnEdFac; + QtCheckBoxFactory * IDATab::qtCheckBoxFactory() + { + return m_parent->m_blnEdFac; } } // namespace IDA diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp index fda5bdef0cfc27f5ef2fd9eee77e1d5ca74b7b33..10bdfcdbfab14591b939f26cab91a6990c24c903 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/MSDFit.cpp @@ -25,13 +25,14 @@ namespace IDA MSDFit::MSDFit(QWidget * parent) : IDATab(parent), m_currentWsName(""), m_msdTree(NULL) { + m_uiForm.setupUi(parent); } void MSDFit::setup() { // Tree Browser m_msdTree = new QtTreePropertyBrowser(); - uiForm().msd_properties->addWidget(m_msdTree); + m_uiForm.properties->addWidget(m_msdTree); m_msdTree->setFactoryForManager(m_dblManager, doubleEditorFactory()); @@ -44,7 +45,7 @@ namespace IDA m_msdTree->addProperty(m_properties["End"]); m_plots["MSDPlot"] = new QwtPlot(m_parentWidget); - uiForm().msd_plot->addWidget(m_plots["MSDPlot"]); + m_uiForm.plot->addWidget(m_plots["MSDPlot"]); // Cosmetics m_plots["MSDPlot"]->setAxisFont(QwtPlot::xBottom, m_parentWidget->font()); @@ -57,12 +58,12 @@ namespace IDA connect(m_rangeSelectors["MSDRange"], SIGNAL(maxValueChanged(double)), this, SLOT(maxChanged(double))); connect(m_dblManager, SIGNAL(valueChanged(QtProperty*, double)), this, SLOT(updateRS(QtProperty*, double))); - connect(uiForm().msd_dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); - connect(uiForm().msd_pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); - connect(uiForm().msd_spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); + connect(m_uiForm.dsSampleInput, SIGNAL(dataReady(const QString&)), this, SLOT(newDataLoaded(const QString&))); + connect(m_uiForm.pbSingle, SIGNAL(clicked()), this, SLOT(singleFit())); + connect(m_uiForm.spPlotSpectrum, SIGNAL(valueChanged(int)), this, SLOT(plotInput())); - connect(uiForm().msd_spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); - connect(uiForm().msd_spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); + connect(m_uiForm.spSpectraMin, SIGNAL(valueChanged(int)), this, SLOT(specMinChanged(int))); + connect(m_uiForm.spSpectraMax, SIGNAL(valueChanged(int)), this, SLOT(specMaxChanged(int))); } void MSDFit::run() @@ -71,17 +72,17 @@ namespace IDA "from IndirectDataAnalysis import msdfit\n" "startX = " + QString::number(m_dblManager->value(m_properties["Start"])) +"\n" "endX = " + QString::number(m_dblManager->value(m_properties["End"])) +"\n" - "specMin = " + uiForm().msd_spSpectraMin->text() + "\n" - "specMax = " + uiForm().msd_spSpectraMax->text() + "\n" - "input = '" + uiForm().msd_dsSampleInput->getCurrentDataName() + "'\n"; + "specMin = " + m_uiForm.spSpectraMin->text() + "\n" + "specMax = " + m_uiForm.spSpectraMax->text() + "\n" + "input = '" + m_uiForm.dsSampleInput->getCurrentDataName() + "'\n"; - if ( uiForm().msd_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; - if ( uiForm().msd_ckPlot->isChecked() ) pyInput += "plot = True\n"; + if ( m_uiForm.ckPlot->isChecked() ) pyInput += "plot = True\n"; else pyInput += "plot = False\n"; - if ( uiForm().msd_ckSave->isChecked() ) pyInput += "save = True\n"; + if ( m_uiForm.ckSave->isChecked() ) pyInput += "save = True\n"; else pyInput += "save = False\n"; pyInput += @@ -91,7 +92,7 @@ namespace IDA UNUSED_ARG(pyOutput); // Set the result workspace for Python script export - QString dataName = uiForm().msd_dsSampleInput->getCurrentDataName(); + QString dataName = m_uiForm.dsSampleInput->getCurrentDataName(); m_pythonExportWsName = dataName.left(dataName.lastIndexOf("_")).toStdString() + "_msd"; } @@ -104,11 +105,11 @@ namespace IDA "from IndirectDataAnalysis import msdfit\n" "startX = " + QString::number(m_dblManager->value(m_properties["Start"])) +"\n" "endX = " + QString::number(m_dblManager->value(m_properties["End"])) +"\n" - "specMin = " + uiForm().msd_spPlotSpectrum->text() + "\n" - "specMax = " + uiForm().msd_spPlotSpectrum->text() + "\n" - "input = '" + uiForm().msd_dsSampleInput->getCurrentDataName() + "'\n"; + "specMin = " + m_uiForm.spPlotSpectrum->text() + "\n" + "specMax = " + m_uiForm.spPlotSpectrum->text() + "\n" + "input = '" + m_uiForm.dsSampleInput->getCurrentDataName() + "'\n"; - if ( uiForm().msd_ckVerbose->isChecked() ) pyInput += "verbose = True\n"; + if ( m_uiForm.ckVerbose->isChecked() ) pyInput += "verbose = True\n"; else pyInput += "verbose = False\n"; pyInput += @@ -123,13 +124,13 @@ namespace IDA { UserInputValidator uiv; - uiv.checkDataSelectorIsValid("Sample input", uiForm().msd_dsSampleInput); + uiv.checkDataSelectorIsValid("Sample input", m_uiForm.dsSampleInput); auto range = std::make_pair(m_dblManager->value(m_properties["Start"]), m_dblManager->value(m_properties["End"])); uiv.checkValidRange("a range", range); - int specMin = uiForm().msd_spSpectraMin->value(); - int specMax = uiForm().msd_spSpectraMax->value(); + int specMin = m_uiForm.spSpectraMin->value(); + int specMax = m_uiForm.spSpectraMax->value(); auto specRange = std::make_pair(specMin, specMax+1); uiv.checkValidRange("spectrum range", specRange); @@ -141,7 +142,7 @@ namespace IDA void MSDFit::loadSettings(const QSettings & settings) { - uiForm().msd_dsSampleInput->readSettings(settings.group()); + m_uiForm.dsSampleInput->readSettings(settings.group()); } void MSDFit::plotFit(QString wsName) @@ -170,23 +171,23 @@ namespace IDA auto ws = Mantid::API::AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(wsName.toStdString()); int maxSpecIndex = static_cast<int>(ws->getNumberHistograms()) - 1; - uiForm().msd_spPlotSpectrum->setMaximum(maxSpecIndex); - uiForm().msd_spPlotSpectrum->setMinimum(0); - uiForm().msd_spPlotSpectrum->setValue(0); + m_uiForm.spPlotSpectrum->setMaximum(maxSpecIndex); + m_uiForm.spPlotSpectrum->setMinimum(0); + m_uiForm.spPlotSpectrum->setValue(0); - uiForm().msd_spSpectraMin->setMaximum(maxSpecIndex); - uiForm().msd_spSpectraMin->setMinimum(0); + m_uiForm.spSpectraMin->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMin->setMinimum(0); - uiForm().msd_spSpectraMax->setMaximum(maxSpecIndex); - uiForm().msd_spSpectraMax->setMinimum(0); - uiForm().msd_spSpectraMax->setValue(maxSpecIndex); + m_uiForm.spSpectraMax->setMaximum(maxSpecIndex); + m_uiForm.spSpectraMax->setMinimum(0); + m_uiForm.spSpectraMax->setValue(maxSpecIndex); plotInput(); } void MSDFit::plotInput() { - QString wsname = uiForm().msd_dsSampleInput->getCurrentDataName(); + QString wsname = m_uiForm.dsSampleInput->getCurrentDataName(); if(!AnalysisDataService::Instance().doesExist(wsname.toStdString())) { @@ -196,7 +197,7 @@ namespace IDA auto ws = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>(wsname.toStdString()); - int wsIndex = uiForm().msd_spPlotSpectrum->value(); + int wsIndex = m_uiForm.spPlotSpectrum->value(); plotMiniPlot(ws, wsIndex, "MSDPlot", "MSDDataCurve"); try @@ -228,7 +229,7 @@ namespace IDA */ void MSDFit::specMinChanged(int value) { - uiForm().msd_spSpectraMax->setMinimum(value); + m_uiForm.spSpectraMax->setMinimum(value); } /** @@ -240,7 +241,7 @@ namespace IDA */ void MSDFit::specMaxChanged(int value) { - uiForm().msd_spSpectraMin->setMaximum(value); + m_uiForm.spSpectraMin->setMaximum(value); } void MSDFit::minChanged(double val)