class ModuleBase_ModelWidget;\r
class ModuleBase_Operation;\r
class ModuleBase_IWorkshop;\r
+class ModelAPI_Result;\r
+\r
+class Handle_AIS_InteractiveObject;\r
\r
/**\r
* \ingroup GUI\r
/// Realizes some functionality by an operation start\r
virtual ModuleBase_Operation* currentOperation() const = 0;\r
\r
- /// Add menu items for viewer into the given menu\r
- /// \param theMenu a popup menu to be shown in the viewer\r
+ /// Add menu items for viewer into the actions map\r
/// \param theStdActions a map of standard actions\r
+ /// \param theMenuActions map of action/menu for the desirable index in the viewer menu\r
/// \return true if items are added and there is no necessity to provide standard menu\r
- virtual bool addViewerMenu(QMenu* theMenu, const QMap<QString, QAction*>& theStdActions) const\r
+ virtual bool addViewerMenu(const QMap<QString, QAction*>& theStdActions,\r
+ QWidget* theParent,\r
+ QMap<int, QAction*>& theMenuActions) const\r
{ return false; }\r
\r
/// Add menu items for object browser into the given menu\r
const bool theUpdateViewer) {}\r
\r
/// Modifies the given presentation in the custom way.\r
- virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,\r
+ virtual bool customisePresentation(std::shared_ptr<ModelAPI_Result> theResult, AISObjectPtr thePrs,\r
GeomCustomPrsPtr theCustomPrs) { return false; };\r
\r
/// Update the object presentable properties such as color, lines width and other\r
/// Create specific for the module presentation\r
/// \param theResult an object for presentation\r
/// \return created presentation or NULL(default value)\r
- virtual Handle(AIS_InteractiveObject) createPresentation(const ResultPtr& theResult);\r
+ virtual Handle_AIS_InteractiveObject createPresentation(\r
+ const std::shared_ptr<ModelAPI_Result>& theResult);\r
\r
//! Returns data object by AIS\r
virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const = 0;\r
\r
+ //! Returns true if the presentation can be shown in shading mode\r
+ //! \param theAIS presentation to be checked\r
+ //! \return boolean value\r
+ virtual bool canBeShaded(Handle(AIS_InteractiveObject) theAIS) const;\r
+\r
/// Update state of pop-up menu items in object browser\r
/// \param theStdActions - a map of standard actions\r
virtual void updateObjectBrowserMenu(const QMap<QString, QAction*>& theStdActions) {}\r
/// Called on selection changed event\r
virtual void onSelectionChanged() {}\r
\r
- protected:\r
- /// Register validators for this module\r
+protected:\r
+ /// Register validators for this module\r
virtual void registerValidators() {}\r
\r
/// Register selection filters for this module\r