Salome HOME
refs #430: incorrect coordinates in dump polyline
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PrsImage.h
index f01115208cb747d1d7260f8c6a1c864553eff288..1fafe35416c0a4d346e0a3d0509d68cda199d00a 100644 (file)
@@ -37,6 +37,8 @@ public:
   enum TransformationPointType { None = 0, PointA, PointB, PointC };
   struct TransformationPoint
   {
+    TransformationPoint() : Point( 0, 0 ), Caption( "" ), GroupItem( 0 ) {}
+
     QPoint              Point;
     QString             Caption;
     QGraphicsItemGroup* GroupItem;
@@ -49,7 +51,8 @@ public:
   virtual ~HYDROGUI_PrsImage();
 
 public:
-  void                            setImage( const QImage& theImage );
+  void                            setImage( const QImage& theImage,
+                                            const bool theCompute = false );
   QImage                          getImage() const;
 
   void                            setCaption( const QString& theCaption );
@@ -89,7 +92,16 @@ public:
   virtual void                    setSelected( bool theState );
 
 protected:
-  void                            computeTransformationPoints();
+  void                            computeTransformationPoints( const bool theObligatoryInit = false );
+
+  QGraphicsItemGroup*             createPointItem( const QString& theCaption,
+                                                   const QColor& theColor );
+
+  /**
+   * Create presentations for transformation points A, B and C or update the presentation
+   * parameters if it is already created
+   */
+  void                            initTrsfPoints( const int thePointType );
   /**
    * Show/hide a transformation point if necessary.
    */