QtiPlot
0.9.8.2
Main Page
Related Pages
Classes
Files
File List
File Members
qtiplot
src
analysis
dialogs
FitDialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : FitDialog.h
3
Project : QtiPlot
4
--------------------------------------------------------------------
5
Copyright : (C) 2004 - 2011 by Ion Vasilief
6
Email (use @ for *) : ion_vasilief*yahoo.fr
7
Description : Fit Wizard
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 FITDIALOG_H
30
#define FITDIALOG_H
31
32
#include <
Graph.h
>
33
#include <QDoubleSpinBox>
34
#include <QCheckBox>
35
36
class
QPushButton;
37
class
QLineEdit;
38
class
QComboBox;
39
class
QStackedWidget;
40
class
QWidget;
41
class
QTextEdit;
42
class
QListWidget;
43
class
QTableWidget;
44
class
QSpinBox;
45
class
QLabel;
46
class
QRadioButton;
47
class
QLineEdit;
48
class
ColorButton
;
49
class
Fit
;
50
class
Table
;
51
class
DoubleSpinBox
;
52
class
FunctionCurve
;
53
class
MdiSubWindow
;
54
class
ScriptEdit
;
55
57
class
FitDialog
:
public
QDialog
58
{
59
Q_OBJECT
60
61
public
:
62
FitDialog
(
Graph
*g, QWidget* parent = 0);
63
64
void
setSrcTables
(QList<MdiSubWindow*> tables);
65
66
protected
:
67
void
closeEvent
(QCloseEvent * e );
68
void
initFitPage
();
69
void
initEditPage
();
70
void
initAdvancedPage
();
71
void
chooseFitModelsFolder
();
72
void
choosePluginsFolder
();
73
74
private
slots:
75
void
accept
();
77
void
resetFunction
();
78
void
showFitPage
();
79
void
showEditPage
();
80
void
showAdvancedPage
();
81
void
showFunctionsList
(
int
category);
82
void
showParseFunctions
();
83
void
showExpression
(
int
function
);
84
void
addFunction
();
85
void
addFunctionName
();
86
void
setFunction
(
bool
ok);
87
void
saveUserFunction
();
88
void
removeUserFunction
();
89
void
setGraph
(
Graph
*g);
90
void
activateCurve
(
const
QString&);
91
void
chooseFolder
();
92
void
changeDataRange
();
93
void
selectSrcTable
(
int
tabnr);
94
void
enableWeightingParameters
(
int
index);
95
void
showPointsBox
(
bool
);
96
void
showParametersTable
();
97
void
showCovarianceMatrix
();
98
void
showResiduals
();
99
void
showConfidenceLimits
();
100
void
showPredictionLimits
();
101
103
void
applyChanges
();
104
106
void
deleteFitCurves
();
107
109
void
enableApplyChanges
(
int
= 0);
110
void
setNumPeaks
(
int
peaks);
111
void
saveInitialGuesses
();
112
void
loadInitialGuesses
();
113
void
guessInitialValues
();
114
void
returnToFitPage
();
115
void
updatePreview
();
116
void
updatePreviewColor
(
const
QColor &);
117
void
showPreview
(
bool
on);
118
void
showParameterRange
(
bool
);
119
void
guessParameters
();
120
121
private
:
122
void
loadPlugins
();
123
void
loadUserFunctions
();
124
void
initBuiltInFunctions
();
125
void
modifyGuesses
(
double
* initVal);
126
QStringList
builtInFunctionNames
();
127
QStringList
userFunctionNames
();
128
QStringList
plugInNames
();
129
QString
parseFormula
(
const
QString& s);
130
void
setEditorTextColor
(
const
QColor& c);
131
void
setCurrentFit
(
int
);
132
133
Fit
*
d_current_fit
;
134
Graph
*
d_graph
;
135
QPointer <Table>
d_param_table
;
136
QList <Fit*>
d_user_functions
,
d_built_in_functions
,
d_plugins
;
137
QList <MdiSubWindow*>
srcTables
;
138
FunctionCurve
*
d_preview_curve
;
139
140
QCheckBox*
boxUseBuiltIn
;
141
QStackedWidget*
tw
;
142
QPushButton*
buttonOk
;
143
QPushButton*
buttonCancel1
;
144
QPushButton*
buttonCancel2
;
145
QPushButton*
buttonCancel3
;
146
QPushButton*
buttonAdvanced
;
147
QPushButton*
buttonClear
;
148
QPushButton*
buttonPlugins
;
149
QPushButton*
btnBack
;
150
QPushButton*
btnSaveGuesses
, *
btnLoadGuesses
, *
btnGuess
;
151
QComboBox*
boxCurve
;
152
QComboBox*
boxAlgorithm
;
153
QTableWidget*
boxParams
;
154
DoubleSpinBox
*
boxFrom
;
155
DoubleSpinBox
*
boxTo
;
156
DoubleSpinBox
*
boxTolerance
;
157
QSpinBox*
boxPoints
, *
generatePointsBox
, *
boxPrecision
, *
polynomOrderBox
;
158
QWidget *
fitPage
, *
editPage
, *
advancedPage
;
159
ScriptEdit
*
editBox
;
160
QTextEdit *
explainBox
, *
boxFunction
;
161
QListWidget *
categoryBox
, *
funcBox
;
162
QLineEdit *
boxName
;
163
QLabel *
boxErrorMsg
, *
boxParam
;
164
QLabel *
lblFunction
, *
lblPoints
, *
polynomOrderLabel
;
165
QPushButton *
btnAddFunc
, *
btnDelFunc
, *
btnContinue
, *
btnApply
;
166
QPushButton *
buttonEdit
, *
btnAddTxt
, *
btnAddName
, *
btnDeleteFitCurves
;
167
ColorButton
*
boxColor
;
168
QComboBox *
boxWeighting
, *
tableNamesBox
, *
colNamesBox
;
169
QRadioButton *
generatePointsBtn
, *
samePointsBtn
;
170
QPushButton *
btnParamTable
, *
btnCovMatrix
, *
btnParamRange
;
171
QPushButton *
btnResiduals
, *
btnConfidenceLimits
, *
btnPredictionLimits
;
172
DoubleSpinBox
*
boxConfidenceLevel
;
173
QLineEdit *
covMatrixName
, *
paramTableName
;
174
QCheckBox *
plotLabelBox
, *
logBox
, *
scaleErrorsBox
, *
globalParamTableBox
;
175
QCheckBox *
previewBox
;
176
};
177
#endif // FITDIALOG_H
Generated on Fri Mar 14 2014 22:59:33 for QtiPlot by
1.8.1.2