QtiPlot  0.9.8.2
MatrixValuesDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : MatrixValuesDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 by Ion Vasilief, Knut Franke
6  Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
7  Description : Set matrix values 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 MVALUESDIALOG_H
30 #define MVALUESDIALOG_H
31 
32 #include <QDialog>
33 #include <ScriptingEnv.h>
34 #include <Script.h>
35 #include <ScriptEdit.h>
36 #include "Matrix.h"
37 
38 #ifdef SCRIPTING_PYTHON
39 class QCheckBox;
40 #endif
41 class QComboBox;
42 class QTextEdit;
43 class QCompleter;
44 class QSpinBox;
45 class QPushButton;
46 class ScriptEdit;
47 class Matrix;
48 
50 class MatrixValuesDialog : public QDialog, public scripted
51 {
52  Q_OBJECT
53 
54 public:
55  MatrixValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
56  void setMatrix(Matrix *m);
57  void setCompleter(QCompleter *);
58 
59 private slots:
60  bool apply();
61  void addCell();
62  void insertFunction();
63  void insertExplain(int index);
64 #ifdef SCRIPTING_PYTHON
65  void updateFunctionsList(bool);
66 #endif
67 
68 private:
70 
71  QSize sizeHint() const ;
72  void customEvent( QEvent *e);
73  void closeEvent(QCloseEvent*);
74 
76  QComboBox* functions;
77  QPushButton* btnAddFunction;
78  QPushButton* btnAddCell;
79  QPushButton* btnCancel;
80  QTextEdit* explain;
81  QSpinBox *startRow, *endRow, *startCol, *endCol;
82  QPushButton *btnApply;
83 #ifdef SCRIPTING_PYTHON
84  QCheckBox *boxMuParser;
85 #endif
86 };
87 
88 #endif //