MatrixValuesDialog.h
Go to the documentation of this file.
/***************************************************************************
File : MatrixValuesDialog.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 by Ion Vasilief, Knut Franke
Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
Description : Set matrix values dialog
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef MVALUESDIALOG_H
#define MVALUESDIALOG_H
#include <QDialog>
#include <ScriptingEnv.h>
#include <Script.h>
#include <ScriptEdit.h>
#include "Matrix.h"
#ifdef SCRIPTING_PYTHON
class QCheckBox;
#endif
class QComboBox;
class QTextEdit;
class QCompleter;
class QSpinBox;
class QPushButton;
class ScriptEdit;
class Matrix;
class MatrixValuesDialog : public QDialog, public scripted
{
Q_OBJECT
public:
MatrixValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
void setMatrix(Matrix *m);
void setCompleter(QCompleter *);
private slots:
bool apply();
void addCell();
void insertFunction();
void insertExplain(int index);
#ifdef SCRIPTING_PYTHON
void updateFunctionsList(bool);
#endif
private:
Matrix *matrix;
QSize sizeHint() const ;
void customEvent( QEvent *e);
void closeEvent(QCloseEvent*);
ScriptEdit* commands;
QComboBox* functions;
QPushButton* btnAddFunction;
QPushButton* btnAddCell;
QPushButton* btnCancel;
QTextEdit* explain;
QSpinBox *startRow, *endRow, *startCol, *endCol;
QPushButton *btnApply;
#ifdef SCRIPTING_PYTHON
QCheckBox *boxMuParser;
#endif
};
#endif //
MatrixValuesDialog::startCol
QSpinBox * startCol
Definition: MatrixValuesDialog.h:81
MatrixValuesDialog::btnCancel
QPushButton * btnCancel
Definition: MatrixValuesDialog.h:79
MatrixValuesDialog::functions
QComboBox * functions
Definition: MatrixValuesDialog.h:76
MatrixValuesDialog::sizeHint
QSize sizeHint() const
Definition: MatrixValuesDialog.cpp:142
MatrixValuesDialog::startRow
QSpinBox * startRow
Definition: MatrixValuesDialog.h:81
MatrixValuesDialog::explain
QTextEdit * explain
Definition: MatrixValuesDialog.h:80
ScriptingEnv
An interpreter for evaluating scripting code. Abstract.
Definition: ScriptingEnv.h:50
ScriptingEnv.h
MatrixValuesDialog::endCol
QSpinBox * endCol
Definition: MatrixValuesDialog.h:81
MatrixValuesDialog
Set matrix values dialog.
Definition: MatrixValuesDialog.h:50
MatrixValuesDialog::btnAddFunction
QPushButton * btnAddFunction
Definition: MatrixValuesDialog.h:77
Script.h
MatrixValuesDialog::endRow
QSpinBox * endRow
Definition: MatrixValuesDialog.h:81
MatrixValuesDialog::btnAddCell
QPushButton * btnAddCell
Definition: MatrixValuesDialog.h:78
MatrixValuesDialog::setCompleter
void setCompleter(QCompleter *)
Definition: MatrixValuesDialog.cpp:227
ScriptEdit
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
MatrixValuesDialog::setMatrix
void setMatrix(Matrix *m)
Definition: MatrixValuesDialog.cpp:179
MatrixValuesDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: MatrixValuesDialog.cpp:235
Matrix.h
Matrix
Matrix worksheet class.
Definition: Matrix.h:57
MatrixValuesDialog::customEvent
void customEvent(QEvent *e)
Definition: MatrixValuesDialog.cpp:147
MatrixValuesDialog::btnApply
QPushButton * btnApply
Definition: MatrixValuesDialog.h:82
MatrixValuesDialog::apply
bool apply()
Definition: MatrixValuesDialog.cpp:153
scripted
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:152
ScriptEdit.h
MatrixValuesDialog::insertFunction
void insertFunction()
Definition: MatrixValuesDialog.cpp:217
MatrixValuesDialog::addCell
void addCell()
Definition: MatrixValuesDialog.cpp:222
MatrixValuesDialog::commands
ScriptEdit * commands
Definition: MatrixValuesDialog.h:75
MatrixValuesDialog::matrix
Matrix * matrix
Definition: MatrixValuesDialog.h:69
MatrixValuesDialog::MatrixValuesDialog
MatrixValuesDialog(ScriptingEnv *env, QWidget *parent=0, Qt::WFlags fl=0)
Definition: MatrixValuesDialog.cpp:47
MatrixValuesDialog::insertExplain
void insertExplain(int index)
Definition: MatrixValuesDialog.cpp:205