-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D\r
-\r
-// File: ModuleBase_WidgetConcealedObjects.h\r
-// Created: 29 Jul 2016\r
-// Author: Natalia ERMOLAEVA\r
-\r
-#ifndef MODULEBASE_WIDGETCONCEALEDOBJECTS_H_\r
-#define MODULEBASE_WIDGETCONCEALEDOBJECTS_H_\r
-\r
-#include <ModuleBase.h>\r
-#include <ModuleBase_ModelWidget.h>\r
-\r
-#include <string>\r
-#include <map>\r
-#include <memory>\r
-\r
-class ModelAPI_Object;\r
-\r
-class QWidget;\r
-class QTableWidget;\r
-class QToolButton;\r
-\r
-/**\r
-* \ingroup GUI\r
-* Implementation of model widget for table of concealed objects.\r
-*/\r
-class MODULEBASE_EXPORT ModuleBase_WidgetConcealedObjects : public ModuleBase_ModelWidget\r
-{\r
- Q_OBJECT\r
- public:\r
- /// Constructor\r
- /// \param theParent the parent object\r
- /// \param theData the widget configuration.\r
- ModuleBase_WidgetConcealedObjects(QWidget* theParent,\r
- const Config_WidgetAPI* theData);\r
- virtual ~ModuleBase_WidgetConcealedObjects();\r
-\r
- /// Redefinition of virtual method\r
- virtual QList<QWidget*> getControls() const;\r
-\r
- /// The widget can not accept focus\r
- virtual bool canAcceptFocus() const { return false; };\r
-\r
-protected:\r
- /// Saves the internal parameters to the given feature\r
- /// \return True in success\r
- virtual bool storeValueCustom();\r
-\r
- /// Redefinition of virtual method\r
- virtual bool restoreValueCustom();\r
-\r
-private:\r
- /// Creates a row in view\r
- /// \param theResult a result for the row\r
- void addViewRow(const std::shared_ptr<ModelAPI_Result>& theResult);\r
-\r
-private slots:\r
- /// Processes the display button click in the view.\r
- /// \param theState a new state\r
- void onItemToggled(bool theState);\r
-\r
-private:\r
- /// Updates icon of button\r
- /// \param theButton a button of the table\r
- void updateItemIcon(QToolButton* theButton);\r
-\r
-private:\r
- std::string myBaseShapeAttribute; ///< attribute of the base object\r
- QTableWidget* myView; ///< table view of visibility states\r
-\r
- std::shared_ptr<ModelAPI_Feature> myBaseFeature; ///< backup of feature of filling the table view\r
- /// backup of visualized in the view concealed objects, stored to avoid table rebuild by restore\r
- std::map<int, std::shared_ptr<ModelAPI_Result> > myConcealedResults;\r
-};\r
-\r
-#endif /* MODULEBASE_WIDGETCONCEALEDOBJECTS_H_ */\r
+// Copyright (C) 2014-2023 CEA, EDF
+//
+// 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_WIDGETCONCEALEDOBJECTS_H_
+#define MODULEBASE_WIDGETCONCEALEDOBJECTS_H_
+
+#include <ModuleBase.h>
+#include <ModuleBase_ModelWidget.h>
+
+#include <string>
+#include <map>
+#include <memory>
+
+class ModelAPI_Object;
+
+class QWidget;
+class QTableWidget;
+
+/**
+* \ingroup GUI
+* Implementation of model widget for table of concealed objects.
+*/
+class MODULEBASE_EXPORT ModuleBase_WidgetConcealedObjects : public ModuleBase_ModelWidget
+{
+ Q_OBJECT
+ public:
+ /// Constructor
+ /// \param theParent the parent object
+ /// \param theData the widget configuration.
+ ModuleBase_WidgetConcealedObjects(QWidget* theParent,
+ const Config_WidgetAPI* theData);
+ virtual ~ModuleBase_WidgetConcealedObjects();
+
+ /// Redefinition of virtual method
+ virtual QList<QWidget*> getControls() const;
+
+ /// The widget can not accept focus
+ virtual bool canAcceptFocus() const { return false; };
+
+protected:
+ /// Saves the internal parameters to the given feature
+ /// \return True in success
+ virtual bool storeValueCustom();
+
+ /// Redefinition of virtual method
+ virtual bool restoreValueCustom();
+
+private:
+ /// Creates a row in view
+ /// \param theResult a result for the row
+ void addViewRow(const std::shared_ptr<ModelAPI_Result>& theResult);
+
+private slots:
+ /// Processes the display button click in the view.
+ /// \param theState a new state
+ void onItemToggled(bool theState);
+
+private:
+ std::string myBaseShapeAttribute; ///< attribute of the base object
+ bool myPickConcealedParents; ///< select parent compsolid/compounds of concealed objects
+ QTableWidget* myView; ///< table view of visibility states
+
+ std::shared_ptr<ModelAPI_Feature> myBaseFeature; ///< backup of feature of filling the table view
+ /// backup of visualized in the view concealed objects, stored to avoid table rebuild by restore
+ std::map<int, std::shared_ptr<ModelAPI_Result> > myConcealedResults;
+};
+
+#endif /* MODULEBASE_WIDGETCONCEALEDOBJECTS_H_ */