X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetSwitch.cpp;h=98d08af2081e900159fc56fe76d39988384d6888;hb=cdd17f8b9923e1283e0a8bd239cd857ac4bd502a;hp=0df6f7ebf0b041a411b25009a4c2acd96b00498a;hpb=41695176c748943485f8844fea6e89cef9a0b6f5;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp index 0df6f7ebf..98d08af20 100644 --- a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp @@ -1,11 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -/* - * ModuleBase_WidgetSwitch.cpp - * - * Created on: Apr 16, 2014 - * Author: sbh - */ +// Copyright (C) 2014-2019 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,10 +28,11 @@ #include #include -ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, const Config_WidgetAPI* theData, - const std::string& theParentId) -: ModuleBase_PagedContainer(theParent, theData, theParentId) +ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, + const Config_WidgetAPI* theData) +: ModuleBase_PagedContainer(theParent, theData) { + myRemeberChoice = false; QVBoxLayout* aMainLay = new QVBoxLayout(this); //aMainLay->setContentsMargins(2, 4, 2, 2); ModuleBase_Tools::adjustMargins(aMainLay); @@ -43,10 +54,12 @@ ModuleBase_WidgetSwitch::~ModuleBase_WidgetSwitch() int ModuleBase_WidgetSwitch::addPage(ModuleBase_PageBase* thePage, const QString& theName, const QString& theCaseId, - const QIcon& theIcon ) + const QPixmap& theIcon, + const QString& theTooltip) { - int aSuperCount = ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon); - myCombo->addItem(theName); + int aSuperCount = + ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip); + myCombo->addItem(translate(theName.toStdString())); int aResultCount = myCombo->count(); if (aResultCount == 2) myCombo->show();