QtiPlot  0.9.8.2
MatrixValuesDialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : MatrixValuesDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2006 by Ion Vasilief, Knut Franke
00006     Email (use @ for *)  : ion_vasilief*yahoo.fr, knut.franke*gmx.de
00007     Description          : Set matrix values 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 MVALUESDIALOG_H
00030 #define MVALUESDIALOG_H
00031 
00032 #include <QDialog>
00033 #include <ScriptingEnv.h>
00034 #include <Script.h>
00035 #include <ScriptEdit.h>
00036 #include "Matrix.h"
00037 
00038 #ifdef SCRIPTING_PYTHON
00039 class QCheckBox;
00040 #endif
00041 class QComboBox;
00042 class QTextEdit;
00043 class QCompleter;
00044 class QSpinBox;
00045 class QPushButton;
00046 class ScriptEdit;
00047 class Matrix;
00048 
00050 class MatrixValuesDialog : public QDialog, public scripted
00051 {
00052     Q_OBJECT
00053 
00054 public:
00055     MatrixValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
00056     void setMatrix(Matrix *m);
00057     void setCompleter(QCompleter *);
00058 
00059 private slots:
00060     bool apply();
00061     void addCell();
00062     void insertFunction();
00063     void insertExplain(int index);
00064 #ifdef SCRIPTING_PYTHON
00065     void updateFunctionsList(bool);
00066 #endif
00067 
00068 private:
00069     Matrix *matrix;
00070 
00071     QSize sizeHint() const ;
00072     void customEvent( QEvent *e);
00073     void closeEvent(QCloseEvent*);
00074 
00075     ScriptEdit* commands;
00076     QComboBox* functions;
00077     QPushButton* btnAddFunction;
00078     QPushButton* btnAddCell;
00079     QPushButton* btnCancel;
00080     QTextEdit* explain;
00081     QSpinBox *startRow, *endRow, *startCol, *endCol;
00082     QPushButton *btnApply;
00083 #ifdef SCRIPTING_PYTHON
00084     QCheckBox *boxMuParser;
00085 #endif
00086 };
00087 
00088 #endif //