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
QLabel * labelFormat
Definition: TableDialog.h:91
void changeWidth(const QString &, bool)
void updatePrecision(int prec)
Definition: TableDialog.cpp:397
QComboBox * displayBox
Definition: TableDialog.h:88
QCheckBox * boxHideColumn
Definition: TableDialog.h:93
void prevColumn()
Definition: TableDialog.cpp:203
void updateDisplay(int item)
Definition: TableDialog.cpp:402
QLabel * labelNumeric
Definition: TableDialog.h:91
void apply()
Definition: TableDialog.cpp:293
QPushButton * buttonApply
Definition: TableDialog.h:80
QPushButton * buttonNext
Definition: TableDialog.h:82
void setDayFormat(const QString &format, bool allRightColumns)
Definition: TableDialog.cpp:546
void accept()
Definition: TableDialog.cpp:197
void enumRightCols(bool)
void nameChanged(const QString &)
void setTextFormat(bool allRightColumns)
Definition: TableDialog.cpp:536
TableDialog(Table *t, QWidget *parent, Qt::WFlags fl=0)
Definition: TableDialog.cpp:46
QPushButton * buttonCancel
Definition: TableDialog.h:79
QPushButton * buttonOk
Definition: TableDialog.h:78
QTextEdit * comments
Definition: TableDialog.h:92
void setDateTimeFormat(int type, const QString &format, bool allRightColumns)
Definition: TableDialog.cpp:490
void showPrecisionBox(int item)
Definition: TableDialog.cpp:375
void setColumnWidth(int width)
Definition: TableDialog.cpp:287
QCheckBox * applyToAllBox
Definition: TableDialog.h:86
QCheckBox * boxReadOnly
Definition: TableDialog.h:93
void updateColumn(int)
Definition: TableDialog.cpp:217
Table * d_table
Definition: TableDialog.h:76
QPushButton * buttonPrev
Definition: TableDialog.h:81
void nextColumn()
Definition: TableDialog.cpp:210
QComboBox * columnsBox
Definition: TableDialog.h:89
QComboBox * formatBox
Definition: TableDialog.h:87
QCheckBox * applyToRightCols
Definition: TableDialog.h:85
QSpinBox * precisionBox
Definition: TableDialog.h:90
void setMonthFormat(const QString &format, bool allRightColumns)
Definition: TableDialog.cpp:559
void setNumericFormat(int type, int prec, bool allRightColumns)
Definition: TableDialog.cpp:524
Column options dialog.
Definition: TableDialog.h:44
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
QCheckBox * boxShowTableComments
Definition: TableDialog.h:93
QLineEdit * colName
Definition: TableDialog.h:83
QCheckBox * enumerateAllBox
Definition: TableDialog.h:84
void setPlotDesignation(int i)
Definition: TableDialog.cpp:364
void closeEvent(QCloseEvent *)
Definition: TableDialog.cpp:358
QSpinBox * colWidth
Definition: TableDialog.h:90