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

Class FitPropertyBrowser implements QtPropertyBrowser to display and control fitting function parameters and settings. More...

#include <FunctionTreeView.h>

Inheritance diagram for MantidQt::MantidWidgets::FunctionTreeView:
MantidQt::MantidWidgets::IFunctionView

Classes

struct  AConstraint
 Constraint structure. More...
 
struct  AProperty
 To keep QtProperty and its QtBrowserItem in one place. More...
 
struct  ATie
 Tie structure. More...
 

Public Member Functions

void clear () override
 Clear the contents. More...
 
void clearErrors () override
 Clear all errors. More...
 
boost::optional< QString > currentFunctionIndex () const override
 Index of currently selected function. More...
 
DoubleDialogEditorFactory * doubleEditorFactory ()
 
 FunctionTreeView (QWidget *parent, bool multi, std::vector< std::string > categories=std::vector< std::string >())
 Constructor. More...
 
IFunction::Attribute getAttribute (const QString &attrName) const override
 Get a value of a attribute. More...
 
Mantid::API::IFunction_sptr getFunction (QtProperty *prop=nullptr, bool attributesOnly=false)
 Return the function. More...
 
QStringList getGlobalParameters () const
 Get a list of global parameters. More...
 
int getNumberOfConstraintProperties () const
 
int getNumberOfQtProperties () const
 
int getNumberOfTieProperties () const
 
double getParameter (const QString &paramName) const override
 Get a value of a parameter. More...
 
QWidget * getParamWidget (const QString &paramName) const
 
IFunction_sptr getSelectedFunction () override
 Get user selected function. More...
 
QRect getVisualRectFunctionProperty (const QString &index) const
 
QRect getVisualRectParameterProperty (const QString &paramName) const
 
bool hasFunction () const override
 Check if a function is set. More...
 
void hideGlobals ()
 Show global column. More...
 
void setColumnSizes (int s0, int s1, int s2=-1)
 Resize the browser's columns. More...
 
void setErrorsEnabled (bool enabled) override
 Set error display on/off. More...
 
void setFunction (Mantid::API::IFunction_sptr fun) override
 Set the function in the browser. More...
 
void setGlobalParameters (const QStringList &) override
 Set new global parameters. More...
 
void setGlobalTies (std::vector< GlobalTie > const &globalTies)
 The global ties within a multi-domain function. More...
 
void setMultiDomainFunctionPrefix (const QString &functionPrefix)
 The function index displayed as a multi-domain function index at the top of the FunctionTreeView. More...
 
void setParameter (const QString &paramName, double value) override
 Update the function parameter value. More...
 
void setParameterConstraint (const QString &paramName, const QString &constraint) override
 Set a constraint. More...
 
void setParameterError (const QString &paramName, double error) override
 Update the function parameter error. More...
 
void setParameterTie (const QString &paramName, const QString &tie) override
 Set a tie. More...
 
void setStretchLastColumn (bool stretch)
 Set the last column to stretch. More...
 
void showFunctionHelp (const QString &functionName) const override
 Show function help page for input functionName. More...
 
void showGlobals ()
 
QtTreePropertyBrowser * treeBrowser ()
 
QTreeWidget * treeWidget () const
 
 ~FunctionTreeView () override
 Destructor. More...
 
- Public Member Functions inherited from MantidQt::MantidWidgets::IFunctionView
virtual void clear ()=0
 
virtual void clearErrors ()=0
 
virtual boost::optional< QString > currentFunctionIndex () const =0
 
virtual IFunction::Attribute getAttribute (const QString &attrName) const =0
 
virtual double getParameter (const QString &paramName) const =0
 
virtual IFunction_sptr getSelectedFunction ()=0
 
virtual bool hasFunction () const =0
 
 IFunctionView (QWidget *parent=nullptr)
 
template<typename T >
void setAttributeValue (const QString &attributeName, T &value)
 
virtual void setErrorsEnabled (bool enabled)=0
 
virtual void setFunction (IFunction_sptr fun)=0
 
virtual void setGlobalParameters (const QStringList &)=0
 
virtual void setParameter (const QString &paramName, double value)=0
 
virtual void setParameterConstraint (const QString &paramName, const QString &constraint)=0
 
virtual void setParameterError (const QString &paramName, double error)=0
 
virtual void setParameterTie (const QString &paramName, const QString &tie)=0
 
virtual void showFunctionHelp (const QString &) const =0
 
virtual ~IFunctionView ()=default
 

Protected Slots

void addConstraints ()
 Add both constraints to current parameter. More...
 
void addConstraints10 ()
 Add both constraints to current parameter. More...
 
void addConstraints50 ()
 Add both constraints to current parameter. More...
 
void addFunctionBegin ()
 Add a function. More...
 
void addFunctionEnd (int result)
 
void addTie ()
 Add a tie to a parameter. More...
 
void attributeChanged (QtProperty *)
 Called when a function attribute property is changed. More...
 
void attributeVectorDoubleChanged (QtProperty *)
 Called when a member of a vector attribute is changed. More...
 
void attributeVectorSizeChanged (QtProperty *)
 Called when the size of a vector attribute is changed. More...
 
void constraintChanged (QtProperty *)
 Called when a constraint property changes. More...
 
void copyToClipboard ()
 Copy the function to the clipboard. More...
 
void fixParameter ()
 Fix a parameter. More...
 
void globalChanged (QtProperty *, const QString &, bool)
 Called when "Global" check-box was clicked. More...
 
void parameterButtonClicked (QtProperty *)
 Called when button in local parameter editor was clicked. More...
 
void parameterPropertyChanged (QtProperty *)
 Called when a function parameter property is changed. More...
 
void pasteFromClipboard ()
 Copy function from the clipboard. More...
 
void popupMenu (const QPoint &)
 Show the context menu. More...
 
void removeConstraint ()
 Remove one of the constraints. More...
 
void removeConstraints ()
 Remove both constraints from current parameter. More...
 
void removeFunction ()
 Remove a function. More...
 
void removeTie ()
 Unfix a parameter. More...
 
void setAttributeToFunction (Mantid::API::IFunction &fun, QtProperty *prop)
 Set value of an attribute (as a property) to a function. More...
 
void tieChanged (QtProperty *)
 Called when a tie property changes. More...
 
void updateCurrentFunctionIndex ()
 Update index of currently selected function. More...
 

Protected Member Functions

void addAttributeAndParameterProperties (QtProperty *prop, const Mantid::API::IFunction_sptr &fun, const Mantid::API::CompositeFunction_sptr &parentComposite=nullptr, const std::size_t &parentIndex=0)
 Add attribute and parameter properties to a function property. More...
 
AProperty addAttributeProperty (QtProperty *parent, const QString &attName, const Mantid::API::IFunction::Attribute &att)
 Add a attribute property. More...
 
QList< APropertyaddConstraintProperties (QtProperty *prop, const QString &constraint)
 Add a constraint property. More...
 
bool addFunction (QtProperty *prop, const Mantid::API::IFunction_sptr &fun)
 Add a function. More...
 
AProperty addFunctionProperty (QtProperty *parent, const QString &funName)
 Add a function property. More...
 
void addGlobalParameterTie (QtProperty *property, const std::string &parameterName, const CompositeFunction_sptr &parentComposite=nullptr, const std::size_t &parentIndex=0)
 Adds a global tie for a parameter if one exists. More...
 
AProperty addIndexProperty (QtProperty *prop)
 Add property showing function's index in the composite function. More...
 
void addMultiDomainIndexProperty (QtProperty *prop)
 Adds an index property representing the function index of a specific domain within a MultiDomainFunction. More...
 
AProperty addParameterProperty (QtProperty *parent, const QString &paramName, const QString &paramDesc, double paramValue)
 Add a parameter property. More...
 
void addParameterTie (QtProperty *property, const Mantid::API::IFunction_sptr &function, const std::string &parameterName, const std::size_t &parameterIndex, const Mantid::API::CompositeFunction_sptr &parentComposite=nullptr, const std::size_t &parentIndex=0)
 Add tie to a parameter property. More...
 
bool addParameterTieInComposite (QtProperty *property, const std::string &parameterName, const Mantid::API::CompositeFunction_sptr &composite, const std::size_t &index)
 Add tie to a parameter property stored within a composite function. More...
 
AProperty addProperty (QtProperty *parent, QtProperty *subproperty)
 Add a sub-property. More...
 
void addTieProperty (QtProperty *prop, const QString &tie, bool globalTie=false)
 Add a tie property. More...
 
