Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::FitScriptOptionsBrowser Class Reference

The BasicFitOptionsBrowser class implements a QtPropertyBrowser to display fitting properties found in the Fit algorithm. More...

#include <FitScriptOptionsBrowser.h>

Inheritance diagram for MantidQt::MantidWidgets::FitScriptOptionsBrowser:

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 *, PropertyGetterm_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 *, PropertySetterm_setters
 Store for the property setter methods. More...
 
QtStringPropertyManager * m_stringManager
 Property managers. More...
 

Detailed Description

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.

Member Typedef Documentation

◆ PropertyGetter

using MantidQt::MantidWidgets::FitScriptOptionsBrowser::PropertyGetter = std::string (FitScriptOptionsBrowser::*)(QtProperty *) const
private

Definition at line 37 of file FitScriptOptionsBrowser.h.

◆ PropertySetter

using MantidQt::MantidWidgets::FitScriptOptionsBrowser::PropertySetter = void (FitScriptOptionsBrowser::*)(QtProperty *, std::string const &)
private

Definition at line 36 of file FitScriptOptionsBrowser.h.

Constructor & Destructor Documentation

◆ FitScriptOptionsBrowser()

MantidQt::MantidWidgets::FitScriptOptionsBrowser::FitScriptOptionsBrowser ( QWidget *  parent = nullptr)

Definition at line 50 of file FitScriptOptionsBrowser.cpp.

References createBrowser(), and createProperties().

◆ ~FitScriptOptionsBrowser()

MantidQt::MantidWidgets::FitScriptOptionsBrowser::~FitScriptOptionsBrowser ( )

Member Function Documentation

◆ addProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::addProperty ( std::string const &  name,
QtProperty *  prop,
PropertyGetter  getter,
PropertySetter  setter 
)
private

◆ createBrowser()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createBrowser ( )
private

◆ createCostFunctionProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createCostFunctionProperty ( )
private

◆ createEvaluationTypeProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createEvaluationTypeProperty ( )
private

◆ createFittingModeProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createFittingModeProperty ( )
private

◆ createMaxIterationsProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createMaxIterationsProperty ( )
private

◆ createMinimizerProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createMinimizerProperty ( )
private

◆ createOutputBaseNameProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createOutputBaseNameProperty ( )
private

◆ createPlotOutputProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createPlotOutputProperty ( )
private

Definition at line 160 of file FitScriptOptionsBrowser.cpp.

References m_boolManager, m_browser, m_plotOutput, and m_propertyNameMap.

Referenced by createProperties().

◆ createProperties()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::createProperties ( )
private

◆ enumChanged

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::enumChanged ( QtProperty *  prop)
privateslot

Definition at line 206 of file FitScriptOptionsBrowser.cpp.

References fittingModeChanged(), getFittingMode(), and m_fittingMode.

Referenced by createBrowser().

◆ fittingModeChanged

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::fittingModeChanged ( FittingMode  fittingMode)
signal

◆ getBoolProperty()

bool MantidQt::MantidWidgets::FitScriptOptionsBrowser::getBoolProperty ( std::string const &  name) const

Definition at line 188 of file FitScriptOptionsBrowser.cpp.

References getQtPropertyFor(), and m_boolManager.

◆ getFittingMode()

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().

◆ getIntProperty()

std::string MantidQt::MantidWidgets::FitScriptOptionsBrowser::getIntProperty ( QtProperty *  prop) const
private

Definition at line 224 of file FitScriptOptionsBrowser.cpp.

References m_intManager.

Referenced by createMaxIterationsProperty().

◆ getProperty()

std::string MantidQt::MantidWidgets::FitScriptOptionsBrowser::getProperty ( std::string const &  name) const

Definition at line 182 of file FitScriptOptionsBrowser.cpp.

References getQtPropertyFor(), and m_getters.

◆ getQtPropertyFor()

QtProperty * MantidQt::MantidWidgets::FitScriptOptionsBrowser::getQtPropertyFor ( std::string const &  name) const
private

Definition at line 193 of file FitScriptOptionsBrowser.cpp.

References m_propertyNameMap.

Referenced by getBoolProperty(), getProperty(), and setProperty().

