1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : VisuGUI_TableDlg.h
8 // Author : Vadim SANDLER
11 #ifndef VisuGUI_TABLE_DLG_H
12 #define VisuGUI_TABLE_DLG_H
15 #include <qlineedit.h>
16 #include <qpushbutton.h>
19 class VisuGUI_TableWidget;
21 #include <SALOMEDSClient_SObject.hxx>
23 class VisuGUI_TableDlg : public QDialog
29 enum { ttNone, ttInt, ttReal, ttBoth, ttAuto };
31 VisuGUI_TableDlg( QWidget* parent,
35 Orientation orient = Horizontal,
36 bool showColumnTitles = true );
46 VisuGUI_TableWidget* myIntTable;
47 VisuGUI_TableWidget* myRealTable;
49 QPushButton* myCancelBtn;
51 _PTR(SObject) myObject;
54 class VisuGUI_TableWidget : public QWidget
58 VisuGUI_TableWidget( QWidget* parent = 0,
61 Orientation orient = Horizontal,
62 bool showColumnTitles = true );
63 ~VisuGUI_TableWidget();
65 void setTableTitle( const QString& title );
66 QString getTableTitle();
67 void setNumRows( const int num );
69 void setNumCols( const int num );
71 void setRowTitles( QStringList& tlts );
72 void getRowTitles( QStringList& tlts );
73 void setColTitles( QStringList& tlts );
74 void getColTitles( QStringList& tlts );
75 void setUnitsTitle( const QString& tlt );
76 void setUnits( QStringList& units );
77 void getUnits( QStringList& units );
78 void setRowData( int row, QStringList& data );
79 void getRowData( int row, QStringList& data );
81 VisuGUI_Table* getTable() { return myTable; }
82 QLineEdit* getTitleEdit() { return myTitleEdit; }
84 bool eventFilter( QObject* o, QEvent* e);
87 void updateButtonsState();
97 QLineEdit* myTitleEdit;
98 VisuGUI_Table* myTable;
99 QPushButton* myAddRowBtn;
100 QPushButton* myAddColBtn;
101 QPushButton* myDelRowBtn;
102 QPushButton* myDelColBtn;
103 QPushButton* myAdjustBtn;
104 QPushButton* mySelectAllBtn;
105 QPushButton* myClearBtn;
106 Orientation myOrientation;
109 #endif // VisuGUI_TABLE_DLG_H