-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-/*
- * ModuleBase_WidgetToolbox.cpp
- *
- * Created on: Feb 27, 2015
- * Author: sbh
- */
+// Copyright (C) 2014-2022 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_WidgetToolbox.h>
#include <ModuleBase_PageBase.h>
#include <QVBoxLayout>
#include <QIcon>
-ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent,
+ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent,
const Config_WidgetAPI* theData)
: ModuleBase_PagedContainer(theParent, theData)
{
int ModuleBase_WidgetToolbox::addPage(ModuleBase_PageBase* thePage,
const QString& theName,
const QString& theCaseId,
- const QPixmap& theIcon )
+ const QPixmap& theIcon,
+ const QString& theTooltip)
{
- ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+ ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
QFrame* aFrame = dynamic_cast<QFrame*>(thePage);
- myToolBox->addItem(aFrame, theName, theIcon );
+ myToolBox->addItem(aFrame, translate(theName.toStdString()), theIcon );
return myToolBox->count();
}