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 50 //! Set column values dialog 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: 75 Table* table; 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; 91 ScriptEdit* commands; 92 QTextEdit* explain; 93 QSpinBox* start, *end; 94 QLabel *colNameLabel; 95 #ifdef SCRIPTING_PYTHON 96 QCheckBox *boxMuParser; 97 #endif 98 }; 99 100 #endif // 101