SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
FitDialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : FitDialog.h
3
Project : SciDAVis
4
--------------------------------------------------------------------
5
Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6
Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
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
34
class
QPushButton;
35
class
QLineEdit;
36
class
QComboBox;
37
class
QStackedWidget;
38
class
QWidget;
39
class
QTextEdit;
40
class
QListWidget;
41
class
QCheckBox;
42
class
QTableWidget;
43
class
QSpinBox;
44
class
QLabel;
45
class
QRadioButton;
46
class
QLineEdit;
47
class
ColorBox
;
48
class
Fit
;
49
51
class
FitDialog
:
public
QDialog
52
{
53
Q_OBJECT
54
55
public
:
56
FitDialog
(QWidget* parent = 0, Qt::WFlags fl = 0 );
57
58
protected
:
60
void
closeEvent
(QCloseEvent * e );
62
void
initFitPage
();
64
void
initEditPage
();
66
void
initAdvancedPage
();
67
68
public
slots:
70
void
accept
();
72
void
addUserFunctions
(
const
QStringList& list);
74
void
clearUserFunctions
();
76
void
resetFunction
();
78
void
showFitPage
();
80
void
showEditPage
();
82
void
showAdvancedPage
();
84
void
showFunctionsList
(
int
category);
86
void
showParseFunctions
();
88
void
showUserFunctions
();
90
void
loadPlugins
();
92
void
showExpression
(
int
function
);
94
void
pasteExpression
();
96
void
pasteFunctionName
();
98
void
setFunction
(
bool
ok);
100
void
saveUserFunction
();
102
void
removeUserFunction
();
104
void
setBuiltInFunctionNames
();
106
void
setBuiltInFunctions
();
108
bool
containsUserFunctionName
(
const
QString&
function
);
110
void
setGraph
(
Graph
*g);
112
void
activateCurve
(
const
QString& curveName);
114
void
choosePluginsFolder
();
116
bool
validInitialValues
();
118
void
changeDataRange
();
120
void
fitBuiltInFunction
(
const
QString&
function
,
double
* initVal);
121
123
void
setSrcTables
(QWidgetList* tables);
125
void
selectSrcTable
(
int
tabnr);
127
void
yErrorSourceChanged
(
int
index);
129
void
showPointsBox
(
bool
);
131
void
showParametersTable
();
133
void
showCovarianceMatrix
();
134
136
void
applyChanges
();
137
139
void
deleteFitCurves
();
140
141
private
slots:
143
void
enableApplyChanges
(
int
= 0);
144
145
signals:
146
void
clearFunctionsList
();
147
void
saveFunctionsList
(
const
QStringList&);
148
149
private
:
150
Fit
*
d_fitter
;
151
Graph
*
d_graph
;
152
QStringList
d_user_functions
,
d_user_function_names
,
d_user_function_params
;
153
QStringList
d_built_in_function_names
,
d_built_in_functions
;
154
QStringList
d_plugin_function_names
,
d_plugin_functions
,
d_plugin_files_list
,
d_plugin_params
;
155
QWidgetList *
d_src_table
;
156
157
QCheckBox*
boxUseBuiltIn
;
158
QStackedWidget*
tw
;
159
QPushButton*
buttonOk
;
160
QPushButton*
buttonCancel1
;
161
QPushButton*
buttonCancel2
;
162
QPushButton*
buttonCancel3
;
163
QPushButton*
buttonAdvanced
;
164
QPushButton*
buttonClear
;
165
QPushButton*
buttonClearUsrList
;
166
QPushButton*
buttonPlugins
;
167
QPushButton*
btnBack
;
168
QComboBox*
boxCurve
;
169
QComboBox*
boxAlgorithm
;
170
QTableWidget*
boxParams
;
171
QLineEdit*
boxFrom
;
172
QLineEdit*
boxTo
;
173
QLineEdit*
boxTolerance
;
174
QSpinBox*
boxPoints
, *
generatePointsBox
, *
boxPrecision
, *
polynomOrderBox
;
175
QWidget *
fitPage
, *
editPage
, *
advancedPage
;
176
QTextEdit *
editBox
, *
explainBox
, *
boxFunction
;
177
QListWidget *
categoryBox
, *
funcBox
;
178
QLineEdit *
boxName
, *
boxParam
;
179
QLabel *
lblFunction
, *
lblPoints
, *
polynomOrderLabel
;
180
QPushButton *
btnAddFunc
, *
btnDelFunc
, *
btnContinue
, *
btnApply
;
181
QPushButton *
buttonEdit
, *
btnAddTxt
, *
btnAddName
, *
btnDeleteFitCurves
;
182
ColorBox
*
boxColor
;
183
QComboBox *
boxYErrorSource
, *
tableNamesBox
, *
colNamesBox
;
184
QRadioButton *
generatePointsBtn
, *
samePointsBtn
;
185
QPushButton *
btnParamTable
, *
btnCovMatrix
;
186
QLineEdit *
covMatrixName
, *
paramTableName
;
187
QCheckBox *
plotLabelBox
, *
logBox
, *
scaleErrorsBox
;
188
};
189
190
#endif // FITDIALOG_H
Generated by
1.8.1