SciDAVis  1.D4
FunctionDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : FunctionDialog.h
3  Project : SciDAVis
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6  Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7  Description : Function dialog
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef FUNCTIONDIALOG_H
30 #define FUNCTIONDIALOG_H
31 
32 #include "Graph.h"
33 
34 class QStackedWidget;
35 class QWidget;
36 class QLineEdit;
37 class QComboBox;
38 class QPushButton;
39 class QSpinBox;
40 class QLabel;
41 class QTextEdit;
42 
44 class FunctionDialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  FunctionDialog( QWidget* parent = 0, Qt::WFlags fl = 0 );
50 
51 protected:
52  QComboBox* boxXFunction;
53  QComboBox* boxYFunction;
54  QComboBox* boxPolarRadius;
55  QComboBox* boxPolarTheta;
56  QComboBox* boxType;
57  QLabel* textFunction;
58  QLineEdit* boxFrom;
59  QLineEdit* boxTo;
60  QLineEdit* boxParameter;
61  QLineEdit* boxParFrom;
62  QLineEdit* boxParTo;
63  QLineEdit* boxPolarParameter;
64  QLineEdit* boxPolarFrom;
65  QLineEdit* boxPolarTo;
66  QPushButton *buttonApply;
67  QPushButton* buttonClear;
68  QPushButton* buttonCancel;
69  QPushButton* buttonOk;
70  QSpinBox* boxPoints;
71  QSpinBox* boxParPoints;
72  QSpinBox* boxPolarPoints;
73  QStackedWidget* optionStack;
74  QTextEdit* boxFunction;
75  QWidget* functionPage;
76  QWidget* polarPage;
77  QWidget* parametricPage;
78 
79 protected slots:
80  void raiseWidget(int index);
81 
82 public slots:
83  bool apply();
84  void accept();
85  bool acceptFunction();
86  bool acceptParametric();
87  bool acceptPolar();
88  void setCurveToModify(Graph *g, int curve);
89  void insertParamFunctionsList(const QStringList& xList, const QStringList& yList);
90  void insertPolarFunctionsList(const QStringList& rList, const QStringList& thetaList);
91  void clearList();
92  void setGraph(Graph *g){graph = g;};
93 
94 signals:
97 
98 private:
100  int curveID;
101 };
102 
103 #endif // FUNCTIONDIALOG_H