SciDAVis  1.D4
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes
FitDialog Class Reference

Fit Wizard. More...

#include <FitDialog.h>

List of all members.

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
ColorBoxboxColor
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
Fitd_fitter
Graphd_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

Detailed Description

Fit Wizard.


Constructor & Destructor Documentation

FitDialog::FitDialog ( QWidget *  parent = 0,
Qt::WFlags  fl = 0 
)

Member Function Documentation

void FitDialog::accept ( )
slot
void FitDialog::activateCurve ( const QString &  curveName)
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().

void FitDialog::addUserFunctions ( const QStringList &  list)
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().

void FitDialog::applyChanges ( )
slot
void FitDialog::changeDataRange ( )
slot

Read the selected data range from the graph.

References boxFrom, boxTo, d_graph, Graph::selectedXEndValue(), and Graph::selectedXStartValue().

Referenced by setGraph().

void FitDialog::choosePluginsFolder ( )
slot
void FitDialog::clearFunctionsList ( )
signal

Referenced by clearUserFunctions().

void FitDialog::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().

void FitDialog::closeEvent ( QCloseEvent *  e)
protected

On closing show the fit function in the plot window if that option is selected.

References d_fitter, plotLabelBox, and Filter::showLegend().

bool FitDialog::containsUserFunctionName ( const QString &  function)
slot

Check whether the given function contains a user-defined function.

References d_user_function_names.

void FitDialog::deleteFitCurves ( )
slot

Deletes the result fit curves from the plot.

References boxCurve, Graph::curvesList(), d_graph, and Graph::deleteFitCurves().

Referenced by initFitPage().

void FitDialog::enableApplyChanges ( int  = 0)
privateslot

Enable the "Apply" button.

References btnApply.

Referenced by initAdvancedPage().

void FitDialog::fitBuiltInFunction ( const QString &  function,
double *  initVal 
)
slot

Fit using a built-in function.

References d_fitter, d_graph, MultiPeakFit::Gauss, MultiPeakFit::Lorentz, polynomOrderBox, and Fit::setInitialGuesses().

Referenced by accept().

void FitDialog::initAdvancedPage ( )
protected
void FitDialog::initEditPage ( )
protected
void FitDialog::initFitPage ( )
protected
void FitDialog::loadPlugins ( )
slot
void FitDialog::pasteExpression ( )
slot

Paste the expression of the current function into the editing text box.

References categoryBox, editBox, and explainBox.

Referenced by initEditPage().

void FitDialog::pasteFunctionName ( )
slot

Paste the name of the current function into the editing text box.

References editBox, and funcBox.

Referenced by initEditPage().

void FitDialog::removeUserFunction ( )
slot
void FitDialog::resetFunction ( )
slot

Clears the function editor, the parameter names and the function name.

References boxName, boxParam, and editBox.

Referenced by initEditPage().

void FitDialog::saveFunctionsList ( const QStringList &  )
signal
void FitDialog::saveUserFunction ( )
slot
void FitDialog::selectSrcTable ( int  tabnr)
slot

Select a table from the source tables list.

References Table::colNames(), colNamesBox, and d_src_table.

Referenced by initFitPage(), and setSrcTables().

void FitDialog::setBuiltInFunctionNames ( )
slot

Populate the list of build-in function names.

References d_built_in_function_names.

Referenced by FitDialog().

void FitDialog::setBuiltInFunctions ( )
slot

Populate the list of build-in function.

References d_built_in_functions.

Referenced by FitDialog().

void FitDialog::setFunction ( bool  ok)
slot
void FitDialog::setGraph ( Graph g)
slot
void FitDialog::setSrcTables ( QWidgetList *  tables)
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().

void FitDialog::showAdvancedPage ( )
slot

Show the advanced options page.

References advancedPage, and tw.

Referenced by initFitPage().

void FitDialog::showCovarianceMatrix ( )
slot

Display the covariance matrix.

References Fit::covarianceMatrix(), covMatrixName, d_fitter, and ApplicationWindow::generateUniqueName().

Referenced by initAdvancedPage().

void FitDialog::showEditPage ( )
slot

Show the edit function page.

References editPage, and tw.

Referenced by initFitPage().

void FitDialog::showExpression ( int  function)
slot
void FitDialog::showFitPage ( )
slot
void FitDialog::showFunctionsList ( int  category)
slot
void FitDialog::showParametersTable ( )
slot

Display the parameters table.

References d_fitter, ApplicationWindow::generateUniqueName(), Fit::parametersTable(), and paramTableName.

Referenced by initAdvancedPage().

void FitDialog::showParseFunctions ( )
slot

Populate the functions list with functions from MyParser.

References funcBox, and MyParser::functionsList().

Referenced by showFunctionsList().

void FitDialog::showPointsBox ( bool  )
slot

Enable the X points spin box.

References generatePointsBox, generatePointsBtn, and lblPoints.

Referenced by initAdvancedPage().

void FitDialog::showUserFunctions ( )
slot

Populate the functions list with user-defined functions.

References d_user_function_names, and funcBox.

Referenced by showFunctionsList().

bool FitDialog::validInitialValues ( )
slot

Check the validity of the initial values.

