FunctionDialog.h
Go to the documentation of this file.
/***************************************************************************
File : FunctionDialog.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 - 2009 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Function dialog
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef FUNCTIONDIALOG_H
#define FUNCTIONDIALOG_H
#include <Graph.h>
class QAbstractButton;
class QDialogButtonBox;
class QTableWidget;
class QStackedWidget;
class QWidget;
class QLineEdit;
class QComboBox;
class QPushButton;
class QSpinBox;
class QLabel;
class QTextEdit;
class DoubleSpinBox;
class ScriptEdit;
class ApplicationWindow;
class FunctionDialog : public QDialog
{
Q_OBJECT
public:
FunctionDialog(ApplicationWindow* parent, bool standAlone = true, Qt::WFlags fl = 0 );
void setCurveToModify(Graph *g, int curve);
void setCurveToModify(FunctionCurve *c);
void setGraph(Graph *g){graph = g;};
public slots:
bool apply();
private slots:
void raiseWidget(int index);
void insertFunction();
void updateFunctionExplain(int);
void accept();
bool acceptFunction();
bool acceptParametric();
bool acceptPolar();
void showFunctionLog();
void showXParLog();
void showYParLog();
void showPolarRadiusLog();
void showPolarThetaLog();
void setActiveEditor(ScriptEdit *edit){d_active_editor = edit;};
void guessConstants();
void buttonClicked(QAbstractButton *);
void clearList();
private:
void setConstants(FunctionCurve *c, const QMap<QString, double>& constants);
Graph *graph;
int curveID;
ScriptEdit* boxXFunction;
ScriptEdit* boxYFunction;
ScriptEdit* boxPolarRadius;
ScriptEdit* boxPolarTheta;
QComboBox* boxType;
QLabel* textFunction;
DoubleSpinBox* boxFrom;
DoubleSpinBox* boxTo;
QLineEdit* boxParameter;
DoubleSpinBox* boxParFrom;
DoubleSpinBox* boxParTo;
QLineEdit* boxPolarParameter;
DoubleSpinBox* boxPolarFrom;
DoubleSpinBox* boxPolarTo;
QPushButton* buttonClear;
QSpinBox* boxPoints;
QSpinBox* boxParPoints;
QSpinBox* boxPolarPoints;
QStackedWidget* optionStack;
ScriptEdit* boxFunction;
QWidget* functionPage;
QWidget* polarPage;
QWidget* parametricPage;
QTableWidget *boxConstants;
QPushButton *addFunctionBtn;
QComboBox* boxMathFunctions;
QTextEdit* boxFunctionExplain;
QPushButton *buttonFunctionLog, *buttonXParLog, *buttonYParLog, *buttonPolarRadiusLog, *buttonPolarRThetaLog;
QDialogButtonBox *buttonBox;
ApplicationWindow *d_app;
ScriptEdit *d_active_editor;
bool d_stand_alone;
};
#endif // FUNCTIONDIALOG_H
FunctionDialog::boxPolarRadius
ScriptEdit * boxPolarRadius
Definition: FunctionDialog.h:90
FunctionDialog::showFunctionLog
void showFunctionLog()
Definition: FunctionDialog.cpp:702
FunctionDialog::boxMathFunctions
QComboBox * boxMathFunctions
Definition: FunctionDialog.h:113
FunctionDialog::d_active_editor
ScriptEdit * d_active_editor
Definition: FunctionDialog.h:119
FunctionDialog::boxPolarParameter
QLineEdit * boxPolarParameter
Definition: FunctionDialog.h:99
FunctionDialog::setGraph
void setGraph(Graph *g)
Definition: FunctionDialog.h:59
FunctionDialog::textFunction
QLabel * textFunction
Definition: FunctionDialog.h:93
FunctionDialog::raiseWidget
void raiseWidget(int index)
Definition: FunctionDialog.cpp:344
FunctionDialog::showPolarRadiusLog
void showPolarRadiusLog()
Definition: FunctionDialog.cpp:751
FunctionDialog::boxPolarPoints
QSpinBox * boxPolarPoints
Definition: FunctionDialog.h:105
FunctionDialog::acceptParametric
bool acceptParametric()
Definition: FunctionDialog.cpp:511
FunctionDialog::boxTo
DoubleSpinBox * boxTo
Definition: FunctionDialog.h:95
FunctionDialog::polarPage
QWidget * polarPage
Definition: FunctionDialog.h:109
Graph
A 2D-plotting widget.
Definition: Graph.h:123
FunctionDialog::boxConstants
QTableWidget * boxConstants
Definition: FunctionDialog.h:111
FunctionDialog::optionStack
QStackedWidget * optionStack
Definition: FunctionDialog.h:106
FunctionDialog::boxPolarFrom
DoubleSpinBox * boxPolarFrom
Definition: FunctionDialog.h:100
FunctionDialog::accept
void accept()
Definition: FunctionDialog.cpp:678
FunctionDialog::boxParameter
QLineEdit * boxParameter
Definition: FunctionDialog.h:96
FunctionDialog::setConstants
void setConstants(FunctionCurve *c, const QMap< QString, double > &constants)
Definition: FunctionDialog.cpp:877
FunctionDialog::buttonClear
QPushButton * buttonClear
Definition: FunctionDialog.h:102
FunctionDialog::buttonPolarRadiusLog
QPushButton * buttonPolarRadiusLog
Definition: FunctionDialog.h:115
FunctionDialog::boxFrom
DoubleSpinBox * boxFrom
Definition: FunctionDialog.h:94
FunctionDialog::functionPage
QWidget * functionPage
Definition: FunctionDialog.h:108
FunctionDialog::d_app
ApplicationWindow * d_app
Definition: FunctionDialog.h:118
FunctionDialog::guessConstants
void guessConstants()
Definition: FunctionDialog.cpp:814
FunctionDialog::setCurveToModify
void setCurveToModify(Graph *g, int curve)
Definition: FunctionDialog.cpp:359
FunctionDialog::buttonFunctionLog
QPushButton * buttonFunctionLog
Definition: FunctionDialog.h:115
FunctionDialog::boxFunction
ScriptEdit * boxFunction
Definition: FunctionDialog.h:107
DoubleSpinBox
A QDoubleSpinBox allowing to customize numbers display with respect to locale settings.
Definition: DoubleSpinBox.h:39
FunctionDialog::buttonXParLog
QPushButton * buttonXParLog
Definition: FunctionDialog.h:115
FunctionDialog::boxFunctionExplain
QTextEdit * boxFunctionExplain
Definition: FunctionDialog.h:114
FunctionDialog::boxYFunction
ScriptEdit * boxYFunction
Definition: FunctionDialog.h:89
FunctionDialog::boxParFrom
DoubleSpinBox * boxParFrom
Definition: FunctionDialog.h:97
ApplicationWindow
QtiPlot's main window.
Definition: ApplicationWindow.h:133
ScriptEdit
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
FunctionDialog::acceptPolar
bool acceptPolar()
Definition: FunctionDialog.cpp:595
FunctionDialog
Function dialog.
Definition: FunctionDialog.h:50
FunctionDialog::showYParLog
void showYParLog()
Definition: FunctionDialog.cpp:735
FunctionCurve
Definition: FunctionCurve.h:37
FunctionDialog::boxPolarTo
DoubleSpinBox * boxPolarTo
Definition: FunctionDialog.h:101
FunctionDialog::d_stand_alone
bool d_stand_alone
Definition: FunctionDialog.h:120
FunctionDialog::graph
Graph * graph
Definition: FunctionDialog.h:85
FunctionDialog::FunctionDialog
FunctionDialog(ApplicationWindow *parent, bool standAlone=true, Qt::WFlags fl=0)
Definition: FunctionDialog.cpp:57
FunctionDialog::boxType
QComboBox * boxType
Definition: FunctionDialog.h:92
FunctionDialog::boxPolarTheta
ScriptEdit * boxPolarTheta
Definition: FunctionDialog.h:91
FunctionDialog::buttonClicked
void buttonClicked(QAbstractButton *)
Definition: FunctionDialog.cpp:329
Graph.h
FunctionDialog::setActiveEditor
void setActiveEditor(ScriptEdit *edit)
Definition: FunctionDialog.h:77
FunctionDialog::boxParPoints
QSpinBox * boxParPoints
Definition: FunctionDialog.h:104
FunctionDialog::parametricPage
QWidget * parametricPage
Definition: FunctionDialog.h:110
FunctionDialog::clearList
void clearList()
Definition: FunctionDialog.cpp:433
FunctionDialog::acceptFunction
bool acceptFunction()
Definition: FunctionDialog.cpp:454
FunctionDialog::boxPoints
QSpinBox * boxPoints
Definition: FunctionDialog.h:103
FunctionDialog::curveID
int curveID
Definition: FunctionDialog.h:86
FunctionDialog::addFunctionBtn
QPushButton * addFunctionBtn
Definition: FunctionDialog.h:112
FunctionDialog::apply
bool apply()
Definition: FunctionDialog.cpp:684
FunctionDialog::boxXFunction
ScriptEdit * boxXFunction
Definition: FunctionDialog.h:88
FunctionDialog::boxParTo
DoubleSpinBox * boxParTo
Definition: FunctionDialog.h:98
FunctionDialog::updateFunctionExplain
void updateFunctionExplain(int)
Definition: FunctionDialog.cpp:809
FunctionDialog::buttonBox
QDialogButtonBox * buttonBox
Definition: FunctionDialog.h:116
FunctionDialog::showPolarThetaLog
void showPolarThetaLog()
Definition: FunctionDialog.cpp:768
FunctionDialog::buttonPolarRThetaLog
QPushButton * buttonPolarRThetaLog
Definition: FunctionDialog.h:115
FunctionDialog::buttonYParLog
QPushButton * buttonYParLog
Definition: FunctionDialog.h:115
FunctionDialog::insertFunction
void insertFunction()
Definition: FunctionDialog.cpp:784
FunctionDialog::showXParLog
void showXParLog()
Definition: FunctionDialog.cpp:718