QtiPlot  0.9.8.2
MultiPeakFitTool.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : MultiPeakFitTool.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006,2007 by Ion Vasilief, Knut Franke
6  Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
7  Description : Plot tool for doing multi-peak fitting.
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef MULTI_PEAK_FIT_TOOL
30 #define MULTI_PEAK_FIT_TOOL
31 
32 #include "PlotToolInterface.h"
33 #include "../analysis/MultiPeakFit.h"
34 #include <QObject>
35 
36 class DataPickerTool;
37 class ApplicationWindow;
38 class QwtPlotCurve;
39 class QwtPlotMarker;
40 
49 class MultiPeakFitTool : public QObject, public PlotToolInterface
50 {
51  Q_OBJECT
52  public:
53  MultiPeakFitTool(Graph *graph, ApplicationWindow *app, MultiPeakFit::PeakProfile profile, int num_peaks, const QObject *status_target, const char *status_slot);
54  virtual ~MultiPeakFitTool();
55 
56  virtual int rtti() const {return PlotToolInterface::Rtti_MultiPeakFitTool;};
57  signals:
62  void statusText(const QString&);
63  protected slots:
64  void selectPeak(QwtPlotCurve *curve, int point_index);
65  private:
66  void finalize();
67  int d_selected_peaks;
70  QwtPlotCurve *d_curve;
71  QList<QwtPlotMarker *> d_lines;
72 };
73 
74 #endif // ifndef MULTI_PEAK_FIT_TOOL
void finalize()
Definition: MultiPeakFitTool.cpp:98
virtual ~MultiPeakFitTool()
Definition: MultiPeakFitTool.cpp:64
int d_selected_peaks
Definition: MultiPeakFitTool.h:67
A 2D-plotting widget.
Definition: Graph.h:123
PeakProfile
Definition: MultiPeakFit.h:39
DataPickerTool * d_picker_tool
Definition: MultiPeakFitTool.h:68
Definition: MultiPeakFit.h:34
void selectPeak(QwtPlotCurve *curve, int point_index)
Definition: MultiPeakFitTool.cpp:72
void statusText(const QString &)
MultiPeakFit * d_fit
Definition: MultiPeakFitTool.h:69
MultiPeakFitTool(Graph *graph, ApplicationWindow *app, MultiPeakFit::PeakProfile profile, int num_peaks, const QObject *status_target, const char *status_slot)
Definition: MultiPeakFitTool.cpp:40
QtiPlot's main window.
Definition: ApplicationWindow.h:133
Definition: MultiPeakFitTool.h:48
virtual int rtti() const
Definition: MultiPeakFitTool.h:56
Definition: PlotToolInterface.h:60
Definition: PlotToolInterface.h:71
QList< QwtPlotMarker * > d_lines
Definition: MultiPeakFitTool.h:71
Plot tool for selecting, moving or removing individual points of a curve.
Definition: DataPickerTool.h:41
QwtPlotCurve * d_curve
Definition: MultiPeakFitTool.h:70