MultiPeakFitTool Class Reference

`#include <MultiPeakFitTool.h>`

Inheritance diagram for MultiPeakFitTool:

## Signals

void | statusText (const QString &)
void | statusText (const QString &)

## Public Member Functions

| MultiPeakFitTool (Graph *graph, ApplicationWindow *app, MultiPeakFit::PeakProfile profile, int num_peaks, const QObject *status_target, const char *status_slot)
| MultiPeakFitTool (Graph *graph, ApplicationWindow *app, MultiPeakFit::PeakProfile profile, int num_peaks, const QObject *status_target, const char *status_slot)
virtual int | rtti () const
virtual int | rtti () const
virtual | ~MultiPeakFitTool ()
virtual | ~MultiPeakFitTool ()
Public Member Functions inherited from PlotToolInterface
| PlotToolInterface (Graph *graph, const QObject *status_target=NULL, const char *status_slot="")
virtual | ~PlotToolInterface ()

## Protected Slots

void | selectPeak (QwtPlotCurve *curve, int point_index)
void | selectPeak (QwtPlotCurve *curve, int point_index)

## Private Member Functions

void | finalize ()
void | finalize ()

## Private Attributes

QwtPlotCurve * | d_curve
MultiPeakFit * | d_fit
QList< QwtPlotMarker * > | d_lines
int | d_num_peaks
DataPickerTool * | d_picker_tool
MultiPeakFit::PeakProfile | d_profile
int | d_selected_peaks

## Additional Inherited Members

Public Types inherited from PlotToolInterface
enum | RttiValues { Rtti_PlotTool = 0, Rtti_RangeSelector, Rtti_DataPicker, Rtti_TranslateCurveTool, Rtti_MultiPeakFitTool, Rtti_LineProfileTool, Rtti_AddWidgetTool, Rtti_DrawDataPoints, Rtti_ImageProfilesTool, Rtti_SubtractLineTool, Rtti_PlotUserTool = 1000 }
Protected Attributes inherited from PlotToolInterface
Graph * | d_graph
const char * | d_status_slot
const QObject * | d_status_target

## Detailed Description

Plot tool for doing multi-peak fitting.

This class can be seen as a user-interface wrapper around MultiPeakFit, providing functionality for visually selecting estimated peak positions and finally executing the fit.

Maybe some other parts of the multi-peak fitting process (namely, specifying the number of peaks and optionally the peak profile) could be moved here as well.

## Constructor & Destructor Documentation

MultiPeakFitTool::MultiPeakFitTool | ( | Graph * | graph,
|  | ApplicationWindow * | app,
|  | MultiPeakFit::PeakProfile | profile,
|  | int | num_peaks,
|  | const QObject * | status_target,
|  | const char * | status_slot
| ) |  |

References d_curve, d_fit, PlotToolInterface::d_graph, d_num_peaks, d_picker_tool, d_profile, d_selected_peaks, DataPickerTool::Display, MultiPeakFit::enablePeakCurves(), ApplicationWindow::fitPoints, Fit::generateFunction(), ApplicationWindow::generatePeakCurves, ApplicationWindow::generateUniformFitPoints, ApplicationWindow::peakCurvesColor, selectPeak(), MultiPeakFit::setPeakCurvesColor(), and statusText().

MultiPeakFitTool::~MultiPeakFitTool | ( |  | ) |

virtual

References d_fit, and d_picker_tool.

MultiPeakFitTool::MultiPeakFitTool | ( | Graph * | graph,
|  | ApplicationWindow * | app,
|  | MultiPeakFit::PeakProfile | profile,
|  | int | num_peaks,
|  | const QObject * | status_target,
|  | const char * | status_slot
| ) |  |

virtual MultiPeakFitTool::~MultiPeakFitTool | ( |  | ) |

virtual

## Member Function Documentation

void MultiPeakFitTool::finalize | ( |  | ) |

private

References Graph::activeTool(), d_curve, d_fit, PlotToolInterface::d_graph, d_num_peaks, d_picker_tool, d_profile, d_selected_peaks, Filter::dataSize(), Fit::fit(), Fit::initialGuess(), MultiPeakFit::Lorentz, Graph::removeMarker(), PlotToolInterface::rtti(), PlotToolInterface::Rtti_RangeSelector, Filter::setDataFromCurve(), Fit::setInitialGuess(), Filter::x(), and Filter::y().

Referenced by selectPeak().

void MultiPeakFitTool::finalize | ( |  | ) |

private

virtual int MultiPeakFitTool::rtti | ( |  | ) | const

inline virtual

Reimplemented from PlotToolInterface.

References PlotToolInterface::Rtti_MultiPeakFitTool.

virtual int MultiPeakFitTool::rtti | ( |  | ) | const

inline virtual

Reimplemented from PlotToolInterface.

References PlotToolInterface::Rtti_MultiPeakFitTool.

void MultiPeakFitTool::selectPeak | ( | QwtPlotCurve * | curve,
|  | int | point_index
| ) |  |

protected slot

References d_curve, d_fit, PlotToolInterface::d_graph, d_num_peaks, d_selected_peaks, finalize(), Graph::insertMarker(), Fit::setInitialGuess(), and statusText().

Referenced by MultiPeakFitTool().

void MultiPeakFitTool::selectPeak | ( | QwtPlotCurve * | curve,
|  | int | point_index
| ) |  |

protected slot

void MultiPeakFitTool::statusText | ( | const QString & |  | ) |

signal

Emitted whenever a new message should be presented to the user.

You don't have to connect to this signal if you alreay specified a reciever during initialization.

Referenced by MultiPeakFitTool(), and selectPeak().

void MultiPeakFitTool::statusText | ( | const QString & |  | ) |

signal

Emitted whenever a new message should be presented to the user.

You don't have to connect to this signal if you alreay specified a reciever during initialization.

## Member Data Documentation

QwtPlotCurve * MultiPeakFitTool::d_curve

private

Referenced by finalize(), MultiPeakFitTool(), and selectPeak().

MultiPeakFit * MultiPeakFitTool::d_fit

private

Referenced by finalize(), MultiPeakFitTool(), selectPeak(), and ~MultiPeakFitTool().

QList<QwtPlotMarker *> MultiPeakFitTool::d_lines

private

int MultiPeakFitTool::d_num_peaks

private

Referenced by finalize(), MultiPeakFitTool(), and selectPeak().

DataPickerTool * MultiPeakFitTool::d_picker_tool

private

Referenced by finalize(), MultiPeakFitTool(), and ~MultiPeakFitTool().

MultiPeakFit::PeakProfile MultiPeakFitTool::d_profile

private

Referenced by finalize(), and MultiPeakFitTool().

int MultiPeakFitTool::d_selected_peaks

private

Referenced by finalize(), MultiPeakFitTool(), and selectPeak().

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

- qtiplot/src/core/MultiPeakFitTool.h
- qtiplot/src/plot2D/MultiPeakFitTool.h
- qtiplot/src/core/MultiPeakFitTool.cpp
- qtiplot/src/plot2D/MultiPeakFitTool.cpp