SetColValuesDialog.h
Go to the documentation of this file.
/***************************************************************************
File : SetColValuesDialog.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 by Ion Vasilief, Knut Franke
Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
Description : Set column 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 VALUESDIALOG_H
#define VALUESDIALOG_H
#include <ScriptingEnv.h>
#include <Script.h>
#include <QDialog>
class QComboBox;
class QTextEdit;
class QSpinBox;
class QPushButton;
class QLabel;
class QCompleter;
#ifdef SCRIPTING_PYTHON
class QCheckBox;
#endif
class Table;
class ScriptingEnv;
class ScriptEdit;
class SetColValuesDialog : public QDialog, public scripted
{
Q_OBJECT
public:
SetColValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
void setTable(Table* w);
void setCompleter(QCompleter *);
private slots:
bool apply();
void prevColumn();
void nextColumn();
void insertFunction();
void insertCol();
void insertCell();
void insertExplain(int index);
void updateColumn(int sc);
void clearFormulas();
#ifdef SCRIPTING_PYTHON
void updateFunctionsList(bool);
#endif
private:
Table* table;
QSize sizeHint() const ;
void customEvent( QEvent *e );
void closeEvent(QCloseEvent*);
QComboBox* functions;
QComboBox* boxColumn;
QPushButton* btnAddFunction;
QPushButton* btnAddCol;
QPushButton* btnCancel;
QPushButton *buttonPrev;
QPushButton *buttonNext;
QPushButton *addCellButton;
QPushButton *btnApply;
QPushButton* buttonClearFormulas;
ScriptEdit* commands;
QTextEdit* explain;
QSpinBox* start, *end;
QLabel *colNameLabel;
#ifdef SCRIPTING_PYTHON
QCheckBox *boxMuParser;
#endif
};
#endif //
SetColValuesDialog::buttonNext
QPushButton * buttonNext
Definition: SetColValuesDialog.h:87
SetColValuesDialog::nextColumn
void nextColumn()
Definition: SetColValuesDialog.cpp:171
SetColValuesDialog::apply
bool apply()
Definition: SetColValuesDialog.cpp:214
SetColValuesDialog::addCellButton
QPushButton * addCellButton
Definition: SetColValuesDialog.h:88
ScriptingEnv
An interpreter for evaluating scripting code. Abstract.
Definition: ScriptingEnv.h:50
ScriptingEnv.h
SetColValuesDialog::functions
QComboBox * functions
Definition: SetColValuesDialog.h:81
SetColValuesDialog::btnAddCol
QPushButton * btnAddCol
Definition: SetColValuesDialog.h:84
SetColValuesDialog::clearFormulas
void clearFormulas()
Definition: SetColValuesDialog.cpp:295
Script.h
SetColValuesDialog::buttonPrev
QPushButton * buttonPrev
Definition: SetColValuesDialog.h:86
SetColValuesDialog::explain
QTextEdit * explain
Definition: SetColValuesDialog.h:92
SetColValuesDialog::insertCol
void insertCol()
Definition: SetColValuesDialog.cpp:253
SetColValuesDialog::btnApply
QPushButton * btnApply
Definition: SetColValuesDialog.h:89
SetColValuesDialog::customEvent
void customEvent(QEvent *e)
Definition: SetColValuesDialog.cpp:208
SetColValuesDialog::boxColumn
QComboBox * boxColumn
Definition: SetColValuesDialog.h:82
SetColValuesDialog::insertExplain
void insertExplain(int index)
Definition: SetColValuesDialog.cpp:236
SetColValuesDialog::prevColumn
void prevColumn()
Definition: SetColValuesDialog.cpp:165
ScriptEdit
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
SetColValuesDialog::btnAddFunction
QPushButton * btnAddFunction
Definition: SetColValuesDialog.h:83
SetColValuesDialog::end
QSpinBox * end
Definition: SetColValuesDialog.h:93
SetColValuesDialog::setTable
void setTable(Table *w)
Definition: SetColValuesDialog.cpp:263
SetColValuesDialog::colNameLabel
QLabel * colNameLabel
Definition: SetColValuesDialog.h:94
SetColValuesDialog::sizeHint
QSize sizeHint() const
Definition: SetColValuesDialog.cpp:203
SetColValuesDialog::btnCancel
QPushButton * btnCancel
Definition: SetColValuesDialog.h:85
SetColValuesDialog::table
Table * table
Definition: SetColValuesDialog.h:75
SetColValuesDialog::insertCell
void insertCell()
Definition: SetColValuesDialog.cpp:258
scripted
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:152
SetColValuesDialog::buttonClearFormulas
QPushButton * buttonClearFormulas
Definition: SetColValuesDialog.h:90
SetColValuesDialog::insertFunction
void insertFunction()
Definition: SetColValuesDialog.cpp:248
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
SetColValuesDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: SetColValuesDialog.cpp:304
SetColValuesDialog
Set column values dialog.
Definition: SetColValuesDialog.h:51
SetColValuesDialog::SetColValuesDialog
SetColValuesDialog(ScriptingEnv *env, QWidget *parent=0, Qt::WFlags fl=0)
Definition: SetColValuesDialog.cpp:52
SetColValuesDialog::start
QSpinBox * start
Definition: SetColValuesDialog.h:93
SetColValuesDialog::setCompleter
void setCompleter(QCompleter *)
Definition: SetColValuesDialog.cpp:287
SetColValuesDialog::commands
ScriptEdit * commands
Definition: SetColValuesDialog.h:91
SetColValuesDialog::updateColumn
void updateColumn(int sc)
Definition: SetColValuesDialog.cpp:177