Salome HOME
Fix for the bug #37: Error when import image with format not supported.
[modules/hydro.git] / src / HYDROPy / HYDROData_Polyline.sip
index d0a8b1ce5a6a3c96025f35c7805dce5e77d58048..0798d97e8f5104f0e267a904945d92cc5b0c3cdb 100644 (file)
@@ -63,56 +63,69 @@ class HYDROData_Polyline : HYDROData_Object
 {
 
 %ConvertToSubClassCode
-    if ( !Handle(HYDROData_Polyline)::DownCast( sipCpp ).IsNull() )
-      sipClass = sipClass_HYDROData_Polyline;
-    else
-      sipClass = NULL;
+    switch ( sipCpp->GetKind() )
+    {
+      case KIND_POLYLINE:
+        sipClass = sipClass_HYDROData_Polyline;
+        break;
+
+      default:
+        // We don't recognise the type.
+        sipClass = NULL;
+    }
 %End
 
 public:
 
   typedef QList<PolylineSection> PolylineData;
 
-public:
-
-  const ObjectKind          GetKind() const;
-
 public:      
 
   /**
    * Replace current polyline data by new sections list
    * \param theSections the sections list
    */
-  void setPolylineData( const PolylineData& theSections );
+  void SetPolylineData( const PolylineData& theSections );
 
   /**
    * Return polyline data
    * \return polyline section list
    */
-  PolylineData getPolylineData();
+  PolylineData GetPolylineData();
    
   /**
    * Return polyline dimension
    * \return polyline dimension (2 or 3)
    */
-  int getDimension() const;
+  int GetDimension() const;
 
   /**
    * Set polyline dimension (2 or 3)
    * \param theDimension the polyline dimension
    */
-  void setDimension( int theDimension );
+  void SetDimension( int theDimension );
 
   /**
    * Remove all sections from polyline
    */
-  void removeAll();
+  void RemoveAll();
 
 
   /**
    * Returns the painter path. The painter path is construct by lines
    */
-  QPainterPath painterPath();
+  QPainterPath GetPainterPath();
+
+
+  /**
+   * Sets the z value for polyline.
+   */
+  void SetZValue( const double theZValue );
+  
+  /**
+   * Returns the z value for polyline.
+   */
+  double ZValue() const;
 
 protected: