1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SALOMEGUI_TableDlg.h
8 // Author : Vadim SANDLER
12 #ifndef SALOMEGUI_TABLE_DLG_H
13 #define SALOMEGUI_TABLE_DLG_H
16 #include <qlineedit.h>
17 #include <qpushbutton.h>
19 class SALOMEGUI_Table;
20 class SALOMEGUI_TableWidget;
22 #include <SALOMEconfig.h>
23 #include CORBA_SERVER_HEADER(SALOMEDS)
24 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
26 class SALOMEGUI_TableDlg : public QDialog
32 enum { ttNone, ttInt, ttReal, ttBoth, ttAuto };
34 SALOMEGUI_TableDlg( QWidget* parent,
35 SALOMEDS::SObject_var obj,
38 Orientation orient = Horizontal,
39 bool showColumnTitles = true );
40 ~SALOMEGUI_TableDlg();
49 SALOMEGUI_TableWidget* myIntTable;
50 SALOMEGUI_TableWidget* myRealTable;
52 QPushButton* myCancelBtn;
54 SALOMEDS::SObject_var myObject;
57 class SALOMEGUI_TableWidget : public QWidget
61 SALOMEGUI_TableWidget( QWidget* parent = 0,
64 Orientation orient = Horizontal,
65 bool showColumnTitles = true );
66 ~SALOMEGUI_TableWidget();
68 void setTableTitle( const QString& title );
69 QString getTableTitle();
70 void setNumRows( const int num );
72 void setNumCols( const int num );
74 void setRowTitles( QStringList& tlts );
75 void getRowTitles( QStringList& tlts );
76 void setColTitles( QStringList& tlts );
77 void getColTitles( QStringList& tlts );
78 void setUnitsTitle( const QString& tlt );
79 void setUnits( QStringList& units );
80 void getUnits( QStringList& units );
81 void setRowData( int row, QStringList& data );
82 void getRowData( int row, QStringList& data );
84 SALOMEGUI_Table* getTable() { return myTable; }
85 QLineEdit* getTitleEdit() { return myTitleEdit; }
87 bool eventFilter( QObject* o, QEvent* e);
90 void updateButtonsState();
100 QLineEdit* myTitleEdit;
101 SALOMEGUI_Table* myTable;
102 QPushButton* myAddRowBtn;
103 QPushButton* myAddColBtn;
104 QPushButton* myDelRowBtn;
105 QPushButton* myDelColBtn;
106 QPushButton* myAdjustBtn;
107 QPushButton* mySelectAllBtn;
108 QPushButton* myClearBtn;
109 Orientation myOrientation;
112 #endif // SALOMEGUI_TABLE_DLG_H