X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IModule.h;h=6ae486f6c72c7d8c8170be9716eb25773d2ef48e;hb=9d2e6d9c21e4f16817ca5b572847fe323f6ef32a;hp=7ba5cfe1e09693d931618d6f73c189f268fdc02e;hpb=feaeb677047efcb01c02b861691810750e2b32e1;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 7ba5cfe1e..6ae486f6c 100644 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -23,6 +23,7 @@ class Config_WidgetAPI; class ModuleBase_ModelWidget; class ModuleBase_Operation; class ModuleBase_IWorkshop; +class ModuleBase_IDocumentDataModel; /** * \ingroup GUI @@ -78,11 +79,11 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// \param theMenu a popup menu to be shown in the viewer /// \param theStdActions a map of standard actions /// \return true if items are added and there is no necessity to provide standard menu - virtual bool addViewerItems(QMenu* theMenu, const QMap& theStdActions) const { return false; } + virtual bool addViewerMenu(QMenu* theMenu, const QMap& theStdActions) const { return false; } /// Add menu atems for object browser into the given menu /// \param theMenu a popup menu to be shown in the object browser - virtual void addObjectBrowserItems(QMenu* theMenu) const {}; + virtual void addObjectBrowserMenu(QMenu* theMenu) const {}; /// Called when it is necessary to update a command state (enable or disable it) //virtual bool isFeatureEnabled(const QString& theCmdId) const = 0; @@ -116,10 +117,26 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// \param theObject a model object virtual bool canDisplayObject(const ObjectPtr& theObject) const; + /// Returns true if selection for the object can be activate. + /// By default a result or feature of the current operation can not be activated + /// \param theObject a model object + virtual bool canActivateSelection(const ObjectPtr& theObject) const; + /// Reacts to the delete action in module /// \returns true if the action is processed virtual bool deleteObjects() { return false; }; + /// Returns data model object for representation of data tree in Object browser + virtual ModuleBase_IDocumentDataModel* dataModel() const = 0; + + /// Returns a list of modes, where the AIS objects should be activated + /// \param theModes a list of modes + virtual void activeSelectionModes(QIntList& theModes) {} + + /// This method is called on object browser creation for customisation of module specific features + /// \param theObjectBrowser a pinter on Object Browser widget + virtual void customizeObjectBrowser(QWidget* theObjectBrowser) {} + public slots: /// Called on call of command corresponded to a feature void onFeatureTriggered();