Salome HOME
It removes unnecessary margin.
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_TableView.cxx
index 56d3a507e9f7cbcf01a4a80ad54bf042068aebbc..b7567ab5752ec3ec826212f43329660f5e057eb8 100644 (file)
@@ -93,7 +93,9 @@ void CurveCreator_TableItemDelegate::setModelData( QWidget* theEditor,
     QItemDelegate::setModelData( theEditor, theModel, theIndex );
 }
 
-CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent )
+CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve,
+                                                QWidget* theParent,
+                                                const QStringList& theCoordTitles )
 : QTableWidget( theParent ), myCurve( theCurve )
 {
   setItemDelegate( new CurveCreator_TableItemDelegate( this ) );
@@ -102,8 +104,10 @@ CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve, Q
   setColumnWidth( 0, SECTION_NAME_COLUMN_WIDTH );
   setColumnWidth( 1, POINT_INDEX_COLUMN_WIDTH );
   QStringList aLabels;
-  //aLabels << tr( "SECTION_LABEL" ) << tr( "IDENTIFIER_LABEL" ) << tr( "X_POSITION_LBL" ) << tr( "Y_POSITION_LBL" );
-  aLabels << tr( "Section" ) << "Index" << tr( "X" ) << tr( "Y" );
+  QString aCoord1 = theCoordTitles.size() > 0 ? theCoordTitles[0] : tr( "X" ); // tr( "X_POSITION_LBL" )
+  QString aCoord2 = theCoordTitles.size() > 1 ? theCoordTitles[1] : tr( "Y" ); // tr( "Y_POSITION_LBL" )
+  //aLabels << tr( "SECTION_LABEL" ) << tr( "IDENTIFIER_LABEL" ) << aCoord1 << aCoord2;
+  aLabels << tr( "Section" ) << "Index" << aCoord1 << aCoord2;
   setHorizontalHeaderLabels( aLabels );
 }