void ALCPeakFittingView::initialize() { m_ui.setupUi(m_widget); connect(m_ui.fit, SIGNAL(clicked()), this, SIGNAL(fitRequested())); m_ui.plot->setCanvasBackground(Qt::white); m_ui.plot->setAxisFont(QwtPlot::xBottom, m_widget->font()); m_ui.plot->setAxisFont(QwtPlot::yLeft, m_widget->font()); m_dataCurve->setStyle(QwtPlotCurve::NoCurve); m_dataCurve->setSymbol( QwtSymbol(QwtSymbol::Ellipse, QBrush(), QPen(), QSize(7, 7))); m_dataCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); m_dataCurve->attach(m_ui.plot); m_fittedCurve->setPen(QPen(Qt::red, 1.5)); m_fittedCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); m_fittedCurve->attach(m_ui.plot); // XXX: Being a QwtPlotItem, should get deleted when m_ui.plot gets deleted // (auto-delete option) m_peakPicker = new MantidWidgets::PeakPicker(m_ui.plot, Qt::red); connect(m_peakPicker, SIGNAL(changed()), SIGNAL(peakPickerChanged())); connect(m_ui.peaks, SIGNAL(currentFunctionChanged()), SIGNAL(currentFunctionChanged())); connect(m_ui.peaks, SIGNAL(parameterChanged(QString, QString)), SIGNAL(parameterChanged(QString, QString))); connect(m_ui.help, SIGNAL(clicked()), this, SLOT(help())); connect(m_ui.plotGuess, SIGNAL(clicked()), this, SLOT(plotGuess())); }
void ALCPeakFittingPresenter::initialize() { m_view->initialize(); connect(m_view, SIGNAL(fitRequested()), SLOT(fit())); connect(m_view, SIGNAL(currentFunctionChanged()), SLOT(onCurrentFunctionChanged())); connect(m_view, SIGNAL(peakPickerChanged()), SLOT(onPeakPickerChanged())); // We are updating the whole function anyway, so paramName if left out connect(m_view, SIGNAL(parameterChanged(QString,QString)), SLOT(onParameterChanged(QString))); connect(m_model, SIGNAL(fittedPeaksChanged()), SLOT(onFittedPeaksChanged())); connect(m_model, SIGNAL(dataChanged()), SLOT(onDataChanged())); }