Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSwitch.cpp
index 77eff6744cfa77257461edc04bc0901a8ada2e03..11d4be0d737b207c23224c7bdb67f9315aece8c7 100644 (file)
@@ -1,11 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-/*
- * ModuleBase_WidgetSwitch.cpp
- *
- *  Created on: Apr 16, 2014
- *      Author: sbh
- */
+// 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<mailto:webmaster.salome@opencascade.com>
+//
 
 #include <ModuleBase_WidgetSwitch.h>
 #include <ModuleBase_ModelWidget.h>
 #include <QStackedLayout>
 #include <QVBoxLayout>
 
-ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, const Config_WidgetAPI* theData)
+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);
@@ -42,9 +55,11 @@ ModuleBase_WidgetSwitch::~ModuleBase_WidgetSwitch()
 
 int ModuleBase_WidgetSwitch::addPage(ModuleBase_PageBase* thePage, const QString& theName,
                                                                    const QString& theCaseId,
-                                                                   const QPixmap& theIcon )
+                                                                   const QPixmap& theIcon,
+                                                                   const QString& theTooltip)
 {
-  int aSuperCount = ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+  int aSuperCount =
+    ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
   myCombo->addItem(theName);
   int aResultCount = myCombo->count();
   if (aResultCount == 2)