1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : VisuGUI_TableDlg.h
21 // Author : Vadim SANDLER
24 #ifndef VisuGUI_TABLE_DLG_H
25 #define VisuGUI_TABLE_DLG_H
28 #include <qlineedit.h>
29 #include <qpushbutton.h>
32 class VisuGUI_TableWidget;
34 #include <SALOMEDSClient_SObject.hxx>
36 class VisuGUI_TableDlg : public QDialog
42 enum { ttNone, ttInt, ttReal, ttBoth, ttAuto };
44 VisuGUI_TableDlg( QWidget* parent,
48 Orientation orient = Horizontal,
49 bool showColumnTitles = true );
60 VisuGUI_TableWidget* myIntTable;
61 VisuGUI_TableWidget* myRealTable;
63 QPushButton* myCancelBtn;
64 QPushButton* myHelpBtn;
66 _PTR(SObject) myObject;
69 class VisuGUI_TableWidget : public QWidget
73 VisuGUI_TableWidget( QWidget* parent = 0,
76 Orientation orient = Horizontal,
77 bool showColumnTitles = true );
78 ~VisuGUI_TableWidget();
80 void setTableTitle( const QString& title );
81 QString getTableTitle();
82 void setNumRows( const int num );
84 void setNumCols( const int num );
86 void setRowTitles( QStringList& tlts );
87 void getRowTitles( QStringList& tlts );
88 void setColTitles( QStringList& tlts );
89 void getColTitles( QStringList& tlts );
90 void setUnitsTitle( const QString& tlt );
91 void setUnits( QStringList& units );
92 void getUnits( QStringList& units );
93 void setRowData( int row, QStringList& data );
94 void getRowData( int row, QStringList& data );
96 VisuGUI_Table* getTable() { return myTable; }
97 QLineEdit* getTitleEdit() { return myTitleEdit; }
99 bool eventFilter( QObject* o, QEvent* e);
102 void updateButtonsState();
112 QLineEdit* myTitleEdit;
113 VisuGUI_Table* myTable;
114 QPushButton* myAddRowBtn;
115 QPushButton* myAddColBtn;
116 QPushButton* myDelRowBtn;
117 QPushButton* myDelColBtn;
118 QPushButton* myAdjustBtn;
119 QPushButton* mySelectAllBtn;
120 QPushButton* myClearBtn;
121 Orientation myOrientation;
124 #endif // VisuGUI_TABLE_DLG_H