X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_FacesPanel.h;h=d4a0b04dae171cd5badcb5fba7e4715ee69f0c63;hb=b6cb9a5e9ecc1c5dae69d686fa73a8afec92d04f;hp=1dca0a9b0da8a064676c9c944a0d4d44b7b9d1ac;hpb=9fd2f82a790ce1d0ef69db4534cbc8fe68062147;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_FacesPanel.h b/src/XGUI/XGUI_FacesPanel.h index 1dca0a9b0..d4a0b04da 100644 --- a/src/XGUI/XGUI_FacesPanel.h +++ b/src/XGUI/XGUI_FacesPanel.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// 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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef XGUI_FacesPanel_H_ @@ -26,8 +25,11 @@ #include #include +#include #include +#include + #include #include #include @@ -74,6 +76,18 @@ public: /// \param isToFlushRedisplay flag if redisplay should be flushed immediatelly virtual void reset(const bool isToFlushRedisplay); + /// Returns whether faces panel contains elements + /// \return boolean value + bool isEmpty() const; + + /// Fills container with the panel selection mode: FACE + // \param theModes [out] a container of modes + void selectionModes(QIntList& theModes); + + /// Appends into container of workshop selection filters + /// \param [out] selection filters + void selectionFilters(SelectMgr_ListOfFilter& theSelectionFilters); + /// Returns whether the panel is active or not bool isActivePanel() const { return myIsActive; } @@ -121,13 +135,6 @@ public: bool customizeObject(const std::shared_ptr& theObject, const std::shared_ptr& thePresentation); -protected: - /// Add panel selection filters to the current viewer - virtual void activateSelectionFilters() {} - - /// Remove panel selection filters from the current viewer - virtual void deactivateSelectionFilters() {} - protected: /// Reimplementation to emit a signal about the panel close virtual void closeEvent(QCloseEvent* theEvent); @@ -141,24 +148,17 @@ signals: void closed(); private: - /// Activate or deactivate selection and selection filters - void activateSelection(bool toActivate); - /// Redisplay objects. /// \param theObjects container of objects - /// \param isToFlushRedisplay flag if redisplay should be flushed immediatelly /// \return true if some of objects was redisplayed - static bool redisplayObjects(const std::set >& theObjects, - const bool isToFlushRedisplay); + static bool redisplayObjects(const std::set >& theObjects); /// Display objects if the objects are in a container of hidden by this pane. /// \param theObjects container of objects /// \param theHiddenObjects hidden objects, if object is in the container, it should be removed - /// \param isToFlushRedisplay flag if redisplay should be flushed immediatelly /// \return true if some of objects was redisplayed static bool displayHiddenObjects(const std::set >& theObjects, - std::set >& theHiddenObjects, - const bool isToFlushRedisplay); + std::set >& theHiddenObjects); /// Iterates by items and hide objects where all sub-shapes are hidden /// \return true if some of objects was redisplayed @@ -170,11 +170,6 @@ private: static void updateProcessedObjects(QMap > theItems, std::set >& theObjects); - /// Generates a presentation name in form: /_ - /// \param thePrs a presentation - /// \return string value - static QString generateName(const std::shared_ptr& thePrs); - protected slots: /// Deletes element in list of items void onDeleteItem(); @@ -185,6 +180,11 @@ protected slots: /// Closes faces panel restore all hidden faces by calling reset() void onClosed(); +private: + /// Flushes redisplay event and perform update of object browser icons + /// (objects might be hidden/shown) + void flushRedisplay() const; + protected: QCheckBox* myHiddenOrTransparent; ///< if checked - transparent, else hidden ModuleBase_ListView* myListView; ///< list control of processed faces