24class QtTreePropertyBrowser;
25class QtGroupPropertyManager;
26class QtDoublePropertyManager;
27class QtIntPropertyManager;
28class QtBoolPropertyManager;
29class QtStringPropertyManager;
30class QtEnumPropertyManager;
33class ParameterPropertyManager;
34class DoubleDialogEditorFactory;
54namespace MantidWidgets {
56class CreateAttributePropertyForFunctionTreeView;
57class SelectFunctionDialog;
89 FunctionTreeView(QWidget *parent,
bool multi, std::vector<std::string> categories = std::vector<std::string>());
93 void clear()
override;
97 bool hasFunction()
const override;
99 void setParameter(
const QString ¶mName,
double value)
override;
101 void setParameterError(
const QString ¶mName,
double error)
override;
103 double getParameter(
const QString ¶mName)
const override;
107 void setErrorsEnabled(
bool enabled)
override;
109 void clearErrors()
override;
111 boost::optional<QString> currentFunctionIndex()
const override;
113 void setParameterTie(
const QString ¶mName,
const QString &tie)
override;
115 void setParameterConstraint(
const QString ¶mName,
const QString &constraint)
override;
117 void setGlobalParameters(
const QStringList &)
override;
119 QStringList getGlobalParameters()
const;
122 void showFunctionHelp(
const QString &functionName)
const override;
127 void setColumnSizes(
int s0,
int s1,
int s2 = -1);
129 void setStretchLastColumn(
bool stretch);
138 void setMultiDomainFunctionPrefix(
const QString &functionPrefix);
140 void setGlobalTies(std::vector<GlobalTie>
const &globalTies);
144 void createBrowser();
146 void createActions();
148 AProperty addProperty(QtProperty *parent, QtProperty *subproperty);
150 void removeProperty(QtProperty *prop);
156 AProperty addFunctionProperty(QtProperty *parent,
const QString &funName);
158 AProperty addParameterProperty(QtProperty *parent,
const QString ¶mName,
const QString ¶mDesc,
161 AProperty addAttributeProperty(QtProperty *parent,
const QString &attName,
166 const std::size_t &parentIndex = 0);
170 const std::string ¶meterName,
const std::size_t ¶meterIndex,
172 const std::size_t &parentIndex = 0);
174 bool addParameterTieInComposite(QtProperty *property,
const std::string ¶meterName,
177 void addGlobalParameterTie(QtProperty *property,
const std::string ¶meterName,
179 const std::size_t &parentIndex = 0);
182 void addMultiDomainIndexProperty(QtProperty *prop);
184 AProperty addIndexProperty(QtProperty *prop);
186 void updateFunctionIndices(QtProperty *prop =
nullptr,
const QString &
index =
"");
190 bool isFunction(QtProperty *prop)
const;
192 bool isAttribute(QtProperty *prop)
const;
194 bool isStringAttribute(QtProperty *prop)
const;
196 bool isDoubleAttribute(QtProperty *prop)
const;
198 bool isIntAttribute(QtProperty *prop)
const;
200 bool isBoolAttribute(QtProperty *prop)
const;
202 bool isVectorAttribute(QtProperty *prop)
const;
204 bool isParameter(QtProperty *prop)
const;
206 double getParameter(QtProperty *prop)
const;
208 bool isIndex(QtProperty *prop)
const;
210 QString getIndex(QtProperty *prop)
const;
212 QString getParameterName(QtProperty *prop)
const;
214 QString getAttributeName(QtProperty *prop)
const;
216 QtProperty *getFunctionProperty(
const QString &
index)
const;
219 QtProperty *getParameterProperty(
const QString ¶mName)
const;
221 QtProperty *getAttributeProperty(
const QString ¶mName)
const;
224 QtProperty *getParentParameterProperty(QtProperty *prop)
const;
226 QtProperty *getTieProperty(QtProperty *prop)
const;
229 void addTieProperty(QtProperty *prop,
const QString &tie,
bool globalTie =
false);
231 bool hasTie(QtProperty *prop)
const;
233 bool isTie(QtProperty *prop)
const;
235 QString getTie(QtProperty *prop)
const;
238 QList<AProperty> addConstraintProperties(QtProperty *prop,
const QString &constraint);
240 bool isConstraint(QtProperty *prop)
const;
242 bool hasConstraint(QtProperty *prop)
const;
244 bool hasLowerBound(QtProperty *prop)
const;
246 bool hasUpperBound(QtProperty *prop)
const;
248 QString getConstraint(
const QString ¶mName,
const double &lowerBound =
Mantid::EMPTY_DBL(),
252 std::pair<QString, QString> getFunctionAndConstraint(QtProperty *prop)
const;
256 void popupMenu(
const QPoint &);
258 void addFunctionBegin();
259 void addFunctionEnd(
int result);
261 void removeFunction();
269 void pasteFromClipboard();
271 void copyToClipboard();
273 void addConstraints();
275 void removeConstraints();
277 void addConstraints10();
279 void addConstraints50();
281 void removeConstraint();
283 void updateCurrentFunctionIndex();
286 void attributeChanged(QtProperty *);
288 void attributeVectorDoubleChanged(QtProperty *);
290 void attributeVectorSizeChanged(QtProperty *);
292 void parameterPropertyChanged(QtProperty *);
294 void parameterButtonClicked(QtProperty *);
296 void tieChanged(QtProperty *);
298 void constraintChanged(QtProperty *);
300 void globalChanged(QtProperty *,
const QString &,
bool);
305 void removeConstraintsQuiet(QtProperty *paramProp);
391 bool m_emitParameterValueChange =
true;
392 bool m_emitAttributeValueChange =
true;
399 void setDoubleAttribute(
const QString &attrName,
double value)
override;
400 void setIntAttribute(
const QString &attrName,
int value)
override;
401 void setStringAttribute(
const QString &attrName, std::string &
value)
override;
402 void setBooleanAttribute(
const QString &attrName,
bool value)
override;
403 void setVectorAttribute(
const QString &attrName, std::vector<double> &val)
override;
406 QString getFullTie(
const QString &tie)
const;
408 std::string getFullParameterName(
const std::string ¶meter,
int compositeIndex = -1)
const;
411 QTreeWidgetItem *getPropertyWidgetItem(QtProperty *prop)
const;
412 QRect visualItemRect(QtProperty *prop)
const;
419 QRect getVisualRectFunctionProperty(
const QString &
index)
const;
420 QRect getVisualRectParameterProperty(
const QString ¶mName)
const;
421 QTreeWidget *treeWidget()
const;
422 QtTreePropertyBrowser *treeBrowser();
423 DoubleDialogEditorFactory *doubleEditorFactory();
424 QWidget *getParamWidget(
const QString ¶mName)
const;
#define EXPORT_OPT_MANTIDQT_COMMON
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
Attribute is a non-fitting parameter.
This is an interface to a fitting function - a semi-abstarct class.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
std::shared_ptr< CompositeFunction > CompositeFunction_sptr
shared pointer to the composite function base class
Helper class which provides the Collimation Length for SANS instruments.
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.