FunctionDialog Class Reference

Function dialog. More...

`#include <FunctionDialog.h>`

Inheritance diagram for FunctionDialog:

## Public Slots

bool | apply ()

## Public Member Functions

| FunctionDialog (ApplicationWindow *parent, bool standAlone=true, Qt::WFlags fl=0)
void | setCurveToModify (Graph *g, int curve)
void | setCurveToModify (FunctionCurve *c)
void | setGraph (Graph *g)

## Private Slots

void | accept ()
bool | acceptFunction ()
bool | acceptParametric ()
bool | acceptPolar ()
void | insertFunction ()
void | raiseWidget (int index)
void | setActiveEditor (ScriptEdit *edit)
void | showFunctionLog ()
void | showPolarRadiusLog ()
void | showPolarThetaLog ()
void | showXParLog ()
void | showYParLog ()
void | updateFunctionExplain (int)

## Private Member Functions

void | buttonClicked (QAbstractButton *)
void | clearList ()
void | guessConstants ()
void | setConstants (FunctionCurve *c, const QMap< QString, double > &constants)

## Private Attributes

QPushButton * | addFunctionBtn
QTableWidget * | boxConstants
DoubleSpinBox * | boxFrom
ScriptEdit * | boxFunction
QTextEdit * | boxFunctionExplain
QComboBox * | boxMathFunctions
QLineEdit * | boxParameter
DoubleSpinBox * | boxParFrom
QSpinBox * | boxParPoints
DoubleSpinBox * | boxParTo
QSpinBox * | boxPoints
DoubleSpinBox * | boxPolarFrom
QLineEdit * | boxPolarParameter
QSpinBox * | boxPolarPoints
ScriptEdit * | boxPolarRadius
ScriptEdit * | boxPolarTheta
DoubleSpinBox * | boxPolarTo
DoubleSpinBox * | boxTo
QComboBox * | boxType
ScriptEdit * | boxXFunction
ScriptEdit * | boxYFunction
QDialogButtonBox * | buttonBox
QPushButton * | buttonClear
QPushButton * | buttonFunctionLog
QPushButton * | buttonPolarRadiusLog
QPushButton * | buttonPolarRThetaLog
QPushButton * | buttonXParLog
QPushButton * | buttonYParLog
int | curveID
ScriptEdit * | d_active_editor
ApplicationWindow * | d_app
bool | d_stand_alone
QWidget * | functionPage
Graph * | graph
QStackedWidget * | optionStack
QWidget * | parametricPage
QWidget * | polarPage
QLabel * | textFunction

## Detailed Description

Function dialog.

## Constructor & Destructor Documentation

## FunctionDialog()

FunctionDialog::FunctionDialog | ( | ApplicationWindow * | parent,
|  | bool | standAlone = `true`,
|  | Qt::WFlags | fl = `0`
| ) |  |

References addFunctionBtn, boxConstants, boxFrom, boxFunction, boxFunctionExplain, boxMathFunctions, boxParameter, boxParFrom, boxParPoints, boxParTo, boxPoints, boxPolarFrom, boxPolarParameter, boxPolarPoints, boxPolarRadius, boxPolarTheta, boxPolarTo, boxTo, boxType, boxXFunction, boxYFunction, buttonBox, buttonClear, buttonClicked(), buttonFunctionLog, buttonPolarRadiusLog, buttonPolarRThetaLog, buttonXParLog, buttonYParLog, clearList(), curveID, d_app, ApplicationWindow::d_decimal_digits, ScriptEdit::enableShortcuts(), functionPage, MyParser::functionsList(), graph, guessConstants(), insertFunction(), M_PI, optionStack, parametricPage, polarPage, raiseWidget(), scripted::scriptingEnv(), setActiveEditor(), DoubleSpinBox::setDecimals(), DoubleSpinBox::setValue(), showFunctionLog(), showPolarRadiusLog(), showPolarThetaLog(), showXParLog(), showYParLog(), and updateFunctionExplain().

## Member Function Documentation

## accept

void FunctionDialog::accept | ( |  | ) |

private slot

References apply().

Referenced by buttonClicked(), and setGraph().

## acceptFunction

bool FunctionDialog::acceptFunction | ( |  | ) |

private slot

