X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IModule.h;h=ac70964372e9bc16625a6602e8d3bb868a4fcbbf;hb=3205d0f18200948632155bbe7b640bc1e482243d;hp=301bcbe5b193719311f74a23dbd959eade6ce9dc;hpb=3b6472899555f2186d09f45f4f1fde38b3af969a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h old mode 100644 new mode 100755 index 301bcbe5b..ac7096437 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -61,21 +61,21 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Realizes some functionality by an operation start /// \param theOperation a started operation - virtual void onOperationStarted(ModuleBase_Operation* theOperation) {} + virtual void operationStarted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation resume /// By default it emits operationResumed signal /// \param theOperation a resumed operation - virtual void onOperationResumed(ModuleBase_Operation* theOperation); + virtual void operationResumed(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation stop - virtual void onOperationStopped(ModuleBase_Operation* theOperation) {} + virtual void operationStopped(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation commit - virtual void onOperationCommitted(ModuleBase_Operation* theOperation) {} + virtual void operationCommitted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation abort - virtual void onOperationAborted(ModuleBase_Operation* theOperation) {} + virtual void operationAborted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation start virtual ModuleBase_Operation* currentOperation() const = 0; @@ -101,6 +101,9 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject return 0; } + /// Returns the active widget, by default it is the property panel active widget + virtual ModuleBase_ModelWidget* activeWidget() const = 0; + /// Returns current workshop ModuleBase_IWorkshop* workshop() const { return myWorkshop; } @@ -122,7 +125,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Returns True if the current operation can be committed. By default it is true. /// \return a boolean value - virtual bool canCommitOperation() const; + //virtual bool canCommitOperation() const; /// Returns whether the object can be erased. The default realization returns true. /// \param theObject a model object @@ -188,13 +191,37 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject //! \return string value virtual QString getFeatureError(const FeaturePtr& theFeature); + /// Returns list of granted operation indices + virtual void grantedOperationIds(ModuleBase_Operation* theOperation, QStringList& theIds) const; + + /// Connects or disconnects to the value changed signal of the property panel widgets + /// \param theWidget a property contol widget + /// \param isToConnect a boolean value whether connect or disconnect + virtual void connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, const bool isToConnect) {}; + + /// Validates the operation to change the "Apply" button state. + /// \param thePreviousState the previous state of the widget + virtual void widgetStateChanged(int thePreviousState) {}; + + /// Returns true if the event is processed. + /// \param thePreviousAttributeID an index of the previous active attribute + virtual bool processEnter(const std::string& thePreviousAttributeID) { return false; }; + + /// Performs some GUI actions after an operation transaction is opened + /// Default realization is empty + virtual void beforeOperationStarted(ModuleBase_Operation* theOperation) {}; + + /// Performs some GUI actions before an operation transaction is stopped + /// Default realization is empty + virtual void beforeOperationStopped(ModuleBase_Operation* theOperation) {}; + signals: /// Signal which is emitted when operation is launched void operationLaunched(); /// Segnal emitted when an operation is resumed /// \param theOp a resumed operation - void operationResumed(ModuleBase_Operation* theOp); + void resumed(ModuleBase_Operation* theOp); public slots: /// Called on call of command corresponded to a feature