void IndirectFitPlotPresenter::updatePlots() {
  const auto result = m_model->getResultWorkspace();
  if (result)
    plotResult(result);
  else
    plotInput();
  updateRangeSelectors();
  updateFitRangeSelector();
}
Esempio n. 2
0
/**
 * @brief Initialize UI form
 */
void FitControl::initLayout() {
  m_uiForm.setupUi(this);
  m_functionBrowser = m_uiForm.functionBrowser;
  m_fitOptionsBrowser = m_uiForm.fitOptionsBrowser;
  this->initBuiltInModels();
  this->initCustomModels();

  // set SIGNAL/SLOTS connections between "internal" objects
  // update the range selector in StartX or EndX has changed in the browser
  connect(m_fitOptionsBrowser, SIGNAL(doublePropertyChanged(QString)), this,
          SLOT(updateFitRangeSelector(QString)));
  // user clicks the Fit push buttom to carry out the fit
  connect(m_uiForm.pushButtonFit, SIGNAL(clicked()), this, SLOT(fit()));
  // update the model evaluation after changes in the function browser
  connect(m_functionBrowser,
          SIGNAL(parameterChanged(const QString &, const QString &)), this,
          SLOT(slotEvaluateModel(const QString &, const QString &)));
}
void IndirectFitPlotPresenter::updatePlotSpectrum(int spectrum) {
  m_view->setPlotSpectrum(spectrum);
  setActiveSpectrum(static_cast<std::size_t>(spectrum));
  updatePlots();
  updateFitRangeSelector();
}