References MultiLayer::activeLayer(), Graph::addFunction(), boxConstants, boxFrom, boxFunction, boxPoints, boxTo, boxType, Graph::curve(), Graph::curveCount(), curveID, d_app, graph, Graph::modifyFunctionCurve(), ApplicationWindow::newFunctionPlot(), setConstants(), ApplicationWindow::updateFunctionLists(), and DoubleSpinBox::value().

Referenced by apply(), and setGraph().

## acceptParametric

bool FunctionDialog::acceptParametric | ( |  | ) |

private slot

References MultiLayer::activeLayer(), Graph::addFunction(), boxConstants, boxParameter, boxParFrom, boxParPoints, boxParTo, boxType, boxXFunction, boxYFunction, Graph::curve(), Graph::curveCount(), curveID, d_app, graph, Graph::modifyFunctionCurve(), ApplicationWindow::newFunctionPlot(), setConstants(), ApplicationWindow::updateFunctionLists(), and DoubleSpinBox::value().

Referenced by apply(), and setGraph().

## acceptPolar

bool FunctionDialog::acceptPolar | ( |  | ) |

private slot

References MultiLayer::activeLayer(), Graph::addFunction(), boxConstants, boxPolarFrom, boxPolarParameter, boxPolarPoints, boxPolarRadius, boxPolarTheta, boxPolarTo, boxType, Graph::curve(), Graph::curveCount(), curveID, d_app, graph, Graph::modifyFunctionCurve(), ApplicationWindow::newFunctionPlot(), setConstants(), ApplicationWindow::updateFunctionLists(), and DoubleSpinBox::value().

Referenced by apply(), and setGraph().

## apply

bool FunctionDialog::apply | ( |  | ) |

slot

References acceptFunction(), acceptParametric(), acceptPolar(), and boxType.

Referenced by accept(), PlotDialog::acceptParams(), buttonClicked(), guessConstants(), setCurveToModify(), and setGraph().

## buttonClicked()

void FunctionDialog::buttonClicked | ( | QAbstractButton * | btn | ) |

private

References accept(), apply(), and buttonBox.

Referenced by FunctionDialog(), and setActiveEditor().

## clearList()

void FunctionDialog::clearList | ( |  | ) |

private

References boxFunction, boxPolarRadius, boxPolarTheta, boxType, boxXFunction, and boxYFunction.

Referenced by FunctionDialog(), and setActiveEditor().

## guessConstants()

void FunctionDialog::guessConstants | ( |  | ) |

private

References apply(), boxConstants, boxFunction, boxParameter, boxPolarParameter, boxPolarRadius, boxPolarTheta, boxType, boxXFunction, boxYFunction, d_stand_alone, NonLinearFit::guessParameters(), and DoubleSpinBox::setValue().

Referenced by FunctionDialog(), raiseWidget(), and setActiveEditor().

## insertFunction

void FunctionDialog::insertFunction | ( |  | ) |

private slot

References boxFunction, boxMathFunctions, boxPolarRadius, boxPolarTheta, boxXFunction, boxYFunction, d_active_editor, functionPage, ScriptEdit::insertFunction(), optionStack, parametricPage, and polarPage.

Referenced by FunctionDialog(), and setGraph().

## raiseWidget

void FunctionDialog::raiseWidget | ( | int | index | ) |

private slot

References guessConstants(), and optionStack.

Referenced by FunctionDialog(), and setGraph().

## setActiveEditor

void FunctionDialog::setActiveEditor | ( | ScriptEdit * | edit | ) |

inline private slot

References buttonClicked(), clearList(), d_active_editor, guessConstants(), and setConstants().

Referenced by FunctionDialog().

## setConstants()

void FunctionDialog::setConstants | ( | FunctionCurve * | c,
|  | const QMap< QString, double > & | constants
| ) |  |

private

References graph, FunctionCurve::loadData(), FunctionCurve::setConstants(), Graph::updateMarkersBoundingRect(), and Graph::updateSecondaryAxis().

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), and setActiveEditor().

## setCurveToModify() [1/2]

void FunctionDialog::setCurveToModify | ( | Graph * | g,
|  | int | curve
| ) |  |

