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