Salome HOME
Hide "by general equation" case for plane creation
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetValidated.h
index db28807d15628b0c08222dd74b23ea29cf7530db..eb0f8fa7fc2a4505ffcbc873bc40a4c36f68cbff 100644 (file)
@@ -41,10 +41,12 @@ class MODULEBASE_EXPORT ModuleBase_WidgetValidated : public ModuleBase_ModelWidg
   /// Checks all widget validator if the owner is valid
   /// \param theOwner a selected owner in the view
   /// \return a boolean value
-  bool isValid(const Handle_SelectMgr_EntityOwner& theOwner);
+  bool isValidSelection(const ModuleBase_ViewerPrs& theValue);
 
   /// Set the given wrapped value to the current widget
   /// This value should be processed in the widget according to the needs
+  /// The method is called by the current operation to process the operation preselection.
+  /// It is redefined to check the value validity and if it is, fill the attribute with by value
   /// \param theValue the wrapped widget value
   virtual bool setSelection(ModuleBase_ViewerPrs theValue);
 
@@ -52,13 +54,19 @@ protected:
   /// Creates a backup of the current values of the attribute
   /// It should be realized in the specific widget because of different
   /// parameters of the current attribute
-  /// \param isBackup a boolean flag, if true, store values from the attribute
-  /// to backup, otherwise set the backed up values to the attribute
-  virtual void backupAttributeValue(const bool isBackup) = 0;
+  virtual void storeAttributeValue() = 0;
+
+  /// Creates a backup of the current values of the attribute
+  /// It should be realized in the specific widget because of different
+  /// parameters of the current attribute
+  /// \param theValid a boolean flag, if restore happens for valid parameters
+  virtual void restoreAttributeValue(const bool theValid) = 0;
 
   /// Fills the attribute with the value of the selected owner
   /// \param theOwner a selected owner
-  virtual bool setSelection(const Handle_SelectMgr_EntityOwner& theOwner) = 0;
+  virtual bool setSelectionCustom(const ModuleBase_ViewerPrs& thePrs) = 0;
+
+  virtual void removePresentations() {};
 
   /// Checks the current attibute in all attribute validators
   // \return true if all validators return that the attribute is valid