Salome HOME
Merge branch 'BR_HYDRO_IMPS_WIN' of ssh://gitolite3@git.salome-platform.org/modules...
[modules/hydro.git] / src / HYDROPy / HYDROData_PolylineXY.sip
index 37dadf7c527a972352f339fcc12baa5426f33580..a32e3f180e48180cd71b26e1a66545975a37630a 100644 (file)
@@ -1,12 +1,8 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,7 +20,7 @@
 #include <HYDROData_PolylineXY.h>
 %End
 
-class HYDROData_PolylineXY : HYDROData_IPolyline
+class HYDROData_PolylineXY : public HYDROData_IPolyline
 {
 
 %TypeHeaderCode
@@ -46,6 +42,89 @@ class HYDROData_PolylineXY : HYDROData_IPolyline
 
 public:      
 
+  /**
+   * Returns default wire color for new polyline.
+   */
+  static QColor DefaultWireColor() const;
+
+  /**
+   * Returns the presentation of polyline section in Qt maner.
+   */
+  static void BuildPainterPath( QPainterPath&                       thePath,
+                                const SectionType&                  theType,
+                                const bool&                         theIsClosed,
+                                const NCollection_Sequence<gp_XYZ>& thePoints );
+
+  /**
+   * Returns flag indicating that polyline can be edited or not.
+   */
+  virtual bool IsEditable() const;
+
+  
+public:
+
+  /**
+   * Imports shape from IOR.
+   * \param theIOR the IOR of Geom object
+   * \return \c true if shape has been successfully imported
+   */
+  bool ImportFromGeomIOR( const TCollection_AsciiString& theIOR );
+
+  /**
+   * Stores the study entry of the imported GEOM object.
+   * \param theEntry GEOM object entry
+   */
+  void SetGeomObjectEntry( const TCollection_AsciiString& theEntry );
+
+  /**
+   * Returns the imported GEOM object entry.
+   */
+  TCollection_AsciiString GetGeomObjectEntry() const;
+
+
+public:
+
+  /**
+   * Returns true if polyline is closed
+   * \param theIsSimpleCheck flag indicating the type of checking
+   *        - if true then all wires checked on closures
+   *        - if false then for positive result polyline should consist of
+   *          only one wire and which must be closed
+   */
+  bool IsClosed( const bool theIsSimpleCheck = true ) const;
+
+   /**
+   * Returns the distance beetwen first and point with index thePointIndex
+   * at the section with index theSectionIndex. -1 is returned if error is occurred.
+   */
+  double GetDistance( const int theSectionIndex,
+                      const int thePointIndex ) const;
+
+  /**
+   * Adds new one section.
+   * \param theSectName name of the section
+   * \param theSectionType type of section
+   * \param theIsClosed flag indicates closures of section
+   */
+  void GetSections( NCollection_Sequence<TCollection_AsciiString>& theSectNames /Out/,
+                    NCollection_Sequence<HYDROData_IPolyline::SectionType>& theSectTypes /Out/,
+                    NCollection_Sequence<bool>& theSectClosures /Out/ ) const;
+
+  /**
+   * Replaces point for section with index "theSectionIndex".
+   * \param theSectionIndex index of section
+   * \param thePoints new points
+   */
+  void SetPoints( const int         theSectionIndex,
+                  const HYDROData_IPolyline::PointsList& thePoints );
+
+  /**
+   * Returns the painter path.
+   * Note: currently only the first section of the polyline data is taken into account.
+   * \return polyline painter path.
+   */
+  virtual QPainterPath GetPainterPath() const;
+
 protected:
 
   /**