Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Slots | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MantidQt::MantidWidgets::PropertyHandler Class Reference

Helps display and edit functions in FitPropertyBrowser. More...

#include <PropertyHandler.h>

Inheritance diagram for MantidQt::MantidWidgets::PropertyHandler:
Mantid::API::FunctionHandler

Public Member Functions

void addConstraint (QtProperty *parProp, bool lo, bool up, double loBound, double upBound)
 Add constraint to parameter property parProp. More...
 
PropertyHandleraddFunction (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::CompositeFunctioncfun () const
 
std::shared_ptr< Mantid::API::IFunctionchangeType (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::CompositeFunctionfindCompositeFunction (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::IFunctionfindFunction (QtBrowserItem *item) const
 Returns 'this' if item == m_item or calls findFunction recursively with all its children or zero. More...
 
PropertyHandlerfindHandler (const Mantid::API::IFunction *fun)
 
PropertyHandlerfindHandler (const Mantid::API::IFunction_const_sptr &fun)
 
PropertyHandlerfindHandler (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
 
PropertyHandlergetHandler (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::IFunctionifun () const
 
void init () override
 overrides virtual init() which is called from IFunction::setHandler(...) More...
 
bool isParameter (QtProperty *prop)
 
bool isParameterExplicitlySet (const std::string &param) const
 
QtBrowserItem * item () const
 
PropertyHandlerparentHandler () const
 
std::shared_ptr< Mantid::API::IPeakFunctionpfun () 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...
 
FunctionHandleroperator= (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
 
FitPropertyBrowserm_browser
 
std::shared_ptr< Mantid::API::CompositeFunctionm_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::CompositeFunctionm_parent
 
std::shared_ptr< Mantid::API::IPeakFunctionm_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...
 

Detailed Description

Helps display and edit functions in FitPropertyBrowser.

Definition at line 39 of file PropertyHandler.h.

Constructor & Destructor Documentation

◆ PropertyHandler()

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.

◆ ~PropertyHandler()

MantidQt::MantidWidgets::PropertyHandler::~PropertyHandler ( )
overridedefault

Destructor.

Member Function Documentation

◆ addConstraint()

void MantidQt::MantidWidgets::PropertyHandler::addConstraint ( QtProperty *  parProp,
bool  lo,
bool  up,
double  loBound,
double  upBound 
)

◆ addFunction()

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::addFunction ( const std::string &  fnName)

◆ addTie()

void MantidQt::MantidWidgets::PropertyHandler::addTie ( const QString &  tieStr)

◆ applyToAllAttributes()

void MantidQt::MantidWidgets::PropertyHandler::applyToAllAttributes ( void(PropertyHandler::*)(QtProperty *)  func)
private

Applies given function to all the attribute properties recursively.

Applies the given function to all the attribute properties recursively, within this context.

Parameters
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().

◆ applyToAllParameters()

void MantidQt::MantidWidgets::PropertyHandler::applyToAllParameters ( void(PropertyHandler::*)(QtProperty *)  func)
private

Applies given function to all the parameter properties recursively.

Applies given function to all the parameter properties recursively, within this context.

Parameters
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().

◆ base()

double MantidQt::MantidWidgets::PropertyHandler::base ( ) const
inline

Definition at line 176 of file PropertyHandler.h.

◆ calcBase()

void MantidQt::MantidWidgets::PropertyHandler::calcBase ( )

◆ 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().

◆ centre()

double MantidQt::MantidWidgets::PropertyHandler::centre ( ) const

◆ cfun()

std::shared_ptr< Mantid::API::CompositeFunction > MantidQt::MantidWidgets::PropertyHandler::cfun ( ) const
inline

◆ changeType()

Mantid::API::IFunction_sptr MantidQt::MantidWidgets::PropertyHandler::changeType ( QtProperty *  prop)

◆ clearError()

void MantidQt::MantidWidgets::PropertyHandler::clearError ( QtProperty *  prop)
private

Clear function parameter error in the manager.

Parameters
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().

◆ 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().

◆ EstimateFwhm()

double MantidQt::MantidWidgets::PropertyHandler::EstimateFwhm ( ) const

Estimate the FwHM for a peak.

Create a simple estimate of the full width half maximum.

Returns
and estimate of the peak width, or 0 if an error occurs

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.

◆ findCompositeFunction()

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().

◆ findFunction()

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().

◆ findHandler() [1/3]

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler ( const Mantid::API::IFunction fun)

◆ findHandler() [2/3]

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler ( const Mantid::API::IFunction_const_sptr fun)

◆ findHandler() [3/3]

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::findHandler ( QtProperty *  prop)

◆ fit()

void MantidQt::MantidWidgets::PropertyHandler::fit ( )

◆ fix()

void MantidQt::MantidWidgets::PropertyHandler::fix ( const QString &  parName)

◆ functionName()

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().

◆ functionPrefix()

QString MantidQt::MantidWidgets::PropertyHandler::functionPrefix ( ) const

◆ fwhm()

double MantidQt::MantidWidgets::PropertyHandler::fwhm ( ) const

Definition at line 1363 of file PropertyHandler.cpp.

References m_pf.

Referenced by EstimateFwhm().

◆ getCentreParameterName()

std::string MantidQt::MantidWidgets::PropertyHandler::getCentreParameterName ( ) const

Definition at line 1377 of file PropertyHandler.cpp.

References m_pf.

◆ getHandler()

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::getHandler ( std::size_t  i) const

◆ getParameterProperty() [1/2]

QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty ( const QString &  parName) const

◆ getParameterProperty() [2/2]

QtProperty * MantidQt::MantidWidgets::PropertyHandler::getParameterProperty ( QtProperty *  prop) const

Definition at line 1092 of file PropertyHandler.cpp.

References m_parameters.

◆ getPeakList()

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().

◆ getTies()

QMap< QString, QtProperty * > MantidQt::MantidWidgets::PropertyHandler::getTies ( )
inline

◆ getWidthParameterName()

std::string MantidQt::MantidWidgets::PropertyHandler::getWidthParameterName ( ) const

Definition at line 1370 of file PropertyHandler.cpp.

References m_pf.

◆ hasPlot()

bool MantidQt::MantidWidgets::PropertyHandler::hasPlot ( ) const
inline

◆ hasTies()

bool MantidQt::MantidWidgets::PropertyHandler::hasTies ( )
inline

Definition at line 208 of file PropertyHandler.h.

◆ height()

double MantidQt::MantidWidgets::PropertyHandler::height ( ) const

Definition at line 1349 of file PropertyHandler.cpp.

References m_pf.

◆ ifun()

std::shared_ptr< Mantid::API::IFunction > MantidQt::MantidWidgets::PropertyHandler::ifun ( ) const
inline

◆ init()

void MantidQt::MantidWidgets::PropertyHandler::init ( )
overridevirtual

◆ initAttributes()

void MantidQt::MantidWidgets::PropertyHandler::initAttributes ( )
protected

◆ initParameters()

void MantidQt::MantidWidgets::PropertyHandler::initParameters ( )
protected

◆ initTies()

void MantidQt::MantidWidgets::PropertyHandler::initTies ( )
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().

◆ initWorkspace()

void MantidQt::MantidWidgets::PropertyHandler::initWorkspace ( )
protected

Definition at line 304 of file PropertyHandler.cpp.

References m_parent, m_workspace, and m_workspaceIndex.

Referenced by init().

◆ isParameter()

bool MantidQt::MantidWidgets::PropertyHandler::isParameter ( QtProperty *  prop)

◆ isParameterExplicitlySet()

bool MantidQt::MantidWidgets::PropertyHandler::isParameterExplicitlySet ( const std::string &  param) const

Definition at line 1384 of file PropertyHandler.cpp.

References m_pf.

◆ item()

QtBrowserItem * MantidQt::MantidWidgets::PropertyHandler::item ( ) const
inline

◆ parentHandler()

PropertyHandler * MantidQt::MantidWidgets::PropertyHandler::parentHandler ( ) const

◆ pfun()

std::shared_ptr< Mantid::API::IPeakFunction > MantidQt::MantidWidgets::PropertyHandler::pfun ( ) const
inline

◆ plotRemoved

void MantidQt::MantidWidgets::PropertyHandler::plotRemoved ( )
protectedslot

Remove the reference to the function curve as it has been deleted.

Definition at line 1495 of file PropertyHandler.cpp.

References m_hasPlot.

◆ removeAllPlots()

void MantidQt::MantidWidgets::PropertyHandler::removeAllPlots ( )

◆ removeConstraint()

void MantidQt::MantidWidgets::PropertyHandler::removeConstraint ( QtProperty *  parProp)

◆ removeFunction()

void MantidQt::MantidWidgets::PropertyHandler::removeFunction ( )

◆ removeTie() [1/3]

void MantidQt::MantidWidgets::PropertyHandler::removeTie ( const QString &  parName)

Remove the tie.

Parameters
parName:: The name of the parameter

Definition at line 1201 of file PropertyHandler.cpp.

References m_ties, and removeTie().

◆ removeTie() [2/3]

void MantidQt::MantidWidgets::PropertyHandler::removeTie ( QtProperty *  prop)

Remove the tie.

Parameters
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.

◆ removeTie() [3/3]

void MantidQt::MantidWidgets::PropertyHandler::removeTie ( QtProperty *  prop,
const std::string &  globalName 
)

Remove the tie.

Parameters
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().

◆ renameChildren()

void MantidQt::MantidWidgets::PropertyHandler::renameChildren ( ) const

◆ setAttribute() [1/4]

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.

Parameters
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.

◆ setAttribute() [2/4]

template<typename AttributeType >
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.

Parameters
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().

◆ setAttribute() [3/4]

void MantidQt::MantidWidgets::PropertyHandler::setAttribute ( QString const &  attName,
Mantid::API::IFunction::Attribute const &  attValue 
)

Set function attribute value.

Parameters
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().

◆ setAttribute() [4/4]

bool MantidQt::MantidWidgets::PropertyHandler::setAttribute ( QtProperty *  prop,
bool  resetProperties = true 
)

◆ setBase()

void MantidQt::MantidWidgets::PropertyHandler::setBase ( const double &  b)
inline

Definition at line 164 of file PropertyHandler.h.

◆ setCentre()

void MantidQt::MantidWidgets::PropertyHandler::setCentre ( const double &  c)

◆ setFunctionWorkspace()

void MantidQt::MantidWidgets::PropertyHandler::setFunctionWorkspace ( )

◆ setFwhm()

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().

◆ setHasPlot()

void MantidQt::MantidWidgets::PropertyHandler::setHasPlot ( const bool  state)
inline

Definition at line 194 of file PropertyHandler.h.

◆ setHeight()

void MantidQt::MantidWidgets::PropertyHandler::setHeight ( const double &  h)

Set the height of the handled peak function.

Definition at line 1301 of file PropertyHandler.cpp.

References m_base, and m_pf.

Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::setHeight().

◆ setParameter()

bool MantidQt::MantidWidgets::PropertyHandler::setParameter ( QtProperty *  prop)

Set function parameter value read from a QtProperty.

Parameters
prop:: The (double) property with the new parameter value
Returns
true if successfull

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().

◆ setVectorAttribute()

void MantidQt::MantidWidgets::PropertyHandler::setVectorAttribute ( QtProperty *  prop)

Set function vector attribute value.

Parameters
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().

◆ updateAttribute()

void MantidQt::MantidWidgets::PropertyHandler::updateAttribute ( QtProperty *  attribute)
private

Sync function attribute value with the manager.

Parameters
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().

◆ 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().

◆ updateError()

void MantidQt::MantidWidgets::PropertyHandler::updateError ( QtProperty *  prop)
private

Set function parameter error in the manager.

Parameters
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().

◆ updateErrors()

void MantidQt::MantidWidgets::PropertyHandler::updateErrors ( )

◆ updateParameter()

void MantidQt::MantidWidgets::PropertyHandler::updateParameter ( QtProperty *  prop)
private

Sync function parameter value with the manager.

Parameters
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().

◆ updateParameters()

void MantidQt::MantidWidgets::PropertyHandler::updateParameters ( )

◆ updateStructureTooltip()

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)

  • FlatBackground)

For non-composite functions: function()->name().

Returns
The new tooltip

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().

◆ updateWorkspaces()

void MantidQt::MantidWidgets::PropertyHandler::updateWorkspaces ( QStringList  oldWorkspaces)

Friends And Related Function Documentation

◆ CreateAttributeProperty

friend class CreateAttributeProperty
friend

Definition at line 261 of file PropertyHandler.h.

Member Data Documentation

◆ m_attributes

QList<QtProperty *> MantidQt::MantidWidgets::PropertyHandler::m_attributes
private

◆ m_base

double MantidQt::MantidWidgets::PropertyHandler::m_base
private

Definition at line 238 of file PropertyHandler.h.

Referenced by calcBase(), EstimateFwhm(), and setHeight().

◆ m_browser

FitPropertyBrowser* MantidQt::MantidWidgets::PropertyHandler::m_browser
private

◆ m_cf

std::shared_ptr<Mantid::API::CompositeFunction> MantidQt::MantidWidgets::PropertyHandler::m_cf
private

◆ m_ci

int MantidQt::MantidWidgets::PropertyHandler::m_ci
private

Definition at line 239 of file PropertyHandler.h.

Referenced by calcBase(), EstimateFwhm(), and setCentre().

◆ m_constraints

QMap<QString, std::pair<QtProperty *, QtProperty *> > MantidQt::MantidWidgets::PropertyHandler::m_constraints
private

Definition at line 231 of file PropertyHandler.h.

Referenced by addConstraint(), findHandler(), initParameters(), and removeConstraint().

◆ m_hasPlot

bool MantidQt::MantidWidgets::PropertyHandler::m_hasPlot
mutableprivate

Definition at line 241 of file PropertyHandler.h.

Referenced by plotRemoved().

◆ m_isMultispectral

bool MantidQt::MantidWidgets::PropertyHandler::m_isMultispectral
private

true if fitting to multiple spectra using MultiBG

Definition at line 234 of file PropertyHandler.h.

◆ m_item

QtBrowserItem* MantidQt::MantidWidgets::PropertyHandler::m_item
private

◆ m_parameters

QList<QtProperty *> MantidQt::MantidWidgets::PropertyHandler::m_parameters
private

◆ m_parent

std::shared_ptr<Mantid::API::CompositeFunction> MantidQt::MantidWidgets::PropertyHandler::m_parent
private

Definition at line 225 of file PropertyHandler.h.

Referenced by changeType(), init(), initWorkspace(), and parentHandler().

◆ m_pf

std::shared_ptr<Mantid::API::IPeakFunction> MantidQt::MantidWidgets::PropertyHandler::m_pf
private

◆ m_ties

QMap<QString, QtProperty *> MantidQt::MantidWidgets::PropertyHandler::m_ties
private

Definition at line 230 of file PropertyHandler.h.

Referenced by addTie(), findHandler(), fix(), initParameters(), removeTie(), and renameChildren().

◆ m_type

QtProperty* MantidQt::MantidWidgets::PropertyHandler::m_type
private

Definition at line 226 of file PropertyHandler.h.

Referenced by changeType(), findHandler(), and init().

◆ m_vectorMembers

QList<QtProperty *> MantidQt::MantidWidgets::PropertyHandler::m_vectorMembers
private

◆ m_vectorSizes

QList<QtProperty *> MantidQt::MantidWidgets::PropertyHandler::m_vectorSizes
private

◆ m_workspace

QtProperty* MantidQt::MantidWidgets::PropertyHandler::m_workspace
private

function

workspace name for multispectral fitting

Definition at line 236 of file PropertyHandler.h.

Referenced by findHandler(), initWorkspace(), setFunctionWorkspace(), and updateWorkspaces().

◆ m_workspaceIndex

QtProperty* MantidQt::MantidWidgets::PropertyHandler::m_workspaceIndex
private

workspace index for multispectral fitting

Definition at line 237 of file PropertyHandler.h.

Referenced by findHandler(), initWorkspace(), and setFunctionWorkspace().


The documentation for this class was generated from the following files: