X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_IModule.h;h=ffe5139479fdc09fdcc09043798e4b6fcd413786;hb=571cc113b54efb9fb058a053cd9ac489549a0729;hp=01896bb8fa3610406fe3e357df9130c9eeff5704;hpb=9e10a25021a539ae9bb44e85e244a8e3fa8119ed;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 01896bb8f..ffe513947 100644 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -69,6 +69,10 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Realizes some functionality by an operation abort virtual void operationAborted(ModuleBase_Operation* theOperation) {} + /// Realizes some functionality by an operation start + /// \param theOperation a started operation + virtual ModuleBase_Operation* currentOperation() const = 0; + /// Add menu atems for viewer into the given menu /// \param theMenu a popup menu to be shown in the viewer virtual void addViewerItems(QMenu* theMenu) const {} @@ -86,9 +90,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// \param theWidgetApi the widget configuation. The attribute of the model widget is obtained from /// \param theParentId is Id of a parent of the current attribute /// \param theModelWidgets list of widget objects - virtual QWidget* createWidgetByType(const std::string& theType, QWidget* theParent, - Config_WidgetAPI* theWidgetApi, std::string theParentId, - QList& theModelWidgets) + virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, QWidget* theParent, + Config_WidgetAPI* theWidgetApi, std::string theParentId) { return 0; } @@ -100,11 +103,21 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// It is called as on clearing of property panel as on filling with new widgets virtual void propertyPanelDefined(ModuleBase_Operation* theOperation) {} + //! Returns True if there are available Undos and there is not an active operation + virtual bool canUndo() const; + + //! Returns True if there are available Redos and there is not an active operation + virtual bool canRedo() const; + /// Returns whether the object can be displayed at the bounds of the active operation. /// Display only current operation results /// \param theObject a model object virtual bool canDisplayObject(const ObjectPtr& theObject) const; + /// Reacts to the delete action in module + /// \returns true if the action is processed + virtual bool deleteObjects() { return false; }; + public slots: /// Called on call of command corresponded to a feature void onFeatureTriggered();