X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IModule.h;h=8ac4817bce5d8260faa29be77c1f9310c5c09953;hb=397bec888031ab3d5d0578d3094e01f9a052222f;hp=8a25b2afbe6116f0d9ff831c25adbbad1fd22e00;hpb=28bbf47d23aa7fc8217e1cbf9ab089acef27cec3;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 8a25b2afb..8ac4817bc 100755 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -29,6 +29,9 @@ class Config_WidgetAPI; class ModuleBase_ModelWidget; class ModuleBase_Operation; class ModuleBase_IWorkshop; +class ModelAPI_Result; + +class Handle_AIS_InteractiveObject; /** * \ingroup GUI @@ -102,11 +105,13 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Realizes some functionality by an operation start virtual ModuleBase_Operation* currentOperation() const = 0; - /// Add menu items for viewer into the given menu - /// \param theMenu a popup menu to be shown in the viewer + /// Add menu items for viewer into the actions map /// \param theStdActions a map of standard actions + /// \param theMenuActions map of action/menu for the desirable index in the viewer menu /// \return true if items are added and there is no necessity to provide standard menu - virtual bool addViewerMenu(QMenu* theMenu, const QMap& theStdActions) const + virtual bool addViewerMenu(const QMap& theStdActions, + QWidget* theParent, + QMap& theMenuActions) const { return false; } /// Add menu items for object browser into the given menu @@ -202,7 +207,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject const bool theUpdateViewer) {} /// Modifies the given presentation in the custom way. - virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, + virtual bool customisePresentation(std::shared_ptr theResult, AISObjectPtr thePrs, GeomCustomPrsPtr theCustomPrs) { return false; }; /// Update the object presentable properties such as color, lines width and other @@ -231,11 +236,17 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Create specific for the module presentation /// \param theResult an object for presentation /// \return created presentation or NULL(default value) - virtual Handle(AIS_InteractiveObject) createPresentation(const ResultPtr& theResult); + virtual Handle_AIS_InteractiveObject createPresentation( + const std::shared_ptr& theResult); //! Returns data object by AIS virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const = 0; + //! Returns true if the presentation can be shown in shading mode + //! \param theAIS presentation to be checked + //! \return boolean value + virtual bool canBeShaded(Handle(AIS_InteractiveObject) theAIS) const; + /// Update state of pop-up menu items in object browser /// \param theStdActions - a map of standard actions virtual void updateObjectBrowserMenu(const QMap& theStdActions) {} @@ -318,8 +329,8 @@ protected slots: /// Called on selection changed event virtual void onSelectionChanged() {} - protected: - /// Register validators for this module +protected: + /// Register validators for this module virtual void registerValidators() {} /// Register selection filters for this module