Mantid
|
The BasicFitOptionsBrowser class implements a QtPropertyBrowser to display fitting properties found in the Fit algorithm. More...
#include <FitScriptOptionsBrowser.h>
Signals | |
void | fittingModeChanged (FittingMode fittingMode) |
void | outputBaseNameChanged (std::string const &outputBaseName) |
Public Member Functions | |
FitScriptOptionsBrowser (QWidget *parent=nullptr) | |
bool | getBoolProperty (std::string const &name) const |
FittingMode | getFittingMode () const |
std::string | getProperty (std::string const &name) const |
void | setFittingMode (FittingMode fittingMode) |
void | setProperty (std::string const &name, std::string const &value) |
~FitScriptOptionsBrowser () | |
Private Types | |
using | PropertyGetter = std::string(FitScriptOptionsBrowser::*)(QtProperty *) const |
using | PropertySetter = void(FitScriptOptionsBrowser::*)(QtProperty *, std::string const &) |
Private Slots | |
void | enumChanged (QtProperty *prop) |
void | stringChanged (QtProperty *prop) |
Private Member Functions | |
void | addProperty (std::string const &name, QtProperty *prop, PropertyGetter getter, PropertySetter setter) |
void | createBrowser () |
void | createCostFunctionProperty () |
void | createEvaluationTypeProperty () |
void | createFittingModeProperty () |
void | createMaxIterationsProperty () |
void | createMinimizerProperty () |
void | createOutputBaseNameProperty () |
void | createPlotOutputProperty () |
void | createProperties () |
std::string | getIntProperty (QtProperty *prop) const |
QtProperty * | getQtPropertyFor (std::string const &name) const |
std::string | getStringEnumProperty (QtProperty *prop) const |
std::string | getStringProperty (QtProperty *prop) const |
void | setIntProperty (QtProperty *prop, std::string const &value) |
void | setStringEnumProperty (QtProperty *prop, std::string const &value) |
void | setStringProperty (QtProperty *prop, std::string const &value) |
Private Attributes | |
QtBoolPropertyManager * | m_boolManager |
QtTreePropertyBrowser * | m_browser |
Qt property browser which displays properties. More... | |
QtProperty * | m_costFunction |
QtEnumPropertyManager * | m_enumManager |
QtProperty * | m_evaluationType |
QtProperty * | m_fittingMode |
Properties. More... | |
QMap< QtProperty *, PropertyGetter > | m_getters |
Store for the property getter methods. More... | |
QtIntPropertyManager * | m_intManager |
QtProperty * | m_maxIterations |
QtProperty * | m_minimizer |
QtProperty * | m_outputBaseName |
QtProperty * | m_plotOutput |
QMap< std::string, QtProperty * > | m_propertyNameMap |
Maps algorithm property name to the QtProperty. More... | |
QMap< QtProperty *, PropertySetter > | m_setters |
Store for the property setter methods. More... | |
QtStringPropertyManager * | m_stringManager |
Property managers. More... | |
The BasicFitOptionsBrowser class implements a QtPropertyBrowser to display fitting properties found in the Fit algorithm.
It only shows the most essential fit properties such as the FittingMode, Max Iterations, Minimizer, Evaluation Type and Cost Function. The other fit properties are not displayed in order to avoid the browser becoming cluttered with rarely used options.
Definition at line 33 of file FitScriptOptionsBrowser.h.
|
private |
Definition at line 37 of file FitScriptOptionsBrowser.h.
|
private |
Definition at line 36 of file FitScriptOptionsBrowser.h.
MantidQt::MantidWidgets::FitScriptOptionsBrowser::FitScriptOptionsBrowser | ( | QWidget * | parent = nullptr | ) |
Definition at line 50 of file FitScriptOptionsBrowser.cpp.
References createBrowser(), and createProperties().
MantidQt::MantidWidgets::FitScriptOptionsBrowser::~FitScriptOptionsBrowser | ( | ) |
Definition at line 57 of file FitScriptOptionsBrowser.cpp.
References m_boolManager, m_browser, m_enumManager, m_intManager, and m_stringManager.
|
private |
Definition at line 169 of file FitScriptOptionsBrowser.cpp.
References m_getters, m_propertyNameMap, and m_setters.
Referenced by createCostFunctionProperty(), createEvaluationTypeProperty(), createMaxIterationsProperty(), createMinimizerProperty(), and createOutputBaseNameProperty().
|
private |
Definition at line 64 of file FitScriptOptionsBrowser.cpp.
References enumChanged(), m_boolManager, m_browser, m_enumManager, m_intManager, m_stringManager, and stringChanged().
Referenced by FitScriptOptionsBrowser().
|
private |
Definition at line 130 of file FitScriptOptionsBrowser.cpp.
References addProperty(), getStringEnumProperty(), m_browser, m_costFunction, m_enumManager, and setStringEnumProperty().
Referenced by createProperties().
|
private |
Definition at line 140 of file FitScriptOptionsBrowser.cpp.
References addProperty(), getStringEnumProperty(), m_browser, m_enumManager, m_evaluationType, and setStringEnumProperty().
Referenced by createProperties().
|
private |
Definition at line 100 of file FitScriptOptionsBrowser.cpp.
References fittingModeChanged(), getFittingMode(), m_browser, m_enumManager, and m_fittingMode.
Referenced by createProperties().
|
private |
Definition at line 108 of file FitScriptOptionsBrowser.cpp.
References addProperty(), getIntProperty(), m_browser, m_intManager, m_maxIterations, and setIntProperty().
Referenced by createProperties().
|
private |
Definition at line 119 of file FitScriptOptionsBrowser.cpp.
References addProperty(), getStringEnumProperty(), m_browser, m_enumManager, m_minimizer, and setStringEnumProperty().
Referenced by createProperties().
|
private |
Definition at line 150 of file FitScriptOptionsBrowser.cpp.
References addProperty(), getStringProperty(), m_browser, m_outputBaseName, m_stringManager, and setStringProperty().
Referenced by createProperties().
|
private |
Definition at line 160 of file FitScriptOptionsBrowser.cpp.
References m_boolManager, m_browser, m_plotOutput, and m_propertyNameMap.
Referenced by createProperties().
|
private |
Definition at line 90 of file FitScriptOptionsBrowser.cpp.
References createCostFunctionProperty(), createEvaluationTypeProperty(), createFittingModeProperty(), createMaxIterationsProperty(), createMinimizerProperty(), createOutputBaseNameProperty(), and createPlotOutputProperty().
Referenced by FitScriptOptionsBrowser().
|
privateslot |
Definition at line 206 of file FitScriptOptionsBrowser.cpp.
References fittingModeChanged(), getFittingMode(), and m_fittingMode.
Referenced by createBrowser().
|
signal |
Referenced by createFittingModeProperty(), and enumChanged().
bool MantidQt::MantidWidgets::FitScriptOptionsBrowser::getBoolProperty | ( | std::string const & | name | ) | const |
Definition at line 188 of file FitScriptOptionsBrowser.cpp.
References getQtPropertyFor(), and m_boolManager.
FittingMode MantidQt::MantidWidgets::FitScriptOptionsBrowser::getFittingMode | ( | ) | const |
Definition at line 257 of file FitScriptOptionsBrowser.cpp.
References m_enumManager, and m_fittingMode.
Referenced by createFittingModeProperty(), and enumChanged().
|
private |
Definition at line 224 of file FitScriptOptionsBrowser.cpp.
References m_intManager.
Referenced by createMaxIterationsProperty().
std::string MantidQt::MantidWidgets::FitScriptOptionsBrowser::getProperty | ( | std::string const & | name | ) | const |
Definition at line 182 of file FitScriptOptionsBrowser.cpp.
References getQtPropertyFor(), and m_getters.
|
private |
Definition at line 193 of file FitScriptOptionsBrowser.cpp.
References m_propertyNameMap.
Referenced by getBoolProperty(), getProperty(), and setProperty().
|
private |
Definition at line 236 of file FitScriptOptionsBrowser.cpp.
References m_enumManager.
Referenced by createCostFunctionProperty(), createEvaluationTypeProperty(), and createMinimizerProperty().
|
private |
Definition at line 216 of file FitScriptOptionsBrowser.cpp.
References m_stringManager.
Referenced by createOutputBaseNameProperty().
|
signal |
Referenced by stringChanged().
void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setFittingMode | ( | FittingMode | fittingMode | ) |
Definition at line 244 of file FitScriptOptionsBrowser.cpp.
References m_enumManager, m_fittingMode, MantidQt::MantidWidgets::SEQUENTIAL, and MantidQt::MantidWidgets::SIMULTANEOUS.
|
private |
Definition at line 220 of file FitScriptOptionsBrowser.cpp.
References m_intManager, and value.
Referenced by createMaxIterationsProperty().
void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setProperty | ( | std::string const & | name, |
std::string const & | value | ||
) |
Definition at line 176 of file FitScriptOptionsBrowser.cpp.
References getQtPropertyFor(), m_setters, and value.
|
private |
Definition at line 228 of file FitScriptOptionsBrowser.cpp.
References m_enumManager, and value.
Referenced by createCostFunctionProperty(), createEvaluationTypeProperty(), and createMinimizerProperty().
|
private |
Definition at line 212 of file FitScriptOptionsBrowser.cpp.
References m_stringManager, and value.
Referenced by createOutputBaseNameProperty().
|
privateslot |
Definition at line 200 of file FitScriptOptionsBrowser.cpp.
References m_outputBaseName, and outputBaseNameChanged().
Referenced by createBrowser().
|
private |
Definition at line 86 of file FitScriptOptionsBrowser.h.
Referenced by createBrowser(), createPlotOutputProperty(), getBoolProperty(), and ~FitScriptOptionsBrowser().
|
private |
Qt property browser which displays properties.
Definition at line 98 of file FitScriptOptionsBrowser.h.
Referenced by createBrowser(), createCostFunctionProperty(), createEvaluationTypeProperty(), createFittingModeProperty(), createMaxIterationsProperty(), createMinimizerProperty(), createOutputBaseNameProperty(), createPlotOutputProperty(), and ~FitScriptOptionsBrowser().
|
private |
Definition at line 92 of file FitScriptOptionsBrowser.h.
Referenced by createCostFunctionProperty().
|
private |
Definition at line 85 of file FitScriptOptionsBrowser.h.
Referenced by createBrowser(), createCostFunctionProperty(), createEvaluationTypeProperty(), createFittingModeProperty(), createMinimizerProperty(), getFittingMode(), getStringEnumProperty(), setFittingMode(), setStringEnumProperty(), and ~FitScriptOptionsBrowser().
|
private |
Definition at line 93 of file FitScriptOptionsBrowser.h.
Referenced by createEvaluationTypeProperty().
|
private |
Properties.
Definition at line 89 of file FitScriptOptionsBrowser.h.
Referenced by createFittingModeProperty(), enumChanged(), getFittingMode(), and setFittingMode().
|
private |
Store for the property getter methods.
Definition at line 105 of file FitScriptOptionsBrowser.h.
Referenced by addProperty(), and getProperty().
|
private |
Definition at line 84 of file FitScriptOptionsBrowser.h.
Referenced by createBrowser(), createMaxIterationsProperty(), getIntProperty(), setIntProperty(), and ~FitScriptOptionsBrowser().
|
private |
Definition at line 90 of file FitScriptOptionsBrowser.h.
Referenced by createMaxIterationsProperty().
|
private |
Definition at line 91 of file FitScriptOptionsBrowser.h.
Referenced by createMinimizerProperty().
|
private |
Definition at line 94 of file FitScriptOptionsBrowser.h.
Referenced by createOutputBaseNameProperty(), and stringChanged().
|
private |
Definition at line 95 of file FitScriptOptionsBrowser.h.
Referenced by createPlotOutputProperty().
|
private |
Maps algorithm property name to the QtProperty.
Definition at line 101 of file FitScriptOptionsBrowser.h.
Referenced by addProperty(), createPlotOutputProperty(), and getQtPropertyFor().
|
private |
Store for the property setter methods.
Definition at line 103 of file FitScriptOptionsBrowser.h.
Referenced by addProperty(), and setProperty().
|
private |
Property managers.
Definition at line 83 of file FitScriptOptionsBrowser.h.
Referenced by createBrowser(), createOutputBaseNameProperty(), getStringProperty(), setStringProperty(), and ~FitScriptOptionsBrowser().