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 | ( | 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

void FunctionDialog::accept | ( |  | ) |

private slot

References apply().

Referenced by buttonClicked().

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().

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().

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().

bool FunctionDialog::apply | ( |  | ) |

slot

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

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

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

private

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

Referenced by FunctionDialog().

void FunctionDialog::clearList | ( |  | ) |

private

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

Referenced by FunctionDialog().

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(), and raiseWidget().

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().

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

private slot

References guessConstants(), and optionStack.

Referenced by FunctionDialog().

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

inline private slot

References d_active_editor.

Referenced by FunctionDialog().

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(), and acceptPolar().

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().

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

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

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

inline

References graph.

Referenced by ApplicationWindow::addFunctionCurve().

void FunctionDialog::showFunctionLog | ( |  | ) |

private slot

References boxFunction, d_app, and ApplicationWindow::d_recent_functions.

Referenced by FunctionDialog().

void FunctionDialog::showPolarRadiusLog | ( |  | ) |

private slot

References boxPolarRadius, d_app, and ApplicationWindow::rFunctions.

Referenced by FunctionDialog().

void FunctionDialog::showPolarThetaLog | ( |  | ) |

private slot

References boxPolarTheta, d_app, and ApplicationWindow::thetaFunctions.

Referenced by FunctionDialog().

void FunctionDialog::showXParLog | ( |  | ) |

private slot

References boxXFunction, d_app, and ApplicationWindow::xFunctions.

Referenced by FunctionDialog().

void FunctionDialog::showYParLog | ( |  | ) |

private slot

References boxYFunction, d_app, and ApplicationWindow::yFunctions.

Referenced by FunctionDialog().

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

private slot

References boxFunctionExplain, and MyParser::explainFunction().

Referenced by FunctionDialog().

## Member Data Documentation

QPushButton* FunctionDialog::addFunctionBtn

private

Referenced by FunctionDialog().

QTableWidget* FunctionDialog::boxConstants

private

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

DoubleSpinBox* FunctionDialog::boxFrom

private

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

ScriptEdit* FunctionDialog::boxFunction

private

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

QTextEdit* FunctionDialog::boxFunctionExplain

private

Referenced by FunctionDialog(), and updateFunctionExplain().

QComboBox* FunctionDialog::boxMathFunctions

private

Referenced by FunctionDialog(), and insertFunction().

QLineEdit* FunctionDialog::boxParameter

private

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

DoubleSpinBox* FunctionDialog::boxParFrom

private

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

QSpinBox* FunctionDialog::boxParPoints

private

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

DoubleSpinBox* FunctionDialog::boxParTo

private

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

QSpinBox* FunctionDialog::boxPoints

private

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

DoubleSpinBox* FunctionDialog::boxPolarFrom

private

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

QLineEdit* FunctionDialog::boxPolarParameter

private

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

QSpinBox* FunctionDialog::boxPolarPoints

private

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

ScriptEdit* FunctionDialog::boxPolarRadius

private

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

ScriptEdit* FunctionDialog::boxPolarTheta

private

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

DoubleSpinBox* FunctionDialog::boxPolarTo

private

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

DoubleSpinBox* FunctionDialog::boxTo

private

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

QComboBox* FunctionDialog::boxType

private

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

ScriptEdit* FunctionDialog::boxXFunction

private

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

ScriptEdit* FunctionDialog::boxYFunction

private

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

QDialogButtonBox* FunctionDialog::buttonBox

private

Referenced by buttonClicked(), and FunctionDialog().

QPushButton* FunctionDialog::buttonClear

private

Referenced by FunctionDialog().

QPushButton* FunctionDialog::buttonFunctionLog

private

Referenced by FunctionDialog().

QPushButton * FunctionDialog::buttonPolarRadiusLog

private

Referenced by FunctionDialog().

QPushButton * FunctionDialog::buttonPolarRThetaLog

private

Referenced by FunctionDialog().

QPushButton * FunctionDialog::buttonXParLog

private

Referenced by FunctionDialog().

QPushButton * FunctionDialog::buttonYParLog

private

Referenced by FunctionDialog().

int FunctionDialog::curveID

private

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

ScriptEdit* FunctionDialog::d_active_editor

private

Referenced by insertFunction(), and setActiveEditor().

ApplicationWindow* FunctionDialog::d_app

private

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

bool FunctionDialog::d_stand_alone

private

Referenced by guessConstants().

QWidget* FunctionDialog::functionPage

private

Referenced by FunctionDialog(), and insertFunction().

Graph* FunctionDialog::graph

private

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

QStackedWidget* FunctionDialog::optionStack

private

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

QWidget* FunctionDialog::parametricPage

private

Referenced by FunctionDialog(), and insertFunction().

QWidget* FunctionDialog::polarPage

private

Referenced by FunctionDialog(), and insertFunction().

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