Salome HOME
Provide hasPreview method for operations with preview
[modules/shaper.git] / src / ModuleBase / ModuleBase_Operation.h
index 0a5e1a54db084bdc52072512f008d0368a5427d8..17be4cba4286a6e6e63ea45c6ed6e3ec622c681a 100644 (file)
@@ -11,7 +11,7 @@
 #include <ModuleBase.h>
 #include <ModuleBase_IOperation.h>
 
-#include "ModelAPI_Feature.h"
+#include <ModelAPI_Feature.h>
 
 #include <QObject>
 #include <QString>
@@ -57,6 +57,9 @@ Q_OBJECT
   /// \return the feature
   FeaturePtr feature() const;
 
+  /// Returns true is feature of operation is valid.
+  virtual bool isValid() const;
+
   /// Returns whether the nested operations are enabled.
   /// The state can depend on the operation current state.
   /// \return enabled state
@@ -76,6 +79,10 @@ Q_OBJECT
 
   virtual void activateNextToCurrentWidget() {};
 
+  /// If operation needs to redisplay its result during operation
+  /// then this method has to return True
+  virtual bool hasPreview() const { return false; }
+
  public slots:
   /// Slots which listen the mode widget activation
   /// \param theWidget the model widget