QtiPlot  0.9.8.2
TableDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : TableDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 - 2009 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Column options 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 TABLEDIALOG_H
30 #define TABLEDIALOG_H
31 
32 #include "Table.h"
33 #include <QDialog>
34 
35 class QPushButton;
36 class QLineEdit;
37 class QCheckBox;
38 class QComboBox;
39 class QLabel;
40 class QTextEdit;
41 class QSpinBox;
42 
44 class TableDialog : public QDialog
45 {
46  Q_OBJECT
47 
48 public:
49  TableDialog(Table *t, QWidget* parent, Qt::WFlags fl = 0 );
50 
51 private slots:
52  void prevColumn();
53  void nextColumn();
54  void updateColumn(int);
55  void setColumnWidth(int width);
56  void showPrecisionBox(int item);
57  void updatePrecision(int prec);
58  void setPlotDesignation(int i);
59  void accept();
60  void apply();
61  void updateDisplay(int item);
62  void setNumericFormat(int type, int prec, bool allRightColumns);
63  void setDayFormat(const QString& format, bool allRightColumns);
64  void setMonthFormat(const QString& format, bool allRightColumns);
65 
66 signals:
67  void nameChanged(const QString&);
68  void enumRightCols(bool);
69  void changeWidth(const QString&, bool);
70 
71 private:
72  void setDateTimeFormat(int type, const QString& format, bool allRightColumns);
73  void setTextFormat(bool allRightColumns);
74  void closeEvent( QCloseEvent *);
75 
77 
78  QPushButton* buttonOk;
79  QPushButton* buttonCancel;
80  QPushButton* buttonApply;
81  QPushButton* buttonPrev;
82  QPushButton* buttonNext;
83  QLineEdit* colName;
84  QCheckBox* enumerateAllBox;
85  QCheckBox* applyToRightCols;
86  QCheckBox* applyToAllBox;
87  QComboBox* formatBox;
88  QComboBox* displayBox;
89  QComboBox* columnsBox;
90  QSpinBox* colWidth, *precisionBox;
92  QTextEdit *comments;
94 };
95 
96 #endif // TABLEDIALOG_H