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 );
47 VisuGUI_TableWidget* myIntTable;
48 VisuGUI_TableWidget* myRealTable;
50 QPushButton* myCancelBtn;
51 QPushButton* myHelpBtn;
53 _PTR(SObject) myObject;
56 class VisuGUI_TableWidget : public QWidget
60 VisuGUI_TableWidget( QWidget* parent = 0,
63 Orientation orient = Horizontal,
64 bool showColumnTitles = true );
65 ~VisuGUI_TableWidget();
67 void setTableTitle( const QString& title );
68 QString getTableTitle();
69 void setNumRows( const int num );
71 void setNumCols( const int num );
73 void setRowTitles( QStringList& tlts );
74 void getRowTitles( QStringList& tlts );
75 void setColTitles( QStringList& tlts );
76 void getColTitles( QStringList& tlts );
77 void setUnitsTitle( const QString& tlt );
78 void setUnits( QStringList& units );
79 void getUnits( QStringList& units );
80 void setRowData( int row, QStringList& data );
81 void getRowData( int row, QStringList& data );
83 VisuGUI_Table* getTable() { return myTable; }
84 QLineEdit* getTitleEdit() { return myTitleEdit; }
86 bool eventFilter( QObject* o, QEvent* e);
89 void updateButtonsState();
99 QLineEdit* myTitleEdit;
100 VisuGUI_Table* myTable;
101 QPushButton* myAddRowBtn;
102 QPushButton* myAddColBtn;
103 QPushButton* myDelRowBtn;
104 QPushButton* myDelColBtn;
105 QPushButton* myAdjustBtn;
106 QPushButton* mySelectAllBtn;
107 QPushButton* myClearBtn;
108 Orientation myOrientation;
111 #endif // VisuGUI_TABLE_DLG_H