X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_WorkshopListener.h;h=70cca034379a2ef28740cd54f94515edd200e436;hb=4de8d53fef7532b6843d79c970f55ad46f98da62;hp=9601486f80e89b68f491539310f5f744f560478f;hpb=917398577a81534c6fb2119ed24960000af29444;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_WorkshopListener.h b/src/XGUI/XGUI_WorkshopListener.h old mode 100755 new mode 100644 index 9601486f8..70cca0343 --- a/src/XGUI/XGUI_WorkshopListener.h +++ b/src/XGUI/XGUI_WorkshopListener.h @@ -1,4 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> +// Copyright (C) 2014-2024 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 XGUI_WORKSHOP_LISTENER_H #define XGUI_WORKSHOP_LISTENER_H @@ -8,6 +25,7 @@ #include #include +#include #include @@ -19,6 +37,7 @@ class XGUI_Workshop; class ModuleBase_IWorkshop; class QString; +class Events_InfoMessage; /**\class XGUI_WorkshopListener * \ingroup GUI @@ -29,8 +48,8 @@ class XGUI_EXPORT XGUI_WorkshopListener : public QObject, public Events_Listener Q_OBJECT public: /// Constructor. Used only if the workshop is launched in Salome environment - /// \param theWorkshop a reference to workshop. - XGUI_WorkshopListener(ModuleBase_IWorkshop* theWorkshop); + /// \param theWorkshop a reference to workshop. + XGUI_WorkshopListener(XGUI_Workshop* theWorkshop); virtual ~XGUI_WorkshopListener(); /// Register this class in the events loop for several types of events @@ -41,7 +60,7 @@ public: signals: /// Emitted when error in applivation happens - void errorOccurred(const QString&); + void errorOccurred(std::shared_ptr theMsg); protected: /// Procedure to process postponed events @@ -59,28 +78,35 @@ protected: /// \param theMsg a message with a container of objects void onFeatureRedisplayMsg(const std::shared_ptr& theMsg); + /// Process clearing of presentation + /// \param theMsg an event message void onFeatureEmptyPresentationMsg(const std::shared_ptr& theMsg); + /// Displaus object and fit all viewer if the object is first (update viewer will not be called) /// Asks the module whether the object can be displayed /// \param theObj an object - /// \param theFirstVisualizedBody an output state whether there are not object displayed in the view - /// and the displayed object is a body + /// \param theFirstVisualizedBody an output state whether there are not object displayed in the + /// view and the displayed object is a body /// \return true if the object is displayed - bool displayObject(ObjectPtr theObj, bool& theFirstVisualizedBody); + bool displayObject(ObjectPtr theObj); /// Calls the module method of cusomize object for the feature of the current operation /// Perform cusomize if the force redisplay flag is true or the list of objects contains the /// current operation feature - /// \param theObjects a list of objects to find current operation feature if forced redisplay is false + /// \param theObjects a list of objects to find current operation feature + /// if forced redisplay is false /// \param theForceRedisplay a flag to customize object even always /// \return true if the object is modified - bool customizeCurrentObject(const std::set& theObjects, bool theForceRedisplay); + bool customizeFeature(const std::set& theObjects, bool theForceRedisplay); /// Returns the workshop XGUI_Workshop* workshop() const; private: - ModuleBase_IWorkshop* myWorkshop; // the current workshop + + void setDisplayed(ObjectPtr theObject, const bool theIsLoadedScript, bool& theDisplayed); + + XGUI_Workshop* myWorkshop; // the current workshop bool myUpdatePrefs; };