QtiPlot  0.9.8.2
SetColValuesDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : SetColValuesDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 by Ion Vasilief, Knut Franke
6  Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
7  Description : Set column values dialog
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef VALUESDIALOG_H
30 #define VALUESDIALOG_H
31 
32 #include <ScriptingEnv.h>
33 #include <Script.h>
34 #include <QDialog>
35 
36 class QComboBox;
37 class QTextEdit;
38 class QSpinBox;
39 class QPushButton;
40 class QLabel;
41 class QCompleter;
42 #ifdef SCRIPTING_PYTHON
43 class QCheckBox;
44 #endif
45 class Table;
46 class ScriptingEnv;
47 class ScriptEdit;
48 
49 
51 class SetColValuesDialog : public QDialog, public scripted
52 {
53  Q_OBJECT
54 
55 public:
56  SetColValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
57  void setTable(Table* w);
58  void setCompleter(QCompleter *);
59 
60 private slots:
61  bool apply();
62  void prevColumn();
63  void nextColumn();
64  void insertFunction();
65  void insertCol();
66  void insertCell();
67  void insertExplain(int index);
68  void updateColumn(int sc);
69  void clearFormulas();
70 #ifdef SCRIPTING_PYTHON
71  void updateFunctionsList(bool);
72 #endif
73 
74 private:
76 
77  QSize sizeHint() const ;
78  void customEvent( QEvent *e );
79  void closeEvent(QCloseEvent*);
80 
81  QComboBox* functions;
82  QComboBox* boxColumn;
83  QPushButton* btnAddFunction;
84  QPushButton* btnAddCol;
85  QPushButton* btnCancel;
86  QPushButton *buttonPrev;
87  QPushButton *buttonNext;
88  QPushButton *addCellButton;
89  QPushButton *btnApply;
90  QPushButton* buttonClearFormulas;
92  QTextEdit* explain;
93  QSpinBox* start, *end;
94  QLabel *colNameLabel;
95 #ifdef SCRIPTING_PYTHON
96  QCheckBox *boxMuParser;
97 #endif
98 };
99 
100 #endif //
QPushButton * buttonNext
Definition: SetColValuesDialog.h:87
void nextColumn()
Definition: SetColValuesDialog.cpp:171
bool apply()
Definition: SetColValuesDialog.cpp:214
QPushButton * addCellButton
Definition: SetColValuesDialog.h:88
An interpreter for evaluating scripting code. Abstract.
Definition: ScriptingEnv.h:50
QComboBox * functions
Definition: SetColValuesDialog.h:81
QPushButton * btnAddCol
Definition: SetColValuesDialog.h:84
void clearFormulas()
Definition: SetColValuesDialog.cpp:295
QPushButton * buttonPrev
Definition: SetColValuesDialog.h:86
QTextEdit * explain
Definition: SetColValuesDialog.h:92
void insertCol()
Definition: SetColValuesDialog.cpp:253
QPushButton * btnApply
Definition: SetColValuesDialog.h:89
void customEvent(QEvent *e)
Definition: SetColValuesDialog.cpp:208
QComboBox * boxColumn
Definition: SetColValuesDialog.h:82
void insertExplain(int index)
Definition: SetColValuesDialog.cpp:236
void prevColumn()
Definition: SetColValuesDialog.cpp:165
Editor widget with support for evaluating expressions and executing code.
Definition: ScriptEdit.h:50
QPushButton * btnAddFunction
Definition: SetColValuesDialog.h:83
QSpinBox * end
Definition: SetColValuesDialog.h:93
void setTable(Table *w)
Definition: SetColValuesDialog.cpp:263
QLabel * colNameLabel
Definition: SetColValuesDialog.h:94
QSize sizeHint() const
Definition: SetColValuesDialog.cpp:203
QPushButton * btnCancel
Definition: SetColValuesDialog.h:85
Table * table
Definition: SetColValuesDialog.h:75
void insertCell()
Definition: SetColValuesDialog.cpp:258
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:152
QPushButton * buttonClearFormulas
Definition: SetColValuesDialog.h:90
void insertFunction()
Definition: SetColValuesDialog.cpp:248
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
void closeEvent(QCloseEvent *)
Definition: SetColValuesDialog.cpp:304
Set column values dialog.
Definition: SetColValuesDialog.h:51
SetColValuesDialog(ScriptingEnv *env, QWidget *parent=0, Qt::WFlags fl=0)
Definition: SetColValuesDialog.cpp:52
QSpinBox * start
Definition: SetColValuesDialog.h:93
void setCompleter(QCompleter *)
Definition: SetColValuesDialog.cpp:287
ScriptEdit * commands
Definition: SetColValuesDialog.h:91
void updateColumn(int sc)
Definition: SetColValuesDialog.cpp:177