Salome HOME
Merge branch 'csgroup_IS2'
[modules/shaper.git] / src / PartSet / PartSet_BSplineWidget.cpp
index b75504d7d0e322cb93274c9f2b82bf4e622506da..99449702d9d7cccd3fc93c395375655e7b130b41 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2019-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -48,7 +48,7 @@ PartSet_BSplineWidget::PartSet_BSplineWidget(
   aMainLayout->setContentsMargins(0, 0, 0, 0);
 
   // GroupBox to keep widgets for B-spline poles and weights
-  myPolesGroupBox = new QGroupBox(tr("Poles and weights"), this);
+  myPolesGroupBox = new QGroupBox(translate("Poles and weights"), this);
   aMainLayout->addWidget(myPolesGroupBox);
 
   QVBoxLayout* aLayout = new QVBoxLayout(myPolesGroupBox);
@@ -140,7 +140,7 @@ bool PartSet_BSplineWidget::restoreValueCustom()
       aData->attribute(SketchPlugin_BSpline::POLES_ID()));
   AttributeDoubleArrayPtr aWeights = aData->realArray(SketchPlugin_BSpline::WEIGHTS_ID());
 
-  while (myPoles.size() < aPoles->size())
+  while ((int)myPoles.size() < aPoles->size())
     addPoleWidget();
 
   std::list<BSplinePoleWidgets>::iterator anIt = myPoles.begin();
@@ -160,7 +160,7 @@ void PartSet_BSplineWidget::addPoleWidget()
 {
   QGridLayout* aGroupLay = dynamic_cast<QGridLayout*>(myPolesWgt->layout());
   int aNbPoles = (int)myPoles.size();
-  QString aPoleStr = tr("Pole %1").arg(aNbPoles + 1);
+  QString aPoleStr = translate("Pole %1").arg(aNbPoles + 1);
 
   myPoles.push_back(BSplinePoleWidgets());
   BSplinePoleWidgets& aPole = myPoles.back();
@@ -182,7 +182,7 @@ QGroupBox* PartSet_BSplineWidget::createPoleWidget(BSplinePoleWidgets& thePole,
   thePole.myWeight = new ModuleBase_ParamSpinBox(aPoleGroupBox);
   thePole.myWeight->setMinimum(THE_MIN_WEIGHT);
 
-  aPoleLay->addWidget(new QLabel(tr("Weight :"), aPoleGroupBox), 2, 0);
+  aPoleLay->addWidget(new QLabel(translate("Weight :"), aPoleGroupBox), 2, 0);
   aPoleLay->addWidget(thePole.myWeight, 2, 1);
   // we should listen textChanged signal as valueChanged do not send when text is modified
   connect(thePole.myWeight, SIGNAL(textChanged(const QString&)),
@@ -190,7 +190,7 @@ QGroupBox* PartSet_BSplineWidget::createPoleWidget(BSplinePoleWidgets& thePole,
 
   thePole.myAddBtn = new QToolButton(aPoleGroupBox);
   thePole.myAddBtn->setIcon(QIcon(":pictures/add.png"));
-  thePole.myAddBtn->setToolTip(tr("Add a new pole after the current"));
+  thePole.myAddBtn->setToolTip(translate("Add a new pole after the current"));
   aPoleLay->addWidget(thePole.myAddBtn, 2, 2);
   connect(thePole.myAddBtn, SIGNAL(clicked(bool)), SLOT(onAddPole()));