Salome HOME
Update flag for calculation case during polyline changing.
[modules/hydro.git] / src / HYDROData / HYDROData_Image.h
index da11061653ac0ce1bc57058881cca94dcba29538..90dec9c3210a6cba816ac85c1825ddb53e46b65c 100644 (file)
@@ -22,7 +22,7 @@ public:
 
   enum TransformationMode
   {
-    ManualLambert = 0,
+    ManualGeodesic = 0,
     ManualCartesian,
     ReferenceImage
   };
@@ -59,9 +59,8 @@ public:
    * Reimplemented to update an Image object in the data structure.
    * Call this method whenever you made changes for operator or reference objects.
    * If it is changed, sets "MustBeUpdated" flag to other depended images.
-   * \param theIsForce force reupdating of data object
    */
-  HYDRODATA_EXPORT virtual void Update( const bool theIsForce = true );
+  HYDRODATA_EXPORT virtual void Update();
 
   /**
    * Returns data of object wrapped to QVariant.
@@ -122,6 +121,17 @@ public:
   HYDRODATA_EXPORT bool IsByTwoPoints() const;
 
 
+  /**
+   * Removes all references from this image.
+   */
+  HYDRODATA_EXPORT bool HasReferences() const;
+
+  /**
+   * Removes all references from this image.
+   */
+  HYDRODATA_EXPORT void RemoveAllReferences();
+
+
   /**
    * Stores the transformation points in local cs of image
    * \param thePointA point A
@@ -130,7 +140,8 @@ public:
    */
   HYDRODATA_EXPORT void SetLocalPoints( const QPoint& thePointA,
                                         const QPoint& thePointB,
-                                        const QPoint& thePointC = QPoint( INT_MIN, INT_MIN ) );
+                                        const QPoint& thePointC = QPoint( INT_MIN, INT_MIN ),
+                                        const bool    theIsUpdate = true );
 
   /**
    * Returns the transformation points in local cs of image
@@ -159,7 +170,8 @@ public:
   HYDRODATA_EXPORT void SetGlobalPoints( const TransformationMode& theMode,
                                          const QPointF&            thePointA,
                                          const QPointF&            thePointB,
-                                         const QPointF&            thePointC = QPoint( INT_MIN, INT_MIN ) );
+                                         const QPointF&            thePointC = QPoint( INT_MIN, INT_MIN ),
+                                         const bool                theIsUpdate = true  );
 
   /**
    * Returns the transformation points in global cs
@@ -190,7 +202,8 @@ public:
   HYDRODATA_EXPORT void SetReferencePoints( const Handle(HYDROData_Image)& theRefImage,
                                             const QPointF&                 thePointA,
                                             const QPointF&                 thePointB,
-                                            const QPointF&                 thePointC = QPoint( INT_MIN, INT_MIN ) );
+                                            const QPointF&                 thePointC = QPoint( INT_MIN, INT_MIN ),
+                                            const bool                     theIsUpdate = true );
 
   /**
    * Returns the transformation points in reference image local cs
@@ -222,6 +235,11 @@ public:
    */
   HYDRODATA_EXPORT Handle(HYDROData_Image) GetTrsfReferenceImage() const;
 
+  /**
+   * Removes the reference image for transformation
+   */
+  HYDRODATA_EXPORT void RemoveTrsfReferenceImage();
+
 
   /**
    * Stores the transformation mode
@@ -273,6 +291,7 @@ public:
    */
   HYDRODATA_EXPORT void ClearReferences();
 
+
   /**
    * Stores the operator name
    * \param theOpName name of the operator that must be executed for image update
@@ -297,17 +316,6 @@ public:
    */
   HYDRODATA_EXPORT QByteArray Args() const;
   
-  /**
-   * Sets the "MustBeUpdated" flag: if image is depended on updated features.
-   * \param theFlag is true for images that must be updated, false for up-to-date
-   */
-  HYDRODATA_EXPORT void MustBeUpdated(bool theFlag);
-
-  /**
-   * Returns the "MustBeUpdated" flag: is image must be recomputed or not
-   * \returns false if image is up to date
-   */
-  HYDRODATA_EXPORT bool MustBeUpdated() const;
 
   /**
    * Marks the image as self-splitted.