void createActions ()
 Create and connect actions. More...
 
void createBrowser ()
 Create the Qt property browser. More...
 
QString getAttributeName (QtProperty *prop) const
 Get name of the attribute for a property. More...
 
QtProperty * getAttributeProperty (const QString &paramName) const
 Get a property for a parameter. More...
 
QString getConstraint (const QString &paramName, const double &lowerBound=Mantid::EMPTY_DBL(), const double &upperBound=Mantid::EMPTY_DBL()) const
 Get a constraint string. More...
 
std::pair< QString, QString > getFunctionAndConstraint (QtProperty *prop) const
 Get a pair of function index (eg f0.f2.) and constraint expression given a parameter property. More...
 
AProperty getFunctionProperty () const
 Get property of the overall function. More...
 
QtProperty * getFunctionProperty (const QString &index) const
 Get function property for the index. More...
 
QString getIndex (QtProperty *prop) const
 Get the function index for a property. More...
 
double getParameter (QtProperty *prop) const
 Get attribute as a string. More...
 
QString getParameterName (QtProperty *prop) const
 Get name of the parameter for a property. More...
 
QtProperty * getParameterProperty (const QString &paramName) const
 Get a property for a parameter Get a property for a parameter. More...
 
QtProperty * getParentParameterProperty (QtProperty *prop) const
 Get a property for a parameter which is a parent of a given property (tie or constraint). More...
 
QString getTie (QtProperty *prop) const
 Get a tie for a paramater. More...
 
QtProperty * getTieProperty (QtProperty *prop) const
 Get a tie property attached to a parameter property. More...
 
bool hasConstraint (QtProperty *prop) const
 Check if a parameter property has a constraint. More...
 
bool hasLowerBound (QtProperty *prop) const
 Check if a parameter property has a lower bound. More...
 
bool hasTie (QtProperty *prop) const
 Check if a parameter property has a tie. More...
 
bool hasUpperBound (QtProperty *prop) const
 Check if a parameter property has a upper bound. More...
 
bool isAttribute (QtProperty *prop) const
 Check if property is a function attribute. More...
 
bool isBoolAttribute (QtProperty *prop) const
 Check if property is a bool attribute. More...
 
bool isConstraint (QtProperty *prop) const
 Check if a property is a constraint. More...
 
bool isDoubleAttribute (QtProperty *prop) const
 Check if property is a double attribute. More...
 
bool isFunction (QtProperty *prop) const
 Check if property is a function group. More...
 
bool isIndex (QtProperty *prop) const
 Check if a property is an index. More...
 
bool isIntAttribute (QtProperty *prop) const
 Check if property is a int attribute. More...
 
bool isParameter (QtProperty *prop) const
 Check if property is a function paramater. More...
 
bool isStringAttribute (QtProperty *prop) const
 Check if property is a string attribute. More...
 
bool isTie (QtProperty *prop) const
 Check if a property is a tie. More...
 
bool isVectorAttribute (QtProperty *prop) const
 Check if property is a vector attribute. More...
 
void removeConstraintsQuiet (QtProperty *paramProp)
 
void removeProperty (QtProperty *prop)
 Remove and delete property. More...
 
void setFunction (QtProperty *prop, const Mantid::API::IFunction_sptr &fun)
 Set a function. More...
 
void updateFunctionIndices (QtProperty *prop=nullptr, const QString &index="")
 Update function index properties. More...
 
virtual void setBooleanAttribute (const QString &paramName, bool value)=0
 
virtual void setDoubleAttribute (const QString &paramName, double value)=0
 
virtual void setIntAttribute (const QString &paramName, int value)=0
 
virtual void setStringAttribute (const QString &paramName, std::string &value)=0
 
virtual void setVectorAttribute (const QString &paramName, std::vector< double > &val)=0
 

Protected Attributes

QAction * m_actionAddFunction
 Add a function. More...
 
QAction * m_actionAddTie
 Add a custom tie to a parameter. More...
 
QAction * m_actionConstraints
 Add both constraints to current parameter. More...
 
QAction * m_actionConstraints10
 Add both constraints to current parameter with 10% spread. More...
 
QAction * m_actionConstraints50
 Add both constraints to current parameter with 50% spread. More...
 
QAction * m_actionFixParameter
 Fix a parameter. More...
 
QAction * m_actionFromClipboard
 Copy a function from the clipboard. More...
 
QAction * m_actionFunctionHelp
 Show function help menu. More...
 
QAction * m_actionRemoveConstraint
 Remove one constraints from current parameter. More...
 
QAction * m_actionRemoveConstraints
 Remove both constraints from current parameter. More...
 
QAction * m_actionRemoveFunction
 Remove a function. More...
 
QAction * m_actionRemoveTie
 Unfix a parameter. More...
 
QAction * m_actionToClipboard
 Copy a function to the clipboard. More...
 
std::vector< std::string > m_allowedCategories
 
QtBoolPropertyManager * m_attributeBoolManager
 Manager for function bool attribute properties. More...
 
QtDoublePropertyManager * m_attributeDoubleManager
 Manager for function double attribute properties. More...
 
QtIntPropertyManager * m_attributeIntManager
 Manager for function int attribute properties. More...
 
QtIntPropertyManager * m_attributeSizeManager
 Manager for vector attribute size properties. More...
 
QtStringPropertyManager * m_attributeStringManager
 Manager for function string attribute properties. More...
 
QtDoublePropertyManager * m_attributeVectorDoubleManager
 Manager for vector attribute member properties. More...
 
QtGroupPropertyManager * m_attributeVectorManager
 Manager for vector attribute properties. More...
 
QtTreePropertyBrowser * m_browser
 Qt property browser which displays properties. More...
 
QtDoublePropertyManager * m_constraintManager
 Manager for parameter constraint properties. More...
 
QMultiMap< QtProperty *, AConstraintm_constraints
 Store parameter constraints. Keys are function properties. More...
 
boost::optional< QString > m_currentFunctionIndex
 Index of currently selected function. More...
 
DoubleDialogEditorFactory * m_doubleEditorFactory
 Editor used for editing doubles. More...
 
bool m_emitAttributeValueChange = true
 
bool m_emitParameterValueChange = true
 
QtStringPropertyManager * m_filenameManager
 Manager for file name attributes. More...
 
QtStringPropertyManager * m_formulaManager
 Manager for Formula attributes. More...
 
QtGroupPropertyManager * m_functionManager
 Manager for function group properties. More...
 
std::vector< GlobalTiem_globalTies
 
QtStringPropertyManager * m_indexManager
 Manager for function index properties. More...
 
bool m_multiDataset
 Set true if the constructed function is intended to be used in a multi-dataset fit. More...
 
QString m_multiDomainFunctionPrefix
 The function prefix of the domain with a MultiDomainFunction currently being displayed. More...
 
ParameterPropertyManager * m_parameterManager
 Manager for function parameter properties. More...
 
QMap< QtProperty *, APropertym_properties
 Store all properties in a map for easy access. More...
 
QtProperty * m_selectedFunctionProperty
 
SelectFunctionDialogm_selectFunctionDialog
 
QtStringPropertyManager * m_tieManager
 Manager for function tie properties. More...
 
QMultiMap< QtProperty *, ATiem_ties
 Store parameter ties. Keys are function properties. More...
 
QtStringPropertyManager * m_workspaceManager
 Manager for Workspace attributes. More...
 

Private Member Functions

std::string getFullParameterName (const std::string &parameter, int compositeIndex=-1) const
 Gets the full parameter name when using the m_multiDomainFunctionPrefix. More...
 
QString getFullTie (const QString &tie) const
 Gets the full tie when using the m_multiDomainFunctionPrefix. More...
 
QTreeWidgetItem * getPropertyWidgetItem (QtProperty *prop) const
 
void setBooleanAttribute (const QString &attrName, bool value) override
 Updates the value of a boolean attribute. More...
 
void setDoubleAttribute (const QString &attrName, double value) override
 Update a double attribute. More...
 
void setIntAttribute (const QString &attrName, int value) override
 Updates the value of a integer attribute. More...
 
void setStringAttribute (const QString &attrName, std::string &value) override
 Updates the value of a string attribute. More...
 
void setVectorAttribute (const QString &attrName, std::vector< double > &val) override
 Updates the value of a vector attribute NOTE: This is currently not implemented as there is no need for it as the use of vector attributes is limited to tabulated functions (e.g resolution) which create their attributes 'on-the-fly' when the fit is performed. More...
 
