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. More... | |
PropertyHandler * | addFunction (const std::string &fnName) |
Add a function to the function handled by this handler. More... | |
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) More... | |
void | calcBaseAll () |
If the handled function is composite calculate the peak baselines for all members. More... | |
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) More... | |
void | clearErrors () |
Clear all parameter error values in the manager. More... | |
double | EstimateFwhm () const |
Estimate the FwHM for a peak. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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(...) More... | |
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. More... | |
void | removeConstraint (QtProperty *parProp) |
void | removeFunction () |
void | removeTie (const QString &propName) |
Remove the tie. More... | |
void | removeTie (QtProperty *prop) |
Remove the tie. More... | |
void | removeTie (QtProperty *prop, const std::string &globalName) |
Remove the tie. More... | |
void | renameChildren () const |
void | setAttribute (const QString &attName, const QString &attValue) |
Set function's attribute of any type. More... | |
template<typename AttributeType > | |
void | setAttribute (QString const &attName, AttributeType const &attValue) |
Set function's attribute if it has type double or int. More... | |
void | setAttribute (QString const &attName, Mantid::API::IFunction::Attribute const &attValue) |
Set function attribute value. More... | |
bool | setAttribute (QtProperty *prop, bool resetProperties=true) |
Set function attribute value read from a QtProperty. More... | |
void | setBase (const double &b) |
void | setCentre (const double &c) |
Set the centre of the handled peak function. More... | |
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. More... | |
bool | setParameter (QtProperty *prop) |
Set function parameter value read from a QtProperty. More... | |
void | setVectorAttribute (QtProperty *prop) |
Set function vector attribute value. More... | |
void | updateAttributes () |
Sync all parameter values with the manager. More... | |
void | updateErrors () |
Set all parameter error values in the manager. More... | |
void | updateParameters () |
Sync all parameter values with the manager. More... | |
QString | updateStructureTooltip () |
Update high-level structure tooltip and return it. More... | |
void | updateWorkspaces (QStringList oldWorkspaces) |
~PropertyHandler () override | |
Destructor. More... | |
Public Member Functions inherited from Mantid::API::FunctionHandler | |
IFunction_sptr | function () const |
Return the handled function. More... | |
FunctionHandler (const FunctionHandler &)=delete | |
Delete copy constructor and copy assignment operator. More... | |
FunctionHandler (IFunction_sptr fun) | |
Constructor. More... | |
virtual void | init ()=0 |
abstract init method. It is called after setting handler to the function More... | |
FunctionHandler & | operator= (const FunctionHandler &)=delete |
virtual | ~FunctionHandler ()=default |
Virtual destructor. More... | |
Protected Slots | |
void | plotRemoved () |
Remove the reference to the function curve as it has been deleted. More... | |
Protected Member Functions | |
void | initAttributes () |
Create and attach QtProperties for function attributes. More... | |
void | initParameters () |
void | initTies () |
Populate ties on parameter properties of child functions. More... | |
void | initWorkspace () |
Private Member Functions | |
void | applyToAllAttributes (void(PropertyHandler::*func)(QtProperty *)) |
Applies given function to all the attribute properties recursively. More... | |
void | applyToAllParameters (void(PropertyHandler::*func)(QtProperty *)) |
Applies given function to all the parameter properties recursively. More... | |
void | clearError (QtProperty *prop) |
Clear function parameter error in the manager. More... | |
void | updateAttribute (QtProperty *prop) |
Sync function attribute value with the manager. More... | |
void | updateError (QtProperty *prop) |
Set function parameter error in the manager. More... | |
void | updateParameter (QtProperty *prop) |
Sync function parameter value with the manager. More... | |
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 More... | |
QtBrowserItem * | m_item |
QList< QtProperty * > | m_parameters |
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 More... | |
QtProperty * | m_workspaceIndex |
workspace index for multispectral fitting More... | |
Friends | |
class | CreateAttributeProperty |
Additional Inherited Members | |
Protected Attributes inherited from Mantid::API::FunctionHandler | |
IFunction_sptr | m_fun |
pointer to the handled function More... | |
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 1394 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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(), MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged(), and MantidQt::MantidWidgets::MuonFitPropertyBrowser::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 353 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), MantidQt::MantidWidgets::FitPropertyBrowser::disableUndo(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 1102 of file PropertyHandler.cpp.
References cfun(), MantidQt::MantidWidgets::FitPropertyBrowser::compositeFunction(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, m_parameters, MantidQt::MantidWidgets::FitPropertyBrowser::m_stringManager, and m_ties.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), MantidQt::MantidWidgets::FitPropertyBrowser::addTieToFunction(), 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 925 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 956 of file PropertyHandler.cpp.
References applyToAllParameters(), getHandler(), m_cf, and m_parameters.
Referenced by applyToAllParameters(), clearErrors(), updateErrors(), and updateParameters().
|
inline |
Definition at line 176 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 1255 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 1283 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 1356 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 addTie(), 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 1000 of file PropertyHandler.cpp.
References changeType(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), fit(), Mantid::API::FunctionHandler::function(), getHandler(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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(), 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 994 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 972 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 1211 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::endX(), fabs, fwhm(), 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 545 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 561 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 624 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::MuonFitPropertyBrowser::doubleChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::enumChanged(), 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 611 of file PropertyHandler.cpp.
References findHandler(), Mantid::API::FunctionHandler::function(), getHandler(), and m_cf.
PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler | ( | QtProperty * | prop | ) |
Definition at line 574 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 1555 of file PropertyHandler.cpp.
References calcBaseAll(), MantidQt::MantidWidgets::FitPropertyBrowser::endX(), MantidQt::MantidWidgets::FitPropertyBrowser::getHandler(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 1132 of file PropertyHandler.cpp.
References getParameterProperty(), m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, Mantid::API::FunctionHandler::m_fun, MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager, MantidQt::MantidWidgets::FitPropertyBrowser::m_stringManager, and m_ties.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addFixTie().
QString MantidQt::MantidWidgets::PropertyHandler::functionName | ( | ) | const |
Creates name for this function to be displayed in the browser.
Definition at line 499 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), and functionPrefix().
Referenced by init(), and renameChildren().
QString MantidQt::MantidWidgets::PropertyHandler::functionPrefix | ( | ) | const |
Definition at line 508 of file PropertyHandler.cpp.
References cfun(), Mantid::API::FunctionHandler::function(), functionPrefix(), and parentHandler().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addTie(), functionName(), functionPrefix(), setParameter(), and MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged().
double MantidQt::MantidWidgets::PropertyHandler::fwhm | ( | ) | const |
std::string MantidQt::MantidWidgets::PropertyHandler::getCentreParameterName | ( | ) | const |
Definition at line 1377 of file PropertyHandler.cpp.
References m_pf.
PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::getHandler | ( | std::size_t | i | ) | const |
Definition at line 535 of file PropertyHandler.cpp.
References m_cf.
Referenced by applyToAllAttributes(), applyToAllParameters(), calcBaseAll(), changeType(), findCompositeFunction(), findFunction(), findHandler(), getPeakList(), removeAllPlots(), renameChildren(), setAttribute(), setParameter(), updateStructureTooltip(), and updateWorkspaces().
QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty | ( | const QString & | parName | ) | const |
Definition at line 1083 of file PropertyHandler.cpp.
References m_parameters.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::doubleChanged(), MantidQt::MantidWidgets::MuonFitPropertyBrowser::doubleChanged(), fix(), removeTie(), and MantidQt::MantidWidgets::FitPropertyBrowser::stringChanged().
QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty | ( | QtProperty * | prop | ) | const |
Definition at line 1092 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 1472 of file PropertyHandler.cpp.
References cfun(), getHandler(), getPeakList(), m_cf, m_pf, and pfun().
Referenced by getPeakList().
|
inline |
Definition at line 207 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::deleteTie().
std::string MantidQt::MantidWidgets::PropertyHandler::getWidthParameterName | ( | ) | const |
Definition at line 1370 of file PropertyHandler.cpp.
References m_pf.
|
inline |
Definition at line 193 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::addAutoBackground(), and MantidQt::MantidWidgets::FitPropertyBrowser::popupMenu().
|
inline |
Definition at line 208 of file PropertyHandler.h.
double MantidQt::MantidWidgets::PropertyHandler::height | ( | ) | const |
Definition at line 1349 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(), and setAttribute().
|
protected |
Definition at line 243 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::addDoubleProperty(), Mantid::API::IConstraint::asString(), Mantid::API::FunctionHandler::function(), m_browser, m_constraints, MantidQt::MantidWidgets::FitPropertyBrowser::m_doubleManager, Mantid::API::FunctionHandler::m_fun, m_item, MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager, m_parameters, MantidQt::MantidWidgets::FitPropertyBrowser::m_stringManager, and m_ties.
Referenced by init(), and setAttribute().
|
protected |
Populate ties on parameter properties of child functions.
Definition at line 207 of file PropertyHandler.cpp.
References Mantid::API::ParameterTie::asString(), findHandler(), and m_cf.
Referenced by init().
|
protected |
Definition at line 304 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 1081 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 1384 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 528 of file PropertyHandler.cpp.
References m_parent.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::enumChanged(), functionPrefix(), init(), 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 1495 of file PropertyHandler.cpp.
References m_hasPlot.
void MantidQt::MantidWidgets::PropertyHandler::removeAllPlots | ( | ) |
Remove all plots including children's.
Definition at line 1546 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 1454 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 449 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 1201 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 1181 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 1159 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 |
Definition at line 469 of file PropertyHandler.cpp.
References Mantid::API::ParameterTie::asString(), functionName(), getHandler(), item(), m_browser, m_cf, MantidQt::MantidWidgets::FitPropertyBrowser::m_changeSlotsEnabled, Mantid::API::FunctionHandler::m_fun, 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 new attribute value as a string. If the attValue's format doesn't match the attribute's type it is ignored. |
attName | :: The name of the attribute |
attValue | :: The value of the attribute |
Definition at line 885 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, 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 new attribute value |
attName | :: The name of the attribute |
attValue | :: The value of the attribute |
Definition at line 856 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 new attribute value |
attName | :: The name of the attribute |
attValue | :: The value of the attribute |
Definition at line 840 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 795 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::MuonFitPropertyBrowser::doubleChanged(), MantidQt::MantidWidgets::FitPropertyBrowser::enactAttributeChange(), MantidQt::MantidWidgets::FitPropertyBrowser::intChanged(), setAttribute(), setVectorAttribute(), MantidQt::MantidWidgets::FitPropertyBrowser::setXRange(), and updateAttribute().
|
inline |
Definition at line 164 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 1311 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 MantidQt::MantidWidgets::FitPropertyBrowser::setCentre().
void MantidQt::MantidWidgets::PropertyHandler::setFunctionWorkspace | ( | ) |
Definition at line 1601 of file PropertyHandler.cpp.
References MantidQt::MantidWidgets::FitPropertyBrowser::endX(), ifun(), index, Mantid::Kernel::SingletonHolder< T >::Instance(), 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 1343 of file PropertyHandler.cpp.
References m_pf.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::setFwhm().
|
inline |
Definition at line 194 of file PropertyHandler.h.
void MantidQt::MantidWidgets::PropertyHandler::setHeight | ( | const double & | h | ) |
Set the height of the handled peak function.
Definition at line 1301 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 642 of file PropertyHandler.cpp.
References functionPrefix(), getHandler(), m_browser, m_cf, Mantid::API::FunctionHandler::m_fun, MantidQt::MantidWidgets::FitPropertyBrowser::m_parameterManager, m_parameters, MantidQt::MantidWidgets::FitPropertyBrowser::sendParameterChanged(), and setParameter().
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::parameterChanged(), and setParameter().
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 909 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 944 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 939 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 985 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 970 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 977 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 968 of file PropertyHandler.cpp.
References applyToAllParameters(), and updateParameter().
Referenced by fit(), MantidQt::MantidWidgets::FitPropertyBrowser::setCentre(), MantidQt::MantidWidgets::FitPropertyBrowser::setFwhm(), MantidQt::MantidWidgets::FitPropertyBrowser::setHeight(), 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 1508 of file PropertyHandler.cpp.
References Mantid::API::FunctionHandler::function(), getHandler(), m_cf, and m_item.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::updateStructureTooltips().
void MantidQt::MantidWidgets::PropertyHandler::updateWorkspaces | ( | QStringList | oldWorkspaces | ) |
Definition at line 1580 of file PropertyHandler.cpp.
References cfun(), getHandler(), index, m_browser, MantidQt::MantidWidgets::FitPropertyBrowser::m_enumManager, m_workspace, MantidQt::MantidWidgets::FitPropertyBrowser::m_workspaceNames, and updateWorkspaces().
Referenced by updateWorkspaces().
|
friend |
Definition at line 261 of file PropertyHandler.h.
|
private |
Definition at line 228 of file PropertyHandler.h.
Referenced by applyToAllAttributes(), findHandler(), initAttributes(), setAttribute(), setVectorAttribute(), and updateAttribute().
|
private |
Definition at line 238 of file PropertyHandler.h.
Referenced by calcBase(), EstimateFwhm(), and setHeight().
|
private |
Definition at line 222 of file PropertyHandler.h.
Referenced by addConstraint(), addFunction(), addTie(), calcBase(), calcBaseAll(), centre(), changeType(), clearError(), EstimateFwhm(), fit(), fix(), init(), initAttributes(), initParameters(), removeAllPlots(), removeFunction(), removeTie(), renameChildren(), setAttribute(), setCentre(), setFunctionWorkspace(), setParameter(), updateError(), updateParameter(), and updateWorkspaces().
|
private |
Definition at line 223 of file PropertyHandler.h.
Referenced by addFunction(), applyToAllAttributes(), applyToAllParameters(), calcBaseAll(), changeType(), findCompositeFunction(), findFunction(), findHandler(), getHandler(), getPeakList(), init(), initTies(), removeAllPlots(), renameChildren(), setAttribute(), setParameter(), and updateStructureTooltip().
|
private |
Definition at line 239 of file PropertyHandler.h.
Referenced by calcBase(), EstimateFwhm(), and setCentre().
|
private |
Definition at line 231 of file PropertyHandler.h.
Referenced by addConstraint(), findHandler(), initParameters(), and removeConstraint().
|
mutableprivate |
Definition at line 241 of file PropertyHandler.h.
Referenced by plotRemoved().
|
private |
true if fitting to multiple spectra using MultiBG
Definition at line 234 of file PropertyHandler.h.
|
private |
Definition at line 227 of file PropertyHandler.h.
Referenced by changeType(), findCompositeFunction(), findFunction(), findHandler(), init(), initAttributes(), initParameters(), removeFunction(), setFunctionWorkspace(), and updateStructureTooltip().
|
private |
Definition at line 229 of file PropertyHandler.h.
Referenced by addTie(), applyToAllParameters(), findHandler(), getParameterProperty(), initParameters(), isParameter(), and setParameter().
|
private |
Definition at line 225 of file PropertyHandler.h.
Referenced by changeType(), init(), initWorkspace(), and parentHandler().
|
private |
Definition at line 224 of file PropertyHandler.h.
Referenced by centre(), changeType(), fwhm(), getCentreParameterName(), getPeakList(), getWidthParameterName(), height(), isParameterExplicitlySet(), setCentre(), setFwhm(), and setHeight().
|
private |
Definition at line 230 of file PropertyHandler.h.
Referenced by addTie(), findHandler(), fix(), initParameters(), removeTie(), and renameChildren().
|
private |
Definition at line 226 of file PropertyHandler.h.
Referenced by changeType(), findHandler(), and init().
|
private |
Definition at line 232 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::CreateAttributeProperty::apply(), findHandler(), and initAttributes().
|
private |
Definition at line 233 of file PropertyHandler.h.
Referenced by MantidQt::MantidWidgets::CreateAttributeProperty::apply(), findHandler(), and setVectorAttribute().
|
private |
function
workspace name for multispectral fitting
Definition at line 236 of file PropertyHandler.h.
Referenced by findHandler(), initWorkspace(), setFunctionWorkspace(), and updateWorkspaces().
|
private |
workspace index for multispectral fitting
Definition at line 237 of file PropertyHandler.h.
Referenced by findHandler(), initWorkspace(), and setFunctionWorkspace().