References boxParams, and CONFS.

Referenced by accept().

void FitDialog::yErrorSourceChanged ( int  index)
slot

Enable/disable widgets for selection of custom error source.

References colNamesBox, Fit::CustomErrors, and tableNamesBox.

Referenced by initFitPage().


Member Data Documentation

QWidget * FitDialog::advancedPage
private
QComboBox* FitDialog::boxAlgorithm
private

Referenced by accept(), and initFitPage().

ColorBox* FitDialog::boxColor
private

Referenced by accept(), and initFitPage().

QComboBox* FitDialog::boxCurve
private
QLineEdit* FitDialog::boxFrom
private
QTextEdit * FitDialog::boxFunction
private

Referenced by accept(), initFitPage(), and showFitPage().

QLineEdit* FitDialog::boxName
private
QLineEdit * FitDialog::boxParam
private
QTableWidget* FitDialog::boxParams
private
QSpinBox* FitDialog::boxPoints
private

Referenced by accept(), and initFitPage().

QSpinBox * FitDialog::boxPrecision
private
QLineEdit* FitDialog::boxTo
private
QLineEdit* FitDialog::boxTolerance
private

Referenced by accept(), and initFitPage().

QCheckBox* FitDialog::boxUseBuiltIn
private
QComboBox* FitDialog::boxYErrorSource
private

Referenced by accept(), and initFitPage().

QPushButton* FitDialog::btnAddFunc
private

Referenced by initEditPage(), and setFunction().

QPushButton * FitDialog::btnAddName
private

Referenced by initEditPage(), and setFunction().

QPushButton * FitDialog::btnAddTxt
private

Referenced by initEditPage(), and setFunction().

QPushButton * FitDialog::btnApply
private
QPushButton* FitDialog::btnBack
private

Referenced by initAdvancedPage().

QPushButton * FitDialog::btnContinue
private

Referenced by initEditPage().

QPushButton * FitDialog::btnCovMatrix
private

Referenced by initAdvancedPage().

QPushButton * FitDialog::btnDeleteFitCurves
private

Referenced by initFitPage().

QPushButton * FitDialog::btnDelFunc
private

Referenced by initEditPage(), and showFunctionsList().

QPushButton* FitDialog::btnParamTable
private

Referenced by initAdvancedPage().

QPushButton* FitDialog::buttonAdvanced
private

Referenced by initFitPage().

QPushButton* FitDialog::buttonCancel1
private

Referenced by initFitPage().

QPushButton* FitDialog::buttonCancel2
private

Referenced by initEditPage().

QPushButton* FitDialog::buttonCancel3
private

Referenced by initAdvancedPage().

QPushButton* FitDialog::buttonClear
private

Referenced by initEditPage(), and setFunction().

QPushButton* FitDialog::buttonClearUsrList
private
QPushButton* FitDialog::buttonEdit
private

Referenced by initFitPage().

QPushButton* FitDialog::buttonOk
private

Referenced by initFitPage().

QPushButton* FitDialog::buttonPlugins
private

Referenced by initEditPage(), and showFunctionsList().

QListWidget* FitDialog::categoryBox
private
QComboBox * FitDialog::colNamesBox
private
QLineEdit* FitDialog::covMatrixName
private
QStringList FitDialog::d_built_in_function_names
private
QStringList FitDialog::d_built_in_functions
private
Fit* FitDialog::d_fitter
private
Graph* FitDialog::d_graph
private
QStringList FitDialog::d_plugin_files_list
private
QStringList FitDialog::d_plugin_function_names
private
QStringList FitDialog::d_plugin_functions
private
QStringList FitDialog::d_plugin_params
private
QWidgetList* FitDialog::d_src_table
private

Referenced by selectSrcTable(), and setSrcTables().

QStringList FitDialog::d_user_function_names
private
QStringList FitDialog::d_user_function_params
private
QStringList FitDialog::d_user_functions
private
QTextEdit* FitDialog::editBox
private
QWidget * FitDialog::editPage
private

Referenced by initEditPage(), and showEditPage().

QTextEdit * FitDialog::explainBox
private
QWidget* FitDialog::fitPage
private

Referenced by initFitPage(), and showFitPage().

QListWidget * FitDialog::funcBox
private
QSpinBox * FitDialog::generatePointsBox
private
QRadioButton* FitDialog::generatePointsBtn
private
QLabel* FitDialog::lblFunction
private

Referenced by initFitPage(), and showFitPage().

QLabel * FitDialog::lblPoints
private

Referenced by initAdvancedPage(), and showPointsBox().

QCheckBox * FitDialog::logBox
private

Referenced by applyChanges(), and initAdvancedPage().

QLineEdit * FitDialog::paramTableName
private
QCheckBox* FitDialog::plotLabelBox
private
QSpinBox * FitDialog::polynomOrderBox
private
QLabel * FitDialog::polynomOrderLabel
private
QRadioButton * FitDialog::samePointsBtn
private

Referenced by initAdvancedPage().

QCheckBox * FitDialog::scaleErrorsBox
private
QComboBox * FitDialog::tableNamesBox
private
QStackedWidget* FitDialog::tw
private

The documentation for this class was generated from the following files: