SciDAVis
1.D4
|
#include <FitDialog.h>
Public Slots | |
void | accept () |
Start the actual fitting. | |
void | activateCurve (const QString &curveName) |
Read the range of curve 'curveName' and set the from/to fields. | |
void | addUserFunctions (const QStringList &list) |
Add a list of user defined functions. | |
void | applyChanges () |
Applies the user changes to the numerical format of the output results. | |
void | changeDataRange () |
Read the selected data range from the graph. | |
void | choosePluginsFolder () |
Let the user select the Plugin folder. | |
void | clearUserFunctions () |
Clear the list of user defined functions. | |
bool | containsUserFunctionName (const QString &function) |
Check whether the given function contains a user-defined function. | |
void | deleteFitCurves () |
Deletes the result fit curves from the plot. | |
void | fitBuiltInFunction (const QString &function, double *initVal) |
Fit using a built-in function. | |
void | loadPlugins () |
Load the fit plugins. | |
void | pasteExpression () |
Paste the expression of the current function into the editing text box. | |
void | pasteFunctionName () |
Paste the name of the current function into the editing text box. | |
void | removeUserFunction () |
Remove a user-defined function. | |
void | resetFunction () |
Clears the function editor, the parameter names and the function name. | |
void | saveUserFunction () |
Save the user-defined function. | |
void | selectSrcTable (int tabnr) |
Select a table from the source tables list. | |
void | setBuiltInFunctionNames () |
Populate the list of build-in function names. | |
void | setBuiltInFunctions () |
Populate the list of build-in function. | |
void | setFunction (bool ok) |
Toggle between predefined function and function editing. | |
void | setGraph (Graph *g) |
Set the graph that is to be fitted. | |
void | setSrcTables (QWidgetList *tables) |
Populate the list of tables containing data displayed in the corresponding graph. | |
void | showAdvancedPage () |
Show the advanced options page. | |
void | showCovarianceMatrix () |
Display the covariance matrix. | |
void | showEditPage () |
Show the edit function page. | |
void | showExpression (int function) |
Populate the expression text box according to the given function. | |
void | showFitPage () |
Show the fit page. | |
void | showFunctionsList (int category) |
Populate the functions list with functions from the given 'category'. | |
void | showParametersTable () |
Display the parameters table. | |
void | showParseFunctions () |
Populate the functions list with functions from MyParser. | |
void | showPointsBox (bool) |
Enable the X points spin box. | |
void | showUserFunctions () |
Populate the functions list with user-defined functions. | |
bool | validInitialValues () |
Check the validity of the initial values. | |
void | yErrorSourceChanged (int index) |
Enable/disable widgets for selection of custom error source. |
Signals | |
void | clearFunctionsList () |
void | saveFunctionsList (const QStringList &) |
Public Member Functions | |
FitDialog (QWidget *parent=0, Qt::WFlags fl=0) |
Protected Member Functions | |
void | closeEvent (QCloseEvent *e) |
On closing show the fit function in the plot window if that option is selected. | |
void | initAdvancedPage () |
Initialized the widget for the third dialog page. | |
void | initEditPage () |
Initialized the widget for the second dialog page. | |
void | initFitPage () |
Initialized the widget for the first dialog page. |
Private Slots | |
void | enableApplyChanges (int=0) |
Enable the "Apply" button. |
Private Attributes | |
QWidget * | advancedPage |
QComboBox * | boxAlgorithm |
ColorBox * | boxColor |
QComboBox * | boxCurve |
QLineEdit * | boxFrom |
QTextEdit * | boxFunction |
QLineEdit * | boxName |
QLineEdit * | boxParam |
QTableWidget * | boxParams |
QSpinBox * | boxPoints |
QSpinBox * | boxPrecision |
QLineEdit * | boxTo |
QLineEdit * | boxTolerance |
QCheckBox * | boxUseBuiltIn |
QComboBox * | boxYErrorSource |
QPushButton * | btnAddFunc |
QPushButton * | btnAddName |
QPushButton * | btnAddTxt |
QPushButton * | btnApply |
QPushButton * | btnBack |
QPushButton * | btnContinue |
QPushButton * | btnCovMatrix |
QPushButton * | btnDeleteFitCurves |
QPushButton * | btnDelFunc |
QPushButton * | btnParamTable |
QPushButton * | buttonAdvanced |
QPushButton * | buttonCancel1 |
QPushButton * | buttonCancel2 |
QPushButton * | buttonCancel3 |
QPushButton * | buttonClear |
QPushButton * | buttonClearUsrList |
QPushButton * | buttonEdit |
QPushButton * | buttonOk |
QPushButton * | buttonPlugins |
QListWidget * | categoryBox |
QComboBox * | colNamesBox |
QLineEdit * | covMatrixName |
QStringList | d_built_in_function_names |
QStringList | d_built_in_functions |
Fit * | d_fitter |
Graph * | d_graph |
QStringList | d_plugin_files_list |
QStringList | d_plugin_function_names |
QStringList | d_plugin_functions |
QStringList | d_plugin_params |
QWidgetList * | d_src_table |
QStringList | d_user_function_names |
QStringList | d_user_function_params |
QStringList | d_user_functions |
QTextEdit * | editBox |
QWidget * | editPage |
QTextEdit * | explainBox |
QWidget * | fitPage |
QListWidget * | funcBox |
QSpinBox * | generatePointsBox |
QRadioButton * | generatePointsBtn |
QLabel * | lblFunction |
QLabel * | lblPoints |
QCheckBox * | logBox |
QLineEdit * | paramTableName |
QCheckBox * | plotLabelBox |
QSpinBox * | polynomOrderBox |
QLabel * | polynomOrderLabel |
QRadioButton * | samePointsBtn |
QCheckBox * | scaleErrorsBox |
QComboBox * | tableNamesBox |
QStackedWidget * | tw |
Fit Wizard.
FitDialog::FitDialog | ( | QWidget * | parent = 0 , |
Qt::WFlags | fl = 0 |
||
) |
|
slot |
Start the actual fitting.
References boxAlgorithm, boxColor, boxCurve, boxFrom, boxFunction, boxParams, boxPoints, boxPrecision, boxTo, boxTolerance, boxUseBuiltIn, boxYErrorSource, categoryBox, colNamesBox, CONFS, Graph::curvesList(), d_built_in_function_names, d_built_in_functions, d_fitter, d_graph, d_plugin_files_list, d_user_function_names, d_user_functions, Fit::fit(), fitBuiltInFunction(), funcBox, Fit::generateFunction(), ApplicationWindow::generatePeakCurves, generatePointsBox, generatePointsBtn, ApplicationWindow::peakCurvesColor, Fit::results(), Fit::scaleErrors(), scaleErrorsBox, Fit::setAlgorithm(), Filter::setColor(), Filter::setDataFromCurve(), Fit::setInitialGuesses(), Filter::setMaximumIterations(), Filter::setTolerance(), Fit::setYErrorSource(), tableNamesBox, and validInitialValues().
Referenced by initFitPage().
|
slot |
Read the range of curve 'curveName' and set the from/to fields.
References boxFrom, boxTo, Graph::curve(), Graph::curveIndex(), d_graph, and Graph::range().
Referenced by initFitPage(), and setGraph().
|
slot |
Add a list of user defined functions.
References boxUseBuiltIn, d_user_function_names, d_user_function_params, and d_user_functions.
Referenced by ApplicationWindow::showFitDialog().
|
slot |
Applies the user changes to the numerical format of the output results.
References boxPrecision, btnApply, ApplicationWindow::fit_output_precision, ApplicationWindow::fit_scale_errors, ApplicationWindow::fitPoints, generatePointsBox, generatePointsBtn, ApplicationWindow::generateUniformFitPoints, logBox, ApplicationWindow::pasteFitResultsToPlot, plotLabelBox, ApplicationWindow::saveSettings(), scaleErrorsBox, and ApplicationWindow::writeFitResultsToLog.
Referenced by initAdvancedPage().
|
slot |
Read the selected data range from the graph.
References boxFrom, boxTo, d_graph, Graph::selectedXEndValue(), and Graph::selectedXStartValue().
Referenced by setGraph().
|
slot |
Let the user select the Plugin folder.
References boxUseBuiltIn, d_plugin_files_list, d_plugin_function_names, d_plugin_functions, d_plugin_params, explainBox, ApplicationWindow::fitPluginsPath, funcBox, and loadPlugins().
Referenced by initEditPage().
|
signal |
Referenced by clearUserFunctions().
|
slot |
Clear the list of user defined functions.
References boxUseBuiltIn, buttonClearUsrList, categoryBox, clearFunctionsList(), d_user_function_names, d_user_functions, explainBox, and funcBox.
Referenced by initEditPage().
|
protected |
On closing show the fit function in the plot window if that option is selected.
References d_fitter, plotLabelBox, and Filter::showLegend().
|
slot |
Check whether the given function contains a user-defined function.
References d_user_function_names.
|
slot |
Deletes the result fit curves from the plot.
References boxCurve, Graph::curvesList(), d_graph, and Graph::deleteFitCurves().
Referenced by initFitPage().
|
privateslot |
|
slot |
Fit using a built-in function.
References d_fitter, d_graph, MultiPeakFit::Gauss, MultiPeakFit::Lorentz, polynomOrderBox, and Fit::setInitialGuesses().
Referenced by accept().
|
protected |
Initialized the widget for the third dialog page.
References advancedPage, applyChanges(), boxPrecision, btnApply, btnBack, btnCovMatrix, btnParamTable, buttonCancel3, covMatrixName, enableApplyChanges(), ApplicationWindow::fit_output_precision, ApplicationWindow::fit_scale_errors, ApplicationWindow::fitPoints, generatePointsBox, generatePointsBtn, ApplicationWindow::generateUniformFitPoints, lblPoints, logBox, paramTableName, ApplicationWindow::pasteFitResultsToPlot, plotLabelBox, samePointsBtn, scaleErrorsBox, showCovarianceMatrix(), showFitPage(), showParametersTable(), showPointsBox(), tw, and ApplicationWindow::writeFitResultsToLog.
Referenced by FitDialog().
|
protected |
Initialized the widget for the second dialog page.
References boxName, boxParam, boxUseBuiltIn, btnAddFunc, btnAddName, btnAddTxt, btnContinue, btnDelFunc, buttonCancel2, buttonClear, buttonClearUsrList, buttonPlugins, categoryBox, choosePluginsFolder(), clearUserFunctions(), editBox, editPage, explainBox, funcBox, pasteExpression(), pasteFunctionName(), polynomOrderBox, polynomOrderLabel, removeUserFunction(), resetFunction(), saveUserFunction(), setFunction(), showExpression(), showFitPage(), showFunctionsList(), and tw.
Referenced by FitDialog().
|
protected |
Initialized the widget for the first dialog page.
References accept(), activateCurve(), boxAlgorithm, boxColor, boxCurve, boxFrom, boxFunction, boxParams, boxPoints, boxTo, boxTolerance, boxYErrorSource, btnDeleteFitCurves, buttonAdvanced, buttonCancel1, buttonEdit, buttonOk, colNamesBox, deleteFitCurves(), fitPage, lblFunction, selectSrcTable(), ColorBox::setColor(), showAdvancedPage(), showEditPage(), tableNamesBox, tw, and yErrorSourceChanged().
Referenced by FitDialog().
|
slot |
Load the fit plugins.
References d_plugin_files_list, d_plugin_function_names, d_plugin_functions, d_plugin_params, and ApplicationWindow::fitPluginsPath.
Referenced by choosePluginsFolder(), and FitDialog().
|
slot |
Paste the expression of the current function into the editing text box.
References categoryBox, editBox, and explainBox.
Referenced by initEditPage().
|
slot |
Paste the name of the current function into the editing text box.
References editBox, and funcBox.
Referenced by initEditPage().
|
slot |
Remove a user-defined function.
References boxUseBuiltIn, buttonClearUsrList, d_user_function_names, d_user_function_params, d_user_functions, explainBox, funcBox, and saveFunctionsList().
Referenced by initEditPage().
|
slot |
Clears the function editor, the parameter names and the function name.
References boxName, boxParam, and editBox.
Referenced by initEditPage().
|
signal |
Referenced by removeUserFunction(), and saveUserFunction().
|
slot |
Save the user-defined function.
References boxName, boxParam, boxUseBuiltIn, buttonClearUsrList, categoryBox, d_built_in_function_names, d_user_function_names, d_user_function_params, d_user_functions, editBox, funcBox, saveFunctionsList(), and showExpression().
Referenced by initEditPage().
|
slot |
Select a table from the source tables list.
References Table::colNames(), colNamesBox, and d_src_table.
Referenced by initFitPage(), and setSrcTables().
|
slot |
Populate the list of build-in function names.
References d_built_in_function_names.
Referenced by FitDialog().
|
slot |
|
slot |
Toggle between predefined function and function editing.
References boxName, boxParam, btnAddFunc, btnAddName, btnAddTxt, buttonClear, categoryBox, d_plugin_params, d_user_function_params, editBox, explainBox, funcBox, PolynomialFit::generateParameterList(), MultiPeakFit::generateParameterList(), and polynomOrderBox.
Referenced by initEditPage(), and showExpression().
|
slot |
Set the graph that is to be fitted.
References activateCurve(), Graph::analysableCurvesList(), boxCurve, changeDataRange(), d_graph, and Graph::selectedCurveTitle().
Referenced by ApplicationWindow::showFitDialog().
|
slot |
Populate the list of tables containing data displayed in the corresponding graph.
References boxCurve, colNamesBox, d_src_table, selectSrcTable(), and tableNamesBox.
Referenced by ApplicationWindow::showFitDialog().
|
slot |
|
slot |
Display the covariance matrix.
References Fit::covarianceMatrix(), covMatrixName, d_fitter, and ApplicationWindow::generateUniqueName().
Referenced by initAdvancedPage().
|
slot |
|
slot |
Populate the expression text box according to the given function.
References boxUseBuiltIn, categoryBox, d_built_in_functions, d_plugin_functions, d_user_functions, explainBox, MyParser::explainFunction(), funcBox, MultiPeakFit::Gauss, PolynomialFit::generateFormula(), MultiPeakFit::generateFormula(), MultiPeakFit::Lorentz, polynomOrderBox, polynomOrderLabel, and setFunction().
Referenced by initEditPage(), and saveUserFunction().
|
slot |
Show the fit page.
References boxFunction, boxName, boxParam, boxParams, boxPrecision, boxUseBuiltIn, categoryBox, editBox, fitPage, lblFunction, and tw.
Referenced by initAdvancedPage(), and initEditPage().
|
slot |
Populate the functions list with functions from the given 'category'.
References boxUseBuiltIn, btnDelFunc, buttonClearUsrList, buttonPlugins, d_built_in_function_names, d_plugin_function_names, d_user_function_names, explainBox, funcBox, polynomOrderBox, polynomOrderLabel, showParseFunctions(), and showUserFunctions().
Referenced by initEditPage().
|
slot |
Display the parameters table.
References d_fitter, ApplicationWindow::generateUniqueName(), Fit::parametersTable(), and paramTableName.
Referenced by initAdvancedPage().
|
slot |
Populate the functions list with functions from MyParser.
References funcBox, and MyParser::functionsList().
Referenced by showFunctionsList().
|
slot |
Enable the X points spin box.
References generatePointsBox, generatePointsBtn, and lblPoints.
Referenced by initAdvancedPage().
|
slot |
Populate the functions list with user-defined functions.
References d_user_function_names, and funcBox.
Referenced by showFunctionsList().
|
slot |
|
slot |
Enable/disable widgets for selection of custom error source.
References colNamesBox, Fit::CustomErrors, and tableNamesBox.
Referenced by initFitPage().
|
private |
Referenced by initAdvancedPage(), and showAdvancedPage().
|
private |
Referenced by accept(), and initFitPage().
|
private |
Referenced by accept(), and initFitPage().
|
private |
Referenced by accept(), deleteFitCurves(), initFitPage(), setGraph(), and setSrcTables().
|
private |
Referenced by accept(), activateCurve(), changeDataRange(), and initFitPage().
|
private |
Referenced by accept(), initFitPage(), and showFitPage().
|
private |
Referenced by initEditPage(), resetFunction(), saveUserFunction(), setFunction(), and showFitPage().
|
private |
Referenced by initEditPage(), resetFunction(), saveUserFunction(), setFunction(), and showFitPage().
|
private |
Referenced by accept(), initFitPage(), showFitPage(), and validInitialValues().
|
private |
Referenced by accept(), and initFitPage().
|
private |
Referenced by accept(), applyChanges(), initAdvancedPage(), and showFitPage().
|
private |
Referenced by accept(), activateCurve(), changeDataRange(), and initFitPage().
|
private |
Referenced by accept(), and initFitPage().
|
private |
|
private |
Referenced by accept(), and initFitPage().
|
private |
Referenced by initEditPage(), and setFunction().
|
private |
Referenced by initEditPage(), and setFunction().
|
private |
Referenced by initEditPage(), and setFunction().
|
private |
Referenced by applyChanges(), enableApplyChanges(), and initAdvancedPage().
|
private |
Referenced by initAdvancedPage().
|
private |
Referenced by initEditPage().
|
private |
Referenced by initAdvancedPage().
|
private |
Referenced by initFitPage().
|
private |
Referenced by initEditPage(), and showFunctionsList().
|
private |
Referenced by initAdvancedPage().
|
private |
Referenced by initFitPage().
|
private |
Referenced by initFitPage().
|
private |
Referenced by initEditPage().
|
private |
Referenced by initAdvancedPage().
|
private |
Referenced by initEditPage(), and setFunction().
|
private |
Referenced by clearUserFunctions(), initEditPage(), removeUserFunction(), saveUserFunction(), and showFunctionsList().
|
private |
Referenced by initFitPage().
|
private |
Referenced by initFitPage().
|
private |
Referenced by initEditPage(), and showFunctionsList().
|
private |
Referenced by accept(), clearUserFunctions(), FitDialog(), initEditPage(), pasteExpression(), saveUserFunction(), setFunction(), showExpression(), and showFitPage().
|
private |
Referenced by accept(), initFitPage(), selectSrcTable(), setSrcTables(), and yErrorSourceChanged().
|
private |
Referenced by initAdvancedPage(), and showCovarianceMatrix().
|
private |
Referenced by accept(), saveUserFunction(), setBuiltInFunctionNames(), and showFunctionsList().
|
private |
Referenced by accept(), setBuiltInFunctions(), and showExpression().
|
private |
Referenced by accept(), closeEvent(), fitBuiltInFunction(), FitDialog(), showCovarianceMatrix(), and showParametersTable().
|
private |
Referenced by accept(), activateCurve(), changeDataRange(), deleteFitCurves(), fitBuiltInFunction(), and setGraph().
|
private |
Referenced by accept(), choosePluginsFolder(), and loadPlugins().
|
private |
Referenced by choosePluginsFolder(), loadPlugins(), and showFunctionsList().
|
private |
Referenced by choosePluginsFolder(), loadPlugins(), and showExpression().
|
private |
Referenced by choosePluginsFolder(), loadPlugins(), and setFunction().
|
private |
Referenced by selectSrcTable(), and setSrcTables().
|
private |
|
private |
Referenced by addUserFunctions(), FitDialog(), removeUserFunction(), saveUserFunction(), and setFunction().
|
private |
Referenced by accept(), addUserFunctions(), clearUserFunctions(), FitDialog(), removeUserFunction(), saveUserFunction(), and showExpression().
|
private |
Referenced by initEditPage(), pasteExpression(), pasteFunctionName(), resetFunction(), saveUserFunction(), setFunction(), and showFitPage().
|
private |
Referenced by initEditPage(), and showEditPage().
|
private |
|
private |
Referenced by initFitPage(), and showFitPage().
|
private |
|
private |
Referenced by accept(), applyChanges(), initAdvancedPage(), and showPointsBox().
|
private |
Referenced by accept(), applyChanges(), initAdvancedPage(), and showPointsBox().
|
private |
Referenced by initFitPage(), and showFitPage().
|
private |
Referenced by initAdvancedPage(), and showPointsBox().
|
private |
Referenced by applyChanges(), and initAdvancedPage().
|
private |
Referenced by initAdvancedPage(), and showParametersTable().
|
private |
Referenced by applyChanges(), closeEvent(), and initAdvancedPage().
|
private |
Referenced by fitBuiltInFunction(), initEditPage(), setFunction(), showExpression(), and showFunctionsList().
|
private |
Referenced by initEditPage(), showExpression(), and showFunctionsList().
|
private |
Referenced by initAdvancedPage().
|
private |
Referenced by accept(), applyChanges(), and initAdvancedPage().
|
private |
Referenced by accept(), initFitPage(), setSrcTables(), and yErrorSourceChanged().
|
private |
Referenced by FitDialog(), initAdvancedPage(), initEditPage(), initFitPage(), showAdvancedPage(), showEditPage(), and showFitPage().