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 ) );
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 );
}