Salome HOME
Add ellipse data type
[modules/shaper.git] / src / PartSet / PartSet_SketcherReentrantMgr.h
index 17006c1e482cf8115a09624e0a4b1422e43f9c53..0b66869830daed9ef974bbcf55465dcc7afc30ba 100644 (file)
@@ -8,6 +8,7 @@
 #include <ModelAPI_Feature.h>
 
 #include <string>
+#include <memory>
 
 #include <QObject>
 
@@ -22,6 +23,10 @@ class QMouseEvent;
 
 class XGUI_Workshop;
 class PartSet_Module;
+class ModuleBase_ViewerPrs;
+class Events_Message;
+class ModelAPI_Attribute;
+class GeomAPI_Pnt2d;
 
 /// \ingroup PartSet_SketcherReentrantMgr
 /// It provides reentrant create operations in sketch, that is when all inputs are valid,
@@ -101,10 +106,17 @@ public:
   /// Returns false if the reentrant mode of the operation is not empty.
   bool canBeCommittedByPreselection();
 
-  /// Put information about created objects into a cash. It will be processed in
-  /// restart operation.
-  /// \param theObjects a list of created objects
-  void appendCreatedObjects(const std::set<ObjectPtr>& theObjects);
+  /// Fills reentrant message during restarting operation
+  /// \param theMessage reentrant message
+  void setReentrantMessage(const std::shared_ptr<Events_Message>& theMessage)
+  { myReentrantMessage = theMessage; }
+
+  /// Returnss reentrant message
+  std::shared_ptr<Events_Message> reentrantMessage() const { return myReentrantMessage; }
+
+  /// Put current selection into reentrant message
+  /// \param theMessage a message of reentrant operation
+  void setReentrantPreSelection(const std::shared_ptr<Events_Message>& theMessage);
 
 private slots:
   /// SLOT, that is called by a widget activating in the property panel
@@ -190,14 +202,17 @@ private:
   RestartingMode myRestartingMode;  /// automatical restarting mode flag
   bool myIsFlagsBlocked; /// true when reset of flags should not be perfromed
   bool myIsInternalEditOperation; /// true when the 'internal' edit is started
-  bool myIsValueChangedBlocked; /// blocked flag to avoid circling by value changed
 
   FeaturePtr myPreviousFeature; /// feature of the previous operation, which is restarted
-  std::set<FeaturePtr> myCreatedFeatures; /// list of created features by restart operation
   FeaturePtr myInternalFeature;
   QWidget* myInternalWidget;
   ModuleBase_ModelWidget* myInternalActiveWidget;
   std::string myNoMoreWidgetsAttribute;
+
+  std::shared_ptr<Events_Message> myReentrantMessage; /// message obtained by operation restart
+  ObjectPtr mySelectedObject; /// cashed selected object
+  std::shared_ptr<ModelAPI_Attribute> mySelectedAttribute; /// cashed selected attribute
+  std::shared_ptr<GeomAPI_Pnt2d> myClickedSketchPoint; /// cashed clicked point
 };
 
 #endif