|
Mantid
|
Class FitPropertyBrowser implements QtPropertyBrowser to display and control fitting function parameters and settings. More...
#include <FunctionTreeView.h>
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. | |
| void | clearErrors () override |
| Clear all errors. | |
| std::optional< std::string > | currentFunctionIndex () const override |
| Index of currently selected function. | |
| DoubleDialogEditorFactory * | doubleEditorFactory () |
| FunctionTreeView (QWidget *parent, bool multi, std::vector< std::string > categories=std::vector< std::string >()) | |
| Constructor. | |
| IFunction::Attribute | getAttribute (std::string const &attrName) const override |
| Get a value of a attribute. | |
| Mantid::API::IFunction_sptr | getFunction (QtProperty *prop=nullptr, bool attributesOnly=false) |
| Return the function. | |
| std::vector< std::string > | getGlobalParameters () const |
| Get a list of global parameters. | |
| int | getNumberOfConstraintProperties () const |
| int | getNumberOfQtProperties () const |
| int | getNumberOfTieProperties () const |
| double | getParameter (std::string const ¶meterName) const override |
| Get a value of a parameter. | |
| QWidget * | getParamWidget (std::string const ¶meterName) const |
| IFunction_sptr | getSelectedFunction () override |
| Get user selected function. | |
| QRect | getVisualRectFunctionProperty (std::string const &index) const |
| QRect | getVisualRectParameterProperty (std::string const &index) const |
| bool | hasFunction () const override |
| Check if a function is set. | |
| void | hideGlobals () |
| Show global column. | |
| void | setColumnSizes (int s0, int s1, int s2=-1) |
| Resize the browser's columns. | |
| void | setErrorsEnabled (bool enabled) override |
| Set error display on/off. | |
| void | setFunction (Mantid::API::IFunction_sptr fun) override |
| Set the function in the browser. | |
| void | setGlobalParameters (const std::vector< std::string > &) override |
| Set new global parameters. | |
| void | setGlobalTies (std::vector< GlobalTie > const &globalTies) |
| The global ties within a multi-domain function. | |
| void | setMultiDomainFunctionPrefix (std::string const &functionPrefix) |
| The function index displayed as a multi-domain function index at the top of the FunctionTreeView. | |
| void | setParameter (std::string const ¶meterName, double value) override |
| Update the function parameter value. | |
| void | setParameterConstraint (std::string const ¶meterName, std::string const &constraint) override |
| Set a constraint. | |
| void | setParameterError (std::string const ¶meterName, double error) override |
| Update the function parameter error. | |
| void | setParameterTie (std::string const ¶meterName, std::string const &tie) override |
| Set a tie. | |
| void | setStretchLastColumn (bool stretch) |
| Set the last column to stretch. | |
| void | showFunctionHelp (std::string const &functionName) const override |
| Show function help page for input functionName. | |
| void | showGlobals () |
| QtTreePropertyBrowser * | treeBrowser () |
| QTreeWidget * | treeWidget () const |
| ~FunctionTreeView () override | |
| Destructor. | |
Public Member Functions inherited from MantidQt::MantidWidgets::IFunctionView | |
| IFunctionView (QWidget *parent=nullptr) | |
| template<typename T > | |
| void | setAttributeValue (std::string const &attributeName, T &value) |
| virtual | ~IFunctionView ()=default |
Protected Slots | |
| void | addConstraints () |
| Add both constraints to current parameter. | |
| void | addConstraints10 () |
| Add both constraints to current parameter. | |
| void | addConstraints50 () |
| Add both constraints to current parameter. | |
| void | addFunctionBegin () |
| Add a function. | |
| void | addFunctionEnd (int result) |
| void | addTie () |
| Add a tie to a parameter. | |
| void | attributeChanged (QtProperty *) |
| Called when a function attribute property is changed. | |
| void | attributeVectorDoubleChanged (QtProperty *) |
| Called when a member of a vector attribute is changed. | |
| void | attributeVectorSizeChanged (QtProperty *) |
| Called when the size of a vector attribute is changed. | |
| void | constraintChanged (QtProperty *) |
| Called when a constraint property changes. | |
| void | copyToClipboard () |
| Copy the function to the clipboard. | |
| void | fixParameter () |
| Fix a parameter. | |
| void | globalChanged (QtProperty *, const QString &, bool) |
| Called when "Global" check-box was clicked. | |
| void | parameterButtonClicked (QtProperty *) |
| Called when button in local parameter editor was clicked. | |
| void | parameterPropertyChanged (QtProperty *) |
| Called when a function parameter property is changed. | |
| void | pasteFromClipboard () |
| Copy function from the clipboard. | |
| void | popupMenu (const QPoint &) |
| Show the context menu. | |
| void | removeConstraint () |
| Remove one of the constraints. | |
| void | removeConstraints () |
| Remove both constraints from current parameter. | |
| void | removeFunction () |
| Remove a function. | |
| void | removeTie () |
| Unfix a parameter. | |
| void | setAttributeToFunction (Mantid::API::IFunction &fun, QtProperty *prop) |
| Set value of an attribute (as a property) to a function. | |
| void | tieChanged (QtProperty *) |
| Called when a tie property changes. | |
| void | updateCurrentFunctionIndex () |
| Update index of currently selected function. | |
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. | |
| AProperty | addAttributeProperty (QtProperty *parent, std::string const &attName, const Mantid::API::IFunction::Attribute &att) |
| Add a attribute property. | |
| QList< AProperty > | addConstraintProperties (QtProperty *prop, std::string const &constraint) |
| Add a constraint property. | |
| bool | addFunction (QtProperty *prop, const Mantid::API::IFunction_sptr &fun) |
| Add a function. | |
| AProperty | addFunctionProperty (QtProperty *parent, std::string const &funName) |
| Add a function property. | |
| void | addGlobalParameterTie (QtProperty *property, const std::string ¶meterName, const CompositeFunction_sptr &parentComposite=nullptr, const std::size_t &parentIndex=0) |
| Adds a global tie for a parameter if one exists. | |
| AProperty | addIndexProperty (QtProperty *prop) |
| Add property showing function's index in the composite function. | |
| void | addMultiDomainIndexProperty (QtProperty *prop) |
| Adds an index property representing the function index of a specific domain within a MultiDomainFunction. | |
| AProperty | addParameterProperty (QtProperty *parent, std::string const ¶meterName, std::string const ¶mDesc, double paramValue) |
| Add a parameter property. | |
| void | addParameterTie (QtProperty *property, const Mantid::API::IFunction_sptr &function, const std::string ¶meterName, const std::size_t ¶meterIndex, const Mantid::API::CompositeFunction_sptr &parentComposite=nullptr, const std::size_t &parentIndex=0) |
| Add tie to a parameter property. | |
| bool | addParameterTieInComposite (QtProperty *property, const std::string ¶meterName, const Mantid::API::CompositeFunction_sptr &composite, const std::size_t &index) |
| Add tie to a parameter property stored within a composite function. | |
| AProperty | addProperty (QtProperty *parent, QtProperty *subproperty) |
| Add a sub-property. | |
| void | addTieProperty (QtProperty *prop, std::string const &tie, bool globalTie=false) |
| Add a tie property. | |
| void | createActions () |
| Create and connect actions. | |
| void | createBrowser () |
| Create the Qt property browser. | |
| std::string | getAttributeName (QtProperty *prop) const |
| Get name of the attribute for a property. | |
| QtProperty * | getAttributeProperty (std::string const ¶meterName) const |
| Get a property for a parameter. | |
| std::string | getConstraint (std::string const ¶meterName, const double &lowerBound=Mantid::EMPTY_DBL(), const double &upperBound=Mantid::EMPTY_DBL()) const |
| Get a constraint string. | |
| std::pair< std::string, std::string > | getFunctionAndConstraint (QtProperty *prop) const |
| Get a pair of function index (eg f0.f2.) and constraint expression given a parameter property. | |
| AProperty | getFunctionProperty () const |
| Get property of the overall function. | |
| QtProperty * | getFunctionProperty (std::string const &index) const |
| Get function property for the index. | |
| std::string | getIndex (QtProperty *prop) const |
| Get the function index for a property. | |
| double | getParameter (QtProperty *prop) const |
| Get attribute as a string. | |
| std::string | getParameterName (QtProperty *prop) const |
| Get name of the parameter for a property. | |
| QtProperty * | getParameterProperty (std::string const ¶meterName) const |
| Get a property for a parameter Get a property for a parameter. | |
| QtProperty * | getParentParameterProperty (QtProperty *prop) const |
| Get a property for a parameter which is a parent of a given property (tie or constraint). | |
| QString | getTie (QtProperty *prop) const |
| Get a tie for a paramater. | |
| QtProperty * | getTieProperty (QtProperty *prop) const |
| Get a tie property attached to a parameter property. | |
| bool | hasConstraint (QtProperty *prop) const |
| Check if a parameter property has a constraint. | |
| bool | hasLowerBound (QtProperty *prop) const |
| Check if a parameter property has a lower bound. | |
| bool | hasTie (QtProperty *prop) const |
| Check if a parameter property has a tie. | |
| bool | hasUpperBound (QtProperty *prop) const |
| Check if a parameter property has a upper bound. | |
| bool | isAttribute (QtProperty *prop) const |
| Check if property is a function attribute. | |
| bool | isBoolAttribute (QtProperty *prop) const |
| Check if property is a bool attribute. | |
| bool | isConstraint (QtProperty *prop) const |
| Check if a property is a constraint. | |
| bool | isDoubleAttribute (QtProperty *prop) const |
| Check if property is a double attribute. | |
| bool | isFunction (QtProperty *prop) const |
| Check if property is a function group. | |
| bool | isIndex (QtProperty *prop) const |
| Check if a property is an index. | |
| bool | isIntAttribute (QtProperty *prop) const |
| Check if property is a int attribute. | |
| bool | isParameter (QtProperty *prop) const |
| Check if property is a function paramater. | |
| bool | isStringAttribute (QtProperty *prop) const |
| Check if property is a string attribute. | |
| bool | isTie (QtProperty *prop) const |
| Check if a property is a tie. | |
| bool | isVectorAttribute (QtProperty *prop) const |
| Check if property is a vector attribute. | |
| void | removeConstraintsQuiet (QtProperty *paramProp) |
| void | removeProperty (QtProperty *prop) |
| Remove and delete property. | |
| void | setFunction (QtProperty *prop, const Mantid::API::IFunction_sptr &fun) |
| Set a function. | |
| void | updateFunctionIndices (QtProperty *prop=nullptr, std::string const &index="") |
| Update function index properties. | |
Protected Attributes | |
| QAction * | m_actionAddFunction |
| Add a function. | |
| QAction * | m_actionAddTie |
| Add a custom tie to a parameter. | |
| QAction * | m_actionConstraints |
| Add both constraints to current parameter. | |
| QAction * | m_actionConstraints10 |
| Add both constraints to current parameter with 10% spread. | |
| QAction * | m_actionConstraints50 |
| Add both constraints to current parameter with 50% spread. | |
| QAction * | m_actionFixParameter |
| Fix a parameter. | |
| QAction * | m_actionFromClipboard |
| Copy a function from the clipboard. | |
| QAction * | m_actionFunctionHelp |
| Show function help menu. | |
| QAction * | m_actionRemoveConstraint |
| Remove one constraints from current parameter. | |
| QAction * | m_actionRemoveConstraints |
| Remove both constraints from current parameter. | |
| QAction * | m_actionRemoveFunction |
| Remove a function. | |
| QAction * | m_actionRemoveTie |
| Unfix a parameter. | |
| QAction * | m_actionToClipboard |
| Copy a function to the clipboard. | |
| std::vector< std::string > | m_allowedCategories |
| QtBoolPropertyManager * | m_attributeBoolManager |
| Manager for function bool attribute properties. | |
| QtDoublePropertyManager * | m_attributeDoubleManager |
| Manager for function double attribute properties. | |
| QtIntPropertyManager * | m_attributeIntManager |
| Manager for function int attribute properties. | |
| QtIntPropertyManager * | m_attributeSizeManager |
| Manager for vector attribute size properties. | |
| QtStringPropertyManager * | m_attributeStringManager |
| Manager for function string attribute properties. | |
| QtDoublePropertyManager * | m_attributeVectorDoubleManager |
| Manager for vector attribute member properties. | |
| QtGroupPropertyManager * | m_attributeVectorManager |
| Manager for vector attribute properties. | |
| QtTreePropertyBrowser * | m_browser |
| Qt property browser which displays properties. | |
| QtDoublePropertyManager * | m_constraintManager |
| Manager for parameter constraint properties. | |
| QMultiMap< QtProperty *, AConstraint > | m_constraints |
| Store parameter constraints. Keys are function properties. | |
| std::optional< std::string > | m_currentFunctionIndex |
| Index of currently selected function. | |
| DoubleDialogEditorFactory * | m_doubleEditorFactory |
| Editor used for editing doubles. | |
| bool | m_emitAttributeValueChange = true |
| bool | m_emitParameterValueChange = true |
| QtStringPropertyManager * | m_filenameManager |
| Manager for file name attributes. | |
| QtStringPropertyManager * | m_formulaManager |
| Manager for Formula attributes. | |
| QtGroupPropertyManager * | m_functionManager |
| Manager for function group properties. | |
| std::vector< GlobalTie > | m_globalTies |
| QtStringPropertyManager * | m_indexManager |
| Manager for function index properties. | |
| bool | m_multiDataset |
| Set true if the constructed function is intended to be used in a multi-dataset fit. | |
| std::string | m_multiDomainFunctionPrefix |
| The function prefix of the domain with a MultiDomainFunction currently being displayed. | |
| ParameterPropertyManager * | m_parameterManager |
| Manager for function parameter properties. | |
| QMap< QtProperty *, AProperty > | m_properties |
| Store all properties in a map for easy access. | |
| QtProperty * | m_selectedFunctionProperty |
| SelectFunctionDialog * | m_selectFunctionDialog |
| QtStringPropertyManager * | m_tieManager |
| Manager for function tie properties. | |
| QMultiMap< QtProperty *, ATie > | m_ties |
| Store parameter ties. Keys are function properties. | |
| QtStringPropertyManager * | m_workspaceManager |
| Manager for Workspace attributes. | |
Private Member Functions | |
| std::string | getFullParameterName (const std::string ¶meter, int compositeIndex=-1) const |
| Gets the full parameter name when using the m_multiDomainFunctionPrefix. | |
| std::string | getFullTie (std::string const &tie) const |
| Gets the full tie when using the m_multiDomainFunctionPrefix. | |
| QTreeWidgetItem * | getPropertyWidgetItem (QtProperty *prop) const |
| void | setBooleanAttribute (std::string const &attrName, bool value) override |
| Updates the value of a boolean attribute. | |
| void | setDoubleAttribute (std::string const &attrName, double value) override |
| Update a double attribute. | |
| void | setIntAttribute (std::string const &attrName, int value) override |
| Updates the value of a integer attribute. | |
| void | setStringAttribute (std::string const &attrName, std::string &value) override |
| Updates the value of a string attribute. | |
| void | setVectorAttribute (std::string const &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. | |
| QRect | visualItemRect (QtProperty *prop) const |
Friends | |
| class | CreateAttributePropertyForFunctionTreeView |
| class | SetAttributeFromProperty |
Additional Inherited Members | |
Signals inherited from MantidQt::MantidWidgets::IFunctionView | |
| void | attributePropertyChanged (std::string const &attrName) |
| Function attribute gets changed. | |
| void | copyToClipboardRequest () |
| User requested copy function to clipboard. | |
| void | currentFunctionChanged () |
| User selects a different (sub)function (or one of it's sub-properties) | |
| void | functionAdded (std::string const &funStr) |
| User adds a function. | |
| void | functionHelpRequest () |
| User requested function help. | |
| void | functionRemoved (std::string const &functionIndex) |
| User removes a function. | |
| void | functionRemovedString (std::string const &funStr) |
| User removes a function. | |
| void | functionReplaced (std::string const &funStr) |
| User replaces the whole function (eg, by pasting it from clipboard) | |
| void | globalsChanged (const std::vector< std::string > &) |
| User changed the list of global parameters. | |
| void | localParameterButtonClicked (std::string const ¶meterName) |
| In multi-dataset context a button value editor was clicked. | |
| void | parameterChanged (std::string const ¶meterName) |
| Function parameter gets changed. | |
| void | parameterConstraintAdded (std::string const &functionIndex, std::string const &constraint) |
| User sets a constraint. | |
| void | parameterConstraintRemoved (std::string const ¶meterName) |
| User removes a constraint. | |
| void | parameterTieChanged (std::string const ¶meterName, std::string const &tie) |
| User sets a tie. | |
Class FitPropertyBrowser implements QtPropertyBrowser to display and control fitting function parameters and settings.
Definition at line 66 of file FunctionTreeView.h.
| MantidQt::MantidWidgets::FunctionTreeView::FunctionTreeView | ( | QWidget * | parent, |
| bool | multi, | ||
| std::vector< std::string > | categories = std::vector<std::string>() |
||
| ) |
Constructor.
| 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 106 of file FunctionTreeView.cpp.
References createActions(), createBrowser(), and m_browser.
|
override |
Destructor.
Definition at line 123 of file FunctionTreeView.cpp.
References m_attributeBoolManager, m_attributeDoubleManager, m_attributeIntManager, m_attributeSizeManager, m_attributeStringManager, m_attributeVectorDoubleManager, m_browser, m_constraintManager, m_filenameManager, m_formulaManager, m_indexManager, m_parameterManager, m_tieManager, and m_workspaceManager.
|
protected |
Add attribute and parameter properties to a function property.
For a composite function adds all member functions' properties
| 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 642 of file FunctionTreeView.cpp.
References addAttributeAndParameterProperties(), addAttributeProperty(), addConstraintProperties(), addFunctionProperty(), addGlobalParameterTie(), addIndexProperty(), addParameterProperty(), addParameterTie(), name, MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, and value.
Referenced by addAttributeAndParameterProperties(), and setFunction().
|
protected |
Add a attribute property.
| parent | :: Parent function property |
| attName | :: Attribute name |
| att | :: Attribute value |
Definition at line 626 of file FunctionTreeView.cpp.
References Mantid::API::IFunction::Attribute::apply().
Referenced by addAttributeAndParameterProperties().
|
protected |
Add a constraint property.
| prop | :: Parent parameter property |
| constraint | :: A constraint string |
Definition at line 1088 of file FunctionTreeView.cpp.
References addProperty(), isParameter(), MantidQt::MantidWidgets::FunctionTreeView::AConstraint::lower, m_constraintManager, m_constraints, m_properties, MantidQt::MantidWidgets::FunctionTreeView::AConstraint::paramProp, MantidQt::MantidWidgets::splitConstraintString(), and MantidQt::MantidWidgets::FunctionTreeView::AConstraint::upper.
Referenced by addAttributeAndParameterProperties(), addConstraints(), addConstraints10(), addConstraints50(), and setParameterConstraint().
|
protectedslot |
Add both constraints to current parameter.
Definition at line 1757 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, name, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), MantidQt::MantidWidgets::splitParameterName(), and value.
Referenced by createActions().
|
protectedslot |
Add both constraints to current parameter.
Definition at line 1775 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, name, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), and MantidQt::MantidWidgets::splitParameterName().
Referenced by createActions().
|
protectedslot |
Add both constraints to current parameter.
Definition at line 1794 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, name, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), and MantidQt::MantidWidgets::splitParameterName().
Referenced by createActions().
|
protected |
Add a function.
| prop | :: Property of the parent composite function or NULL |
| fun | :: A function to add |
Definition at line 445 of file FunctionTreeView.cpp.
References addFunctionProperty(), getFunction(), MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, setFunction(), and updateFunctionIndices().
Referenced by addFunctionEnd(), and setFunction().
|
protectedslot |
Add a function.
Add a function to currently selected composite function property.
Definition at line 1246 of file FunctionTreeView.cpp.
References addFunctionEnd(), MantidQt::MantidWidgets::SelectFunctionDialog::clearSearchBoxText(), isFunction(), m_allowedCategories, m_browser, m_selectedFunctionProperty, m_selectFunctionDialog, and top.
Referenced by createActions().
|
protectedslot |
Definition at line 1276 of file FunctionTreeView.cpp.
References addFunction(), MantidQt::MantidWidgets::IFunctionView::functionAdded(), MantidQt::MantidWidgets::SelectFunctionDialog::getFunction(), getFunction(), getGlobalParameters(), MantidQt::MantidWidgets::IFunctionView::globalsChanged(), m_multiDomainFunctionPrefix, m_selectedFunctionProperty, m_selectFunctionDialog, setFunction(), and setGlobalParameters().
Referenced by addFunctionBegin().
|
protected |
Add a function property.
| parent | :: Parent function property or NULL |
| funName | :: Function name |
Definition at line 389 of file FunctionTreeView.cpp.
References addProperty(), and m_functionManager.
Referenced by addAttributeAndParameterProperties(), and addFunction().
|
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.
| 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 742 of file FunctionTreeView.cpp.
References addTieProperty(), getFullParameterName(), m_globalTies, and m_multiDomainFunctionPrefix.
Referenced by addAttributeAndParameterProperties().
|
protected |
Add property showing function's index in the composite function.
| prop | :: A function property |
Definition at line 776 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().
|
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.
| prop | :: The property to add the function index on to. |
Definition at line 762 of file FunctionTreeView.cpp.
References addProperty(), m_indexManager, and m_multiDomainFunctionPrefix.
Referenced by setFunction().
|
protected |
Add a parameter property.
| parent | :: Parent function property |
| parameterName | :: Parameter name |
| paramDesc | :: Parameter description |
| paramValue | :: Parameter value |
Definition at line 405 of file FunctionTreeView.cpp.
References addProperty(), m_functionManager, m_multiDataset, and m_parameterManager.
Referenced by addAttributeAndParameterProperties().
|
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.
| 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 693 of file FunctionTreeView.cpp.
References addParameterTieInComposite(), and addTieProperty().
Referenced by addAttributeAndParameterProperties().
|
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.
| 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. |
Definition at line 717 of file FunctionTreeView.cpp.
References addTieProperty(), index, and std::to_string().
Referenced by addParameterTie().
|
protected |
Add a sub-property.
Add a sub-property to a parent property.
| parent | :: The parent property |
| subproperty | :: New sub-property |
Definition at line 305 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::FunctionTreeView::AProperty::item, m_browser, m_properties, MantidQt::MantidWidgets::FunctionTreeView::AProperty::parent, and MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop.
Referenced by addConstraintProperties(), addFunctionProperty(), addIndexProperty(), addMultiDomainIndexProperty(), addParameterProperty(), addTieProperty(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), and MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply().
|
protectedslot |
Add a tie to a parameter.
Add a custom tie to currently selected parameter.
Definition at line 1706 of file FunctionTreeView.cpp.
References addTieProperty(), getParameterName(), isParameter(), m_browser, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().
Referenced by createActions().
|
protected |
Add a tie property.
| prop | :: Parent parameter property |
| tie | :: A tie string |
| globalTie | :: true if the tie is a global tie. |
Definition at line 989 of file FunctionTreeView.cpp.
References addProperty(), getFullTie(), getFunctionProperty(), getParameterName(), isParameter(), m_tieManager, m_ties, MantidQt::MantidWidgets::FunctionTreeView::ATie::paramName, MantidQt::MantidWidgets::FunctionTreeView::ATie::paramProp, MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop, and MantidQt::MantidWidgets::FunctionTreeView::ATie::tieProp.
Referenced by addGlobalParameterTie(), addParameterTie(), addParameterTieInComposite(), addTie(), fixParameter(), and setParameterTie().
|
protectedslot |
Called when a function attribute property is changed.
Slot connected to all function attribute managers.
Update the corresponding function.
| prop | :: An attribute property that was changed |
Definition at line 1895 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().
|
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.
| prop | :: A property that was changed. |
Definition at line 1963 of file FunctionTreeView.cpp.
References attributeChanged(), and m_properties.
Referenced by createBrowser().
|
protectedslot |
Called when the size of a vector attribute is changed.
| prop | :: A property that was changed. |
Definition at line 1928 of file FunctionTreeView.cpp.
References getFunction(), m_attributeSizeManager, m_properties, setFunction(), and updateFunctionIndices().
Referenced by createBrowser().
|
overridevirtual |
Clear the contents.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 284 of file FunctionTreeView.cpp.
References m_browser, and m_properties.
Referenced by setFunction().
|
overridevirtual |
Clear all errors.
Clear all errors, if they are set.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2067 of file FunctionTreeView.cpp.
References m_parameterManager.
|
protectedslot |
Called when a constraint property changes.
Definition at line 1995 of file FunctionTreeView.cpp.
References getFunctionAndConstraint(), getParentParameterProperty(), m_constraints, and MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded().
Referenced by createBrowser().
|
protectedslot |
Copy the function to the clipboard.
Copy function to the clipboard.
Definition at line 1752 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::copyToClipboardRequest().
Referenced by createActions().
|
protected |
Create and connect actions.
Definition at line 234 of file FunctionTreeView.cpp.
References addConstraints(), addConstraints10(), addConstraints50(), addFunctionBegin(), addTie(), copyToClipboard(), fixParameter(), MantidQt::MantidWidgets::IFunctionView::functionHelpRequest(), m_actionAddFunction, m_actionAddTie, m_actionConstraints, m_actionConstraints10, m_actionConstraints50, m_actionFixParameter, m_actionFromClipboard, m_actionFunctionHelp, m_actionRemoveConstraint, m_actionRemoveConstraints, m_actionRemoveFunction, m_actionRemoveTie, m_actionToClipboard, pasteFromClipboard(), removeConstraint(), removeConstraints(), removeFunction(), removeTie(), and setErrorsEnabled().
Referenced by FunctionTreeView().
|
protected |
Create the Qt property browser.
Create the Qt property browser and set up property managers.
Definition at line 142 of file FunctionTreeView.cpp.
References attributeChanged(), attributeVectorDoubleChanged(), attributeVectorSizeChanged(), constraintChanged(), globalChanged(), m_attributeBoolManager, m_attributeDoubleManager, m_attributeIntManager, m_attributeSizeManager, m_attributeStringManager, m_attributeVectorDoubleManager, m_attributeVectorManager, m_browser, m_constraintManager, m_doubleEditorFactory, m_filenameManager, m_formulaManager, m_functionManager, m_indexManager, m_multiDataset, m_parameterManager, m_tieManager, m_workspaceManager, parameterButtonClicked(), parameterPropertyChanged(), popupMenu(), tieChanged(), and updateCurrentFunctionIndex().
Referenced by FunctionTreeView().
|
overridevirtual |
Index of currently selected function.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2069 of file FunctionTreeView.cpp.
References m_currentFunctionIndex.
| DoubleDialogEditorFactory * MantidQt::MantidWidgets::FunctionTreeView::doubleEditorFactory | ( | ) |
Definition at line 2174 of file FunctionTreeView.cpp.
References m_doubleEditorFactory.
|
protectedslot |
Fix a parameter.
Fix currently selected parameter.
Definition at line 1663 of file FunctionTreeView.cpp.
References addTieProperty(), getParameter(), getParameterName(), isParameter(), m_browser, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().
Referenced by createActions().
|
overridevirtual |
Get a value of a attribute.
| attrName | :: Attribute name |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1534 of file FunctionTreeView.cpp.
References getAttributeProperty(), isBoolAttribute(), isDoubleAttribute(), isIntAttribute(), isStringAttribute(), isVectorAttribute(), m_attributeBoolManager, m_attributeDoubleManager, m_attributeIntManager, m_attributeStringManager, and m_attributeVectorDoubleManager.
|
protected |
Get name of the attribute for a property.
| prop | :: A property |
Definition at line 956 of file FunctionTreeView.cpp.
References getIndex(), and isAttribute().
Referenced by attributeChanged().
|
protected |
Get a property for a parameter.
Get a property for an attribute.
Definition at line 1569 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, m_browser, name, and MantidQt::MantidWidgets::splitParameterName().
Referenced by getAttribute(), setBooleanAttribute(), setDoubleAttribute(), setIntAttribute(), and setStringAttribute().
|
protected |
Get a constraint string.
Definition at line 1167 of file FunctionTreeView.cpp.
References Mantid::EMPTY_DBL().
Referenced by getFunction(), and getFunctionAndConstraint().
|
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.
| parameter | :: The original parameter. |
| compositeIndex | :: The index of the function within the composite that the parameter is in. |
Definition at line 1036 of file FunctionTreeView.cpp.
References m_multiDomainFunctionPrefix, and std::to_string().
Referenced by addGlobalParameterTie().
|
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.
| tie | :: The original tie. |
Definition at line 1021 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::isNumber(), and m_multiDomainFunctionPrefix.
Referenced by addTieProperty().
| Mantid::API::IFunction_sptr MantidQt::MantidWidgets::FunctionTreeView::getFunction | ( | QtProperty * | prop = nullptr, |
| bool | attributesOnly = false |
||
| ) |
Return the function.
| prop | :: Function property |
| attributesOnly | :: Only set attributes |
Definition at line 1346 of file FunctionTreeView.cpp.
References Mantid::API::g_log, getConstraint(), getFunction(), getParameter(), isAttribute(), isFunction(), isParameter(), lower, m_browser, m_constraintManager, m_constraints, m_tieManager, m_ties, removeProperty(), setAttributeToFunction(), upper, and Mantid::Kernel::Logger::warning().
Referenced by addFunction(), addFunctionEnd(), attributeChanged(), attributeVectorSizeChanged(), getFunction(), getSelectedFunction(), and removeFunction().
|
protected |
Get a pair of function index (eg f0.f2.) and constraint expression given a parameter property.
Definition at line 1872 of file FunctionTreeView.cpp.
References Mantid::EMPTY_DBL(), getConstraint(), getParameterName(), lower, m_constraintManager, name, MantidQt::MantidWidgets::splitParameterName(), and upper.
Referenced by constraintChanged(), and removeConstraint().
|
protected |
Get property of the overall function.
Definition at line 824 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::FunctionTreeView::AProperty::item, m_browser, m_properties, MantidQt::MantidWidgets::FunctionTreeView::AProperty::parent, and MantidQt::MantidWidgets::FunctionTreeView::AProperty::prop.
Referenced by addTieProperty(), getAttributeProperty(), getParameterProperty(), getVisualRectFunctionProperty(), and setParameterError().
|
protected |
Get function property for the index.
Return function property for a function with given index.
| index | :: Function index to search, or empty string for top-level function |
Definition at line 969 of file FunctionTreeView.cpp.
References getIndex(), index, isFunction(), and m_properties.
| std::vector< std::string > MantidQt::MantidWidgets::FunctionTreeView::getGlobalParameters | ( | ) | const |
Get a list of global parameters.
Definition at line 2107 of file FunctionTreeView.cpp.
References getParameterName(), m_properties, and name.
Referenced by addFunctionEnd(), globalChanged(), and removeFunction().
|
protected |
Get the function index for a property.
| prop | :: A property |
Definition at line 922 of file FunctionTreeView.cpp.
References getIndex(), isFunction(), m_indexManager, and m_properties.
Referenced by getAttributeName(), getFunctionProperty(), getIndex(), getParameterName(), parameterButtonClicked(), removeFunction(), and updateCurrentFunctionIndex().
|
inline |
Definition at line 418 of file FunctionTreeView.h.
|
inline |
Definition at line 416 of file FunctionTreeView.h.
|
inline |
Definition at line 417 of file FunctionTreeView.h.
|
protected |
Get attribute as a string.
Get parameter value as a string.
| prop | :: A parameter property |
Definition at line 909 of file FunctionTreeView.cpp.
References m_parameterManager.
|
overridevirtual |
Get a value of a parameter.
| parameterName | :: Parameter name |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1526 of file FunctionTreeView.cpp.
References getParameterProperty(), and m_parameterManager.
Referenced by addConstraints(), addConstraints10(), addConstraints50(), fixParameter(), and getFunction().
|
protected |
Get name of the parameter for a property.
| prop | :: A property |
Definition at line 944 of file FunctionTreeView.cpp.
References getIndex(), getParentParameterProperty(), and isParameter().
Referenced by addConstraints(), addConstraints10(), addConstraints50(), addTie(), addTieProperty(), fixParameter(), getFunctionAndConstraint(), getGlobalParameters(), parameterPropertyChanged(), removeConstraint(), removeConstraints(), removeTie(), setGlobalParameters(), and tieChanged().
|
protected |
Get a property for a parameter Get a property for a parameter.
Get a property for a parameter.
Definition at line 1551 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, name, and MantidQt::MantidWidgets::splitParameterName().
Referenced by getParameter(), getParamWidget(), getVisualRectParameterProperty(), setParameter(), setParameterConstraint(), and setParameterTie().
| QWidget * MantidQt::MantidWidgets::FunctionTreeView::getParamWidget | ( | std::string const & | parameterName | ) | const |
Definition at line 2161 of file FunctionTreeView.cpp.
References getParameterProperty(), and getPropertyWidgetItem().
|
protected |
Get a property for a parameter which is a parent of a given property (tie or constraint).
Definition at line 1593 of file FunctionTreeView.cpp.
References m_constraints, and m_ties.
Referenced by constraintChanged(), getParameterName(), and removeConstraint().
|
private |
Definition at line 2132 of file FunctionTreeView.cpp.
References m_browser, and m_properties.
Referenced by getParamWidget(), and visualItemRect().
|
overridevirtual |
Get user selected function.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1856 of file FunctionTreeView.cpp.
References getFunction(), isFunction(), and m_browser.
|
protected |
Get a tie for a paramater.
Get a tie for a parameter.
| prop | :: A parameter property |
Definition at line 1068 of file FunctionTreeView.cpp.
References m_tieManager.
Referenced by tieChanged().
|
protected |
Get a tie property attached to a parameter property.
Definition at line 1676 of file FunctionTreeView.cpp.
Referenced by parameterPropertyChanged(), removeTie(), and setParameterTie().
| QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectFunctionProperty | ( | std::string const & | index | ) | const |
Definition at line 2143 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, Mantid::Geometry::rect, and visualItemRect().
| QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectParameterProperty | ( | std::string const & | index | ) | const |
Definition at line 2152 of file FunctionTreeView.cpp.
References getParameterProperty(), index, Mantid::Geometry::rect, and visualItemRect().
|
protectedslot |
Called when "Global" check-box was clicked.
Emit a signal when any of the Global options change.
Definition at line 2054 of file FunctionTreeView.cpp.
References getGlobalParameters(), and MantidQt::MantidWidgets::IFunctionView::globalsChanged().
Referenced by createBrowser().
|
protected |
Check if a parameter property has a constraint.
| prop | :: A parameter property. |
Definition at line 1136 of file FunctionTreeView.cpp.
References hasLowerBound(), and hasUpperBound().
Referenced by setParameterConstraint().
|
overridevirtual |
Check if a function is set.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2015 of file FunctionTreeView.cpp.
References m_functionManager.
|
protected |
Check if a parameter property has a lower bound.
| prop | :: A parameter property. |
Definition at line 1142 of file FunctionTreeView.cpp.
References isParameter().
Referenced by hasConstraint(), and popupMenu().
|
protected |
Check if a parameter property has a tie.
| prop | :: A parameter property |
Definition at line 1048 of file FunctionTreeView.cpp.
Referenced by popupMenu().
|
protected |
Check if a parameter property has a upper bound.
| prop | :: A parameter property. |
Definition at line 1156 of file FunctionTreeView.cpp.
References isParameter().
Referenced by hasConstraint(), and popupMenu().
| void MantidQt::MantidWidgets::FunctionTreeView::hideGlobals | ( | ) |
Show global column.
Definition at line 2026 of file FunctionTreeView.cpp.
References m_browser.
Referenced by MantidQt::MantidWidgets::FunctionBrowser::hideGlobalCheckbox(), and MantidQt::MantidWidgets::FunctionMultiDomainPresenter::hideGlobals().
|
protected |
Check if property is a function attribute.
| prop | :: Property to check |
Definition at line 892 of file FunctionTreeView.cpp.
References isBoolAttribute(), isDoubleAttribute(), isIntAttribute(), isStringAttribute(), and isVectorAttribute().
Referenced by getAttributeName(), and getFunction().
|
protected |
Check if property is a bool attribute.
Check if property is a function bool attribute.
| prop | :: Property to check |
Definition at line 876 of file FunctionTreeView.cpp.
References m_attributeBoolManager.
Referenced by getAttribute(), and isAttribute().
|
protected |
Check if a property is a constraint.
| prop | :: Property to check. |
Definition at line 1128 of file FunctionTreeView.cpp.
References m_constraintManager.
Referenced by popupMenu(), removeConstraint(), removeConstraintsQuiet(), and removeProperty().
|
protected |
Check if property is a double attribute.
Check if property is a function attribute.
| prop | :: Property to check |
Definition at line 860 of file FunctionTreeView.cpp.
References m_attributeDoubleManager.
Referenced by getAttribute(), and isAttribute().
|
protected |
Check if property is a function group.
| prop | :: Property to check |
Definition at line 841 of file FunctionTreeView.cpp.
References m_functionManager.
Referenced by addFunctionBegin(), addIndexProperty(), getFunction(), getFunctionProperty(), getIndex(), getSelectedFunction(), popupMenu(), removeFunction(), removeProperty(), and updateFunctionIndices().
|
protected |
Check if a property is an index.
| prop | :: A property |
Definition at line 914 of file FunctionTreeView.cpp.
References m_indexManager.
Referenced by updateFunctionIndices().
|
protected |
Check if property is a int attribute.
Check if property is a function attribute.
| prop | :: Property to check |
Definition at line 868 of file FunctionTreeView.cpp.
References m_attributeIntManager.
Referenced by getAttribute(), and isAttribute().
|
protected |
Check if property is a function paramater.
Check if property is a function parameter.
| prop | :: Property to check |
Definition at line 901 of file FunctionTreeView.cpp.
References m_parameterManager.
Referenced by addConstraintProperties(), addConstraints(), addConstraints10(), addConstraints50(), addTie(), addTieProperty(), fixParameter(), getFunction(), getParameterName(), hasLowerBound(), hasUpperBound(), popupMenu(), removeConstraints(), and removeTie().
|
protected |
Check if property is a string attribute.
Check if property is any of the string attributes.
| prop | :: Property to check |
Definition at line 849 of file FunctionTreeView.cpp.
References m_attributeStringManager, m_filenameManager, m_formulaManager, and m_workspaceManager.
Referenced by getAttribute(), and isAttribute().
|
protected |
Check if a property is a tie.
| prop | :: A property |
Definition at line 1060 of file FunctionTreeView.cpp.
References m_tieManager.
Referenced by removeProperty().
|
protected |
Check if property is a vector attribute.
Check if property is a function vector attribute.
| prop | :: Property to check |
Definition at line 884 of file FunctionTreeView.cpp.
References m_attributeVectorManager.
Referenced by getAttribute(), and isAttribute().
|
protectedslot |
Called when button in local parameter editor was clicked.
Definition at line 2011 of file FunctionTreeView.cpp.
References getIndex(), and MantidQt::MantidWidgets::IFunctionView::localParameterButtonClicked().
Referenced by createBrowser().
|
protectedslot |
Called when a function parameter property is changed.
Definition at line 1970 of file FunctionTreeView.cpp.
References getParameterName(), getTieProperty(), m_emitParameterValueChange, m_parameterManager, m_tieManager, MantidQt::MantidWidgets::IFunctionView::parameterChanged(), and setErrorsEnabled().
Referenced by createBrowser().
|
protectedslot |
Copy function from the clipboard.
Definition at line 1731 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::functionReplaced(), and setFunction().
Referenced by createActions().
|
protectedslot |
Show the context menu.
Show a pop up menu.
Definition at line 1184 of file FunctionTreeView.cpp.
References hasLowerBound(), hasTie(), hasUpperBound(), isConstraint(), isFunction(), isParameter(), m_actionAddFunction, m_actionAddTie, m_actionConstraints, m_actionConstraints10, m_actionConstraints50, m_actionFixParameter, m_actionFromClipboard, m_actionFunctionHelp, m_actionRemoveConstraint, m_actionRemoveConstraints, m_actionRemoveFunction, m_actionRemoveTie, m_actionToClipboard, m_browser, and m_properties.
Referenced by createBrowser().
|
protectedslot |
Remove one of the constraints.
Remove one constraint from current parameter.
Definition at line 1836 of file FunctionTreeView.cpp.
References getFunctionAndConstraint(), getParameterName(), getParentParameterProperty(), isConstraint(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), MantidQt::MantidWidgets::IFunctionView::parameterConstraintRemoved(), and removeProperty().
Referenced by createActions().
|
protectedslot |
Remove both constraints from current parameter.
Definition at line 1822 of file FunctionTreeView.cpp.
References getParameterName(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintRemoved(), and removeConstraintsQuiet().
Referenced by createActions().
|
protected |
Definition at line 1810 of file FunctionTreeView.cpp.
References isConstraint(), and removeProperty().
Referenced by removeConstraints(), and setParameterConstraint().
|
protectedslot |
Remove a function.
Remove the function under currently selected property.
Definition at line 1611 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::functionRemoved(), MantidQt::MantidWidgets::IFunctionView::functionRemovedString(), getFunction(), getGlobalParameters(), getIndex(), MantidQt::MantidWidgets::IFunctionView::globalsChanged(), isFunction(), m_browser, m_multiDomainFunctionPrefix, removeProperty(), setFunction(), setGlobalParameters(), and updateFunctionIndices().
Referenced by createActions().
|
protected |
Remove and delete property.
| prop | :: Property to remove. |
Definition at line 327 of file FunctionTreeView.cpp.
References isConstraint(), isFunction(), isTie(), m_browser, m_constraints, m_properties, m_ties, MantidQt::MantidWidgets::FunctionTreeView::AProperty::parent, and removeProperty().
Referenced by getFunction(), removeConstraint(), removeConstraintsQuiet(), removeFunction(), removeProperty(), removeTie(), setFunction(), and setParameterTie().
|
protectedslot |
Unfix a parameter.
Unfix currently selected parameter.
Definition at line 1689 of file FunctionTreeView.cpp.
References getParameterName(), getTieProperty(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterTieChanged(), and removeProperty().
Referenced by createActions().
|
protectedslot |
Set value of an attribute (as a property) to a function.
| fun | :: Function to which attribute is set. |
| prop | :: A property with the name and value of the attribute. |
Definition at line 1327 of file FunctionTreeView.cpp.
References Mantid::API::IFunction::Attribute::apply(), Mantid::API::IFunction::getAttribute(), and Mantid::API::IFunction::setAttribute().
Referenced by getFunction().
|
overrideprivatevirtual |
Updates the value of a boolean attribute.
| attrName | :: Attribute name |
| value | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1504 of file FunctionTreeView.cpp.
References getAttributeProperty(), m_attributeBoolManager, m_emitAttributeValueChange, and value.
| void MantidQt::MantidWidgets::FunctionTreeView::setColumnSizes | ( | int | s0, |
| int | s1, | ||
| int | s2 = -1 |
||
| ) |
Resize the browser's columns.
| 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 2021 of file FunctionTreeView.cpp.
References m_browser.
Referenced by MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setColumnSizes().
|
overrideprivatevirtual |
Update a double attribute.
Updates the value of a double attribute.
| attrName | :: Attribute name |
| value | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1463 of file FunctionTreeView.cpp.
References getAttributeProperty(), m_attributeDoubleManager, m_emitAttributeValueChange, and value.
|
overridevirtual |
Set error display on/off.
Set display of parameter errors on/off.
| enabled | :: [input] On/off display of errors |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2062 of file FunctionTreeView.cpp.
References m_parameterManager.
Referenced by createActions(), and parameterPropertyChanged().
|
overridevirtual |
Set the function in the browser.
| fun | :: A function |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 293 of file FunctionTreeView.cpp.
References addFunction(), and clear().
Referenced by addFunction(), addFunctionEnd(), attributeChanged(), attributeVectorSizeChanged(), pasteFromClipboard(), and removeFunction().
|
protected |
Set a function.
| prop | :: Property of the function or NULL |
| fun | :: A function |
Definition at line 429 of file FunctionTreeView.cpp.
References addAttributeAndParameterProperties(), addMultiDomainIndexProperty(), m_multiDomainFunctionPrefix, and removeProperty().
|
overridevirtual |
Set new global parameters.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2118 of file FunctionTreeView.cpp.
References getParameterName(), and m_properties.
Referenced by addFunctionEnd(), and removeFunction().
| 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.
| globalTies | :: A vector of global ties to be displayed within the function tree. |
Definition at line 2049 of file FunctionTreeView.cpp.
References m_globalTies.
|
overrideprivatevirtual |
Updates the value of a integer attribute.
| attrName | :: Attribute name |
| value | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1473 of file FunctionTreeView.cpp.
References getAttributeProperty(), m_attributeIntManager, m_emitAttributeValueChange, and value.
| void MantidQt::MantidWidgets::FunctionTreeView::setMultiDomainFunctionPrefix | ( | std::string const & | 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.
| functionPrefix | :: The function prefix of the domain currently being displayed in the FunctionTreeView. |
Definition at line 2038 of file FunctionTreeView.cpp.
References m_multiDomainFunctionPrefix.
|
overridevirtual |
Update the function parameter value.
Updates the function parameter value.
| parameterName | :: Parameter name |
| value | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1434 of file FunctionTreeView.cpp.
References getParameterProperty(), m_emitParameterValueChange, m_parameterManager, and value.
|
overridevirtual |
Set a constraint.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2099 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameterProperty(), hasConstraint(), and removeConstraintsQuiet().
|
overridevirtual |
Update the function parameter error.
Updates the function parameter error.
| parameterName | :: Parameter name |
| error | :: New error |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1445 of file FunctionTreeView.cpp.
References error, getFunctionProperty(), index, m_parameterManager, name, and MantidQt::MantidWidgets::splitParameterName().
|
overridevirtual |
Set a tie.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2085 of file FunctionTreeView.cpp.
References addTieProperty(), getParameterProperty(), getTieProperty(), m_tieManager, and removeProperty().
| void MantidQt::MantidWidgets::FunctionTreeView::setStretchLastColumn | ( | bool | stretch | ) |
Set the last column to stretch.
Definition at line 2023 of file FunctionTreeView.cpp.
References m_browser.
|
overrideprivatevirtual |
Updates the value of a string attribute.
| attrName | :: Attribute name |
| valueAsStdStr | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1483 of file FunctionTreeView.cpp.
References getAttributeProperty(), m_attributeStringManager, m_emitAttributeValueChange, m_filenameManager, m_formulaManager, m_workspaceManager, and 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.
| attrName | :: Attribute name |
| value | :: New value |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1518 of file FunctionTreeView.cpp.
References UNUSED_ARG, and value.
|
overridevirtual |
Show function help page for input functionName.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1868 of file FunctionTreeView.cpp.
References MantidQt::API::InterfaceManager::showFitFunctionHelp().
| void MantidQt::MantidWidgets::FunctionTreeView::showGlobals | ( | ) |
Definition at line 2028 of file FunctionTreeView.cpp.
References m_browser.
Referenced by MantidQt::MantidWidgets::FunctionMultiDomainPresenter::showGlobals().
|
protectedslot |
Called when a tie property changes.
Definition at line 1986 of file FunctionTreeView.cpp.
References getParameterName(), getTie(), m_ties, and MantidQt::MantidWidgets::IFunctionView::parameterTieChanged().
Referenced by createBrowser().
| QtTreePropertyBrowser * MantidQt::MantidWidgets::FunctionTreeView::treeBrowser | ( | ) |
Definition at line 2172 of file FunctionTreeView.cpp.
References m_browser.
| QTreeWidget * MantidQt::MantidWidgets::FunctionTreeView::treeWidget | ( | ) | const |
Definition at line 2170 of file FunctionTreeView.cpp.
References m_browser.
|
protectedslot |
Update index of currently selected function.
Definition at line 2071 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::currentFunctionChanged(), getIndex(), m_browser, and m_currentFunctionIndex.
Referenced by createBrowser().
|
protected |
Update function index properties.
| prop | :: A function property |
| index | :: The parent function's index |
Definition at line 802 of file FunctionTreeView.cpp.
References index, isFunction(), isIndex(), m_browser, m_indexManager, m_multiDomainFunctionPrefix, std::to_string(), top, and updateFunctionIndices().
Referenced by addFunction(), addIndexProperty(), attributeChanged(), attributeVectorSizeChanged(), removeFunction(), and updateFunctionIndices().
|
private |
Definition at line 2136 of file FunctionTreeView.cpp.
References getPropertyWidgetItem().
Referenced by getVisualRectFunctionProperty(), and getVisualRectParameterProperty().
|
friend |
Definition at line 394 of file FunctionTreeView.h.
|
friend |
Definition at line 395 of file FunctionTreeView.h.
|
protected |
Add a function.
Definition at line 352 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Add a custom tie to a parameter.
Definition at line 360 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Add both constraints to current parameter.
Definition at line 370 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Add both constraints to current parameter with 10% spread.
Definition at line 366 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Add both constraints to current parameter with 50% spread.
Definition at line 368 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Fix a parameter.
Definition at line 356 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Copy a function from the clipboard.
Definition at line 362 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Show function help menu.
Definition at line 376 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Remove one constraints from current parameter.
Definition at line 374 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Remove both constraints from current parameter.
Definition at line 372 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Remove a function.
Definition at line 354 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Unfix a parameter.
Definition at line 358 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Copy a function to the clipboard.
Definition at line 364 of file FunctionTreeView.h.
Referenced by createActions(), and popupMenu().
|
protected |
Definition at line 388 of file FunctionTreeView.h.
Referenced by addFunctionBegin().
|
protected |
Manager for function bool attribute properties.
Definition at line 320 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), createBrowser(), getAttribute(), isBoolAttribute(), setBooleanAttribute(), and ~FunctionTreeView().
|
protected |
Manager for function double attribute properties.
Definition at line 316 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), getAttribute(), isDoubleAttribute(), setDoubleAttribute(), and ~FunctionTreeView().
|
protected |
Manager for function int attribute properties.
Definition at line 318 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), getAttribute(), isIntAttribute(), setIntAttribute(), and ~FunctionTreeView().
|
protected |
Manager for vector attribute size properties.
Definition at line 338 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), attributeVectorSizeChanged(), createBrowser(), and ~FunctionTreeView().
|
protected |
Manager for function string attribute properties.
Definition at line 314 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), getAttribute(), isStringAttribute(), setStringAttribute(), and ~FunctionTreeView().
|
protected |
Manager for vector attribute member properties.
Definition at line 336 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), getAttribute(), and ~FunctionTreeView().
|
protected |
Manager for vector attribute properties.
Definition at line 334 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), createBrowser(), and isVectorAttribute().
|
protected |
Qt property browser which displays properties.
Definition at line 341 of file FunctionTreeView.h.
Referenced by addConstraints(), addConstraints10(), addConstraints50(), addFunctionBegin(), addProperty(), addTie(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), clear(), createBrowser(), fixParameter(), FunctionTreeView(), getAttributeProperty(), getFunction(), getFunctionProperty(), getPropertyWidgetItem(), getSelectedFunction(), hideGlobals(), popupMenu(), removeConstraint(), removeConstraints(), removeFunction(), removeProperty(), removeTie(), setColumnSizes(), setStretchLastColumn(), showGlobals(), treeBrowser(), treeWidget(), updateCurrentFunctionIndex(), updateFunctionIndices(), and ~FunctionTreeView().
|
protected |
Manager for parameter constraint properties.
Definition at line 326 of file FunctionTreeView.h.
Referenced by addConstraintProperties(), createBrowser(), getFunction(), getFunctionAndConstraint(), isConstraint(), and ~FunctionTreeView().
|
protected |
Store parameter constraints. Keys are function properties.
Definition at line 347 of file FunctionTreeView.h.
Referenced by addConstraintProperties(), constraintChanged(), getFunction(), getParentParameterProperty(), and removeProperty().
|
protected |
Index of currently selected function.
Gets updated in updateCurrentFunctionIndex()
Definition at line 379 of file FunctionTreeView.h.
Referenced by currentFunctionIndex(), and updateCurrentFunctionIndex().
|
protected |
Editor used for editing doubles.
Definition at line 308 of file FunctionTreeView.h.
Referenced by createBrowser(), and doubleEditorFactory().
|
protected |
Definition at line 392 of file FunctionTreeView.h.
Referenced by attributeChanged(), setBooleanAttribute(), setDoubleAttribute(), setIntAttribute(), and setStringAttribute().
|
protected |
Definition at line 391 of file FunctionTreeView.h.
Referenced by parameterPropertyChanged(), and setParameter().
|
protected |
Manager for file name attributes.
Definition at line 328 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), isStringAttribute(), setStringAttribute(), and ~FunctionTreeView().
|
protected |
Manager for Formula attributes.
Definition at line 330 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), isStringAttribute(), setStringAttribute(), and ~FunctionTreeView().
|
protected |
Manager for function group properties.
Definition at line 310 of file FunctionTreeView.h.
Referenced by addFunctionProperty(), addParameterProperty(), MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::CreateAttributePropertyForFunctionTreeView(), createBrowser(), hasFunction(), and isFunction().
|
protected |
Definition at line 387 of file FunctionTreeView.h.
Referenced by addGlobalParameterTie(), and setGlobalTies().
|
protected |
Manager for function index properties.
Definition at line 322 of file FunctionTreeView.h.
Referenced by addIndexProperty(), addMultiDomainIndexProperty(), createBrowser(), getIndex(), isIndex(), updateFunctionIndices(), and ~FunctionTreeView().
|
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().
|
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().
|
protected |
Manager for function parameter properties.
Definition at line 312 of file FunctionTreeView.h.
Referenced by addParameterProperty(), clearErrors(), createBrowser(), getParameter(), getParameter(), isParameter(), parameterPropertyChanged(), setErrorsEnabled(), setParameter(), setParameterError(), and ~FunctionTreeView().
|
protected |
Store all properties in a map for easy access.
Definition at line 343 of file FunctionTreeView.h.
Referenced by addConstraintProperties(), addIndexProperty(), addProperty(), attributeChanged(), attributeVectorDoubleChanged(), attributeVectorSizeChanged(), clear(), getFunctionProperty(), getFunctionProperty(), getGlobalParameters(), getIndex(), getPropertyWidgetItem(), popupMenu(), removeProperty(), and setGlobalParameters().
|
protected |
Definition at line 390 of file FunctionTreeView.h.
Referenced by addFunctionBegin(), and addFunctionEnd().
|
protected |
Definition at line 389 of file FunctionTreeView.h.
Referenced by addFunctionBegin(), and addFunctionEnd().
|
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().
Store parameter ties. Keys are function properties.
Definition at line 345 of file FunctionTreeView.h.
Referenced by addTieProperty(), getFunction(), getParentParameterProperty(), removeProperty(), and tieChanged().
|
protected |
Manager for Workspace attributes.
Definition at line 332 of file FunctionTreeView.h.
Referenced by MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply(), MantidQt::MantidWidgets::SetAttributeFromProperty::apply(), createBrowser(), isStringAttribute(), setStringAttribute(), and ~FunctionTreeView().