X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_PolylineXY.sip;h=4286dee313f2ad46fc3fcde86c457f24b1ebb8ca;hb=f58865bdfb548ebba53ecb264f17ef357fa4c409;hp=37dadf7c527a972352f339fcc12baa5426f33580;hpb=d84fadb6fba0d9ef3926995eab878175cc24e291;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_PolylineXY.sip b/src/HYDROPy/HYDROData_PolylineXY.sip index 37dadf7c..4286dee3 100644 --- a/src/HYDROPy/HYDROData_PolylineXY.sip +++ b/src/HYDROPy/HYDROData_PolylineXY.sip @@ -24,7 +24,7 @@ #include %End -class HYDROData_PolylineXY : HYDROData_IPolyline +class HYDROData_PolylineXY : public HYDROData_IPolyline { %TypeHeaderCode @@ -46,6 +46,66 @@ class HYDROData_PolylineXY : HYDROData_IPolyline public: + /** + * Returns default wire color for new polyline. + */ + static QColor DefaultWireColor(); + + /** + * Returns the presentation of polyline section in Qt maner. + */ + static void BuildPainterPath( QPainterPath& thePath, + const SectionType& theType, + const bool& theIsClosed, + const NCollection_Sequence& thePoints ); + + /** + * Returns flag indicating that polyline can be edited or not. + */ + virtual bool IsEditable() const; + + + /** + * 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& theSectNames, + NCollection_Sequence& theSectTypes, + NCollection_Sequence& theSectClosures ) 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: /**