QRect visualItemRect (QtProperty *prop) const
 

Friends

class CreateAttributePropertyForFunctionTreeView
 
class SetAttributeFromProperty
 

Additional Inherited Members

- Signals inherited from MantidQt::MantidWidgets::IFunctionView
void attributePropertyChanged (const QString &attrName)
 Function attribute gets changed. More...
 
void copyToClipboardRequest ()
 User requested copy function to clipboard. More...
 
void currentFunctionChanged ()
 User selects a different (sub)function (or one of it's sub-properties) More...
 
void functionAdded (const QString &funStr)
 User adds a function. More...
 
void functionHelpRequest ()
 User requested function help. More...
 
void functionRemoved (const QString &functionIndex)
 User removes a function. More...
 
void functionRemovedString (const QString &funStr)
 User removes a function. More...
 
void functionReplaced (const QString &funStr)
 User replaces the whole function (eg, by pasting it from clipboard) More...
 
void globalsChanged (const QStringList &)
 User changed the list of global parameters. More...
 
void localParameterButtonClicked (const QString &parName)
 In multi-dataset context a button value editor was clicked. More...
 
void parameterChanged (const QString &paramName)
 Function parameter gets changed. More...
 
void parameterConstraintAdded (const QString &functionIndex, const QString &constraint)
 User sets a constraint. More...
 
void parameterConstraintRemoved (const QString &paramName)
 User removes a constraint. More...
 
void parameterTieChanged (const QString &parName, const QString &tie)
 User sets a tie. More...
 

Detailed Description

Class FitPropertyBrowser implements QtPropertyBrowser to display and control fitting function parameters and settings.

Date
18/04/2012

Definition at line 66 of file FunctionTreeView.h.

Constructor & Destructor Documentation

◆ FunctionTreeView()

MantidQt::MantidWidgets::FunctionTreeView::FunctionTreeView ( QWidget *  parent,
bool  multi,
std::vector< std::string >  categories = std::vector<std::string>() 
)

Constructor.

Parameters
parent:: The parent widget.
multi:: Option to use the browser for multi-dataset fitting.
categories:: Function categories to be included to the Add Function dialog. An empty vector means include all available categories.

Definition at line 104 of file FunctionTreeView.cpp.

References createActions(), createBrowser(), and m_browser.

◆ ~FunctionTreeView()

MantidQt::MantidWidgets::FunctionTreeView::~FunctionTreeView ( )
override

Member Function Documentation

◆ addAttributeAndParameterProperties()

void MantidQt::MantidWidgets::FunctionTreeView::addAttributeAndParameterProperties ( QtProperty *  prop,
const Mantid::API::IFunction_sptr fun,
const Mantid::API::CompositeFunction_sptr parentComposite = nullptr,
const std::size_t &  parentIndex = 0 
)
protected

Add attribute and parameter properties to a function property.

For a composite function adds all member functions' properties

Parameters
prop:: A function property
fun:: Shared pointer to a created function
parentComposite:: If relevant, the composite the function is part of.
parentIndex:: If relevant, the index of the function within its composite.

Definition at line 635 of file FunctionTreeView.cpp.

References addAttributeAndParameterProperties(), addAttributeProperty(), addConstraintProperties(), addFunctionProperty(), addGlobalParameterTie(), addIndexProperty(), addParameterProperty(), addParameterTie(), MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, and value.

Referenced by addAttributeAndParameterProperties(), and setFunction().

◆ addAttributeProperty()

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::addAttributeProperty ( QtProperty *  parent,
const QString &  attName,
const Mantid::API::IFunction::Attribute att 
)
protected

Add a attribute property.

Parameters
parent:: Parent function property
attName:: Attribute name
att:: Attribute value

Definition at line 619 of file FunctionTreeView.cpp.

References Mantid::API::IFunction::Attribute::apply().

Referenced by addAttributeAndParameterProperties().

◆ addConstraintProperties()

QList< FunctionTreeView::AProperty > MantidQt::MantidWidgets::FunctionTreeView::addConstraintProperties ( QtProperty *  prop,
const QString &  constraint 
)
protected

◆ addConstraints

void MantidQt::MantidWidgets::FunctionTreeView::addConstraints ( )
protectedslot

◆ addConstraints10

void MantidQt::MantidWidgets::FunctionTreeView::addConstraints10 ( )
protectedslot

◆ addConstraints50

void MantidQt::MantidWidgets::FunctionTreeView::addConstraints50 ( )
protectedslot

◆ addFunction()

bool MantidQt::MantidWidgets::FunctionTreeView::addFunction ( QtProperty *  prop,
const Mantid::API::IFunction_sptr fun 
)
protected

Add a function.

Parameters
prop:: Property of the parent composite function or NULL
fun:: A function to add

Definition at line 439 of file FunctionTreeView.cpp.

References addFunctionProperty(), getFunction(), MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, setFunction(), and updateFunctionIndices().

Referenced by addFunctionEnd(), and setFunction().

◆ addFunctionBegin

void MantidQt::MantidWidgets::FunctionTreeView::addFunctionBegin ( )
protectedslot

Add a function.

Add a function to currently selected composite function property.

Definition at line 1253 of file FunctionTreeView.cpp.

References addFunctionEnd(), MantidQt::MantidWidgets::SelectFunctionDialog::clearSearchBoxText(), isFunction(), m_allowedCategories, m_browser, m_selectedFunctionProperty, m_selectFunctionDialog, and top.

Referenced by createActions().

◆ addFunctionEnd

void MantidQt::MantidWidgets::FunctionTreeView::addFunctionEnd ( int  result)
protectedslot

◆ addFunctionProperty()

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::addFunctionProperty ( QtProperty *  parent,
const QString &  funName 
)
protected

Add a function property.

Parameters
parent:: Parent function property or NULL
funName:: Function name
Returns
:: A set AProperty struct

Definition at line 385 of file FunctionTreeView.cpp.

References addProperty(), and m_functionManager.

Referenced by addAttributeAndParameterProperties(), and addFunction().

◆ addGlobalParameterTie()

void MantidQt::MantidWidgets::FunctionTreeView::addGlobalParameterTie ( QtProperty *  property,
const std::string &  parameterName,
const CompositeFunction_sptr parentComposite = nullptr,
const std::size_t &  parentIndex = 0 
)
protected

Adds a global tie for a parameter if one exists.

Add a global tie to a function property if one exists for the specified parameter.

Parameters
property:: A function property.
parameterName:: The name of the parameter to check for a global tie.
parentComposite:: The composite function the parameter is in. This is a nullptr if the parameter is not in a composite function.
parentIndex:: The index of the parameter within its composite.

Definition at line 736 of file FunctionTreeView.cpp.

References addTieProperty(), getFullParameterName(), m_globalTies, and m_multiDomainFunctionPrefix.

Referenced by addAttributeAndParameterProperties().

◆ addIndexProperty()

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::addIndexProperty ( QtProperty *  prop)
protected

Add property showing function's index in the composite function.

Parameters
prop:: A function property
Returns
:: AProperty struct for added property. If all fields are NULL - property wasn't added because it is the top function

Definition at line 770 of file FunctionTreeView.cpp.

References addProperty(), index, isFunction(), MantidQt::MantidWidgets::FunctionTreeView::AProperty::item, m_indexManager, m_properties, MantidQt::MantidWidgets::FunctionTreeView::AProperty::parent, MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, and updateFunctionIndices().

Referenced by addAttributeAndParameterProperties().

◆ addMultiDomainIndexProperty()

void MantidQt::MantidWidgets::FunctionTreeView::addMultiDomainIndexProperty ( QtProperty *  prop)
protected

Adds an index property representing the function index of a specific domain within a MultiDomainFunction.

Adds a property showing the function index of a domain within a MultiDomainFunction.

It is used when we don't want to display an entire MultiDomainFunction, just a specific function within it.

Parameters
prop:: The property to add the function index on to.

Definition at line 756 of file FunctionTreeView.cpp.

References addProperty(), m_indexManager, and m_multiDomainFunctionPrefix.

Referenced by setFunction().

◆ addParameterProperty()

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::addParameterProperty ( QtProperty *  parent,
const QString &  paramName,
const QString &  paramDesc,
double  paramValue 
)
protected

Add a parameter property.

Parameters
parent:: Parent function property
paramName:: Parameter name
paramDesc:: Parameter description
paramValue:: Parameter value

Definition at line 401 of file FunctionTreeView.cpp.

References addProperty(), m_functionManager, m_multiDataset, and m_parameterManager.

Referenced by addAttributeAndParameterProperties().

◆ addParameterTie()

void MantidQt::MantidWidgets::FunctionTreeView::addParameterTie ( QtProperty *  property,
const Mantid::API::IFunction_sptr function,
const std::string &  parameterName,
const std::size_t &  parameterIndex,
const Mantid::API::CompositeFunction_sptr parentComposite = nullptr,
const std::size_t &  parentIndex = 0 
)
protected

Add tie to a parameter property.

Add a tie to a function property.

This will also work for ties across functions in a composite function.

If the tie is stored within the wider composite function, it will find this tie and apply it.

Parameters
property:: A function property.
function:: Shared pointer to the function.
parameterName:: The name of the parameter to be tied.
parameterIndex:: The index of the parameter within its function.
parentComposite:: If relevant, the composite the function is part of.
parentIndex:: If relevant, the index of the function within its composite.

Definition at line 687 of file FunctionTreeView.cpp.

References addParameterTieInComposite(), and addTieProperty().

Referenced by addAttributeAndParameterProperties().

◆ addParameterTieInComposite()

bool MantidQt::MantidWidgets::FunctionTreeView::addParameterTieInComposite ( QtProperty *  property,
const std::string &  parameterName,
const Mantid::API::CompositeFunction_sptr composite,
const std::size_t &  index 
)
protected

Add tie to a parameter property stored within a composite function.

Add a tie to a function property.

Used if a tie is stored within the wider composite function.

Parameters
property:: A function property.
parameterName:: The name of the parameter to be tied.
composite:: The composite function containing the tie.
index:: The index of the function within the composite function.
Returns
true if a tie was found, and a tie property was added.

Definition at line 711 of file FunctionTreeView.cpp.

References addTieProperty(), index, and std::to_string().

Referenced by addParameterTie().

◆ addProperty()

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::addProperty ( QtProperty *  parent,
QtProperty *  subproperty 
)
protected

◆ addTie

void MantidQt::MantidWidgets::FunctionTreeView::addTie ( )
protectedslot

Add a tie to a parameter.

Add a custom tie to currently selected parameter.

Definition at line 1709 of file FunctionTreeView.cpp.

References addTieProperty(), getParameterName(), isParameter(), m_browser, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().

Referenced by createActions().

◆ addTieProperty()

void MantidQt::MantidWidgets::FunctionTreeView::addTieProperty ( QtProperty *  prop,
const QString &  tie,
bool  globalTie = false 
)
protected

◆ attributeChanged

void MantidQt::MantidWidgets::FunctionTreeView::attributeChanged ( QtProperty *  prop)
protectedslot

Called when a function attribute property is changed.

Slot connected to all function attribute managers.

Update the corresponding function.

Parameters
prop:: An attribute property that was changed

Definition at line 1896 of file FunctionTreeView.cpp.

References MantidQt::MantidWidgets::IFunctionView::attributePropertyChanged(), MantidQt::MantidWidgets::IFunctionView::functionReplaced(), getAttributeName(), getFunction(), m_emitAttributeValueChange, m_properties, setFunction(), and updateFunctionIndices().

Referenced by attributeVectorDoubleChanged(), and createBrowser().

◆ attributeVectorDoubleChanged

void MantidQt::MantidWidgets::FunctionTreeView::attributeVectorDoubleChanged ( QtProperty *  prop)
protectedslot

Called when a member of a vector attribute is changed.

Slot connected to a property displaying the value of a member of a vector attribute.

Parameters
prop:: A property that was changed.

Definition at line 1964 of file FunctionTreeView.cpp.

References attributeChanged(), and m_properties.

Referenced by createBrowser().

◆ attributeVectorSizeChanged

void MantidQt::MantidWidgets::FunctionTreeView::attributeVectorSizeChanged ( QtProperty *  prop)
protectedslot

Called when the size of a vector attribute is changed.

Parameters
prop:: A property that was changed.

Definition at line 1929 of file FunctionTreeView.cpp.

References getFunction(), m_attributeSizeManager, m_properties, setFunction(), and updateFunctionIndices().

Referenced by createBrowser().

◆ clear()

void MantidQt::MantidWidgets::FunctionTreeView::clear ( )
overridevirtual

Clear the contents.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 282 of file FunctionTreeView.cpp.

References m_browser, and m_properties.

Referenced by setFunction().

◆ clearErrors()

void MantidQt::MantidWidgets::FunctionTreeView::clearErrors ( )
overridevirtual

Clear all errors.

Clear all errors, if they are set.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 2068 of file FunctionTreeView.cpp.

References m_parameterManager.

◆ constraintChanged

void MantidQt::MantidWidgets::FunctionTreeView::constraintChanged ( QtProperty *  prop)
protectedslot

◆ copyToClipboard

void MantidQt::MantidWidgets::FunctionTreeView::copyToClipboard ( )
protectedslot

Copy the function to the clipboard.

Copy function to the clipboard.

Definition at line 1755 of file FunctionTreeView.cpp.

References MantidQt::MantidWidgets::IFunctionView::copyToClipboardRequest().

Referenced by createActions().

◆ createActions()

void MantidQt::MantidWidgets::FunctionTreeView::createActions ( )
protected

◆ createBrowser()

void MantidQt::MantidWidgets::FunctionTreeView::createBrowser ( )
protected

◆ currentFunctionIndex()

boost::optional< QString > MantidQt::MantidWidgets::FunctionTreeView::currentFunctionIndex ( ) const
overridevirtual

Index of currently selected function.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 2070 of file FunctionTreeView.cpp.

References m_currentFunctionIndex.

◆ doubleEditorFactory()

DoubleDialogEditorFactory * MantidQt::MantidWidgets::FunctionTreeView::doubleEditorFactory ( )

Definition at line 2175 of file FunctionTreeView.cpp.

References m_doubleEditorFactory.

Referenced by createBrowser().

◆ fixParameter

void MantidQt::MantidWidgets::FunctionTreeView::fixParameter ( )
protectedslot

Fix a parameter.

Fix currently selected parameter.

Definition at line 1666 of file FunctionTreeView.cpp.

References addTieProperty(), getParameter(), getParameterName(), isParameter(), m_browser, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().

Referenced by createActions().

◆ getAttribute()

IFunction::Attribute MantidQt::MantidWidgets::FunctionTreeView::getAttribute ( const QString &  attrName) const
overridevirtual

◆ getAttributeName()

QString MantidQt::MantidWidgets::FunctionTreeView::getAttributeName ( QtProperty *  prop) const
protected

Get name of the attribute for a property.

Parameters
prop:: A property

Definition at line 951 of file FunctionTreeView.cpp.

References getIndex(), and isAttribute().

Referenced by attributeChanged().

◆ getAttributeProperty()

QtProperty * MantidQt::MantidWidgets::FunctionTreeView::getAttributeProperty ( const QString &  paramName) const
protected

Get a property for a parameter.

Get a property for an attribute.

Definition at line 1573 of file FunctionTreeView.cpp.

References getFunctionProperty(), index, isAttribute(), m_browser, and MantidQt::MantidWidgets::splitParameterName().

Referenced by getAttribute(), setBooleanAttribute(), setDoubleAttribute(), setIntAttribute(), and setStringAttribute().

◆ getConstraint()

QString MantidQt::MantidWidgets::FunctionTreeView::getConstraint ( const QString &  paramName,
const double &  lowerBound = Mantid::EMPTY_DBL(),
const double &  upperBound = Mantid::EMPTY_DBL() 
) const
protected

Get a constraint string.

Definition at line 1174 of file FunctionTreeView.cpp.

References Mantid::EMPTY_DBL().

Referenced by getFunction(), and getFunctionAndConstraint().

◆ getFullParameterName()

std::string MantidQt::MantidWidgets::FunctionTreeView::getFullParameterName ( const std::string &  parameter,
int  compositeIndex = -1 
) const
private

Gets the full parameter name when using the m_multiDomainFunctionPrefix.

Returns the full parameter name.

This will add the m_multiDomainFunctionPrefix to the start if we are using multiple datasets, and will add the composite index if it is within a composite.

Parameters
parameter:: The original parameter.
compositeIndex:: The index of the function within the composite that the parameter is in.
Returns
The full parameter name.

Definition at line 1031 of file FunctionTreeView.cpp.

References m_multiDomainFunctionPrefix, and std::to_string().

Referenced by addGlobalParameterTie().

◆ getFullTie()

QString MantidQt::MantidWidgets::FunctionTreeView::getFullTie ( const QString &  tie) const
private

Gets the full tie when using the m_multiDomainFunctionPrefix.

Returns the full tie to add as a Tie property.

This will add the m_multiDomainFunctionPrefix to the start if we are using multiple datasets.

Parameters
tie:: The original tie.
Returns
The full tie to use as a tie property.

Definition at line 1016 of file FunctionTreeView.cpp.

References MantidQt::MantidWidgets::isNumber(), and m_multiDomainFunctionPrefix.

Referenced by addTieProperty().

◆ getFunction()

Mantid::API::IFunction_sptr MantidQt::MantidWidgets::FunctionTreeView::getFunction ( QtProperty *  prop = nullptr,
bool  attributesOnly = false 
)

◆ getFunctionAndConstraint()

std::pair< QString, QString > MantidQt::MantidWidgets::FunctionTreeView::getFunctionAndConstraint ( QtProperty *  prop) const
protected

Get a pair of function index (eg f0.f2.) and constraint expression given a parameter property.

Definition at line 1873 of file FunctionTreeView.cpp.

References Mantid::EMPTY_DBL(), getConstraint(), getParameterName(), lower, m_constraintManager, MantidQt::MantidWidgets::splitParameterName(), and upper.

Referenced by constraintChanged(), and removeConstraint().

◆ getFunctionProperty() [1/2]

FunctionTreeView::AProperty MantidQt::MantidWidgets::FunctionTreeView::getFunctionProperty ( ) const
protected

◆ getFunctionProperty() [2/2]

QtProperty * MantidQt::MantidWidgets::FunctionTreeView::getFunctionProperty ( const QString &  index) const
protected

Get function property for the index.

Return function property for a function with given index.

Parameters
index:: Function index to search, or empty string for top-level function
Returns
Function property, or NULL if not found

Definition at line 964 of file FunctionTreeView.cpp.

References getIndex(), index, isFunction(), and m_properties.

◆ getGlobalParameters()

QStringList MantidQt::MantidWidgets::FunctionTreeView::getGlobalParameters ( ) const

Get a list of global parameters.

Definition at line 2108 of file FunctionTreeView.cpp.

References getParameterName(), and m_properties.

Referenced by addFunctionEnd(), globalChanged(), and removeFunction().

◆ getIndex()

QString MantidQt::MantidWidgets::FunctionTreeView::getIndex ( QtProperty *  prop) const
protected

Get the function index for a property.

Parameters
prop:: A property

Definition at line 916 of file FunctionTreeView.cpp.

References getIndex(), isFunction(), isIndex(), m_indexManager, and m_properties.

Referenced by getAttributeName(), getFunctionProperty(), getIndex(), getParameterName(), parameterButtonClicked(), removeFunction(), and updateCurrentFunctionIndex().

◆ getNumberOfConstraintProperties()

int MantidQt::MantidWidgets::FunctionTreeView::getNumberOfConstraintProperties ( ) const
inline

Definition at line 418 of file FunctionTreeView.h.

◆ getNumberOfQtProperties()

int MantidQt::MantidWidgets::FunctionTreeView::getNumberOfQtProperties ( ) const
inline

Definition at line 416 of file FunctionTreeView.h.

◆ getNumberOfTieProperties()

int MantidQt::MantidWidgets::FunctionTreeView::getNumberOfTieProperties ( ) const
inline

Definition at line 417 of file FunctionTreeView.h.

◆ getParameter() [1/2]

double MantidQt::MantidWidgets::FunctionTreeView::getParameter ( const QString &  paramName) const
overridevirtual

Get a value of a parameter.

Parameters
paramName:: Parameter name

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1531 of file FunctionTreeView.cpp.

References getParameterProperty(), and m_parameterManager.

Referenced by addConstraints(), addConstraints10(), addConstraints50(), fixParameter(), and getFunction().

◆ getParameter() [2/2]

double MantidQt::MantidWidgets::FunctionTreeView::getParameter ( QtProperty *  prop) const
protected

Get attribute as a string.

Get parameter value as a string.

Parameters
prop:: A parameter property

Definition at line 903 of file FunctionTreeView.cpp.

References m_parameterManager.

◆ getParameterName()

QString MantidQt::MantidWidgets::FunctionTreeView::getParameterName ( QtProperty *  prop) const
protected

◆ getParameterProperty()

QtProperty * MantidQt::MantidWidgets::FunctionTreeView::getParameterProperty ( const QString &  paramName) const
protected

Get a property for a parameter Get a property for a parameter.

Get a property for a parameter.

Definition at line 1556 of file FunctionTreeView.cpp.

References getFunctionProperty(), index, isParameter(), and MantidQt::MantidWidgets::splitParameterName().

Referenced by getParameter(), getParamWidget(), getVisualRectParameterProperty(), setParameter(), setParameterConstraint(), and setParameterTie().

◆ getParamWidget()

QWidget * MantidQt::MantidWidgets::FunctionTreeView::getParamWidget ( const QString &  paramName) const

Definition at line 2162 of file FunctionTreeView.cpp.

References getParameterProperty(), and getPropertyWidgetItem().

◆ getParentParameterProperty()

QtProperty * MantidQt::MantidWidgets::FunctionTreeView::getParentParameterProperty ( QtProperty *  prop) const
protected

Get a property for a parameter which is a parent of a given property (tie or constraint).

Definition at line 1596 of file FunctionTreeView.cpp.

References m_constraints, and m_ties.

Referenced by constraintChanged(), getParameterName(), and removeConstraint().

◆ getPropertyWidgetItem()

QTreeWidgetItem * MantidQt::MantidWidgets::FunctionTreeView::getPropertyWidgetItem ( QtProperty *  prop) const
private

Definition at line 2133 of file FunctionTreeView.cpp.

References m_browser, and m_properties.

Referenced by getParamWidget(), and visualItemRect().

◆ getSelectedFunction()

IFunction_sptr MantidQt::MantidWidgets::FunctionTreeView::getSelectedFunction ( )
overridevirtual

Get user selected function.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1857 of file FunctionTreeView.cpp.

References getFunction(), isFunction(), and m_browser.

◆ getTie()

QString MantidQt::MantidWidgets::FunctionTreeView::getTie ( QtProperty *  prop) const
protected

Get a tie for a paramater.

Get a tie for a parameter.

Parameters
prop:: A parameter property

Definition at line 1067 of file FunctionTreeView.cpp.

References m_tieManager.

Referenced by tieChanged().

◆ getTieProperty()

QtProperty * MantidQt::MantidWidgets::FunctionTreeView::getTieProperty ( QtProperty *  prop) const
protected

Get a tie property attached to a parameter property.

Definition at line 1679 of file FunctionTreeView.cpp.

Referenced by parameterPropertyChanged(), removeTie(), and setParameterTie().

◆ getVisualRectFunctionProperty()

QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectFunctionProperty ( const QString &  index) const

◆ getVisualRectParameterProperty()

QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectParameterProperty ( const QString &  paramName) const

◆ globalChanged

void MantidQt::MantidWidgets::FunctionTreeView::globalChanged ( QtProperty *  ,
const QString &  ,
bool   
)
protectedslot

Called when "Global" check-box was clicked.

Emit a signal when any of the Global options change.

Definition at line 2055 of file FunctionTreeView.cpp.

References getGlobalParameters(), and MantidQt::MantidWidgets::IFunctionView::globalsChanged().

Referenced by createBrowser().

◆ hasConstraint()

bool MantidQt::MantidWidgets::FunctionTreeView::hasConstraint ( QtProperty *  prop) const
protected

Check if a parameter property has a constraint.

Parameters
prop:: A parameter property.

Definition at line 1135 of file FunctionTreeView.cpp.

References hasLowerBound(), and hasUpperBound().

Referenced by setParameterConstraint().

◆ hasFunction()

bool MantidQt::MantidWidgets::FunctionTreeView::hasFunction ( ) const
overridevirtual

Check if a function is set.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 2016 of file FunctionTreeView.cpp.

References m_functionManager.

◆ hasLowerBound()

bool MantidQt::MantidWidgets::FunctionTreeView::hasLowerBound ( QtProperty *  prop) const
protected

Check if a parameter property has a lower bound.

Parameters
prop:: A parameter property.

Definition at line 1141 of file FunctionTreeView.cpp.

References isParameter(), and m_constraintManager.

Referenced by hasConstraint(), and popupMenu().

◆ hasTie()

bool MantidQt::MantidWidgets::FunctionTreeView::hasTie ( QtProperty *  prop) const
protected

Check if a parameter property has a tie.

Parameters
prop:: A parameter property

Definition at line 1043 of file FunctionTreeView.cpp.

Referenced by popupMenu().

◆ hasUpperBound()

bool MantidQt::MantidWidgets::FunctionTreeView::hasUpperBound ( QtProperty *  prop) const
protected

Check if a parameter property has a upper bound.

Parameters
prop:: A parameter property.

Definition at line 1159 of file FunctionTreeView.cpp.

References isParameter(), and m_constraintManager.

Referenced by hasConstraint(), and popupMenu().

◆ hideGlobals()

void MantidQt::MantidWidgets::FunctionTreeView::hideGlobals ( )

Show global column.

Definition at line 2027 of file FunctionTreeView.cpp.

References m_browser.

Referenced by MantidQt::MantidWidgets::FunctionMultiDomainPresenter::hideGlobals().

◆ isAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isAttribute ( QtProperty *  prop) const
protected

Check if property is a function attribute.

Parameters
prop:: Property to check

Definition at line 886 of file FunctionTreeView.cpp.

References isBoolAttribute(), isDoubleAttribute(), isIntAttribute(), isStringAttribute(), and isVectorAttribute().

Referenced by getAttributeName(), getAttributeProperty(), and getFunction().

◆ isBoolAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isBoolAttribute ( QtProperty *  prop) const
protected

Check if property is a bool attribute.

Check if property is a function bool attribute.

Parameters
prop:: Property to check

Definition at line 870 of file FunctionTreeView.cpp.

References m_attributeBoolManager.

Referenced by getAttribute(), and isAttribute().

◆ isConstraint()

bool MantidQt::MantidWidgets::FunctionTreeView::isConstraint ( QtProperty *  prop) const
protected

Check if a property is a constraint.

Parameters
prop:: Property to check.

Definition at line 1127 of file FunctionTreeView.cpp.

References m_constraintManager.

Referenced by popupMenu(), removeConstraint(), removeConstraintsQuiet(), and removeProperty().

◆ isDoubleAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isDoubleAttribute ( QtProperty *  prop) const
protected

Check if property is a double attribute.

Check if property is a function attribute.

Parameters
prop:: Property to check

Definition at line 854 of file FunctionTreeView.cpp.

References m_attributeDoubleManager.

Referenced by getAttribute(), and isAttribute().

◆ isFunction()

bool MantidQt::MantidWidgets::FunctionTreeView::isFunction ( QtProperty *  prop) const
protected

Check if property is a function group.

Parameters
prop:: Property to check

Definition at line 835 of file FunctionTreeView.cpp.

References m_functionManager.

Referenced by addFunctionBegin(), addIndexProperty(), getFunction(), getFunctionProperty(), getIndex(), getSelectedFunction(), popupMenu(), removeFunction(), removeProperty(), and updateFunctionIndices().

◆ isIndex()

bool MantidQt::MantidWidgets::FunctionTreeView::isIndex ( QtProperty *  prop) const
protected

Check if a property is an index.

Parameters
prop:: A property

Definition at line 908 of file FunctionTreeView.cpp.

References m_indexManager.

Referenced by getIndex(), and updateFunctionIndices().

◆ isIntAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isIntAttribute ( QtProperty *  prop) const
protected

Check if property is a int attribute.

Check if property is a function attribute.

Parameters
prop:: Property to check

Definition at line 862 of file FunctionTreeView.cpp.

References m_attributeIntManager.

Referenced by getAttribute(), and isAttribute().

◆ isParameter()

bool MantidQt::MantidWidgets::FunctionTreeView::isParameter ( QtProperty *  prop) const
protected

Check if property is a function paramater.

Check if property is a function parameter.

Parameters
prop:: Property to check

Definition at line 895 of file FunctionTreeView.cpp.

References m_parameterManager.

Referenced by addConstraintProperties(), addConstraints(), addConstraints10(), addConstraints50(), addTie(), addTieProperty(), fixParameter(), getFunction(), getParameterName(), getParameterProperty(), hasLowerBound(), hasUpperBound(), popupMenu(), removeConstraints(), removeTie(), and setParameterError().

◆ isStringAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isStringAttribute ( QtProperty *  prop) const
protected

Check if property is a string attribute.

Check if property is any of the string attributes.

Parameters
prop:: Property to check

Definition at line 843 of file FunctionTreeView.cpp.

References m_attributeStringManager, m_filenameManager, m_formulaManager, and m_workspaceManager.

Referenced by getAttribute(), and isAttribute().

◆ isTie()

bool MantidQt::MantidWidgets::FunctionTreeView::isTie ( QtProperty *  prop) const
protected

Check if a property is a tie.

Parameters
prop:: A property

Definition at line 1059 of file FunctionTreeView.cpp.

References m_tieManager.

Referenced by removeProperty().

◆ isVectorAttribute()

bool MantidQt::MantidWidgets::FunctionTreeView::isVectorAttribute ( QtProperty *  prop) const
protected

Check if property is a vector attribute.

Check if property is a function vector attribute.

Parameters
prop:: Property to check

Definition at line 878 of file FunctionTreeView.cpp.

References m_attributeVectorManager.

Referenced by getAttribute(), and isAttribute().

◆ parameterButtonClicked

void MantidQt::MantidWidgets::FunctionTreeView::parameterButtonClicked ( QtProperty *  prop)
protectedslot

Called when button in local parameter editor was clicked.

Definition at line 2012 of file FunctionTreeView.cpp.

References getIndex(), and MantidQt::MantidWidgets::IFunctionView::localParameterButtonClicked().

Referenced by createBrowser().

◆ parameterPropertyChanged

void MantidQt::MantidWidgets::FunctionTreeView::parameterPropertyChanged ( QtProperty *  prop)
protectedslot

◆ pasteFromClipboard

void MantidQt::MantidWidgets::FunctionTreeView::pasteFromClipboard ( )
protectedslot

◆ popupMenu

void MantidQt::MantidWidgets::FunctionTreeView::popupMenu ( const QPoint &  )
protectedslot

◆ removeConstraint

void MantidQt::MantidWidgets::FunctionTreeView::removeConstraint ( )
protectedslot

◆ removeConstraints

void MantidQt::MantidWidgets::FunctionTreeView::removeConstraints ( )
protectedslot

Remove both constraints from current parameter.

Definition at line 1823 of file FunctionTreeView.cpp.

References getParameterName(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintRemoved(), and removeConstraintsQuiet().

Referenced by createActions().

◆ removeConstraintsQuiet()

void MantidQt::MantidWidgets::FunctionTreeView::removeConstraintsQuiet ( QtProperty *  paramProp)
protected

Definition at line 1811 of file FunctionTreeView.cpp.

References isConstraint(), and removeProperty().

Referenced by removeConstraints(), and setParameterConstraint().

◆ removeFunction

void MantidQt::MantidWidgets::FunctionTreeView::removeFunction ( )
protectedslot

◆ removeProperty()

void MantidQt::MantidWidgets::FunctionTreeView::removeProperty ( QtProperty *  prop)
protected

◆ removeTie

void MantidQt::MantidWidgets::FunctionTreeView::removeTie ( )
protectedslot

Unfix a parameter.

Unfix currently selected parameter.

Definition at line 1692 of file FunctionTreeView.cpp.

References getParameterName(), getTieProperty(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterTieChanged(), and removeProperty().

Referenced by createActions().

◆ setAttributeToFunction

void MantidQt::MantidWidgets::FunctionTreeView::setAttributeToFunction ( Mantid::API::IFunction fun,
QtProperty *  prop 
)
protectedslot

Set value of an attribute (as a property) to a function.

Parameters
fun:: Function to which attribute is set.
prop:: A property with the name and value of the attribute.

Definition at line 1334 of file FunctionTreeView.cpp.

References Mantid::API::IFunction::Attribute::apply(), Mantid::API::IFunction::getAttribute(), and Mantid::API::IFunction::setAttribute().

Referenced by getFunction().

◆ setBooleanAttribute()

void MantidQt::MantidWidgets::FunctionTreeView::setBooleanAttribute ( const QString &  attrName,
bool  value 
)
overrideprivatevirtual

Updates the value of a boolean attribute.

Parameters
attrName:: Attribute name
value:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1509 of file FunctionTreeView.cpp.

References getAttributeProperty(), m_attributeBoolManager, m_emitAttributeValueChange, and value.

◆ setColumnSizes()

void MantidQt::MantidWidgets::FunctionTreeView::setColumnSizes ( int  s0,
int  s1,
int  s2 = -1 
)

Resize the browser's columns.

Parameters
s0:: New size for the first column (Parameter).
s1:: New size for the second column (Value).
s2:: New size for the third optional column (Global).

Definition at line 2022 of file FunctionTreeView.cpp.

References m_browser.

Referenced by MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setColumnSizes().

◆ setDoubleAttribute()

void MantidQt::MantidWidgets::FunctionTreeView::setDoubleAttribute ( const QString &  attrName,
double  value 
)
overrideprivatevirtual

Update a double attribute.

Updates the value of a double attribute.

Parameters
attrName:: Attribute name
value:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1468 of file FunctionTreeView.cpp.

References getAttributeProperty(), m_attributeDoubleManager, m_emitAttributeValueChange, and value.

◆ setErrorsEnabled()

void MantidQt::MantidWidgets::FunctionTreeView::setErrorsEnabled ( bool  enabled)
overridevirtual

Set error display on/off.

Set display of parameter errors on/off.

Parameters
enabled:: [input] On/off display of errors

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 2063 of file FunctionTreeView.cpp.

References m_parameterManager.

Referenced by createActions(), and parameterPropertyChanged().

◆ setFunction() [1/2]

void MantidQt::MantidWidgets::FunctionTreeView::setFunction ( Mantid::API::IFunction_sptr  fun)
overridevirtual

Set the function in the browser.

Parameters
fun:: A function

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 291 of file FunctionTreeView.cpp.

References addFunction(), and clear().

Referenced by addFunction(), addFunctionEnd(), attributeChanged(), attributeVectorSizeChanged(), pasteFromClipboard(), and removeFunction().

◆ setFunction() [2/2]

void MantidQt::MantidWidgets::FunctionTreeView::setFunction ( QtProperty *  prop,
const Mantid::API::IFunction_sptr fun 
)
protected

Set a function.

Parameters
prop:: Property of the function or NULL
fun:: A function

Definition at line 425 of file FunctionTreeView.cpp.

References addAttributeAndParameterProperties(), addMultiDomainIndexProperty(), m_multiDomainFunctionPrefix, and removeProperty().

◆ setGlobalParameters()

void MantidQt::MantidWidgets::FunctionTreeView::setGlobalParameters ( const QStringList &  globals)
overridevirtual

Set new global parameters.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 2119 of file FunctionTreeView.cpp.

References getParameterName(), and m_properties.

Referenced by addFunctionEnd(), and removeFunction().

◆ setGlobalTies()

void MantidQt::MantidWidgets::FunctionTreeView::setGlobalTies ( std::vector< GlobalTie > const &  globalTies)

The global ties within a multi-domain function.

It is used when we don't want to display an entire MultiDomainFunction, and so we have to store the GlobalTies manually in this vector.

Parameters
globalTies:: A vector of global ties to be displayed within the function tree.

Definition at line 2050 of file FunctionTreeView.cpp.

References m_globalTies.

◆ setIntAttribute()

void MantidQt::MantidWidgets::FunctionTreeView::setIntAttribute ( const QString &  attrName,
int  value 
)
overrideprivatevirtual

Updates the value of a integer attribute.

Parameters
attrName:: Attribute name
value:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1478 of file FunctionTreeView.cpp.

References getAttributeProperty(), m_attributeIntManager, m_emitAttributeValueChange, and value.

◆ setMultiDomainFunctionPrefix()

void MantidQt::MantidWidgets::FunctionTreeView::setMultiDomainFunctionPrefix ( const QString &  functionPrefix)

The function index displayed as a multi-domain function index at the top of the FunctionTreeView.

It is used as an offset for the other function prefixes. It is used when we don't want to display an entire MultiDomainFunction, just a specific function within it.

Parameters
functionPrefix:: The function prefix of the domain currently being displayed in the FunctionTreeView.

Definition at line 2039 of file FunctionTreeView.cpp.

References m_multiDomainFunctionPrefix.

◆ setParameter()

void MantidQt::MantidWidgets::FunctionTreeView::setParameter ( const QString &  paramName,
double  value 
)
overridevirtual

Update the function parameter value.

Updates the function parameter value.

Parameters
paramName:: Parameter name
value:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1439 of file FunctionTreeView.cpp.

References getParameterProperty(), m_emitParameterValueChange, m_parameterManager, and value.

◆ setParameterConstraint()

void MantidQt::MantidWidgets::FunctionTreeView::setParameterConstraint ( const QString &  paramName,
const QString &  constraint 
)
overridevirtual

◆ setParameterError()

void MantidQt::MantidWidgets::FunctionTreeView::setParameterError ( const QString &  paramName,
double  error 
)
overridevirtual

Update the function parameter error.

Updates the function parameter error.

Parameters
paramName:: Parameter name
error:: New error

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1450 of file FunctionTreeView.cpp.

References error, getFunctionProperty(), index, isParameter(), m_parameterManager, and MantidQt::MantidWidgets::splitParameterName().

◆ setParameterTie()

void MantidQt::MantidWidgets::FunctionTreeView::setParameterTie ( const QString &  paramName,
const QString &  tie 
)
overridevirtual

◆ setStretchLastColumn()

void MantidQt::MantidWidgets::FunctionTreeView::setStretchLastColumn ( bool  stretch)

Set the last column to stretch.

Definition at line 2024 of file FunctionTreeView.cpp.

References m_browser.

◆ setStringAttribute()

void MantidQt::MantidWidgets::FunctionTreeView::setStringAttribute ( const QString &  attrName,
std::string &  valueAsStdStr 
)
overrideprivatevirtual

Updates the value of a string attribute.

Parameters
attrName:: Attribute name
valueAsStdStr:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1488 of file FunctionTreeView.cpp.

References getAttributeProperty(), m_attributeStringManager, m_emitAttributeValueChange, m_filenameManager, m_formulaManager, m_workspaceManager, and value.

◆ setVectorAttribute()

void MantidQt::MantidWidgets::FunctionTreeView::setVectorAttribute ( const QString &  attrName,
std::vector< double > &  value 
)
overrideprivatevirtual

Updates the value of a vector attribute NOTE: This is currently not implemented as there is no need for it as the use of vector attributes is limited to tabulated functions (e.g resolution) which create their attributes 'on-the-fly' when the fit is performed.

Parameters
attrName:: Attribute name
value:: New value

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1523 of file FunctionTreeView.cpp.

References UNUSED_ARG, and value.

◆ showFunctionHelp()

void MantidQt::MantidWidgets::FunctionTreeView::showFunctionHelp ( const QString &  functionName) const
overridevirtual

Show function help page for input functionName.

Implements MantidQt::MantidWidgets::IFunctionView.

Definition at line 1869 of file FunctionTreeView.cpp.

References MantidQt::API::InterfaceManager::showFitFunctionHelp().

◆ showGlobals()

void MantidQt::MantidWidgets::FunctionTreeView::showGlobals ( )

◆ tieChanged

void MantidQt::MantidWidgets::FunctionTreeView::tieChanged ( QtProperty *  prop)
protectedslot

Called when a tie property changes.

Definition at line 1987 of file FunctionTreeView.cpp.

References getParameterName(), getTie(), m_ties, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().

Referenced by createBrowser().

◆ treeBrowser()

QtTreePropertyBrowser * MantidQt::MantidWidgets::FunctionTreeView::treeBrowser ( )

Definition at line 2173 of file FunctionTreeView.cpp.

References m_browser.

◆ treeWidget()

QTreeWidget * MantidQt::MantidWidgets::FunctionTreeView::treeWidget ( ) const

Definition at line 2171 of file FunctionTreeView.cpp.

References m_browser.

◆ updateCurrentFunctionIndex

void MantidQt::MantidWidgets::FunctionTreeView::updateCurrentFunctionIndex ( )
protectedslot

Update index of currently selected function.

Definition at line 2072 of file FunctionTreeView.cpp.

References MantidQt::MantidWidgets::IFunctionView::currentFunctionChanged(), getIndex(), m_browser, and m_currentFunctionIndex.

Referenced by createBrowser().

◆ updateFunctionIndices()

void MantidQt::MantidWidgets::FunctionTreeView::updateFunctionIndices ( QtProperty *  prop = nullptr,
const QString &  index = "" 
)
protected

Update function index properties.

Parameters
prop:: A function property
index:: The parent function's index

Definition at line 796 of file FunctionTreeView.cpp.

References index, isFunction(), isIndex(), m_browser, m_indexManager, m_multiDomainFunctionPrefix, top, and updateFunctionIndices().

Referenced by addFunction(), addIndexProperty(), attributeChanged(), attributeVectorSizeChanged(), removeFunction(), and updateFunctionIndices().

◆ visualItemRect()

QRect MantidQt::MantidWidgets::FunctionTreeView::visualItemRect ( QtProperty *  prop) const
private

Friends And Related Function Documentation

◆ CreateAttributePropertyForFunctionTreeView

Definition at line 394 of file FunctionTreeView.h.

◆ SetAttributeFromProperty

friend class SetAttributeFromProperty
friend

Definition at line 395 of file FunctionTreeView.h.

Member Data Documentation

◆ m_actionAddFunction

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionAddFunction
protected

Add a function.

Definition at line 352 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionAddTie

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionAddTie
protected

Add a custom tie to a parameter.

Definition at line 360 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionConstraints

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionConstraints
protected

Add both constraints to current parameter.

Definition at line 370 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionConstraints10

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionConstraints10
protected

Add both constraints to current parameter with 10% spread.

Definition at line 366 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionConstraints50

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionConstraints50
protected

Add both constraints to current parameter with 50% spread.

Definition at line 368 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionFixParameter

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionFixParameter
protected

Fix a parameter.

Definition at line 356 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionFromClipboard

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionFromClipboard
protected

Copy a function from the clipboard.

Definition at line 362 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionFunctionHelp

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionFunctionHelp
protected

Show function help menu.

Definition at line 376 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionRemoveConstraint

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionRemoveConstraint
protected

Remove one constraints from current parameter.

Definition at line 374 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionRemoveConstraints

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionRemoveConstraints
protected

Remove both constraints from current parameter.

Definition at line 372 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionRemoveFunction

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionRemoveFunction
protected

Remove a function.

Definition at line 354 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionRemoveTie

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionRemoveTie
protected

Unfix a parameter.

Definition at line 358 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_actionToClipboard

QAction* MantidQt::MantidWidgets::FunctionTreeView::m_actionToClipboard
protected

Copy a function to the clipboard.

Definition at line 364 of file FunctionTreeView.h.

Referenced by createActions(), and popupMenu().

◆ m_allowedCategories

std::vector<std::string> MantidQt::MantidWidgets::FunctionTreeView::m_allowedCategories
protected

Definition at line 388 of file FunctionTreeView.h.

Referenced by addFunctionBegin().

◆ m_attributeBoolManager

QtBoolPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeBoolManager
protected

◆ m_attributeDoubleManager

QtDoublePropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeDoubleManager
protected

◆ m_attributeIntManager

QtIntPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeIntManager
protected

◆ m_attributeSizeManager

QtIntPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeSizeManager
protected

◆ m_attributeStringManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeStringManager
protected

◆ m_attributeVectorDoubleManager

QtDoublePropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeVectorDoubleManager
protected

◆ m_attributeVectorManager

QtGroupPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_attributeVectorManager
protected

Manager for vector attribute properties.

Definition at line 334 of file FunctionTreeView.h.

Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), createBrowser(), and isVectorAttribute().

◆ m_browser

QtTreePropertyBrowser* MantidQt::MantidWidgets::FunctionTreeView::m_browser
protected

◆ m_constraintManager

QtDoublePropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_constraintManager
protected

Manager for parameter constraint properties.

Definition at line 326 of file FunctionTreeView.h.

Referenced by addConstraintProperties(), createBrowser(), getFunction(), getFunctionAndConstraint(), hasLowerBound(), hasUpperBound(), isConstraint(), and ~FunctionTreeView().

◆ m_constraints

QMultiMap<QtProperty *, AConstraint> MantidQt::MantidWidgets::FunctionTreeView::m_constraints
protected

Store parameter constraints. Keys are function properties.

Definition at line 347 of file FunctionTreeView.h.

Referenced by addConstraintProperties(), constraintChanged(), getFunction(), getParentParameterProperty(), and removeProperty().

◆ m_currentFunctionIndex

boost::optional<QString> MantidQt::MantidWidgets::FunctionTreeView::m_currentFunctionIndex
protected

Index of currently selected function.

Gets updated in updateCurrentFunctionIndex()

Definition at line 379 of file FunctionTreeView.h.

Referenced by currentFunctionIndex(), and updateCurrentFunctionIndex().

◆ m_doubleEditorFactory

DoubleDialogEditorFactory* MantidQt::MantidWidgets::FunctionTreeView::m_doubleEditorFactory
protected

Editor used for editing doubles.

Definition at line 308 of file FunctionTreeView.h.

Referenced by createBrowser(), and doubleEditorFactory().

◆ m_emitAttributeValueChange

bool MantidQt::MantidWidgets::FunctionTreeView::m_emitAttributeValueChange = true
protected

◆ m_emitParameterValueChange

bool MantidQt::MantidWidgets::FunctionTreeView::m_emitParameterValueChange = true
protected

Definition at line 391 of file FunctionTreeView.h.

Referenced by parameterPropertyChanged(), and setParameter().

◆ m_filenameManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_filenameManager
protected

◆ m_formulaManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_formulaManager
protected

◆ m_functionManager

QtGroupPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_functionManager
protected

◆ m_globalTies

std::vector<GlobalTie> MantidQt::MantidWidgets::FunctionTreeView::m_globalTies
protected

Definition at line 387 of file FunctionTreeView.h.

Referenced by addGlobalParameterTie(), and setGlobalTies().

◆ m_indexManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_indexManager
protected

Manager for function index properties.

Definition at line 322 of file FunctionTreeView.h.

Referenced by addIndexProperty(), addMultiDomainIndexProperty(), createBrowser(), getIndex(), isIndex(), updateFunctionIndices(), and ~FunctionTreeView().

◆ m_multiDataset

bool MantidQt::MantidWidgets::FunctionTreeView::m_multiDataset
protected

Set true if the constructed function is intended to be used in a multi-dataset fit.

Definition at line 382 of file FunctionTreeView.h.

Referenced by addParameterProperty(), and createBrowser().

◆ m_multiDomainFunctionPrefix

QString MantidQt::MantidWidgets::FunctionTreeView::m_multiDomainFunctionPrefix
protected

The function prefix of the domain with a MultiDomainFunction currently being displayed.

Definition at line 385 of file FunctionTreeView.h.

Referenced by addFunctionEnd(), addGlobalParameterTie(), addMultiDomainIndexProperty(), getFullParameterName(), getFullTie(), removeFunction(), setFunction(), setMultiDomainFunctionPrefix(), and updateFunctionIndices().

◆ m_parameterManager

ParameterPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_parameterManager
protected

◆ m_properties

QMap<QtProperty *, AProperty> MantidQt::MantidWidgets::FunctionTreeView::m_properties
protected

◆ m_selectedFunctionProperty

QtProperty* MantidQt::MantidWidgets::FunctionTreeView::m_selectedFunctionProperty
protected

Definition at line 390 of file FunctionTreeView.h.

Referenced by addFunctionBegin(), and addFunctionEnd().

◆ m_selectFunctionDialog

SelectFunctionDialog* MantidQt::MantidWidgets::FunctionTreeView::m_selectFunctionDialog
protected

Definition at line 389 of file FunctionTreeView.h.

Referenced by addFunctionBegin(), and addFunctionEnd().

◆ m_tieManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_tieManager
protected

Manager for function tie properties.

Definition at line 324 of file FunctionTreeView.h.

Referenced by addTieProperty(), createBrowser(), getFunction(), getTie(), isTie(), parameterPropertyChanged(), setParameterTie(), and ~FunctionTreeView().

◆ m_ties

QMultiMap<QtProperty *, ATie> MantidQt::MantidWidgets::FunctionTreeView::m_ties
protected

Store parameter ties. Keys are function properties.

Definition at line 345 of file FunctionTreeView.h.

Referenced by addTieProperty(), getFunction(), getParentParameterProperty(), removeProperty(), and tieChanged().

◆ m_workspaceManager

QtStringPropertyManager* MantidQt::MantidWidgets::FunctionTreeView::m_workspaceManager
protected

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