Salome HOME
Issue #1774: Can't select edge for tangent constraint creation
[modules/shaper.git] / src / PartSet / PartSet_OperationPrs.h
index 6ea0ac622a5a5ceb3cd0fba895b3d269ca4b79c7..cc1416451b8e923a8f083b2d5d2e612d34035b9b 100755 (executable)
@@ -22,6 +22,7 @@
 #include <Standard_DefineHandle.hxx>
 
 #include <Quantity_Color.hxx>
+#include <NCollection_List.hxx>
 
 #include <QMap>
 #include <QList>
@@ -31,6 +32,7 @@
 DEFINE_STANDARD_HANDLE(PartSet_OperationPrs, ViewerData_AISShape)
 
 class XGUI_Displayer;
+class Handle_AIS_InteractiveObject;
 
 /**
 * \ingroup GUI
@@ -69,9 +71,9 @@ protected:
                                                 const Standard_Integer aMode) ;
 
 protected:
-  /// Returns map of feature shapes to be able to fill it outside this class, e.g. in friend
-  /// \return a map of object to shape
-  QMap<ObjectPtr, QList<GeomShapePtr> >& featureShapes() { return myFeatureShapes; }
+  /// list of visualized shapes
+  /// \return a map of shapes
+  NCollection_DataMap<TopoDS_Shape, Handle_AIS_InteractiveObject>& shapesMap();
 
 private:
   /// Fills the map by the feature object and shapes, which should be visuaziled
@@ -129,8 +131,15 @@ private:
                                    GeomShapePtr theGeomShape,
                                    QMap<ObjectPtr, QList<GeomShapePtr> >& theObjectShapes);
 
+  /// Fills the list of shapes by map of model objects
+  /// \param theFeatureShape a container to find shapes
+  /// \param theShapesMap an out container
+  static void fillShapeList(const QMap<ObjectPtr, QList<GeomShapePtr> >& theFeatureShapes,
+          ModuleBase_IWorkshop* theWorkshop,
+          NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)>& theShapeToPrsMap);
+
 private:
-  QMap<ObjectPtr, QList<GeomShapePtr> > myFeatureShapes; /// visualized shapes
+  NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)> myShapeToPrsMap; /// list of visualized shapes
 
   ModuleBase_IWorkshop* myWorkshop; /// current workshop
   Quantity_Color myShapeColor; /// color of feature depended shapes