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 //
QSpinBox * startCol
Definition: MatrixValuesDialog.h:81
QPushButton * btnCancel
Definition: MatrixValuesDialog.h:79
QComboBox * functions
Definition: MatrixValuesDialog.h:76
QSize sizeHint() const
Definition: MatrixValuesDialog.cpp:142
QSpinBox * startRow
Definition: MatrixValuesDialog.h:81
QTextEdit * explain
Definition: MatrixValuesDialog.h:80
An interpreter for evaluating scripting code. Abstract.
Definition: ScriptingEnv.h:50
QSpinBox * endCol
Definition: MatrixValuesDialog.h:81
Set matrix values dialog.
Definition: MatrixValuesDialog.h:50
QPushButton * btnAddFunction
Definition: MatrixValuesDialog.h:77
QSpinBox * endRow
Definition: MatrixValuesDialog.h:81
QPushButton * btnAddCell
Definition: MatrixValuesDialog.h:78
void setCompleter(QCompleter *)
Definition: MatrixValuesDialog.cpp:227
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
void setMatrix(Matrix *m)
Definition: MatrixValuesDialog.cpp:179
void closeEvent(QCloseEvent *)
Definition: MatrixValuesDialog.cpp:235
Matrix worksheet class.
Definition: Matrix.h:57
void customEvent(QEvent *e)
Definition: MatrixValuesDialog.cpp:147
QPushButton * btnApply
Definition: MatrixValuesDialog.h:82
bool apply()
Definition: MatrixValuesDialog.cpp:153
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:152
void insertFunction()
Definition: MatrixValuesDialog.cpp:217
void addCell()
Definition: MatrixValuesDialog.cpp:222
ScriptEdit * commands
Definition: MatrixValuesDialog.h:75
Matrix * matrix
Definition: MatrixValuesDialog.h:69
MatrixValuesDialog(ScriptingEnv *env, QWidget *parent=0, Qt::WFlags fl=0)
Definition: MatrixValuesDialog.cpp:47
void insertExplain(int index)
Definition: MatrixValuesDialog.cpp:205