◆ getStringEnumProperty()

std::string MantidQt::MantidWidgets::FitScriptOptionsBrowser::getStringEnumProperty ( QtProperty *  prop) const
private

◆ getStringProperty()

std::string MantidQt::MantidWidgets::FitScriptOptionsBrowser::getStringProperty ( QtProperty *  prop) const
private

Definition at line 216 of file FitScriptOptionsBrowser.cpp.

References m_stringManager.

Referenced by createOutputBaseNameProperty().

◆ outputBaseNameChanged

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::outputBaseNameChanged ( std::string const &  outputBaseName)
signal

Referenced by stringChanged().

◆ setFittingMode()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setFittingMode ( FittingMode  fittingMode)

◆ setIntProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setIntProperty ( QtProperty *  prop,
std::string const &  value 
)
private

Definition at line 220 of file FitScriptOptionsBrowser.cpp.

References m_intManager, and value.

Referenced by createMaxIterationsProperty().

◆ setProperty()

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.

◆ setStringEnumProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setStringEnumProperty ( QtProperty *  prop,
std::string const &  value 
)
private

◆ setStringProperty()

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::setStringProperty ( QtProperty *  prop,
std::string const &  value 
)
private

Definition at line 212 of file FitScriptOptionsBrowser.cpp.

References m_stringManager, and value.

Referenced by createOutputBaseNameProperty().

◆ stringChanged

void MantidQt::MantidWidgets::FitScriptOptionsBrowser::stringChanged ( QtProperty *  prop)
privateslot

Definition at line 200 of file FitScriptOptionsBrowser.cpp.

References m_outputBaseName, and outputBaseNameChanged().

Referenced by createBrowser().

Member Data Documentation

◆ m_boolManager

QtBoolPropertyManager* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_boolManager
private

◆ m_browser

QtTreePropertyBrowser* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_browser
private

◆ m_costFunction

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_costFunction
private

Definition at line 92 of file FitScriptOptionsBrowser.h.

Referenced by createCostFunctionProperty().

◆ m_enumManager

QtEnumPropertyManager* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_enumManager
private

◆ m_evaluationType

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_evaluationType
private

Definition at line 93 of file FitScriptOptionsBrowser.h.

Referenced by createEvaluationTypeProperty().

◆ m_fittingMode

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_fittingMode
private

Properties.

Definition at line 89 of file FitScriptOptionsBrowser.h.

Referenced by createFittingModeProperty(), enumChanged(), getFittingMode(), and setFittingMode().

◆ m_getters

QMap<QtProperty *, PropertyGetter> MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_getters
private

Store for the property getter methods.

Definition at line 105 of file FitScriptOptionsBrowser.h.

Referenced by addProperty(), and getProperty().

◆ m_intManager

QtIntPropertyManager* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_intManager
private

◆ m_maxIterations

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_maxIterations
private

Definition at line 90 of file FitScriptOptionsBrowser.h.

Referenced by createMaxIterationsProperty().

◆ m_minimizer

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_minimizer
private

Definition at line 91 of file FitScriptOptionsBrowser.h.

Referenced by createMinimizerProperty().

◆ m_outputBaseName

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_outputBaseName
private

Definition at line 94 of file FitScriptOptionsBrowser.h.

Referenced by createOutputBaseNameProperty(), and stringChanged().

◆ m_plotOutput

QtProperty* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_plotOutput
private

Definition at line 95 of file FitScriptOptionsBrowser.h.

Referenced by createPlotOutputProperty().

◆ m_propertyNameMap

QMap<std::string, QtProperty *> MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_propertyNameMap
private

Maps algorithm property name to the QtProperty.

Definition at line 101 of file FitScriptOptionsBrowser.h.

Referenced by addProperty(), createPlotOutputProperty(), and getQtPropertyFor().

◆ m_setters

QMap<QtProperty *, PropertySetter> MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_setters
private

Store for the property setter methods.

Definition at line 103 of file FitScriptOptionsBrowser.h.

Referenced by addProperty(), and setProperty().

◆ m_stringManager

QtStringPropertyManager* MantidQt::MantidWidgets::FitScriptOptionsBrowser::m_stringManager
private

The documentation for this class was generated from the following files: