X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetShapeSelector.cpp;h=f3a2fb50ca9e90d73f60b41cc37179c353934641;hb=1e2eaa713f139d2617c80eba9ede62d4e9976bb7;hp=39387667a44beff6f08e46718020cd7cec8a53e9;hpb=9ddad7aadf48e6754d8ddeea4eaf0c37c66a9b8f;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 39387667a..f3a2fb50c 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ModuleBase_WidgetShapeSelector.cpp -// Created: 2 June 2014 -// Author: Vitaly Smetannikov +// Copyright (C) 2014-2017 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #include #include @@ -10,11 +24,12 @@ #include #include #include -#include #include #include #include +#include +#include #include #include #include @@ -38,7 +53,6 @@ #include #include -#include #include @@ -73,14 +87,14 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen QFormLayout* aLayout = new QFormLayout(this); ModuleBase_Tools::adjustMargins(aLayout); - QString aLabelText = QString::fromStdString(theData->widgetLabel()); + QString aLabelText = translate(theData->widgetLabel()); QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); myLabel = new QLabel(aLabelText, this); if (!aLabelIcon.isEmpty()) - myLabel->setPixmap(QPixmap(aLabelIcon)); + myLabel->setPixmap(ModuleBase_IconFactory::loadPixmap(aLabelIcon)); - QString aToolTip = QString::fromStdString(theData->widgetTooltip()); + QString aToolTip = translate(theData->widgetTooltip()); myTextLine = new QLineEdit(this); QString anObjName = QString::fromStdString(attributeID()); myTextLine->setObjectName(anObjName); @@ -101,9 +115,9 @@ ModuleBase_WidgetShapeSelector::~ModuleBase_WidgetShapeSelector() } //******************************************************************** -bool ModuleBase_WidgetShapeSelector::storeValueCustom() const +bool ModuleBase_WidgetShapeSelector::storeValueCustom() { - // the value is stored on the selection changed signal processing + // the value is stored on the selection changed signal processing return true; } @@ -172,7 +186,7 @@ void ModuleBase_WidgetShapeSelector::updateFocus() } //******************************************************************** -QIntList ModuleBase_WidgetShapeSelector::getShapeTypes() const +QIntList ModuleBase_WidgetShapeSelector::shapeTypes() const { QIntList aShapeTypes; foreach(QString aType, myShapeTypes) { @@ -215,7 +229,7 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName() AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID()); if (aRefAttr && aRefAttr->attr().get() != NULL) { //myIsObject = aRefAttr->isObject(); - std::string anAttrName = generateName(aRefAttr->attr(), myWorkshop); + std::string anAttrName = ModuleBase_Tools::generateName(aRefAttr->attr(), myWorkshop); myTextLine->setText(QString::fromStdString(anAttrName)); } else {