Skip to content

Commit

Permalink
Added a checkbox for tying lorentzian centres. Re #7927
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Sep 12, 2013
1 parent d67b6a5 commit 565cfee
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ namespace IDA
void fitContextMenu(const QPoint &);
void fixItem();
void unFixItem();
void showTieCheckbox(QString);

private:
boost::shared_ptr<Mantid::API::CompositeFunction> createFunction(bool tie=false);
boost::shared_ptr<Mantid::API::CompositeFunction> createFunction(bool tieCentres=false);
QtProperty* createLorentzian(const QString &);
void populateFunction(Mantid::API::IFunction_sptr func, Mantid::API::IFunction_sptr comp, QtProperty* group, const std::string & pref, bool tie);
QString fitTypeString() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="elwin_inputFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="elwin_inputFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -49,7 +49,7 @@
<property name="multipleFiles" stdset="0">
<bool>true</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_red.nxs</string>
</stringlist>
Expand Down Expand Up @@ -193,7 +193,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="msd_inputFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="msd_inputFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -209,7 +209,7 @@
<property name="multipleFiles" stdset="0">
<bool>true</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_eq2.nxs</string>
</stringlist>
Expand Down Expand Up @@ -305,7 +305,7 @@
<item>
<layout class="QGridLayout" name="fury_layoutFiles">
<item row="2" column="1">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="fury_resFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="fury_resFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -321,7 +321,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_res.nxs</string>
</stringlist>
Expand Down Expand Up @@ -356,7 +356,7 @@
<item row="0" column="1">
<layout class="QHBoxLayout" name="fury_layout_input">
<item>
<widget class="MantidQt::MantidWidgets::DataSelector" name="fury_dsInput">
<widget class="MantidQt::MantidWidgets::DataSelector" name="fury_dsInput" native="true">
<property name="loadLabelText" stdset="0">
<string>Plot Input</string>
</property>
Expand All @@ -372,7 +372,7 @@
<string>_sqw.nxs</string>
</stringlist>
</property>
<property name="showLoad">
<property name="showLoad" stdset="0">
<bool>true</bool>
</property>
</widget>
Expand Down Expand Up @@ -498,7 +498,7 @@
<widget class="QWidget" name="furyfit_page_inputFile">
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="furyfit_inputFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="furyfit_inputFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -514,7 +514,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_iqt.nxs</string>
</stringlist>
Expand All @@ -534,7 +534,7 @@
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="MantidQt::MantidWidgets::WorkspaceSelector" name="furyfit_wsIqt">
<property name="WorkspaceTypes">
<property name="WorkspaceTypes" stdset="0">
<stringlist/>
</property>
<property name="Suffix" stdset="0">
Expand Down Expand Up @@ -829,7 +829,7 @@
</layout>
</item>
<item row="2" column="0">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="confit_resInput">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="confit_resInput" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
Expand All @@ -845,7 +845,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_res.nxs</string>
<string>.res</string>
Expand Down Expand Up @@ -892,7 +892,7 @@
<widget class="QWidget" name="confit_page_inputFile">
<layout class="QHBoxLayout" name="confit_layout_page_inputFile">
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="confit_inputFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="confit_inputFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -908,7 +908,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_red.nxs</string>
<string>_sqw.nxs</string>
Expand All @@ -929,7 +929,7 @@
<layout class="QHBoxLayout" name="horizontalLayout_29">
<item>
<widget class="MantidQt::MantidWidgets::WorkspaceSelector" name="confit_wsSample">
<property name="WorkspaceTypes">
<property name="WorkspaceTypes" stdset="0">
<stringlist/>
</property>
<property name="Suffix" stdset="0">
Expand Down Expand Up @@ -1036,6 +1036,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="confit_ckTieCentres">
<property name="text">
<string>Tie Centres</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down Expand Up @@ -1278,11 +1285,20 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="absp_inputFile">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="absp_inputFile" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
Expand All @@ -1298,7 +1314,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_red.nxs</string>
</stringlist>
Expand All @@ -1312,12 +1328,21 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="MantidQt::MantidWidgets::WorkspaceSelector" name="absp_wsInput">
<property name="WorkspaceTypes">
<property name="WorkspaceTypes" stdset="0">
<stringlist/>
</property>
<property name="Suffix" stdset="0">
Expand Down Expand Up @@ -1390,7 +1415,16 @@
</property>
<widget class="QWidget" name="absp_page_Flat">
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
Expand Down Expand Up @@ -1472,7 +1506,16 @@
</widget>
<widget class="QWidget" name="absp_pageCylinder">
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="1">
Expand Down Expand Up @@ -1918,7 +1961,7 @@
<widget class="QWidget" name="abscor_samFile">
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="abscor_sample">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="abscor_sample" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
Expand All @@ -1931,7 +1974,7 @@
<property name="multipleFiles" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_red.nxs</string>
</stringlist>
Expand All @@ -1944,7 +1987,7 @@
<layout class="QHBoxLayout" name="horizontalLayout_31">
<item>
<widget class="MantidQt::MantidWidgets::WorkspaceSelector" name="abscor_wsSample">
<property name="WorkspaceTypes">
<property name="WorkspaceTypes" stdset="0">
<stringlist/>
</property>
<property name="Suffix" stdset="0">
Expand Down Expand Up @@ -2117,11 +2160,20 @@
</property>
<widget class="QWidget" name="abscor_conFile">
<layout class="QHBoxLayout" name="horizontalLayout_34">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="abscor_can">
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="abscor_can" native="true">
<property name="enabled">
<bool>true</bool>
</property>
Expand All @@ -2140,7 +2192,7 @@
<property name="optional" stdset="0">
<bool>false</bool>
</property>
<property name="fileExtensions">
<property name="fileExtensions" stdset="0">
<stringlist>
<string>_red.nxs</string>
</stringlist>
Expand All @@ -2151,7 +2203,16 @@
</widget>
<widget class="QWidget" name="abscor_conWS">
<layout class="QHBoxLayout" name="horizontalLayout_35">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
Expand Down

0 comments on commit 565cfee

Please sign in to comment.