1 /***************************************************************************
2     File                 : ExpDecayDialog.h
3     Project              : QtiPlot
4     --------------------------------------------------------------------
5 	Copyright            : (C) 2006 - 2011 by Ion Vasilief
6     Email (use @ for *)  : ion_vasilief*yahoo.fr
7     Description          : Fit exponential decay dialog
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 EXPDECAYDIALOG_H
30 #define EXPDECAYDIALOG_H
31 
32 #include <QDialog>
33 
34 class QPushButton;
35 class QComboBox;
36 class QLabel;
37 class Graph;
38 class ColorButton;
39 class Fit;
40 class DoubleSpinBox;
41 
42 //! Fit exponential decay dialog
43 class ExpDecayDialog : public QDialog
44 {
45     Q_OBJECT
46 
47 public:
48     ExpDecayDialog( int type, QWidget* parent = 0, Qt::WFlags fl = 0 );
49 
50 public slots:
51 	void fit();
52 	void setGraph(Graph *g);
53 
54 private slots:
55 	void activateCurve(const QString&);
56 	void changeDataRange();
57 
58 private:
59     void closeEvent (QCloseEvent *);
60 
61     Fit *fitter;
62 	Graph *graph;
63 	int slopes;
64 
65 	QPushButton* buttonFit;
66 	QPushButton* buttonCancel;
67 	QComboBox* boxName;
68 	DoubleSpinBox* boxAmplitude;
69 	DoubleSpinBox* boxFirst;
70 	DoubleSpinBox* boxSecond;
71 	DoubleSpinBox* boxThird;
72 	DoubleSpinBox* boxStart;
73 	DoubleSpinBox* boxYOffset;
74 	QLabel* thirdLabel, *dampingLabel;
75 	ColorButton* boxColor;
76 };
77 
78 #endif
79