Salome HOME
Update copyrights
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSwitch.cpp
index 0df6f7ebf0b041a411b25009a4c2acd96b00498a..405ddc1984038896cfa15fe9f562e27aa432a559 100644 (file)
@@ -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 <ModuleBase_WidgetSwitch.h>
 #include <ModuleBase_ModelWidget.h>
 #include <QStackedLayout>
 #include <QVBoxLayout>
 
-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,9 +54,11 @@ 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);
+  int aSuperCount =
+    ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
   myCombo->addItem(theName);
   int aResultCount = myCombo->count();
   if (aResultCount == 2)