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 );
}
class CurveCreator_TableView : public QTableWidget
{
public:
- CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent = 0 );
+ CurveCreator_TableView( CurveCreator_ICurve* theCurve, QWidget* theParent = 0,
+ const QStringList& theCoordTitles = QStringList() );
~CurveCreator_TableView() {};
void setCurve( CurveCreator_ICurve* theCurve );
CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
CurveCreator_ICurve *theCurve,
const int theActionFlags,
+ const QStringList& theCoordTitles,
Qt::WindowFlags fl,
int theLocalPointRowLimit )
: QWidget(parent), myNewSectionEditor(NULL), myCurve(theCurve), mySection(0),
connect( mySectionView, SIGNAL(sectionEntered(int)), this, SLOT(onEditSection(int)) );
connect( mySectionView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onContextMenu(QPoint)) );
- myLocalPointView = new CurveCreator_TableView( myCurve, this );
+ myLocalPointView = new CurveCreator_TableView( myCurve, this, theCoordTitles );
connect( myLocalPointView, SIGNAL( cellChanged( int, int ) ),
this, SLOT( onCellChanged( int, int ) ) );
explicit CurveCreator_Widget( QWidget* parent,
CurveCreator_ICurve *theCurve,
const int theActionFlags = NoFlags,
+ const QStringList& theCoordTitles = QStringList(),
Qt::WindowFlags fl=0,
int theLocalPointRowLimit = 20);
int anActionFlags =
CurveCreator_Widget::DisableNewSection | CurveCreator_Widget::DisableDetectionMode |
CurveCreator_Widget::DisableClosedSection;
- myEditorWidget = new CurveCreator_Widget( this, NULL, anActionFlags );
+ QStringList aCoordTitles;
+ aCoordTitles << tr( "U_TITLE" ) << tr( "Z_TITLE" );
+ myEditorWidget = new CurveCreator_Widget( this, NULL, anActionFlags, aCoordTitles );
addWidget( myEditorWidget, 3 );
myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
// Show the coordinates
QString aX = HYDROGUI_Tool::GetCoordinateString( aPnt.X() );
QString anY = HYDROGUI_Tool::GetCoordinateString( aPnt.Y() );
- myCoordLabel->setText( tr("COORDINATES_INFO").arg( aX ).arg( anY ) );
+ myCoordLabel->setText( tr("UZ_COORDINATES_INFO").arg( aX ).arg( anY ) );
}
}
<source>PROFILE_NAME_TLT</source>
<translation>Name</translation>
</message>
+ <message>
+ <source>UZ_COORDINATES_INFO</source>
+ <translation>U: %1, Z: %2</translation>
+ </message>
+ <message>
+ <source>U_TITLE</source>
+ <translation>U</translation>
+ </message>
+ <message>
+ <source>Z_TITLE</source>
+ <translation>Z</translation>
+ </message>
</context>
<context>