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. 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 ¶mName) const override |
Get a value of a parameter. More... | |
QWidget * | getParamWidget (const QString ¶mName) const |
IFunction_sptr | getSelectedFunction () override |
Get user selected function. More... | |
QRect | getVisualRectFunctionProperty (const QString &index) const |
QRect | getVisualRectParameterProperty (const QString ¶mName) 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 ¶mName, double value) override |
Update the function parameter value. More... | |
void | setParameterConstraint (const QString ¶mName, const QString &constraint) override |
Set a constraint. More... | |
void | setParameterError (const QString ¶mName, double error) override |
Update the function parameter error. More... | |
void | setParameterTie (const QString ¶mName, 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 ¶mName) 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 ¶mName, double value)=0 |
virtual void | setParameterConstraint (const QString ¶mName, const QString &constraint)=0 |
virtual void | setParameterError (const QString ¶mName, double error)=0 |
virtual void | setParameterTie (const QString ¶mName, 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< AProperty > | addConstraintProperties (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 ¶meterName, 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 ¶mName, const QString ¶mDesc, double paramValue) |
Add a parameter property. More... | |
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. More... | |
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. 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 ¶mName) const |
Get a property for a parameter. More... | |
QString | getConstraint (const QString ¶mName, 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 ¶mName) 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 ¶mName, bool value)=0 |
virtual void | setDoubleAttribute (const QString ¶mName, double value)=0 |
virtual void | setIntAttribute (const QString ¶mName, int value)=0 |
virtual void | setStringAttribute (const QString ¶mName, std::string &value)=0 |
virtual void | setVectorAttribute (const QString ¶mName, 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 *, AConstraint > | m_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< GlobalTie > | m_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 *, AProperty > | m_properties |
Store all properties in a map for easy access. More... | |
QtProperty * | m_selectedFunctionProperty |
SelectFunctionDialog * | m_selectFunctionDialog |
QtStringPropertyManager * | m_tieManager |
Manager for function tie properties. More... | |
QMultiMap< QtProperty *, ATie > | m_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 ¶meter, 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 ¶mName) |
Function parameter gets changed. More... | |
void | parameterConstraintAdded (const QString &functionIndex, const QString &constraint) |
User sets a constraint. More... | |
void | parameterConstraintRemoved (const QString ¶mName) |
User removes a constraint. More... | |
void | parameterTieChanged (const QString &parName, const QString &tie) |
User sets a tie. More... | |
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 104 of file FunctionTreeView.cpp.
References createActions(), createBrowser(), and m_browser.
|
override |
Destructor.
Definition at line 121 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 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().
|
protected |
Add a attribute property.
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().
|
protected |
Add a constraint property.
prop | :: Parent parameter property |
constraint | :: A constraint string |
Definition at line 1087 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 1760 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), MantidQt::MantidWidgets::splitParameterName(), and value.
Referenced by createActions().
|
protectedslot |
Add both constraints to current parameter.
Definition at line 1778 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintAdded(), and MantidQt::MantidWidgets::splitParameterName().
Referenced by createActions().
|
protectedslot |
Add both constraints to current parameter.
Definition at line 1796 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameter(), getParameterName(), isParameter(), m_browser, 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 439 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 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().
|
protectedslot |
Definition at line 1283 of file FunctionTreeView.cpp.
References addFunction(), MantidQt::MantidWidgets::IFunctionView::functionAdded(), MantidQt::MantidWidgets::SelectFunctionDialog::getFunction(), getFunction(), getGlobalParameters(), MantidQt::MantidWidgets::IFunctionView::globalsChanged(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 385 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 736 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 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().
|
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 756 of file FunctionTreeView.cpp.
References addProperty(), m_indexManager, and m_multiDomainFunctionPrefix.
Referenced by setFunction().
|
protected |
Add a parameter property.
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().
|
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 687 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 711 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 303 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(), and MantidQt::MantidWidgets::CreateAttributePropertyForFunctionTreeView::apply().
|
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().
|
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 984 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 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().
|
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 1964 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 1929 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 282 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 2068 of file FunctionTreeView.cpp.
References m_parameterManager.
|
protectedslot |
Called when a constraint property changes.
Definition at line 1996 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 1755 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::copyToClipboardRequest().
Referenced by createActions().
|
protected |
Create and connect actions.
Definition at line 232 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 140 of file FunctionTreeView.cpp.
References attributeChanged(), attributeVectorDoubleChanged(), attributeVectorSizeChanged(), constraintChanged(), doubleEditorFactory(), 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 2070 of file FunctionTreeView.cpp.
References m_currentFunctionIndex.
DoubleDialogEditorFactory * MantidQt::MantidWidgets::FunctionTreeView::doubleEditorFactory | ( | ) |
Definition at line 2175 of file FunctionTreeView.cpp.
References m_doubleEditorFactory.
Referenced by createBrowser().
|
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().
|
overridevirtual |
Get a value of a attribute.
attrName | :: Attribute name |
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 1539 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 951 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 1573 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, isAttribute(), m_browser, and MantidQt::MantidWidgets::splitParameterName().
Referenced by getAttribute(), setBooleanAttribute(), setDoubleAttribute(), setIntAttribute(), and setStringAttribute().
|
protected |
Get a constraint string.
Definition at line 1174 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 1031 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 1016 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 1353 of file FunctionTreeView.cpp.
References Mantid::API::g_log, getConstraint(), getFunction(), getParameter(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 1873 of file FunctionTreeView.cpp.
References Mantid::EMPTY_DBL(), getConstraint(), getParameterName(), lower, m_constraintManager, MantidQt::MantidWidgets::splitParameterName(), and upper.
Referenced by constraintChanged(), and removeConstraint().
|
protected |
Get property of the overall function.
Definition at line 818 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 964 of file FunctionTreeView.cpp.
References getIndex(), index, isFunction(), and m_properties.
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().
|
protected |
Get the function index for a property.
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().
|
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.
|
overridevirtual |
Get a value of a parameter.
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().
|
protected |
Get attribute as a string.
Get parameter value as a string.
prop | :: A parameter property |
Definition at line 903 of file FunctionTreeView.cpp.
References m_parameterManager.
|
protected |
Get name of the parameter for a property.
prop | :: A property |
Definition at line 939 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 1556 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, isParameter(), and MantidQt::MantidWidgets::splitParameterName().
Referenced by getParameter(), getParamWidget(), getVisualRectParameterProperty(), setParameter(), setParameterConstraint(), and setParameterTie().
QWidget * MantidQt::MantidWidgets::FunctionTreeView::getParamWidget | ( | const QString & | paramName | ) | const |
Definition at line 2162 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 1596 of file FunctionTreeView.cpp.
References m_constraints, and m_ties.
Referenced by constraintChanged(), getParameterName(), and removeConstraint().
|
private |
Definition at line 2133 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 1857 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 1067 of file FunctionTreeView.cpp.
References m_tieManager.
Referenced by tieChanged().
|
protected |
Get a tie property attached to a parameter property.
Definition at line 1679 of file FunctionTreeView.cpp.
Referenced by parameterPropertyChanged(), removeTie(), and setParameterTie().
QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectFunctionProperty | ( | const QString & | index | ) | const |
Definition at line 2144 of file FunctionTreeView.cpp.
References getFunctionProperty(), index, Mantid::Geometry::rect, and visualItemRect().
QRect MantidQt::MantidWidgets::FunctionTreeView::getVisualRectParameterProperty | ( | const QString & | paramName | ) | const |
Definition at line 2153 of file FunctionTreeView.cpp.
References getParameterProperty(), 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 2055 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 1135 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 2016 of file FunctionTreeView.cpp.
References m_functionManager.
|
protected |
Check if a parameter property has a lower bound.
prop | :: A parameter property. |
Definition at line 1141 of file FunctionTreeView.cpp.
References isParameter(), and m_constraintManager.
Referenced by hasConstraint(), and popupMenu().
|
protected |
Check if a parameter property has a tie.
prop | :: A parameter property |
Definition at line 1043 of file FunctionTreeView.cpp.
Referenced by popupMenu().
|
protected |
Check if a parameter property has a upper bound.
prop | :: A parameter property. |
Definition at line 1159 of file FunctionTreeView.cpp.
References isParameter(), and m_constraintManager.
Referenced by hasConstraint(), and popupMenu().
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().
|
protected |
Check if property is a function attribute.
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().
|
protected |
Check if property is a bool attribute.
Check if property is a function bool attribute.
prop | :: Property to check |
Definition at line 870 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 1127 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 854 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 835 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 908 of file FunctionTreeView.cpp.
References m_indexManager.
Referenced by getIndex(), and updateFunctionIndices().
|
protected |
Check if property is a int attribute.
Check if property is a function attribute.
prop | :: Property to check |
Definition at line 862 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 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().
|
protected |
Check if property is a string attribute.
Check if property is any of the string attributes.
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().
|
protected |
Check if a property is a tie.
prop | :: A property |
Definition at line 1059 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 878 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 2012 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 1971 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 1734 of file FunctionTreeView.cpp.
References MantidQt::MantidWidgets::IFunctionView::functionReplaced(), Mantid::Kernel::SingletonHolder< T >::Instance(), and setFunction().
Referenced by createActions().
|
protectedslot |
Show the context menu.
Show a pop up menu.
Definition at line 1191 of file FunctionTreeView.cpp.
References hasLowerBound(), hasTie(), hasUpperBound(), Mantid::Kernel::SingletonHolder< T >::Instance(), 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 1837 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 1823 of file FunctionTreeView.cpp.
References getParameterName(), isParameter(), m_browser, MantidQt::MantidWidgets::IFunctionView::parameterConstraintRemoved(), and removeConstraintsQuiet().
Referenced by createActions().
|
protected |
Definition at line 1811 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 1614 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 325 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 1692 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 1334 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 1509 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 2022 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 1468 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 2063 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 291 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 425 of file FunctionTreeView.cpp.
References addAttributeAndParameterProperties(), addMultiDomainIndexProperty(), m_multiDomainFunctionPrefix, and removeProperty().
|
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().
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 2050 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 1478 of file FunctionTreeView.cpp.
References getAttributeProperty(), m_attributeIntManager, m_emitAttributeValueChange, and value.
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.
functionPrefix | :: The function prefix of the domain currently being displayed in the FunctionTreeView. |
Definition at line 2039 of file FunctionTreeView.cpp.
References m_multiDomainFunctionPrefix.
|
overridevirtual |
Update the function parameter value.
Updates the function parameter value.
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.
|
overridevirtual |
Set a constraint.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2100 of file FunctionTreeView.cpp.
References addConstraintProperties(), getParameterProperty(), hasConstraint(), and removeConstraintsQuiet().
|
overridevirtual |
Update the function parameter error.
Updates the function parameter error.
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().
|
overridevirtual |
Set a tie.
Implements MantidQt::MantidWidgets::IFunctionView.
Definition at line 2086 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 2024 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 1488 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 1523 of file FunctionTreeView.cpp.
References UNUSED_ARG, and value.
|
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().
void MantidQt::MantidWidgets::FunctionTreeView::showGlobals | ( | ) |
Definition at line 2029 of file FunctionTreeView.cpp.
References m_browser.
Referenced by MantidQt::MantidWidgets::FunctionMultiDomainPresenter::showGlobals().
|
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().
QtTreePropertyBrowser * MantidQt::MantidWidgets::FunctionTreeView::treeBrowser | ( | ) |
Definition at line 2173 of file FunctionTreeView.cpp.
References m_browser.
QTreeWidget * MantidQt::MantidWidgets::FunctionTreeView::treeWidget | ( | ) | const |
Definition at line 2171 of file FunctionTreeView.cpp.
References m_browser.
|
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().
|
protected |
Update function index properties.
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().
|
private |
Definition at line 2137 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(), hasLowerBound(), hasUpperBound(), 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(), 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(), 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().