X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_PagedContainer.h;h=feaaa79d8670cf321c5c30e1e2867042f7db5b81;hb=c6745a6b1ad00c0285fab5aeac2cb0d57afef5cc;hp=b98055fc9dcb640713822ed18b6097cc5041b809;hpb=3b6472899555f2186d09f45f4f1fde38b3af969a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PagedContainer.h b/src/ModuleBase/ModuleBase_PagedContainer.h index b98055fc9..feaaa79d8 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.h +++ b/src/ModuleBase/ModuleBase_PagedContainer.h @@ -1,9 +1,21 @@ -/* - * ModuleBase_PagedContainer.h - * - * Created on: Mar 13, 2015 - * 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 +// #ifndef MODULEBASE_PAGEDCONTAINER_H_ #define MODULEBASE_PAGEDCONTAINER_H_ @@ -24,9 +36,7 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge /// A constructor /// \param theParent a parent widget /// \param theData a data of the widget - /// \param theParentId an Id of the parent object - ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData, - const std::string& theParentId); + ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData); virtual ~ModuleBase_PagedContainer(); /// Add a new page @@ -37,7 +47,8 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge virtual int addPage( ModuleBase_PageBase* theWidget, const QString& theName, const QString& theCaseId, - const QPixmap& theIcon ); + const QPixmap& theIcon, + const QString& theTooltip); /// Redefinition of virtual function virtual QList getControls() const; @@ -51,6 +62,9 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge /// Redefinition of virtual function virtual void enableFocusProcessing(); + /// The slot is called when user press Ok or OkPlus buttons in the parent property panel + virtual void onFeatureAccepted(); + protected: /// Returns index of current page virtual int currentPageIndex() const = 0; @@ -62,11 +76,14 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge virtual void activateCustom(); /// Redefinition of virtual function - virtual bool storeValueCustom() const; + virtual bool storeValueCustom(); /// Redefinition of virtual function virtual bool restoreValueCustom(); + // A flag which let to remeber last user choice and restore it on next launch + bool myRemeberChoice; + protected slots: /// A slot called on page change void onPageChanged(); @@ -75,7 +92,8 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge bool myIsFocusOnCurrentPage; QStringList myCaseIds; QList myPages; - + bool myIsFirst; + std::string myDefValue; }; #endif /* MODULEBASE_PAGEDCONTAINER_H_ */