QtiPlot  0.9.8.2
AssociationsDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : AssociationsDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 - 2010 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Plot associations 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 ASSOCIATIONSDIALOG_H
30 #define ASSOCIATIONSDIALOG_H
31 
32 #include <QDialog>
33 
34 class QLabel;
35 class QListWidget;
36 class QPushButton;
37 class QTableWidget;
38 class QStringList;
39 class Table;
40 class Graph;
41 class MdiSubWindow;
42 
44 class AssociationsDialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  AssociationsDialog( QWidget* parent = 0, Qt::WFlags fl = 0 );
50 
51  void initTablesList(QList<MdiSubWindow *> lst, int curve);
52  void setGraph(Graph *g);
53 
54 private slots:
55  void updateTable(int index);
56  void updateCurves();
57  void accept();
58 
59 private:
60  void changePlotAssociation(int curve, const QStringList& lst);
61  void updateColumnTypes();
62  void uncheckCol(int col);
63  void updatePlotAssociation(int row, int col);
64  QStringList plotAssociation(const QString& text);
65  Table *findTable(int index);
66  bool eventFilter(QObject *object, QEvent *e);
67 
68  QList <MdiSubWindow*> tables;
71  QStringList plotAssociationsList;
72 
74  QTableWidget *table;
75  QPushButton *btnOK, *btnCancel, *btnApply;
76  QListWidget* associations;
77 };
78 
79 #endif // ASSOCIATIONSDIALOG_H
QPushButton * btnOK
Definition: AssociationsDialog.h:75
Table * active_table
Definition: AssociationsDialog.h:69
A 2D-plotting widget.
Definition: Graph.h:123
void initTablesList(QList< MdiSubWindow * > lst, int curve)
Definition: AssociationsDialog.cpp:190
bool eventFilter(QObject *object, QEvent *e)
Definition: AssociationsDialog.cpp:447
void updatePlotAssociation(int row, int col)
Definition: AssociationsDialog.cpp:382
QList< MdiSubWindow * > tables
Definition: AssociationsDialog.h:68
Plot associations dialog.
Definition: AssociationsDialog.h:44
void updateCurves()
Definition: AssociationsDialog.cpp:107
QPushButton * btnApply
Definition: AssociationsDialog.h:75
void uncheckCol(int col)
Definition: AssociationsDialog.cpp:349
void changePlotAssociation(int curve, const QStringList &lst)
Definition: AssociationsDialog.cpp:121
void setGraph(Graph *g)
Definition: AssociationsDialog.cpp:358
void updateTable(int index)
Definition: AssociationsDialog.cpp:212
QListWidget * associations
Definition: AssociationsDialog.h:76
Table * findTable(int index)
Definition: AssociationsDialog.cpp:201
AssociationsDialog(QWidget *parent=0, Qt::WFlags fl=0)
Definition: AssociationsDialog.cpp:49
QTableWidget * table
Definition: AssociationsDialog.h:74
QLabel * tableCaptionLabel
Definition: AssociationsDialog.h:73
QStringList plotAssociationsList
Definition: AssociationsDialog.h:71
Graph * graph
Definition: AssociationsDialog.h:70
Base class of all MDI client windows.
Definition: MdiSubWindow.h:51
void updateColumnTypes()
Definition: AssociationsDialog.cpp:248
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
QPushButton * btnCancel
Definition: AssociationsDialog.h:75
QStringList plotAssociation(const QString &text)
Definition: AssociationsDialog.cpp:176
void accept()
Definition: AssociationsDialog.cpp:101