00001 /*************************************************************************** 00002 File : FunctionDialog.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2006 by Ion Vasilief, Tilman Hoener zu Siederdissen 00006 Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net 00007 Description : Function dialog 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 * This program is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00021 * GNU General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU General Public License * 00024 * along with this program; if not, write to the Free Software * 00025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00026 * Boston, MA 02110-1301 USA * 00027 * * 00028 ***************************************************************************/ 00029 #ifndef FUNCTIONDIALOG_H 00030 #define FUNCTIONDIALOG_H 00031 00032 #include "../Graph.h" 00033 00034 class QStackedWidget; 00035 class QWidget; 00036 class QLineEdit; 00037 class QComboBox; 00038 class QPushButton; 00039 class QSpinBox; 00040 class QLabel; 00041 class QTextEdit; 00042 class DoubleSpinBox; 00043 00045 class FunctionDialog : public QDialog 00046 { 00047 Q_OBJECT 00048 00049 public: 00050 FunctionDialog( QWidget* parent = 0, Qt::WFlags fl = 0 ); 00051 00052 protected: 00053 QComboBox* boxXFunction; 00054 QComboBox* boxYFunction; 00055 QComboBox* boxPolarRadius; 00056 QComboBox* boxPolarTheta; 00057 QComboBox* boxType; 00058 QLabel* textFunction; 00059 DoubleSpinBox* boxFrom; 00060 DoubleSpinBox* boxTo; 00061 QLineEdit* boxParameter; 00062 QLineEdit* boxParFrom; 00063 QLineEdit* boxParTo; 00064 QLineEdit* boxPolarParameter; 00065 QLineEdit* boxPolarFrom; 00066 QLineEdit* boxPolarTo; 00067 QPushButton* buttonClear; 00068 QPushButton* buttonCancel; 00069 QPushButton* buttonOk; 00070 QSpinBox* boxPoints; 00071 QSpinBox* boxParPoints; 00072 QSpinBox* boxPolarPoints; 00073 QStackedWidget* optionStack; 00074 QTextEdit* boxFunction; 00075 QWidget* functionPage; 00076 QWidget* polarPage; 00077 QWidget* parametricPage; 00078 00079 protected slots: 00080 void raiseWidget(int index); 00081 00082 public slots: 00083 void accept(); 00084 void acceptFunction(); 00085 void acceptParametric(); 00086 void acceptPolar(); 00087 void setCurveToModify(Graph *g, int curve); 00088 void insertParamFunctionsList(const QStringList& xList, const QStringList& yList); 00089 void insertPolarFunctionsList(const QStringList& rList, const QStringList& thetaList); 00090 void clearList(); 00091 void setGraph(Graph *g){graph = g;}; 00092 00093 signals: 00094 void clearParamFunctionsList(); 00095 void clearPolarFunctionsList(); 00096 00097 private: 00098 Graph *graph; 00099 int curveID; 00100 }; 00101 00102 #endif // FUNCTIONDIALOG_H