00001 /*************************************************************************** 00002 File : SetColValuesDialog.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2006 by Ion Vasilief, 00006 Tilman Hoener zu Siederdissen 00007 Knut Franke 00008 Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net, 00009 knut.franke*gmx.de 00010 Description : Set column values dialog 00011 00012 ***************************************************************************/ 00013 00014 /*************************************************************************** 00015 * * 00016 * This program is free software; you can redistribute it and/or modify * 00017 * it under the terms of the GNU General Public License as published by * 00018 * the Free Software Foundation; either version 2 of the License, or * 00019 * (at your option) any later version. * 00020 * * 00021 * This program is distributed in the hope that it will be useful, * 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00024 * GNU General Public License for more details. * 00025 * * 00026 * You should have received a copy of the GNU General Public License * 00027 * along with this program; if not, write to the Free Software * 00028 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00029 * Boston, MA 02110-1301 USA * 00030 * * 00031 ***************************************************************************/ 00032 #ifndef VALUESDIALOG_H 00033 #define VALUESDIALOG_H 00034 00035 #include "ScriptingEnv.h" 00036 #include "Script.h" 00037 #include <QDialog> 00038 00039 class QComboBox; 00040 class QTextEdit; 00041 class QSpinBox; 00042 class QPushButton; 00043 class QLabel; 00044 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 00059 private slots: 00060 bool apply(); 00061 void prevColumn(); 00062 void nextColumn(); 00063 void insertFunction(); 00064 void insertCol(); 00065 void insertCell(); 00066 void insertExplain(int index); 00067 void updateColumn(int sc); 00068 00069 private: 00070 Table* table; 00071 00072 QSize sizeHint() const ; 00073 void customEvent( QEvent *e ); 00074 00075 QComboBox* functions; 00076 QComboBox* boxColumn; 00077 QPushButton* btnAddFunction; 00078 QPushButton* btnAddCol; 00079 QPushButton* btnCancel; 00080 QPushButton *buttonPrev; 00081 QPushButton *buttonNext; 00082 QPushButton *addCellButton; 00083 QPushButton *btnApply; 00084 ScriptEdit* commands; 00085 QTextEdit* explain; 00086 QSpinBox* start, *end; 00087 QLabel *colNameLabel; 00088 }; 00089 00090 #endif //