QtiPlot 0.9.8.2
|
00001 /*************************************************************************** 00002 File : TableDialog.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2006 - 2009 by Ion Vasilief 00006 Email (use @ for *) : ion_vasilief*yahoo.fr 00007 Description : Column options dialog 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 * This program is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00021 * GNU General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU General Public License * 00024 * along with this program; if not, write to the Free Software * 00025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00026 * Boston, MA 02110-1301 USA * 00027 * * 00028 ***************************************************************************/ 00029 #ifndef TABLEDIALOG_H 00030 #define TABLEDIALOG_H 00031 00032 #include "Table.h" 00033 #include <QDialog> 00034 00035 class QPushButton; 00036 class QLineEdit; 00037 class QCheckBox; 00038 class QComboBox; 00039 class QLabel; 00040 class QTextEdit; 00041 class QSpinBox; 00042 00044 class TableDialog : public QDialog 00045 { 00046 Q_OBJECT 00047 00048 public: 00049 TableDialog(Table *t, QWidget* parent, Qt::WFlags fl = 0 ); 00050 00051 private slots: 00052 void prevColumn(); 00053 void nextColumn(); 00054 void updateColumn(int); 00055 void setColumnWidth(int width); 00056 void showPrecisionBox(int item); 00057 void updatePrecision(int prec); 00058 void setPlotDesignation(int i); 00059 void accept(); 00060 void apply(); 00061 void updateDisplay(int item); 00062 void setNumericFormat(int type, int prec, bool allRightColumns); 00063 void setDayFormat(const QString& format, bool allRightColumns); 00064 void setMonthFormat(const QString& format, bool allRightColumns); 00065 00066 signals: 00067 void nameChanged(const QString&); 00068 void enumRightCols(bool); 00069 void changeWidth(const QString&, bool); 00070 00071 private: 00072 void setDateTimeFormat(int type, const QString& format, bool allRightColumns); 00073 void setTextFormat(bool allRightColumns); 00074 void closeEvent( QCloseEvent *); 00075 00076 Table * d_table; 00077 00078 QPushButton* buttonOk; 00079 QPushButton* buttonCancel; 00080 QPushButton* buttonApply; 00081 QPushButton* buttonPrev; 00082 QPushButton* buttonNext; 00083 QLineEdit* colName; 00084 QCheckBox* enumerateAllBox; 00085 QCheckBox* applyToRightCols; 00086 QCheckBox* applyToAllBox; 00087 QComboBox* formatBox; 00088 QComboBox* displayBox; 00089 QComboBox* columnsBox; 00090 QSpinBox* colWidth, *precisionBox; 00091 QLabel *labelNumeric, *labelFormat; 00092 QTextEdit *comments; 00093 QCheckBox *boxShowTableComments, *boxReadOnly, *boxHideColumn; 00094 }; 00095 00096 #endif // TABLEDIALOG_H