References apply(), boxConstants, boxFrom, boxFunction, boxParameter, boxParFrom, boxParPoints, boxParTo, boxPoints, boxPolarFrom, boxPolarParameter, boxPolarPoints, boxPolarRadius, boxPolarTheta, boxPolarTo, boxTo, boxType, boxXFunction, boxYFunction, FunctionCurve::constants(), Graph::curve(), curveID, FunctionCurve::endRange(), FunctionCurve::formulas(), FunctionCurve::functionType(), graph, FunctionCurve::Normal, optionStack, FunctionCurve::Parametric, FunctionCurve::Polar, DoubleSpinBox::setValue(), FunctionCurve::startRange(), and FunctionCurve::variable().

Referenced by PlotDialog::insertTabs(), PlotDialog::setActiveCurve(), setCurveToModify(), and ApplicationWindow::showFunctionDialog().

## setCurveToModify() [2/2]

void FunctionDialog::setCurveToModify | ( | FunctionCurve * | c | ) |

References Graph::curveIndex(), and setCurveToModify().

## setGraph()

void FunctionDialog::setGraph | ( | Graph * | g | ) |

inline

References accept(), acceptFunction(), acceptParametric(), acceptPolar(), apply(), graph, insertFunction(), raiseWidget(), showFunctionLog(), showPolarRadiusLog(), showPolarThetaLog(), showXParLog(), showYParLog(), and updateFunctionExplain().

Referenced by ApplicationWindow::addFunctionCurve().

## showFunctionLog

void FunctionDialog::showFunctionLog | ( |  | ) |

private slot

References boxFunction, d_app, and ApplicationWindow::d_recent_functions.

Referenced by FunctionDialog(), and setGraph().

## showPolarRadiusLog

void FunctionDialog::showPolarRadiusLog | ( |  | ) |

private slot

References boxPolarRadius, d_app, and ApplicationWindow::rFunctions.

Referenced by FunctionDialog(), and setGraph().

## showPolarThetaLog

void FunctionDialog::showPolarThetaLog | ( |  | ) |

private slot

References boxPolarTheta, d_app, and ApplicationWindow::thetaFunctions.

Referenced by FunctionDialog(), and setGraph().

## showXParLog

void FunctionDialog::showXParLog | ( |  | ) |

private slot

References boxXFunction, d_app, and ApplicationWindow::xFunctions.

Referenced by FunctionDialog(), and setGraph().

## showYParLog

void FunctionDialog::showYParLog | ( |  | ) |

private slot

References boxYFunction, d_app, and ApplicationWindow::yFunctions.

Referenced by FunctionDialog(), and setGraph().

## updateFunctionExplain

void FunctionDialog::updateFunctionExplain | ( | int | index | ) |

private slot

References boxFunctionExplain, and MyParser::explainFunction().

Referenced by FunctionDialog(), and setGraph().

## Member Data Documentation

## addFunctionBtn

QPushButton* FunctionDialog::addFunctionBtn

private

Referenced by FunctionDialog().

## boxConstants

QTableWidget* FunctionDialog::boxConstants

private

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), FunctionDialog(), guessConstants(), and setCurveToModify().

## boxFrom

DoubleSpinBox* FunctionDialog::boxFrom

private

Referenced by acceptFunction(), FunctionDialog(), and setCurveToModify().

## boxFunction

ScriptEdit* FunctionDialog::boxFunction

private

Referenced by acceptFunction(), clearList(), FunctionDialog(), guessConstants(), insertFunction(), setCurveToModify(), and showFunctionLog().

## boxFunctionExplain

QTextEdit* FunctionDialog::boxFunctionExplain

private

Referenced by FunctionDialog(), and updateFunctionExplain().

## boxMathFunctions

QComboBox* FunctionDialog::boxMathFunctions

private

Referenced by FunctionDialog(), and insertFunction().

## boxParameter

QLineEdit* FunctionDialog::boxParameter

private

Referenced by acceptParametric(), FunctionDialog(), guessConstants(), and setCurveToModify().

## boxParFrom

DoubleSpinBox* FunctionDialog::boxParFrom

private

Referenced by acceptParametric(), FunctionDialog(), and setCurveToModify().

## boxParPoints

QSpinBox* FunctionDialog::boxParPoints

private

Referenced by acceptParametric(), FunctionDialog(), and setCurveToModify().

## boxParTo

DoubleSpinBox* FunctionDialog::boxParTo

private

Referenced by acceptParametric(), FunctionDialog(), and setCurveToModify().

## boxPoints

QSpinBox* FunctionDialog::boxPoints

private

Referenced by acceptFunction(), FunctionDialog(), and setCurveToModify().

## boxPolarFrom

