00001 /*************************************************************************** 00002 File : SetColValuesDialog.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 column 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 VALUESDIALOG_H 00030 #define VALUESDIALOG_H 00031 00032 #include <ScriptingEnv.h> 00033 #include <Script.h> 00034 #include <QDialog> 00035 00036 class QComboBox; 00037 class QTextEdit; 00038 class QSpinBox; 00039 class QPushButton; 00040 class QLabel; 00041 class QCompleter; 00042 #ifdef SCRIPTING_PYTHON 00043 class QCheckBox; 00044 #endif 00045 class Table; 00046 class ScriptingEnv; 00047 class ScriptEdit; 00048 00049 00051 class SetColValuesDialog : public QDialog, public scripted 00052 { 00053 Q_OBJECT 00054 00055 public: 00056 SetColValuesDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 ); 00057 void setTable(Table* w); 00058 void setCompleter(QCompleter *); 00059 00060 private slots: 00061 bool apply(); 00062 void prevColumn(); 00063 void nextColumn(); 00064 void insertFunction(); 00065 void insertCol(); 00066 void insertCell(); 00067 void insertExplain(int index); 00068 void updateColumn(int sc); 00069 void clearFormulas(); 00070 #ifdef SCRIPTING_PYTHON 00071 void updateFunctionsList(bool); 00072 #endif 00073 00074 private: 00075 Table* table; 00076 00077 QSize sizeHint() const ; 00078 void customEvent( QEvent *e ); 00079 void closeEvent(QCloseEvent*); 00080 00081 QComboBox* functions; 00082 QComboBox* boxColumn; 00083 QPushButton* btnAddFunction; 00084 QPushButton* btnAddCol; 00085 QPushButton* btnCancel; 00086 QPushButton *buttonPrev; 00087 QPushButton *buttonNext; 00088 QPushButton *addCellButton; 00089 QPushButton *btnApply; 00090 QPushButton* buttonClearFormulas; 00091 ScriptEdit* commands; 00092 QTextEdit* explain; 00093 QSpinBox* start, *end; 00094 QLabel *colNameLabel; 00095 #ifdef SCRIPTING_PYTHON 00096 QCheckBox *boxMuParser; 00097 #endif 00098 }; 00099 00100 #endif //