QtiPlot  0.9.8.2
ContourLinesEditor.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : ContourLinesEditor.h
3  Project : QtiPlot
4 --------------------------------------------------------------------
5  Copyright : (C) 2009 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : A Contour Lines Editor Widget
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  * This program is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU General Public License *
23  * along with this program; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25  * Boston, MA 02110-1301 USA *
26  * *
27  ***************************************************************************/
28 #ifndef CONTOURLINESEDITOR_H
29 #define CONTOURLINESEDITOR_H
30 
31 #include <QWidget>
32 #include <QLocale>
33 
34 class QPushButton;
35 class QTableWidget;
36 class QCheckBox;
37 class DoubleSpinBox;
38 class Spectrogram;
39 class ColorButton;
40 class PenStyleBox;
41 
43 
49 class ContourLinesEditor: public QWidget
50 {
51  Q_OBJECT
52 
53 public:
55 
58  ContourLinesEditor(const QLocale& locale = QLocale::system(), int precision = 6, QWidget* parent = 0);
61  void setSpectrogram(Spectrogram *sp);
63  void updateContourLevels();
64  void updateContourPens();
66  void updateContents();
67  void showPenColumn(bool on = true);
68 
69 protected slots:
70  void enableButtons(int row);
71  void showPenDialog(int row, int col);
72  void insertLevel();
73  void deleteLevel();
75  void updatePen();
76 
77  bool eventFilter(QObject *object, QEvent *e);
78 
79 private:
80  void updatePenColumn();
81 
83  QTableWidget *table;
84  QPushButton *insertBtn, *deleteBtn;
86 
88  QLocale d_locale;
91 
92  QDialog *penDialog;
97 
99  QList<QPen> d_pen_list;
100 };
101 
102 #endif