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 "../scripting/ScriptingEnv.h" 00034 #include "../scripting/Script.h" 00035 #include "../scripting/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 00065 private: 00066 Matrix *matrix; 00067 00068 QSize sizeHint() const ; 00069 void customEvent( QEvent *e); 00070 00071 ScriptEdit* commands; 00072 QComboBox* functions; 00073 QPushButton* btnAddFunction; 00074 QPushButton* btnAddCell; 00075 QPushButton* btnCancel; 00076 QTextEdit* explain; 00077 QSpinBox *startRow, *endRow, *startCol, *endCol; 00078 QPushButton *btnApply; 00079 #ifdef SCRIPTING_PYTHON 00080 QCheckBox *boxMuParser; 00081 #endif 00082 }; 00083 00084 #endif //