00001 /*************************************************************************** 00002 File : MatrixValuesDialog.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2006 by Ion Vasilief, 00006 Knut Franke 00007 Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de 00008 Description : Set matrix values dialog 00009 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * * 00014 * This program is free software; you can redistribute it and/or modify * 00015 * it under the terms of the GNU General Public License as published by * 00016 * the Free Software Foundation; either version 2 of the License, or * 00017 * (at your option) any later version. * 00018 * * 00019 * This program is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 * GNU General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU General Public License * 00025 * along with this program; if not, write to the Free Software * 00026 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00027 * Boston, MA 02110-1301 USA * 00028 * * 00029 ***************************************************************************/ 00030 #ifndef MVALUESDIALOG_H 00031 #define MVALUESDIALOG_H 00032 00033 #include <QDialog> 00034 #include "../ScriptingEnv.h" 00035 #include "../Script.h" 00036 #include "../ScriptEdit.h" 00037 #include "Matrix.h" 00038 00039 #ifdef SCRIPTING_PYTHON 00040 class QCheckBox; 00041 #endif 00042 class QComboBox; 00043 class QTextEdit; 00044 class QCompleter; 00045 class QSpinBox; 00046 class QPushButton; 00047 class ScriptEdit; 00048 class Matrix; 00049 00051 class MatrixValuesDialog : public QDialog, public scripted 00052 { 00053 Q_OBJECT 00054 00055 public: 00056 MatrixValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 ); 00057 void setMatrix(Matrix *m); 00058 void setCompleter(QCompleter *); 00059 00060 private slots: 00061 bool apply(); 00062 void addCell(); 00063 void insertFunction(); 00064 void insertExplain(int index); 00065 00066 private: 00067 Matrix *matrix; 00068 00069 QSize sizeHint() const ; 00070 void customEvent( QEvent *e); 00071 00072 ScriptEdit* commands; 00073 QComboBox* functions; 00074 QPushButton* btnAddFunction; 00075 QPushButton* btnAddCell; 00076 QPushButton* btnCancel; 00077 QTextEdit* explain; 00078 QSpinBox *startRow, *endRow, *startCol, *endCol; 00079 QPushButton *btnApply; 00080 #ifdef SCRIPTING_PYTHON 00081 QCheckBox *boxMuParser; 00082 #endif 00083 }; 00084 00085 #endif //