QtiPlot  0.9.8.2
PlotWizard.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : PlotWizard.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2004 - 2010 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : A wizard type dialog to create new plots
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 
30 
31 #ifndef PLOTWIZARD_H
32 #define PLOTWIZARD_H
33 
34 #include <QDialog>
35 class QGroupBox;
36 class QPushButton;
37 class QListWidget;
38 class QComboBox;
39 
41 class PlotWizard : public QDialog
42 {
43  Q_OBJECT
44 
45 public:
47 
51  PlotWizard( QWidget* parent = 0, Qt::WFlags fl = 0 );
52 
53 private:
55  QPushButton* buttonOk,
57  *buttonXErr,
59  *buttonYErr,
61  *buttonDelete;
63  QPushButton* buttonCancel,
65  *buttonX,
67  *buttonY,
69  *buttonNew,
71  *buttonZ;
73  QGroupBox* groupBox1,
75  *groupBox2,
77  *groupBox3;
79  QComboBox* boxTables;
81  QListWidget *columnsList,
84 
86  QStringList columns;
87 
88 public slots:
90  void changeColumnsList(const QString &table);
92  void insertTablesList(const QStringList& tables);
94  void setColumnsListBoxContents(const QStringList& cols);
96  void setColumnsList(const QStringList& cols);
98  void addCurve();
100  void removeCurve();
102  void addXCol();
104  void addYCol();
106  void addXErrCol();
108  void addYErrCol();
110  void accept();
112  void addZCol();
113 
114 private:
115  void plot2D(const QStringList&);
116  void plot3D(const QStringList&);
117  void plot3DRibbon(const QStringList&);
119  bool noCurves();
120  QSize sizeHint() const;
121 };
122 
123 #endif // PLOTWIZARD_H
QPushButton * buttonY
Button &quot;&lt;-&gt;Y&quot;.
Definition: PlotWizard.h:63
void plot3DRibbon(const QStringList &)
Definition: PlotWizard.cpp:324
QListWidget * plotAssociations
List of the plots to generate.
Definition: PlotWizard.h:81
bool noCurves()
Display a warning that a new curve must be added first before the selection of the columns...
Definition: PlotWizard.cpp:313
void addCurve()
Add new curve.
Definition: PlotWizard.cpp:285
QGroupBox * groupBox1
Button group defining the layout.
Definition: PlotWizard.h:73
QListWidget * columnsList
List of the columns in the selected table.
Definition: PlotWizard.h:81
void addYCol()
Add column as Y.
Definition: PlotWizard.cpp:211
void plot2D(const QStringList &)
Definition: PlotWizard.cpp:398
void plot3D(const QStringList &)
Definition: PlotWizard.cpp:358
QPushButton * buttonZ
Button &quot;&lt;-&gt;Z&quot;.
Definition: PlotWizard.h:63
QPushButton * buttonYErr
Button &quot;&lt;-&gt;yErr&quot;.
Definition: PlotWizard.h:55
void addZCol()
Add column as Z.
Definition: PlotWizard.cpp:227
void setColumnsList(const QStringList &cols)
Set the internal columns list to &#39;cols&#39;.
Definition: PlotWizard.cpp:308
QStringList columns
Internal list of columns (contains all columns in all tables)
Definition: PlotWizard.h:86
A wizard type dialog class to create new plots.
Definition: PlotWizard.h:41
void accept()
Accept settings, close the dialog.
Definition: PlotWizard.cpp:143
void addXErrCol()
Add column as X error.
Definition: PlotWizard.cpp:245
QPushButton * buttonDelete
Button &quot;Delete curve&quot;.
Definition: PlotWizard.h:55
void addYErrCol()
Add column as Y error.
Definition: PlotWizard.cpp:265
QPushButton * buttonOk
Button &quot;Plot&quot;.
Definition: PlotWizard.h:55
QGroupBox * groupBox3
Button group defining the layout.
Definition: PlotWizard.h:73
QGroupBox * groupBox2
Button group defining the layout.
Definition: PlotWizard.h:73
QPushButton * buttonX
Button &quot;&lt;-&gt;X&quot;.
Definition: PlotWizard.h:63
QSize sizeHint() const
Definition: PlotWizard.cpp:138
void insertTablesList(const QStringList &tables)
Insert a list of tables into the tables combo box.
Definition: PlotWizard.cpp:296
void addXCol()
Add column as X.
Definition: PlotWizard.cpp:197
PlotWizard(QWidget *parent=0, Qt::WFlags fl=0)
Constructor.
Definition: PlotWizard.cpp:50
QComboBox * boxTables
Combo box to select the table.
Definition: PlotWizard.h:79
void changeColumnsList(const QString &table)
Update the columns list box to contain the columns of &#39;table&#39;.
Definition: PlotWizard.cpp:184
QPushButton * buttonCancel
Button &quot;cancel&quot;.
Definition: PlotWizard.h:63
void setColumnsListBoxContents(const QStringList &cols)
Set the contents of the columns list box to the strings in &#39;cols&#39;.
Definition: PlotWizard.cpp:301
QPushButton * buttonXErr
Button &quot;&lt;-&gt;xErr&quot;.
Definition: PlotWizard.h:55
void removeCurve()
Delete selected curve.
Definition: PlotWizard.cpp:291
QPushButton * buttonNew
Button &quot;New curve&quot;.
Definition: PlotWizard.h:63