Salome HOME
Import/Export new corrections
[modules/hydro.git] / src / HYDROData / HYDROData_LandCover.h
index 246208e320dc0837d40ca98cafb9bd378259e46d..289e4bff1820b2778bac1190edd3312d107335c6 100644 (file)
@@ -23,6 +23,8 @@
 
 DEFINE_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
 
+class TopoDS_Shape;
+
 class HYDROData_LandCover : public HYDROData_Entity
 {
 protected:
@@ -30,7 +32,12 @@ protected:
 
   enum DataTag
   {
-    DataTag_Table = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+    DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+    DataTag_Shape,                                         ///< the shape presentation of the land cover   
+    DataTag_StricklerType,                                 ///< the type corresponding to types in the Strickler tables 
+    DataTag_Polylines,                                     ///< the set of reference polylines
+    DataTag_FillingColor,                                  ///< filling color of the land cover presentation
+    DataTag_BorderColor                                    ///< border color of the land cover presentation
   };
 
   HYDRODATA_EXPORT HYDROData_LandCover();
@@ -39,7 +46,103 @@ protected:
 public:
   DEFINE_STANDARD_RTTI( HYDROData_LandCover );
 
+  /**
+   */
   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
+
+  /**
+   * Dump object to Python script representation.
+   */
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+
+  /**
+   * Returns the list of all reference objects of this object.
+   */
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
+
+  /**
+   * Update the shape presentation of the land cover.
+   * Call this method whenever you made changes for land cover polylines.
+   */
+  HYDRODATA_EXPORT virtual void Update();
+
+  /**
+   * Checks that object has 2D presentation. Reimlemented to return true.
+   */
+  HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
+
+  /**
+   * Set Strickler type for the land cover.
+   */
+  HYDRODATA_EXPORT virtual void SetStricklerType( const QString& theType );
+
+  /**
+   * Returns Strickler type for the land cover.
+   */
+  HYDRODATA_EXPORT virtual QString GetStricklerType() const;
+
+  /**
+   * Set reference polyline objects for the land cover.
+   */
+  HYDRODATA_EXPORT virtual void SetPolylines( const HYDROData_SequenceOfObjects& thePolylines );
+
+  /**
+   * Returns all reference polyline objects of the land cover.
+   */
+  HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetPolylines() const;
+
+  /**
+   * Returns the shape presentation of the land cover.
+   */
+  HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
+
+  /**
+   * Sets filling color for land cover.
+   */
+  HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
+
+  /**
+   * Returns filling color of land cover.
+   */
+  HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
+
+   /**
+   * Sets border color for land cover.
+   */
+  HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
+
+  /**
+   * Returns border color of land cover.
+   */
+  HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
+
+  /**
+   * Returns default filling color for new land cover.
+   */
+  HYDRODATA_EXPORT static QColor DefaultFillingColor();
+
+  /**
+   * Returns default border color for new land cover.
+   */
+  HYDRODATA_EXPORT static QColor DefaultBorderColor();
+
+  /**
+   * Build the shape presentation of the land cover.
+   */
+  HYDRODATA_EXPORT static TopoDS_Shape buildShape( const HYDROData_SequenceOfObjects& thePolylines,
+                                                   TCollection_AsciiString& theErrorMsg );
+
+  /**
+   * Sets the shape presentation of the land cover.
+   */
+  HYDRODATA_EXPORT virtual void setShape( const TopoDS_Shape& theShape );
+
+protected:
+
+  /**
+   * Removes the shape from data label of the land cover object.
+   */
+  HYDRODATA_EXPORT virtual void removeShape();
 };
 
 #endif