Mantid
|
#include <FunctionMultiDomainPresenter.h>
Signals | |
void | attributeChanged (const QString &attributeName) |
void | functionStructureChanged () |
void | parameterChanged (const QString &funcIndex, const QString ¶mName) |
Public Member Functions | |
void | addDatasets (const QStringList &datasetNames) |
void | clear () |
void | clearErrors () |
boost::optional< QString > | currentFunctionIndex () const |
FunctionMultiDomainPresenter (IFunctionView *view) | |
int | getCurrentDataset () const |
QStringList | getDatasetDomainNames () const |
QStringList | getDatasetNames () const |
IFunction_sptr | getFitFunction () const |
QString | getFitFunctionString () const |
IFunction_sptr | getFunction () const |
IFunction_sptr | getFunctionByIndex (const QString &index) |
QString | getFunctionString () const |
QStringList | getGlobalParameters () const |
QString | getLocalParameterConstraint (const QString &parName, int i) const |
QStringList | getLocalParameters () const |
QString | getLocalParameterTie (const QString &parName, int i) const |
double | getLocalParameterValue (const QString &parName, int i) const |
int | getNumberOfDatasets () const |
double | getParameter (const QString ¶mName) |
QString | getParameterTie (const QString &parName) const |
bool | hasFunction () const |
void | hideGlobals () |
bool | isLocalParameterFixed (const QString &parName, int i) const |
bool | isParameterFixed (const QString &parName) const |
void | removeDatasets (QList< int > indices) |
void | setBackgroundA0 (double value) |
void | setColumnSizes (int s0, int s1, int s2) |
void | setCurrentDataset (int) |
void | setDatasets (const QList< FunctionModelDataset > &datasets) |
void | setDatasets (const QStringList &datasetNames) |
void | setErrorsEnabled (bool enabled) |
void | setFunction (IFunction_sptr fun) |
void | setFunctionString (const QString &funStr) |
void | setGlobalParameters (const QStringList &globals) |
void | setLocalParameterConstraint (const QString &parName, int i, const QString &constraint) |
void | setLocalParameterFixed (const QString &parName, int i, bool fixed) |
void | setLocalParameterTie (const QString &parName, int i, const QString &tie) |
void | setLocalParameterValue (const QString &parName, int i, double value) |
void | setLocalParameterValue (const QString &parName, int i, double value, double error) |
void | setNumberOfDatasets (int) |
void | setParameter (const QString ¶mName, double value) |
void | setParameterError (const QString ¶mName, double value) |
void | setStretchLastColumn (bool stretch) |
void | showGlobals () |
void | updateMultiDatasetAttributes (const IFunction &fun) |
void | updateMultiDatasetParameters (const IFunction &fun) |
void | updateParameters (const IFunction &fun) |
IFunctionView * | view () const |
Private Slots | |
void | editLocalParameter (const QString &parName) |
Launches the Edit Local Parameter dialog and deals with the input from it. More... | |
void | editLocalParameterFinish (int result) |
void | viewAddedConstraint (const QString &functionIndex, const QString &constraint) |
void | viewAddedFunction (const QString &funStr) |
void | viewChangedAttribute (const QString &attrName) |
void | viewChangedGlobals (const QStringList &globalParameters) |
void | viewChangedParameter (const QString &parName) |
void | viewChangedTie (const QString &parName, const QString &tie) |
void | viewPastedFunction (const QString &funStr) |
void | viewRemovedConstraint (const QString &parName) |
void | viewRemovedFunction (const QString &functionIndex) |
void | viewRequestedCopyToClipboard () |
void | viewRequestedFunctionHelp () |
Private Member Functions | |
void | updateViewAttributesFromModel () |
void | updateViewFromModel () |
Private Attributes | |
EditLocalParameterDialog * | m_editLocalParameterDialog |
std::unique_ptr< FunctionModel > | m_model |
IFunctionView * | m_view |
Definition at line 28 of file FunctionMultiDomainPresenter.h.
MantidQt::MantidWidgets::FunctionMultiDomainPresenter::FunctionMultiDomainPresenter | ( | IFunctionView * | view | ) |
Definition at line 31 of file FunctionMultiDomainPresenter.cpp.
References editLocalParameter(), m_view, parameterChanged(), viewAddedConstraint(), viewAddedFunction(), viewChangedAttribute(), viewChangedGlobals(), viewChangedParameter(), viewChangedTie(), viewPastedFunction(), viewRemovedConstraint(), viewRemovedFunction(), viewRequestedCopyToClipboard(), and viewRequestedFunctionHelp().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::addDatasets | ( | const QStringList & | datasetNames | ) |
Definition at line 122 of file FunctionMultiDomainPresenter.cpp.
References m_model.
|
signal |
Referenced by viewChangedAttribute().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::clear | ( | ) |
Definition at line 270 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::clear(), functionStructureChanged(), m_model, and m_view.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::clearErrors | ( | ) |
Definition at line 108 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::clearErrors(), and m_view.
boost::optional< QString > MantidQt::MantidWidgets::FunctionMultiDomainPresenter::currentFunctionIndex | ( | ) | const |
Definition at line 110 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::currentFunctionIndex(), and m_view.
|
privateslot |
Launches the Edit Local Parameter dialog and deals with the input from it.
parName | :: Name of parameter that button was clicked for. |
Definition at line 311 of file FunctionMultiDomainPresenter.cpp.
References editLocalParameterFinish(), getDatasetDomainNames(), getDatasetNames(), getLocalParameterConstraint(), getLocalParameterTie(), getLocalParameterValue(), isLocalParameterFixed(), m_editLocalParameterDialog, m_view, n, and value.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 336 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), MantidQt::MantidWidgets::EditLocalParameterDialog::getConstraints(), MantidQt::MantidWidgets::EditLocalParameterDialog::getFixes(), getNumberOfDatasets(), MantidQt::MantidWidgets::EditLocalParameterDialog::getParameterName(), MantidQt::MantidWidgets::EditLocalParameterDialog::getTies(), MantidQt::MantidWidgets::EditLocalParameterDialog::getValues(), m_editLocalParameterDialog, setLocalParameterConstraint(), setLocalParameterFixed(), setLocalParameterTie(), and setLocalParameterValue().
Referenced by editLocalParameter().
|
signal |
int MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getCurrentDataset | ( | ) | const |
Definition at line 130 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QStringList MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getDatasetDomainNames | ( | ) | const |
Definition at line 126 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
QStringList MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getDatasetNames | ( | ) | const |
Definition at line 124 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
IFunction_sptr MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getFitFunction | ( | ) | const |
Definition at line 63 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QString MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getFitFunctionString | ( | ) | const |
Definition at line 65 of file FunctionMultiDomainPresenter.cpp.
References m_model.
IFunction_sptr MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getFunction | ( | ) | const |
Definition at line 268 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by viewRequestedCopyToClipboard().
IFunction_sptr MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getFunctionByIndex | ( | const QString & | index | ) |
Definition at line 69 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::getFunctionWithPrefix(), index, and m_model.
QString MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getFunctionString | ( | ) | const |
Definition at line 266 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QStringList MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getGlobalParameters | ( | ) | const |
Definition at line 199 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QString MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getLocalParameterConstraint | ( | const QString & | parName, |
int | i | ||
) | const |
Definition at line 154 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
QStringList MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getLocalParameters | ( | ) | const |
Definition at line 206 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QString MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getLocalParameterTie | ( | const QString & | parName, |
int | i | ||
) | const |
Definition at line 150 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
double MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getLocalParameterValue | ( | const QString & | parName, |
int | i | ||
) | const |
Definition at line 142 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
int MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getNumberOfDatasets | ( | ) | const |
Definition at line 128 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameterFinish().
double MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getParameter | ( | const QString & | paramName | ) |
Definition at line 83 of file FunctionMultiDomainPresenter.cpp.
References m_model.
QString MantidQt::MantidWidgets::FunctionMultiDomainPresenter::getParameterTie | ( | const QString & | parName | ) | const |
Definition at line 89 of file FunctionMultiDomainPresenter.cpp.
References m_model.
bool MantidQt::MantidWidgets::FunctionMultiDomainPresenter::hasFunction | ( | ) | const |
Definition at line 67 of file FunctionMultiDomainPresenter.cpp.
References m_model.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::hideGlobals | ( | ) |
Definition at line 386 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::FunctionTreeView::hideGlobals(), and m_view.
bool MantidQt::MantidWidgets::FunctionMultiDomainPresenter::isLocalParameterFixed | ( | const QString & | parName, |
int | i | ||
) | const |
Definition at line 146 of file FunctionMultiDomainPresenter.cpp.
References m_model.
Referenced by editLocalParameter().
bool MantidQt::MantidWidgets::FunctionMultiDomainPresenter::isParameterFixed | ( | const QString & | parName | ) | const |
Definition at line 85 of file FunctionMultiDomainPresenter.cpp.
References m_model.
|
signal |
Referenced by FunctionMultiDomainPresenter(), and viewChangedParameter().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::removeDatasets | ( | QList< int > | indices | ) |
Definition at line 137 of file FunctionMultiDomainPresenter.cpp.
References m_model, and setCurrentDataset().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setBackgroundA0 | ( | double | value | ) |
Definition at line 208 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameter(), and value.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setColumnSizes | ( | int | s0, |
int | s1, | ||
int | s2 | ||
) |
Definition at line 276 of file FunctionMultiDomainPresenter.cpp.
References m_view, and MantidQt::MantidWidgets::FunctionTreeView::setColumnSizes().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setCurrentDataset | ( | int | index | ) |
Definition at line 132 of file FunctionMultiDomainPresenter.cpp.
References index, m_model, and updateViewFromModel().
Referenced by removeDatasets().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setDatasets | ( | const QList< FunctionModelDataset > & | datasets | ) |
Definition at line 118 of file FunctionMultiDomainPresenter.cpp.
References m_model.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setDatasets | ( | const QStringList & | datasetNames | ) |
Definition at line 116 of file FunctionMultiDomainPresenter.cpp.
References m_model.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setErrorsEnabled | ( | bool | enabled | ) |
Definition at line 287 of file FunctionMultiDomainPresenter.cpp.
References m_view, and MantidQt::MantidWidgets::IFunctionView::setErrorsEnabled().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setFunction | ( | IFunction_sptr | fun | ) |
Definition at line 51 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setFunction().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setFunctionString | ( | const QString & | funStr | ) |
Definition at line 57 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setFunction().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setGlobalParameters | ( | const QStringList & | globals | ) |
Definition at line 201 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setGlobalParameters().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setLocalParameterConstraint | ( | const QString & | parName, |
int | i, | ||
const QString & | constraint | ||
) |
Definition at line 191 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setParameterConstraint().
Referenced by editLocalParameterFinish().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setLocalParameterFixed | ( | const QString & | parName, |
int | i, | ||
bool | fixed | ||
) |
Definition at line 173 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setParameterTie().
Referenced by editLocalParameterFinish().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setLocalParameterTie | ( | const QString & | parName, |
int | i, | ||
const QString & | tie | ||
) |
Definition at line 184 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setParameterTie().
Referenced by editLocalParameterFinish().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setLocalParameterValue | ( | const QString & | parName, |
int | i, | ||
double | value | ||
) |
Definition at line 158 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameter(), and value.
Referenced by editLocalParameterFinish().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setLocalParameterValue | ( | const QString & | parName, |
int | i, | ||
double | value, | ||
double | error | ||
) |
Definition at line 165 of file FunctionMultiDomainPresenter.cpp.
References error, m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameter(), MantidQt::MantidWidgets::IFunctionView::setParameterError(), and value.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setNumberOfDatasets | ( | int | n | ) |
Definition at line 114 of file FunctionMultiDomainPresenter.cpp.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setParameter | ( | const QString & | paramName, |
double | value | ||
) |
Definition at line 73 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameter(), and value.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setParameterError | ( | const QString & | paramName, |
double | value | ||
) |
Definition at line 78 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameterError(), and value.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::setStretchLastColumn | ( | bool | stretch | ) |
Definition at line 282 of file FunctionMultiDomainPresenter.cpp.
References m_view.
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::showGlobals | ( | ) |
Definition at line 393 of file FunctionMultiDomainPresenter.cpp.
References m_view, and MantidQt::MantidWidgets::FunctionTreeView::showGlobals().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::updateMultiDatasetAttributes | ( | const IFunction & | fun | ) |
Definition at line 103 of file FunctionMultiDomainPresenter.cpp.
References m_model, and updateViewFromModel().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::updateMultiDatasetParameters | ( | const IFunction & | fun | ) |
Definition at line 98 of file FunctionMultiDomainPresenter.cpp.
References m_model, and updateViewFromModel().
void MantidQt::MantidWidgets::FunctionMultiDomainPresenter::updateParameters | ( | const IFunction & | fun | ) |
Definition at line 93 of file FunctionMultiDomainPresenter.cpp.
References m_model, and updateViewFromModel().
|
private |
Definition at line 376 of file FunctionMultiDomainPresenter.cpp.
References m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setAttributeValue(), and value.
Referenced by updateViewFromModel(), and viewChangedAttribute().
|
private |
Definition at line 360 of file FunctionMultiDomainPresenter.cpp.
References index, m_model, m_view, MantidQt::MantidWidgets::IFunctionView::setParameter(), MantidQt::MantidWidgets::IFunctionView::setParameterConstraint(), MantidQt::MantidWidgets::IFunctionView::setParameterError(), MantidQt::MantidWidgets::IFunctionView::setParameterTie(), updateViewAttributesFromModel(), and value.
Referenced by setCurrentDataset(), updateMultiDatasetAttributes(), updateMultiDatasetParameters(), and updateParameters().
|
inline |
Definition at line 109 of file FunctionMultiDomainPresenter.h.
|
privateslot |
Definition at line 238 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), and m_model.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 219 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::currentFunctionIndex(), functionStructureChanged(), m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setGlobalParameters().
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 296 of file FunctionMultiDomainPresenter.cpp.
References attributeChanged(), Mantid::Kernel::Logger::error(), Mantid::API::g_log, MantidQt::MantidWidgets::IFunctionView::getAttribute(), m_model, m_view, updateViewAttributesFromModel(), and value.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 255 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), and m_model.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 289 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::getParameter(), m_model, m_view, parameterChanged(), MantidQt::MantidWidgets::splitParameterName(), and value.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 233 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), and m_model.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 214 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), and m_model.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 243 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), and m_model.
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 227 of file FunctionMultiDomainPresenter.cpp.
References functionStructureChanged(), m_model, m_view, and MantidQt::MantidWidgets::IFunctionView::setGlobalParameters().
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 248 of file FunctionMultiDomainPresenter.cpp.
References getFunction().
Referenced by FunctionMultiDomainPresenter().
|
privateslot |
Definition at line 260 of file FunctionMultiDomainPresenter.cpp.
References MantidQt::MantidWidgets::IFunctionView::getSelectedFunction(), m_view, and MantidQt::MantidWidgets::IFunctionView::showFunctionHelp().
Referenced by FunctionMultiDomainPresenter().
|
private |
Definition at line 106 of file FunctionMultiDomainPresenter.h.
Referenced by editLocalParameter(), and editLocalParameterFinish().
|
private |
Definition at line 105 of file FunctionMultiDomainPresenter.h.
Referenced by addDatasets(), clear(), getCurrentDataset(), getDatasetDomainNames(), getDatasetNames(), getFitFunction(), getFitFunctionString(), getFunction(), getFunctionByIndex(), getFunctionString(), getGlobalParameters(), getLocalParameterConstraint(), getLocalParameters(), getLocalParameterTie(), getLocalParameterValue(), getNumberOfDatasets(), getParameter(), getParameterTie(), hasFunction(), isLocalParameterFixed(), isParameterFixed(), removeDatasets(), setBackgroundA0(), setCurrentDataset(), setDatasets(), setFunction(), setFunctionString(), setGlobalParameters(), setLocalParameterConstraint(), setLocalParameterFixed(), setLocalParameterTie(), setLocalParameterValue(), setNumberOfDatasets(), setParameter(), setParameterError(), updateMultiDatasetAttributes(), updateMultiDatasetParameters(), updateParameters(), updateViewAttributesFromModel(), updateViewFromModel(), viewAddedConstraint(), viewAddedFunction(), viewChangedAttribute(), viewChangedGlobals(), viewChangedParameter(), viewChangedTie(), viewPastedFunction(), viewRemovedConstraint(), and viewRemovedFunction().
|
private |
Definition at line 104 of file FunctionMultiDomainPresenter.h.
Referenced by clear(), clearErrors(), currentFunctionIndex(), editLocalParameter(), FunctionMultiDomainPresenter(), hideGlobals(), setBackgroundA0(), setColumnSizes(), setErrorsEnabled(), setFunction(), setFunctionString(), setGlobalParameters(), setLocalParameterConstraint(), setLocalParameterFixed(), setLocalParameterTie(), setLocalParameterValue(), setParameter(), setParameterError(), setStretchLastColumn(), showGlobals(), updateViewAttributesFromModel(), updateViewFromModel(), viewAddedFunction(), viewChangedAttribute(), viewChangedParameter(), viewRemovedFunction(), and viewRequestedFunctionHelp().