ExtractDataDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : ExtractDataDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2010 by Ion Vasilief
00006     Email (use @ for *)  : ion_vasilief*yahoo.fr
00007     Description          : Extract data 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 EXTRACTDATADIALOG_H
00030 #define EXTRACTDATADIALOG_H
00031 
00032 #include <ScriptingEnv.h>
00033 #include <Script.h>
00034 #include <QDialog>
00035 
00036 class QLineEdit;
00037 class QComboBox;
00038 class QTextEdit;
00039 class QSpinBox;
00040 class QPushButton;
00041 class QLabel;
00042 class QCompleter;
00043 class Table;
00044 class ScriptingEnv;
00045 class ScriptEdit;
00046 
00047 
00049 class ExtractDataDialog : public QDialog, public scripted
00050 {
00051     Q_OBJECT
00052 
00053 public:
00054     ExtractDataDialog( ScriptingEnv *env, QWidget* parent = 0, Qt::WFlags fl = 0 );
00055     void setTable(Table* w);
00056     void setCompleter(QCompleter *);
00057 
00058 private slots:
00059     void apply();
00060     void insertFunction();
00061     void insertCol();
00062     void insertOp();
00063     void insertExplain(int index);
00064     void clearFormulas();
00065 
00066 private:
00067     Table* table;
00068 
00069     QSize sizeHint() const ;
00070 
00071     QComboBox* functions;
00072     QComboBox* boxColumn;
00073     QComboBox *boxOperators;
00074 
00075     QPushButton* btnAddFunction;
00076     QPushButton* btnAddCol;
00077     QPushButton* btnCancel;
00078     QPushButton *btnApply;
00079     QPushButton* buttonClearFormulas;
00080     QPushButton* btnAddOp;
00081 
00082     ScriptEdit* commands;
00083     QTextEdit* explain;
00084     QSpinBox* start, *end;
00085     QLineEdit *destNameBox;
00086 };
00087 
00088 #endif //