|
Mantid
|
Helps display and edit functions in FitPropertyBrowser. More...
#include <PropertyHandler.h>
Public Member Functions | |
| void | addConstraint (QtProperty *parProp, bool lo, bool up, double loBound, double upBound) |
| Add constraint to parameter property parProp. | |
| PropertyHandler * | addFunction (const std::string &fnName) |
| Add a function to the function handled by this handler. | |
| void | addTie (const QString &tieStr) |
| double | base () const |
| void | calcBase () |
| Calculate m_base: the baseline level under the peak (if this function is a peak and auto background is on) | |
| void | calcBaseAll () |
| If the handled function is composite calculate the peak baselines for all members. | |
| double | centre () const |
| std::shared_ptr< Mantid::API::CompositeFunction > | cfun () const |
| std::shared_ptr< Mantid::API::IFunction > | changeType (QtProperty *prop) |
| Change the type of the function (replace the function) | |
| void | clearErrors () |
| Clear all parameter error values in the manager. | |
| double | EstimateFwhm () const |
| Estimate the FwHM for a peak. | |
| std::shared_ptr< const Mantid::API::CompositeFunction > | findCompositeFunction (QtBrowserItem *item) const |
| Returns 'this' if item == m_item and this is a composite function or calls findCompositeFunction recursively with all its children or zero. | |
| std::shared_ptr< const Mantid::API::IFunction > | findFunction (QtBrowserItem *item) const |
| Returns 'this' if item == m_item or calls findFunction recursively with all its children or zero. | |
| PropertyHandler * | findHandler (const Mantid::API::IFunction *fun) |
| PropertyHandler * | findHandler (const Mantid::API::IFunction_const_sptr &fun) |
| PropertyHandler * | findHandler (QtProperty *prop) |
| void | fit () |
| void | fix (const QString &parName) |
| QString | functionName () const |
| Creates name for this function to be displayed in the browser. | |
| QString | functionPrefix () const |
| double | fwhm () const |
| std::string | getCentreParameterName () const |
| PropertyHandler * | getHandler (std::size_t i) const |
| QtProperty * | getParameterProperty (const QString &parName) const |
| QtProperty * | getParameterProperty (QtProperty *prop) const |
| QList< PropertyHandler * > | getPeakList () |
| Make a list of all peaks in this function. | |
| const QMap< QString, QtProperty * > & | getTies () |
| std::string | getWidthParameterName () const |
| bool | hasPlot () const |
| bool | hasTies () |
| double | height () const |
| std::shared_ptr< Mantid::API::IFunction > | ifun () const |
| void | init () override |
| overrides virtual init() which is called from IFunction::setHandler(...) | |
| bool | isParameter (QtProperty *prop) |
| bool | isParameterExplicitlySet (const std::string ¶m) const |
| QtBrowserItem * | item () const |
| PropertyHandler * | parentHandler () const |
| std::shared_ptr< Mantid::API::IPeakFunction > | pfun () const |
| PropertyHandler (const Mantid::API::IFunction_sptr &fun, std::shared_ptr< Mantid::API::CompositeFunction > parent, FitPropertyBrowser *browser, QtBrowserItem *item=nullptr) | |
| void | removeAllPlots () |
| Remove all plots including children's. | |
| void | removeConstraint (QtProperty *parProp) |
| void | removeFunction () |
| void | removeTie (const QString &propName) |
| Remove the tie. | |
| void | removeTie (QtProperty *prop) |
| Remove the tie. | |
| void | removeTie (QtProperty *prop, const std::string &globalName) |
| Remove the tie. | |
| void | renameChildren (const Mantid::API::CompositeFunction &cf) |
| void | setAttribute (const QString &attName, const QString &attValue) |
| Set function's attribute of any type. | |
| template<typename AttributeType > | |
| void | setAttribute (QString const &attName, AttributeType const &attValue) |
| Set function's attribute if it has type double or int. | |
| void | setAttribute (QString const &attName, Mantid::API::IFunction::Attribute const &attValue) |
| Set function attribute value. | |
| bool | setAttribute (QtProperty *prop, bool resetProperties=true) |
| Set function attribute value read from a QtProperty. | |
| void | setBase (const double &b) |
| void | setCentre (const double &c) |
| Set the centre of the handled peak function. | |
| void | setFunctionWorkspace () |
| void | setFwhm (const double &w) |
| void | setHasPlot (const bool state) |
| void | setHeight (const double &h) |
| Set the height of the handled peak function. | |
| bool | setParameter (QtProperty *prop) |
| Set function parameter value read from a QtProperty. | |
| void | setVectorAttribute (QtProperty *prop) |
| Set function vector attribute value. | |
| void | updateAttributes () |
| Sync all parameter values with the manager. | |
| void | updateErrors () |
| Set all parameter error values in the manager. | |
| void | updateParameters () |
| Sync all parameter values with the manager. | |
| QString | updateStructureTooltip () |
| Update high-level structure tooltip and return it. | |
| void | updateWorkspaces (const QStringList &oldWorkspaces) |
| ~PropertyHandler () override | |
| Destructor. | |
Public Member Functions inherited from Mantid::API::FunctionHandler | |
| IFunction_sptr | function () const |
| Return the handled function. | |
| FunctionHandler (const FunctionHandler &)=delete | |
| Delete copy constructor and copy assignment operator. | |
| FunctionHandler (IFunction_sptr fun) | |
| Constructor. | |
| FunctionHandler & | operator= (const FunctionHandler &)=delete |
| virtual | ~FunctionHandler ()=default |
| Virtual destructor. | |
Protected Slots | |
| void | plotRemoved () |
| Remove the reference to the function curve as it has been deleted. | |
Protected Member Functions | |
| void | initAttributes () |
| Create and attach QtProperties for function attributes. | |
| void | initParameters () |
| void | initTies () |
| Populate ties on parameter properties of child functions. | |
| void | initWorkspace () |
Private Member Functions | |
| void | applyToAllAttributes (void(PropertyHandler::*func)(QtProperty *)) |
| Applies given function to all the attribute properties recursively. | |
| void | applyToAllParameters (void(PropertyHandler::*func)(QtProperty *)) |
| Applies given function to all the parameter properties recursively. | |
| void | clearError (QtProperty *prop) |
| Clear function parameter error in the manager. | |
| void | updateAttribute (QtProperty *prop) |
| Sync function attribute value with the manager. | |
| void | updateError (QtProperty *prop) |
| Set function parameter error in the manager. | |
| void | updateParameter (QtProperty *prop) |
| Sync function parameter value with the manager. | |
Private Attributes | |
| QList< QtProperty * > | m_attributes |
| double | m_base |
| FitPropertyBrowser * | m_browser |
| std::shared_ptr< Mantid::API::CompositeFunction > | m_cf |
| int | m_ci |
| QMap< QString, std::pair< QtProperty *, QtProperty * > > | m_constraints |
| bool | m_hasPlot |
| bool | m_isMultispectral |
| true if fitting to multiple spectra using MultiBG | |
| QtBrowserItem * | m_item |
| QList< QtProperty * > | m_parameters |
| QMap< QtProperty *, PropertyHandler * > | m_paramToPropertyHandlerMap |
| QtProperties to PropertyHandler map for faster lookup. | |
| std::shared_ptr< Mantid::API::CompositeFunction > | m_parent |
| std::shared_ptr< Mantid::API::IPeakFunction > | m_pf |
| QMap< QString, QtProperty * > | m_ties |
| QtProperty * | m_type |
| QList< QtProperty * > | m_vectorMembers |
| QList< QtProperty * > | m_vectorSizes |
| QtProperty * | m_workspace |
| function | |
| QtProperty * | m_workspaceIndex |
| workspace index for multispectral fitting | |
Friends | |
| class | CreateAttributeProperty |
Additional Inherited Members | |
Protected Attributes inherited from Mantid::API::FunctionHandler | |
| IFunction_sptr | m_fun |
| pointer to the handled function | |
Helps display and edit functions in FitPropertyBrowser.
Definition at line 39 of file PropertyHandler.h.
| MantidQt::MantidWidgets::PropertyHandler::PropertyHandler | ( | const Mantid::API::IFunction_sptr & | fun, |
| std::shared_ptr< Mantid::API::CompositeFunction > | parent, | ||
| FitPropertyBrowser * | browser, | ||
| QtBrowserItem * | item = nullptr |
||
| ) |
Definition at line 45 of file PropertyHandler.cpp.
|
overridedefault |
Destructor.
| void MantidQt::MantidWidgets::PropertyHandler::addConstraint | ( | QtProperty * | parProp, |
| bool | lo, | ||
| bool | up, | ||
| double | loBound, | ||
| double | upBound | ||
| ) |
Add constraint to parameter property parProp.
Definition at line 1437 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, m_constraints, MantidQt::MantidWidgets::FitPropertyBrowser::m_doubleManager, and Mantid::API::FunctionHandler::m_fun.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addConstraint(), and MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged().
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::addFunction | ( | const std::string & | fnName | ) |
Add a function to the function handled by this handler.
| fnName | :: A function name or full initialization string in the form name=FunctionName,param1=Value,param2=Value,... |
Definition at line 360 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::disableUndo(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), iend, istart, m_browser, m_cf, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, MantidQt::MantidWidgets::FitPropertyBrowser::reset(), setAttribute(), MantidQt::MantidWidgets::FitPropertyBrowser::setCurrentFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::setDefaultBackgroundType(), MantidQt::MantidWidgets::FitPropertyBrowser::setDefaultPeakType(), MantidQt::MantidWidgets::FitPropertyBrowser::setFitEnabled(), MantidQt::MantidWidgets::FitPropertyBrowser::setWorkspace(), MantidQt::MantidWidgets::FitPropertyBrowser::startX(), MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), MantidQt::MantidWidgets::FitPropertyBrowser::workspaceName(), Mantid::Geometry::X, Mantid::Geometry::x, and Mantid::Geometry::Y.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::acceptFit(), MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), and MantidQt::MantidWidgets::FitPropertyBrowser::addFunction().
| void MantidQt::MantidWidgets::PropertyHandler::addTie | ( | const QString & | tieStr | ) |
Definition at line 1148 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), Mantid::API::IFunction::Fixed, getParameterProperty(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, MantidQt::MantidWidgets::FitPropertyBrowser::m_stringManager, m_ties, name, and updateParameters().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTieToFunction(), fix(), and MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged().
|
private |
Applies given function to all the attribute properties recursively.
Applies the given function to all the attribute properties recursively, within this context.
| func | :: Function to apply |
Definition at line 970 of file PropertyHandler.cpp.
References applyToAllAttributes(), getHandler(), m_attributes, and m_cf.
Referenced by applyToAllAttributes(), and updateAttributes().
|
private |
Applies given function to all the parameter properties recursively.
Applies given function to all the parameter properties recursively, within this context.
| func | :: Function to apply |
Definition at line 1001 of file PropertyHandler.cpp.
References applyToAllParameters(), getHandler(), m_cf, and m_parameters.
Referenced by applyToAllParameters(), clearErrors(), updateErrors(), and updateParameters().
|
inline |
Definition at line 157 of file PropertyHandler.h.
| void MantidQt::MantidWidgets::PropertyHandler::calcBase | ( | ) |
Calculate m_base: the baseline level under the peak (if this function is a peak and auto background is on)
Definition at line 1298 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), MantidQt::MantidWidgets::FitPropertyBrowser::getWorkspace(), MantidQt::MantidWidgets::FitPropertyBrowser::m_autoBackground, m_base, m_browser, m_ci, n, MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), Mantid::Geometry::X, Mantid::Geometry::x, Mantid::Geometry::Y, and Mantid::Geometry::y.
Referenced by calcBaseAll().
| void MantidQt::MantidWidgets::PropertyHandler::calcBaseAll | ( | ) |
If the handled function is composite calculate the peak baselines for all members.
If auto background is off does nothing.
Definition at line 1326 of file PropertyHandler.cpp.
References calcBase(), calcBaseAll(), cfun(), getHandler(), MantidQt::MantidWidgets::FitPropertyBrowser::m_autoBackground, m_browser, m_cf, and pfun().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), calcBaseAll(), and fit().
| double MantidQt::MantidWidgets::PropertyHandler::centre | ( | ) | const |
Definition at line 1399 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::endX(), m_browser, m_pf, and MantidQt::MantidWidgets::FitPropertyBrowser::startX().
|
inline |
Definition at line 66 of file PropertyHandler.h.
Referenced by calcBaseAll(), functionPrefix(), getPeakList(), removeFunction(), setAttribute(), and updateWorkspaces().
| Mantid::API::IFunction_sptr MantidQt::MantidWidgets::PropertyHandler::changeType | ( | QtProperty * | prop | ) |
Change the type of the function (replace the function)
| prop | :: The "Type" property with new value |
Definition at line 1045 of file PropertyHandler.cpp.
References changeType(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), fit(), Mantid::API::FunctionHandler::function(), getHandler(), MantidQt::MantidWidgets::FitPropertyBrowser::m_autoBackground, m_browser, m_cf, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, MantidQt::MantidWidgets::FitPropertyBrowser::m_enumManager, m_item, m_parent, m_pf, m_type, MantidQt::MantidWidgets::FitPropertyBrowser::removePlotSignal(), setCentre(), Mantid::API::IFunctionWithLocation::setCentre(), MantidQt::MantidWidgets::FitPropertyBrowser::setDefaultBackgroundType(), MantidQt::MantidWidgets::FitPropertyBrowser::setDefaultPeakType(), Mantid::API::IPeakFunction::setFwhm(), Mantid::API::IFunctionWithLocation::setHeight(), MantidQt::MantidWidgets::FitPropertyBrowser::startX(), MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), and MantidQt::MantidWidgets::FitPropertyBrowser::workspaceName().
Referenced by changeType(), and MantidQt::MantidWidgets::FitPropertyBrowser::enumChanged().
|
private |
Clear function parameter error in the manager.
| prop | :: Property of the parameter |
Definition at line 1039 of file PropertyHandler.cpp.
References m_browser, and MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager.
Referenced by clearErrors().
| void MantidQt::MantidWidgets::PropertyHandler::clearErrors | ( | ) |
Clear all parameter error values in the manager.
Definition at line 1017 of file PropertyHandler.cpp.
References applyToAllParameters(), and clearError().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::undoFit().
| double MantidQt::MantidWidgets::PropertyHandler::EstimateFwhm | ( | ) | const |
Estimate the FwHM for a peak.
Create a simple estimate of the full width half maximum.
Definition at line 1254 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::endX(), fabs, MantidQt::MantidWidgets::FitPropertyBrowser::getWorkspace(), m_base, m_browser, m_ci, n, MantidQt::MantidWidgets::FitPropertyBrowser::startX(), MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), Mantid::Geometry::X, and Mantid::Geometry::Y.
| Mantid::API::CompositeFunction_const_sptr MantidQt::MantidWidgets::PropertyHandler::findCompositeFunction | ( | QtBrowserItem * | item | ) | const |
Returns 'this' if item == m_item and this is a composite function or calls findCompositeFunction recursively with all its children or zero.
Definition at line 574 of file PropertyHandler.cpp.
References findCompositeFunction(), getHandler(), item(), m_cf, and m_item.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::acceptFit(), MantidQt::MantidWidgets::FitPropertyBrowser::addFunction(), findCompositeFunction(), and MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu().
| Mantid::API::IFunction_const_sptr MantidQt::MantidWidgets::PropertyHandler::findFunction | ( | QtBrowserItem * | item | ) | const |
Returns 'this' if item == m_item or calls findFunction recursively with all its children or zero.
Definition at line 590 of file PropertyHandler.cpp.
References findFunction(), Mantid::API::FunctionHandler::function(), getHandler(), item(), m_cf, and m_item.
Referenced by findFunction(), and MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu().
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler | ( | const Mantid::API::IFunction * | fun | ) |
Definition at line 653 of file PropertyHandler.cpp.
References findHandler(), Mantid::API::FunctionHandler::function(), getHandler(), and m_cf.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::acceptFit(), MantidQt::MantidWidgets::FitPropertyBrowser::addConstraint(), MantidQt::MantidWidgets::FitPropertyBrowser::addFixTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTieToFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::boolChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::currentItemChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::deleteFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::deleteTie(), MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::enumChanged(), findHandler(), findHandler(), findHandler(), initTies(), MantidQt::MantidWidgets::FitPropertyBrowser::intChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu(), MantidQt::MantidWidgets::FitPropertyBrowser::removeBounds(), MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::vectorDoubleChanged(), and MantidQt::MantidWidgets::FitPropertyBrowser::vectorSizeChanged().
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler | ( | const Mantid::API::IFunction_const_sptr & | fun | ) |
Definition at line 640 of file PropertyHandler.cpp.
References findHandler(), Mantid::API::FunctionHandler::function(), getHandler(), and m_cf.
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler | ( | QtProperty * | prop | ) |
Definition at line 603 of file PropertyHandler.cpp.
References findHandler(), getHandler(), m_attributes, m_cf, m_constraints, m_item, m_parameters, m_ties, m_type, m_vectorMembers, m_vectorSizes, m_workspace, and m_workspaceIndex.
| void MantidQt::MantidWidgets::PropertyHandler::fit | ( | ) |
Definition at line 1598 of file PropertyHandler.cpp.
References calcBaseAll(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), MantidQt::MantidWidgets::FitPropertyBrowser::getHandler(), m_browser, Mantid::API::FunctionHandler::m_fun, MantidQt::MantidWidgets::FitPropertyBrowser::startX(), updateParameters(), MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), and MantidQt::MantidWidgets::FitPropertyBrowser::workspaceName().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), changeType(), MantidQt::MantidWidgets::FitPropertyBrowser::refitAutoBackground(), and setAttribute().
| void MantidQt::MantidWidgets::PropertyHandler::fix | ( | const QString & | parName | ) |
Definition at line 1188 of file PropertyHandler.cpp.
References addTie(), functionPrefix(), getParameterProperty(), m_browser, and MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addFixTie(), initParameters(), and setParameter().
| QString MantidQt::MantidWidgets::PropertyHandler::functionName | ( | ) | const |
Creates name for this function to be displayed in the browser.
Definition at line 528 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), functionPrefix(), and name.
Referenced by init(), and renameChildren().
| QString MantidQt::MantidWidgets::PropertyHandler::functionPrefix | ( | ) | const |
Definition at line 537 of file PropertyHandler.cpp.
References cfun(), Mantid::API::FunctionHandler::function(), functionPrefix(), and parentHandler().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), fix(), functionName(), functionPrefix(), renameChildren(), setParameter(), and MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged().
| double MantidQt::MantidWidgets::PropertyHandler::fwhm | ( | ) | const |
Definition at line 1406 of file PropertyHandler.cpp.
References m_pf.
| std::string MantidQt::MantidWidgets::PropertyHandler::getCentreParameterName | ( | ) | const |
Definition at line 1420 of file PropertyHandler.cpp.
References m_pf.
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::getHandler | ( | std::size_t | i | ) | const |
Definition at line 564 of file PropertyHandler.cpp.
References m_cf.
Referenced by applyToAllAttributes(), applyToAllParameters(), calcBaseAll(), changeType(), findCompositeFunction(), findFunction(), findHandler(), findHandler(), findHandler(), getPeakList(), removeAllPlots(), renameChildren(), setAttribute(), setAttribute(), updateStructureTooltip(), and updateWorkspaces().
| QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty | ( | const QString & | parName | ) | const |
Definition at line 1130 of file PropertyHandler.cpp.
References m_parameters.
Referenced by addTie(), MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged(), fix(), removeTie(), removeTie(), renameChildren(), and MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged().
| QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty | ( | QtProperty * | prop | ) | const |
Definition at line 1139 of file PropertyHandler.cpp.
References m_parameters.
| QList< PropertyHandler * > MantidQt::MantidWidgets::PropertyHandler::getPeakList | ( | ) |
Make a list of all peaks in this function.
Definition at line 1515 of file PropertyHandler.cpp.
References cfun(), getHandler(), getPeakList(), m_cf, m_pf, and pfun().
Referenced by getPeakList().
|
inline |
Definition at line 188 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::deleteTie().
| std::string MantidQt::MantidWidgets::PropertyHandler::getWidthParameterName | ( | ) | const |
Definition at line 1413 of file PropertyHandler.cpp.
References m_pf.
|
inline |
Definition at line 174 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), and MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu().
|
inline |
Definition at line 189 of file PropertyHandler.h.
| double MantidQt::MantidWidgets::PropertyHandler::height | ( | ) | const |
Definition at line 1392 of file PropertyHandler.cpp.
References m_pf.
|
inline |
Definition at line 70 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::functionHelp(), and setFunctionWorkspace().
|
overridevirtual |
overrides virtual init() which is called from IFunction::setHandler(...)
Implements Mantid::API::FunctionHandler.
Definition at line 56 of file PropertyHandler.cpp.
References functionName(), initAttributes(), initParameters(), initTies(), initWorkspace(), item(), MantidQt::MantidWidgets::FitPropertyBrowser::m_browser, m_browser, m_cf, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, MantidQt::MantidWidgets::FitPropertyBrowser::m_enumManager, Mantid::API::FunctionHandler::m_fun, MantidQt::MantidWidgets::FitPropertyBrowser::m_functionsGroup, MantidQt::MantidWidgets::FitPropertyBrowser::m_groupManager, m_item, m_parent, MantidQt::MantidWidgets::FitPropertyBrowser::m_registeredFunctions, m_type, and parentHandler().
|
protected |
Create and attach QtProperties for function attributes.
Definition at line 224 of file PropertyHandler.cpp.
References Mantid::API::IFunction::Attribute::apply(), Mantid::API::FunctionHandler::function(), Mantid::API::IFunction::Attribute::getValidator(), m_attributes, m_browser, m_item, m_vectorMembers, and tmp.
Referenced by init(), setAttribute(), setAttribute(), and setAttribute().
|
protected |
Definition at line 243 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), Mantid::API::IConstraint::asString(), fix(), Mantid::API::FunctionHandler::function(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, m_constraints, MantidQt::MantidWidgets::FitPropertyBrowser::m_doubleManager, Mantid::API::FunctionHandler::m_fun, m_item, MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager, m_parameters, m_paramToPropertyHandlerMap, and parentHandler().
Referenced by init(), setAttribute(), setAttribute(), and setAttribute().
|
protected |
Populate ties on parameter properties of child functions.
Definition at line 207 of file PropertyHandler.cpp.
References findHandler(), and m_cf.
Referenced by init().
|
protected |
Definition at line 311 of file PropertyHandler.cpp.
References m_parent, m_workspace, and m_workspaceIndex.
Referenced by init().
| bool MantidQt::MantidWidgets::PropertyHandler::isParameter | ( | QtProperty * | prop | ) |
Definition at line 1128 of file PropertyHandler.cpp.
References m_parameters.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addFixTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTieToFunction(), and MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu().
| bool MantidQt::MantidWidgets::PropertyHandler::isParameterExplicitlySet | ( | const std::string & | param | ) | const |
Definition at line 1427 of file PropertyHandler.cpp.
References m_pf.
|
inline |
Definition at line 72 of file PropertyHandler.h.
Referenced by findCompositeFunction(), findFunction(), init(), removeFunction(), renameChildren(), and MantidQt::MantidWidgets::FitPropertyBrowser::setCurrentFunction().
| PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::parentHandler | ( | ) | const |
Definition at line 557 of file PropertyHandler.cpp.
References m_parent.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::enumChanged(), functionPrefix(), init(), initParameters(), and removeFunction().
|
inline |
Definition at line 68 of file PropertyHandler.h.
Referenced by calcBaseAll(), MantidQt::MantidWidgets::FitPropertyBrowser::centre(), MantidQt::MantidWidgets::FitPropertyBrowser::fwhm(), getPeakList(), MantidQt::MantidWidgets::FitPropertyBrowser::height(), and MantidQt::MantidWidgets::FitPropertyBrowser::isPeak().
|
protectedslot |
Remove the reference to the function curve as it has been deleted.
Definition at line 1538 of file PropertyHandler.cpp.
References m_hasPlot.
| void MantidQt::MantidWidgets::PropertyHandler::removeAllPlots | ( | ) |
Remove all plots including children's.
Definition at line 1589 of file PropertyHandler.cpp.
References getHandler(), m_browser, m_cf, removeAllPlots(), and MantidQt::MantidWidgets::FitPropertyBrowser::removePlotSignal().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::clear(), MantidQt::MantidWidgets::FitPropertyBrowser::loadFunction(), and removeAllPlots().
| void MantidQt::MantidWidgets::PropertyHandler::removeConstraint | ( | QtProperty * | parProp | ) |
Definition at line 1497 of file PropertyHandler.cpp.
References m_constraints, and Mantid::API::FunctionHandler::m_fun.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::removeBounds().
| void MantidQt::MantidWidgets::PropertyHandler::removeFunction | ( | ) |
Definition at line 457 of file PropertyHandler.cpp.
References cfun(), Mantid::API::FunctionHandler::function(), item(), MantidQt::MantidWidgets::FitPropertyBrowser::m_autoBackground, m_browser, m_item, parentHandler(), MantidQt::MantidWidgets::FitPropertyBrowser::removePlotSignal(), renameChildren(), and MantidQt::MantidWidgets::FitPropertyBrowser::setFitEnabled().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), and MantidQt::MantidWidgets::FitPropertyBrowser::removeFunction().
| void MantidQt::MantidWidgets::PropertyHandler::removeTie | ( | const QString & | parName | ) |
Remove the tie.
| parName | :: The name of the parameter |
Definition at line 1244 of file PropertyHandler.cpp.
References m_ties, and removeTie().
| void MantidQt::MantidWidgets::PropertyHandler::removeTie | ( | QtProperty * | prop | ) |
Remove the tie.
| prop | :: The tie property to remove |
Definition at line 1224 of file PropertyHandler.cpp.
References getParameterProperty(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, Mantid::API::FunctionHandler::m_fun, and m_ties.
| void MantidQt::MantidWidgets::PropertyHandler::removeTie | ( | QtProperty * | prop, |
| const std::string & | globalName | ||
| ) |
Remove the tie.
| prop | :: The tie property to remove |
| globalName | :: Name of the parameter in compoite function (e.g. f1.omega) |
Definition at line 1202 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), getParameterProperty(), index, m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, and m_ties.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::deleteTie(), and removeTie().
| void MantidQt::MantidWidgets::PropertyHandler::renameChildren | ( | const Mantid::API::CompositeFunction & | cf | ) |
Definition at line 477 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), Mantid::API::IFunction::Fixed, Mantid::API::IFunction::FixedByDefault, functionName(), functionPrefix(), getHandler(), getParameterProperty(), Mantid::API::CompositeFunction::getParameterStatus(), Mantid::API::CompositeFunction::getTie(), item(), m_browser, m_cf, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, MantidQt::MantidWidgets::FitPropertyBrowser::m_stringManager, m_ties, and renameChildren().
Referenced by removeFunction(), and renameChildren().
| void MantidQt::MantidWidgets::PropertyHandler::setAttribute | ( | const QString & | attName, |
| const QString & | attValue | ||
| ) |
Set function's attribute of any type.
Sets the function attribute value if it has type QString.
| attName | :: The name of the attribute |
| attValue | :: The value of the attribute |
Definition at line 930 of file PropertyHandler.cpp.
References Mantid::API::IFunction::Attribute::apply(), MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), Mantid::API::IFunction::Attribute::fromString(), initAttributes(), initParameters(), m_attributes, m_browser, Mantid::API::FunctionHandler::m_fun, name, and tmp.
| void MantidQt::MantidWidgets::PropertyHandler::setAttribute | ( | QString const & | attName, |
| AttributeType const & | attValue | ||
| ) |
Set function's attribute if it has type double or int.
Sets the function attribute value if it has type double or int.
| attName | :: The name of the attribute |
| attValue | :: The value of the attribute |
Definition at line 898 of file PropertyHandler.cpp.
References cfun(), MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), getHandler(), initAttributes(), initParameters(), m_attributes, m_browser, Mantid::API::FunctionHandler::m_fun, and setAttribute().
| void MantidQt::MantidWidgets::PropertyHandler::setAttribute | ( | QString const & | attName, |
| Mantid::API::IFunction::Attribute const & | attValue | ||
| ) |
Set function attribute value.
| attName | :: The name of the attribute |
| attValue | :: The value of the attribute |
Definition at line 882 of file PropertyHandler.cpp.
References Mantid::API::IFunction::Attribute::asDouble(), Mantid::API::IFunction::Attribute::asInt(), Mantid::API::IFunction::Attribute::asString(), setAttribute(), and Mantid::API::IFunction::Attribute::type().
| bool MantidQt::MantidWidgets::PropertyHandler::setAttribute | ( | QtProperty * | prop, |
| bool | resetProperties = true |
||
| ) |
Set function attribute value read from a QtProperty.
| prop | :: The property with the new attribute value |
| resetProperties | :: Flag to reset all properties of the handled function. |
Definition at line 837 of file PropertyHandler.cpp.
References Mantid::API::IFunction::Attribute::apply(), MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), fit(), getHandler(), Mantid::API::IFunction::Attribute::getValidator(), initAttributes(), initParameters(), m_attributes, MantidQt::MantidWidgets::FitPropertyBrowser::m_autoBackground, m_browser, m_cf, Mantid::API::FunctionHandler::m_fun, setAttribute(), and tmp.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), addFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::enactAttributeChange(), MantidQt::MantidWidgets::FitPropertyBrowser::intChanged(), setAttribute(), setAttribute(), setAttribute(), setVectorAttribute(), MantidQt::MantidWidgets::FitPropertyBrowser::setXRange(), and updateAttribute().
|
inline |
Definition at line 145 of file PropertyHandler.h.
| void MantidQt::MantidWidgets::PropertyHandler::setCentre | ( | const double & | c | ) |
Set the centre of the handled peak function.
Find m_ci: x-index of the peakcentre.
Definition at line 1354 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::getWorkspace(), m_browser, m_ci, m_pf, n, MantidQt::MantidWidgets::FitPropertyBrowser::workspaceIndex(), Mantid::Geometry::X, and Mantid::Geometry::x.
Referenced by changeType(), and MantidQt::MantidWidgets::FitPropertyBrowser::setCentre().
| void MantidQt::MantidWidgets::PropertyHandler::setFunctionWorkspace | ( | ) |
Definition at line 1647 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::endX(), ifun(), index, m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_enumManager, MantidQt::MantidWidgets::FitPropertyBrowser::m_intManager, m_item, m_workspace, m_workspaceIndex, MantidQt::MantidWidgets::FitPropertyBrowser::m_workspaceNames, and MantidQt::MantidWidgets::FitPropertyBrowser::startX().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::intChanged().
| void MantidQt::MantidWidgets::PropertyHandler::setFwhm | ( | const double & | w | ) |
Definition at line 1386 of file PropertyHandler.cpp.
References m_pf.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::setFwhm().
|
inline |
Definition at line 175 of file PropertyHandler.h.
| void MantidQt::MantidWidgets::PropertyHandler::setHeight | ( | const double & | h | ) |
Set the height of the handled peak function.
Definition at line 1344 of file PropertyHandler.cpp.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::setHeight().
| bool MantidQt::MantidWidgets::PropertyHandler::setParameter | ( | QtProperty * | prop | ) |
Set function parameter value read from a QtProperty.
| prop | :: The (double) property with the new parameter value |
Definition at line 671 of file PropertyHandler.cpp.
References fix(), functionPrefix(), m_browser, m_cf, Mantid::API::FunctionHandler::m_fun, MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager, m_parameters, m_paramToPropertyHandlerMap, MantidQt::MantidWidgets::FitPropertyBrowser::sendParameterChanged(), and updateParameters().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::parameterChanged().
| void MantidQt::MantidWidgets::PropertyHandler::setVectorAttribute | ( | QtProperty * | prop | ) |
Set function vector attribute value.
| prop | :: A property for a member of a vector attribute. |
Definition at line 954 of file PropertyHandler.cpp.
References m_attributes, m_vectorSizes, and setAttribute().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::enactAttributeChange().
|
private |
Sync function attribute value with the manager.
| attribute | :: An attribute of the function |
Definition at line 989 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), m_attributes, and setAttribute().
Referenced by updateAttributes().
| void MantidQt::MantidWidgets::PropertyHandler::updateAttributes | ( | ) |
Sync all parameter values with the manager.
Updates all string, double and int attributes which have changed in a function.
Definition at line 984 of file PropertyHandler.cpp.
References applyToAllAttributes(), and updateAttribute().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::updateAttributes().
|
private |
Set function parameter error in the manager.
| prop | :: Property of the parameter |
Definition at line 1030 of file PropertyHandler.cpp.
References error, Mantid::API::FunctionHandler::function(), index, m_browser, and MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager.
Referenced by updateErrors().
| void MantidQt::MantidWidgets::PropertyHandler::updateErrors | ( | ) |
Set all parameter error values in the manager.
Definition at line 1015 of file PropertyHandler.cpp.
References applyToAllParameters(), and updateError().
Referenced by MantidQt::MantidWidgets::SequentialFitDialog::getFitResults(), and MantidQt::MantidWidgets::FitPropertyBrowser::updateBrowserFromFitResults().
|
private |
Sync function parameter value with the manager.
| prop | :: Property of the parameter |
Definition at line 1022 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), m_browser, and MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager.
Referenced by updateParameters().
| void MantidQt::MantidWidgets::PropertyHandler::updateParameters | ( | ) |
Sync all parameter values with the manager.
Definition at line 1013 of file PropertyHandler.cpp.
References applyToAllParameters(), and updateParameter().
Referenced by addTie(), fit(), MantidQt::MantidWidgets::FitPropertyBrowser::setCentre(), MantidQt::MantidWidgets::FitPropertyBrowser::setFwhm(), MantidQt::MantidWidgets::FitPropertyBrowser::setHeight(), setParameter(), and MantidQt::MantidWidgets::FitPropertyBrowser::updateParameters().
| QString MantidQt::MantidWidgets::PropertyHandler::updateStructureTooltip | ( | ) |
Update high-level structure tooltip and return it.
Updates the high-level structure tooltip of this handler's property, updating those of sub-properties recursively first.
For non-empty composite functions: something like ((Gaussian * Lorentzian)
For non-composite functions: function()->name().
Definition at line 1551 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), getHandler(), m_cf, m_item, and name.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::updateStructureTooltips().
| void MantidQt::MantidWidgets::PropertyHandler::updateWorkspaces | ( | const QStringList & | oldWorkspaces | ) |
Definition at line 1623 of file PropertyHandler.cpp.
References cfun(), getHandler(), index, m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_enumManager, m_workspace, MantidQt::MantidWidgets::FitPropertyBrowser::m_workspaceNames, name, and updateWorkspaces().
Referenced by updateWorkspaces().
|
friend |
Definition at line 245 of file PropertyHandler.h.
|
private |
Definition at line 209 of file PropertyHandler.h.
Referenced by applyToAllAttributes(), findHandler(), initAttributes(), setAttribute(), setAttribute(), setAttribute(), setVectorAttribute(), and updateAttribute().
|
private |
Definition at line 219 of file PropertyHandler.h.
Referenced by calcBase(), EstimateFwhm(), and setHeight().
|
private |
Definition at line 203 of file PropertyHandler.h.
Referenced by addConstraint(), addFunction(), addTie(), calcBase(), calcBaseAll(), centre(), changeType(), clearError(), EstimateFwhm(), fit(), fix(), init(), initAttributes(), initParameters(), removeAllPlots(), removeFunction(), removeTie(), removeTie(), renameChildren(), setAttribute(), setAttribute(), setAttribute(), setCentre(), setFunctionWorkspace(), setParameter(), updateError(), updateParameter(), and updateWorkspaces().
|
private |
Definition at line 204 of file PropertyHandler.h.
Referenced by addFunction(), applyToAllAttributes(), applyToAllParameters(), calcBaseAll(), changeType(), findCompositeFunction(), findFunction(), findHandler(), findHandler(), findHandler(), getHandler(), getPeakList(), init(), initTies(), removeAllPlots(), renameChildren(), setAttribute(), setParameter(), and updateStructureTooltip().
|
private |
Definition at line 220 of file PropertyHandler.h.
Referenced by calcBase(), EstimateFwhm(), and setCentre().
|
private |
Definition at line 212 of file PropertyHandler.h.
Referenced by addConstraint(), findHandler(), initParameters(), and removeConstraint().
|
mutableprivate |
Definition at line 222 of file PropertyHandler.h.
Referenced by plotRemoved().
|
private |
true if fitting to multiple spectra using MultiBG
Definition at line 215 of file PropertyHandler.h.
|
private |
Definition at line 208 of file PropertyHandler.h.
Referenced by changeType(), findCompositeFunction(), findFunction(), findHandler(), init(), initAttributes(), initParameters(), removeFunction(), setFunctionWorkspace(), and updateStructureTooltip().
|
private |
Definition at line 210 of file PropertyHandler.h.
Referenced by applyToAllParameters(), findHandler(), getParameterProperty(), getParameterProperty(), initParameters(), isParameter(), and setParameter().
|
private |
QtProperties to PropertyHandler map for faster lookup.
Definition at line 225 of file PropertyHandler.h.
Referenced by initParameters(), and setParameter().
|
private |
Definition at line 206 of file PropertyHandler.h.
Referenced by changeType(), init(), initWorkspace(), and parentHandler().
|
private |
Definition at line 205 of file PropertyHandler.h.
Referenced by centre(), changeType(), fwhm(), getCentreParameterName(), getPeakList(), getWidthParameterName(), height(), isParameterExplicitlySet(), setCentre(), setFwhm(), and setHeight().
|
private |
Definition at line 211 of file PropertyHandler.h.
Referenced by addTie(), findHandler(), removeTie(), removeTie(), removeTie(), and renameChildren().
|
private |
Definition at line 207 of file PropertyHandler.h.
Referenced by changeType(), findHandler(), and init().
|
private |
Definition at line 213 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::CreateAttributeProperty::apply(), findHandler(), and initAttributes().
|
private |
Definition at line 214 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::CreateAttributeProperty::apply(), findHandler(), and setVectorAttribute().
|
private |
function
workspace name for multispectral fitting
Definition at line 217 of file PropertyHandler.h.
Referenced by findHandler(), initWorkspace(), setFunctionWorkspace(), and updateWorkspaces().
|
private |
workspace index for multispectral fitting
Definition at line 218 of file PropertyHandler.h.
Referenced by findHandler(), initWorkspace(), and setFunctionWorkspace().