DoubleSpinBox* FunctionDialog::boxPolarFrom

private

Referenced by acceptPolar(), FunctionDialog(), and setCurveToModify().

## boxPolarParameter

QLineEdit* FunctionDialog::boxPolarParameter

private

Referenced by acceptPolar(), FunctionDialog(), guessConstants(), and setCurveToModify().

## boxPolarPoints

QSpinBox* FunctionDialog::boxPolarPoints

private

Referenced by acceptPolar(), FunctionDialog(), and setCurveToModify().

## boxPolarRadius

ScriptEdit* FunctionDialog::boxPolarRadius

private

Referenced by acceptPolar(), clearList(), FunctionDialog(), guessConstants(), insertFunction(), setCurveToModify(), and showPolarRadiusLog().

## boxPolarTheta

ScriptEdit* FunctionDialog::boxPolarTheta

private

Referenced by acceptPolar(), clearList(), FunctionDialog(), guessConstants(), insertFunction(), setCurveToModify(), and showPolarThetaLog().

## boxPolarTo

DoubleSpinBox* FunctionDialog::boxPolarTo

private

Referenced by acceptPolar(), FunctionDialog(), and setCurveToModify().

## boxTo

DoubleSpinBox* FunctionDialog::boxTo

private

Referenced by acceptFunction(), FunctionDialog(), and setCurveToModify().

## boxType

QComboBox* FunctionDialog::boxType

private

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), apply(), clearList(), FunctionDialog(), guessConstants(), and setCurveToModify().

## boxXFunction

ScriptEdit* FunctionDialog::boxXFunction

private

Referenced by acceptParametric(), clearList(), FunctionDialog(), guessConstants(), insertFunction(), setCurveToModify(), and showXParLog().

## boxYFunction

ScriptEdit* FunctionDialog::boxYFunction

private

Referenced by acceptParametric(), clearList(), FunctionDialog(), guessConstants(), insertFunction(), setCurveToModify(), and showYParLog().

## buttonBox

QDialogButtonBox* FunctionDialog::buttonBox

private

Referenced by buttonClicked(), and FunctionDialog().

## buttonClear

QPushButton* FunctionDialog::buttonClear

private

Referenced by FunctionDialog().

## buttonFunctionLog

QPushButton* FunctionDialog::buttonFunctionLog

private

Referenced by FunctionDialog().

## buttonPolarRadiusLog

QPushButton * FunctionDialog::buttonPolarRadiusLog

private

Referenced by FunctionDialog().

## buttonPolarRThetaLog

QPushButton * FunctionDialog::buttonPolarRThetaLog

private

Referenced by FunctionDialog().

## buttonXParLog

QPushButton * FunctionDialog::buttonXParLog

private

Referenced by FunctionDialog().

## buttonYParLog

QPushButton * FunctionDialog::buttonYParLog

private

Referenced by FunctionDialog().

## curveID

int FunctionDialog::curveID

private

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), FunctionDialog(), and setCurveToModify().

## d_active_editor

ScriptEdit* FunctionDialog::d_active_editor

private

Referenced by insertFunction(), and setActiveEditor().

## d_app

ApplicationWindow* FunctionDialog::d_app

private

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), FunctionDialog(), showFunctionLog(), showPolarRadiusLog(), showPolarThetaLog(), showXParLog(), and showYParLog().

## d_stand_alone

bool FunctionDialog::d_stand_alone

private

Referenced by guessConstants().

## functionPage

QWidget* FunctionDialog::functionPage

private

Referenced by FunctionDialog(), and insertFunction().

## graph

Graph* FunctionDialog::graph

private

Referenced by acceptFunction(), acceptParametric(), acceptPolar(), FunctionDialog(), setConstants(), setCurveToModify(), and setGraph().

## optionStack

QStackedWidget* FunctionDialog::optionStack

private

Referenced by FunctionDialog(), insertFunction(), raiseWidget(), and setCurveToModify().

## parametricPage

QWidget* FunctionDialog::parametricPage

private

Referenced by FunctionDialog(), and insertFunction().

## polarPage

QWidget* FunctionDialog::polarPage

private

Referenced by FunctionDialog(), and insertFunction().

## textFunction

QLabel* FunctionDialog::textFunction

private

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

- qtiplot/src/plot2D/dialogs/FunctionDialog.h
- qtiplot/src/plot2D/dialogs/FunctionDialog.cpp