55 void removeFunction();
61 QString functionName()
const;
63 QString functionPrefix()
const;
66 std::shared_ptr<Mantid::API::CompositeFunction>
cfun()
const {
return m_cf; }
68 std::shared_ptr<Mantid::API::IPeakFunction>
pfun()
const {
return m_pf; }
70 std::shared_ptr<Mantid::API::IFunction>
ifun()
const {
return m_fun; }
72 QtBrowserItem *
item()
const {
return m_item; }
81 std::shared_ptr<const Mantid::API::CompositeFunction> findCompositeFunction(QtBrowserItem *item)
const;
86 std::shared_ptr<const Mantid::API::IFunction> findFunction(QtBrowserItem *item)
const;
97 bool setParameter(QtProperty *prop);
100 bool isParameter(QtProperty *prop);
103 bool setAttribute(QtProperty *prop,
bool resetProperties =
true);
109 template <
typename AttributeType>
void setAttribute(QString
const &attName, AttributeType
const &attValue);
112 void setAttribute(
const QString &attName,
const QString &attValue);
115 void setVectorAttribute(QtProperty *prop);
118 void updateParameters();
121 void updateAttributes();
130 QtProperty *getParameterProperty(
const QString &parName)
const;
134 QtProperty *getParameterProperty(QtProperty *prop)
const;
140 std::shared_ptr<Mantid::API::IFunction> changeType(QtProperty *prop);
142 void setHeight(
const double &h);
143 void setCentre(
const double &c);
144 void setFwhm(
const double &w);
149 double EstimateFwhm()
const;
152 double centre()
const;
154 std::string getWidthParameterName()
const;
155 std::string getCentreParameterName()
const;
156 bool isParameterExplicitlySet(
const std::string ¶m)
const;
157 double base()
const {
return m_base; }
159 void addTie(
const QString &tieStr);
160 void fix(
const QString &parName);
161 void removeTie(QtProperty *prop,
const std::string &globalName);
162 void removeTie(QtProperty *prop);
163 void removeTie(
const QString &propName);
164 void addConstraint(QtProperty *parProp,
bool lo,
bool up,
double loBound,
double upBound);
165 void removeConstraint(QtProperty *parProp);
176 void removeAllPlots();
181 void updateWorkspaces(
const QStringList &oldWorkspaces);
183 void setFunctionWorkspace();
186 QString updateStructureTooltip();
188 const QMap<QString, QtProperty *> &
getTies() {
return m_ties; };
197 void initAttributes();
198 void initParameters();
199 void initWorkspace();
204 std::shared_ptr<Mantid::API::CompositeFunction>
m_cf;
205 std::shared_ptr<Mantid::API::IPeakFunction>
m_pf;
206 std::shared_ptr<Mantid::API::CompositeFunction>
m_parent;
225 void updateParameter(QtProperty *prop);
228 void updateError(QtProperty *prop);
231 void clearError(QtProperty *prop);
234 void applyToAllParameters(
void (
PropertyHandler::*func)(QtProperty *));
237 void updateAttribute(QtProperty *prop);
240 void applyToAllAttributes(
void (
PropertyHandler::*func)(QtProperty *));