Salome HOME
Correct compilation on Linux.
[modules/shaper.git] / src / ModuleBase / ModuleBase_IModule.h
index ed5ad0456ccfdb95215d5d0ef3bb7de62424e239..acd6b49acef50c0332d35978bfdaf2c63b38693b 100755 (executable)
@@ -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
@@ -188,6 +191,11 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   //! \return string value\r
   virtual QString getFeatureError(const FeaturePtr& theFeature);\r
 \r
+  //! Returns the widget error, get it from the attribute validator and state of the widget\r
+  //! If the feature is correct, it returns an empty value\r
+  //! \return string value\r
+  virtual QString getWidgetError(ModuleBase_ModelWidget* theWidget);\r
+\r
   /// Returns list of granted operation indices\r
   virtual void grantedOperationIds(ModuleBase_Operation* theOperation, QStringList& theIds) const;\r
 \r
@@ -196,6 +204,22 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// \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