From: vsv Date: Tue, 10 Sep 2019 14:16:22 +0000 (+0300) Subject: Translate 3d point input tooltips and placeholders X-Git-Tag: V9_4_0a2~4^2~81^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f66fa05e1d12f157483b7d848fe322b52199e54;p=modules%2Fshaper.git Translate 3d point input tooltips and placeholders --- diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index 51f982cb0..fea77f589 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -233,7 +233,7 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent, aMainLay->addWidget(myResultLabel); myEditor = new ExpressionEditor(this); myEditor->setMinimumHeight(20); - myEditor->setPlaceHolderText( QString::fromStdString( thePlaceHolder ) ); + myEditor->setPlaceHolderText( translate( thePlaceHolder ) ); aMainLay->addWidget(myEditor); this->setLayout(aMainLay); diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp index 8003a76f5..e915477ed 100644 --- a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp +++ b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp @@ -97,7 +97,7 @@ ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent, if (!aLabelIcon.isEmpty()) aLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon)); - myLineEdit = new CustomLineEdit( this, QString::fromStdString( thePlaceHolder ) ); + myLineEdit = new CustomLineEdit( this, translate( thePlaceHolder ) ); // Here we do not use the Qt's standard method setPlaceHolderText() since it // draws the place holder only if there is no focus on widget; // we would like to see the place holder in the case of empty text diff --git a/src/ModuleBase/ModuleBase_WidgetPointInput.cpp b/src/ModuleBase/ModuleBase_WidgetPointInput.cpp index faf5ff527..ca7c3c055 100644 --- a/src/ModuleBase/ModuleBase_WidgetPointInput.cpp +++ b/src/ModuleBase/ModuleBase_WidgetPointInput.cpp @@ -60,7 +60,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent, myXSpin = new ModuleBase_ParamSpinBox(this); myXSpin->setAcceptVariables(aAcceptVariables); - myXSpin->setToolTip("X coordinate"); + myXSpin->setToolTip(tr("X coordinate")); myXSpin->setValue(myDefaultValue[0]); QLabel* aXLbl = new QLabel(this); aXLbl->setPixmap(QPixmap(":pictures/x_size.png")); @@ -68,7 +68,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent, myYSpin = new ModuleBase_ParamSpinBox(this); myYSpin->setAcceptVariables(aAcceptVariables); - myYSpin->setToolTip("Y coordinate"); + myYSpin->setToolTip(tr("Y coordinate")); myYSpin->setValue(myDefaultValue[1]); QLabel* aYLbl = new QLabel(this); aYLbl->setPixmap(QPixmap(":pictures/y_size.png")); @@ -76,7 +76,7 @@ ModuleBase_WidgetPointInput::ModuleBase_WidgetPointInput(QWidget* theParent, myZSpin = new ModuleBase_ParamSpinBox(this); myZSpin->setAcceptVariables(aAcceptVariables); - myZSpin->setToolTip("Z coordinate"); + myZSpin->setToolTip(tr("Z coordinate")); myZSpin->setValue(myDefaultValue[2]); QLabel* aZLbl = new QLabel(this); aZLbl->setPixmap(QPixmap(":pictures/z_size.png"));