Salome HOME
Create Presentation for rigid constraint
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.h
index e2e992dd7cdb846590e1e2ab21c1bf5d978576d1..c7d639348f858daae620f6403558e1f81e3f17a6 100644 (file)
@@ -60,27 +60,9 @@ Q_OBJECT
   /// \return the list of subfeatures
   virtual std::list<FeaturePtr> subFeatures() const;
 
-  /// Returns the operation local selection mode
-  /// \param theFeature the feature object to get the selection mode
-  /// \return the selection mode
-  virtual std::list<int> getSelectionModes(ObjectPtr theFeature) const;
-
-  /// Initializes the operation with previously created feature. It is used in sequental operations
-  virtual void initFeature(FeaturePtr theFeature)
-  {
-  }
-
-  /// Initialisation of operation with preliminary selection
-  /// \param theSelected the list of selected presentations
-  /// \param theHighlighted the list of highlighted presentations
-  virtual void initSelection(const std::list<ModuleBase_ViewerPrs>& theSelected,
-                             const std::list<ModuleBase_ViewerPrs>& theHighlighted)
-  {
-  }
-
   /// Returns the operation sketch feature
   /// \returns the sketch instance
-  virtual FeaturePtr sketch() const = 0;
+  virtual CompositeFeaturePtr sketch() const = 0;
 
   /// Processes the mouse pressed in the point
   /// \param theEvent the mouse event
@@ -114,16 +96,16 @@ Q_OBJECT
                                 const std::list<ModuleBase_ViewerPrs>& theSelected,
                                 const std::list<ModuleBase_ViewerPrs>& theHighlighted);
 
-  /// Processes the key pressed in the view
-  /// \param theKey a key value
-  virtual void keyReleased(const int theKey);
-
   /// Emits a signal about the operation start. This signal has an information about the feature.
   /// If the provided feature is empty, the current operation feature is used.
   /// \param theType a type of an operation started
   /// theFeature the operation argument
   void restartOperation(const std::string& theType, ObjectPtr theFeature = ObjectPtr());
 
+  /// If operation needs to redisplay its result during operation
+  /// then this method has to return True
+  virtual bool hasPreview() const { return true; }
+
 signals:
   /// signal about the request to launch operation
   /// theName the operation name
@@ -152,9 +134,6 @@ signals:
   /// \param theFeatures a list of features to be disabled
   void setSelection(const QList<ObjectPtr>& theFeatures);
 
-  /// signal to close the operation local context if it is opened
-  void closeLocalContext();
-
  protected:
   /// Creates an operation new feature
   /// In addition to the default realization it appends the created line feature to
@@ -162,6 +141,9 @@ signals:
   /// \param theFlushMessage the flag whether the create message should be flushed
   /// \returns the created feature
   virtual FeaturePtr createFeature(const bool theFlushMessage = true);
+
+  /// Activates widgets by preselection if it is accepted
+  virtual void activateByPreselection();
 };
 
 #endif