-// 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
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);
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();
{
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();
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&)),
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()));