X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetAction.cpp;h=8a927868959be73ed360573a54c5cd8e0250b16e;hb=374a366d81778aa27ed32cc080c0f95bdb03f1c5;hp=b0206a5a5a0921e924ee2dccbe4e35e3fb08ea47;hpb=54fad17a4c8aa6e7dd91f240ec76b0148920ac80;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetAction.cpp b/src/ModuleBase/ModuleBase_WidgetAction.cpp old mode 100755 new mode 100644 index b0206a5a5..8a9278689 --- a/src/ModuleBase/ModuleBase_WidgetAction.cpp +++ b/src/ModuleBase/ModuleBase_WidgetAction.cpp @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ModuleBase_WidgetAction.cpp -// Created: 15 Apr 2016 -// Author: Natalia Ermolaeva +// Copyright (C) 2014-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 +// 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 @@ -18,18 +31,18 @@ ModuleBase_WidgetAction::ModuleBase_WidgetAction(QWidget* theParent, const Config_WidgetAPI* theData) -: ModuleBase_ModelWidget(theParent, theData) +: ModuleBase_ModelWidget(theParent, theData), + myActionID(attributeID()) { + setAttributeID(""); // To prevent errors. Action not stored as attribtue in feature. QHBoxLayout* aControlLay = new QHBoxLayout(this); ModuleBase_Tools::adjustMargins(aControlLay); - myActionID = attributeID(); - setAttributeID(""); - myButton = new QToolButton(this); - QString aText = QString::fromStdString(theData->widgetLabel()); - QString aToolTip = ModuleBase_Tools::wrapTextByWords( - QString::fromStdString(theData->widgetTooltip()), myButton, DEFAULT_TOOL_TIP_WIDTH); + QString aText = translate(theData->widgetLabel()); + QString aToolTip = ModuleBase_Tools::wrapTextByWords(translate(theData->widgetTooltip()), + myButton, + DEFAULT_TOOL_TIP_WIDTH); myButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); aControlLay->addWidget(myButton);