X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_IPolyline.sip;h=cb455acd1a629d72370d2cca3c2fdc90728d3332;hb=9e52a2e1ae5433bef53ca5ae6c03fa7998274188;hp=6d5f8b798d7a191124d5313dff8beb3a0eaccc1d;hpb=697a6aa753b5cca692ca982a10662a674c34658a;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_IPolyline.sip b/src/HYDROPy/HYDROData_IPolyline.sip index 6d5f8b79..cb455acd 100644 --- a/src/HYDROPy/HYDROData_IPolyline.sip +++ b/src/HYDROPy/HYDROData_IPolyline.sip @@ -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,17 +20,16 @@ #include %End -class HYDROData_IPolyline : HYDROData_Entity /Abstract/ +class HYDROData_IPolyline : public HYDROData_Entity /Abstract/ { +%TypeHeaderCode +#include +%End typedef gp_XY Point; typedef NCollection_Sequence PointsList; -%TypeHeaderCode -#include -%End - %ConvertToSubClassCode switch ( sipCpp->GetKind() ) { @@ -58,6 +53,134 @@ public: public: + /** + * Sets wire color for object. + */ + virtual void SetWireColor( const QColor& theColor ); + + /** + * Returns wire color of object. + */ + virtual QColor GetWireColor() const; + + /** + * Returns default wire color for new object. + */ + static QColor DefaultWireColor(); + +public: + + /** + * Returns number of sections. + */ + virtual int NbSections() const = 0; + + /** + * Adds new one section. + * \param theSectName name of the section + * \param theSectionType type of section + * \param theIsClosed flag indicates closures of section + */ + virtual void AddSection( const TCollection_AsciiString& theSectName, + const HYDROData_IPolyline::SectionType theSectionType, + const bool theIsClosed ) = 0; + + /** + * Returns name of section with given index. + * \param theSectionIndex index of section + */ + virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const = 0; + + /** + * Set name for section with given index. + * \param theSectionIndex index of section + * \param theSectionName new section name + */ + virtual void SetSectionName( const int theSectionIndex, + const TCollection_AsciiString& theSectionName ) = 0; + + /** + * Returns type of section with given index. + * \param theSectionIndex index of section + */ + virtual HYDROData_IPolyline::SectionType GetSectionType( const int theSectionIndex ) const = 0; + + /** + * Set type for section with given index. + * \param theSectionIndex index of section + * \param theSectionType new section type + */ + virtual void SetSectionType( const int theSectionIndex, + const HYDROData_IPolyline::SectionType theSectionType ) = 0; + + /** + * Returns true if section with given index is closed. + * \param theSectionIndex index of section + */ + virtual bool IsClosedSection( const int theSectionIndex ) const = 0; + + /** + * Set closed flag for section with given index. + * \param theSectionIndex index of section + * \param theIsClosed new closures state + */ + virtual void SetSectionClosed( const int theSectionIndex, + const bool theIsClosed ) = 0; + + /** + * Removes section with given index. + * \param theSectionIndex index of section + */ + virtual void RemoveSection( const int theSectionIndex ) = 0; + + /** + * Removes all sections. + */ + virtual void RemoveSections() = 0; + + + /** + * Return number of profile points. + * \return number of points + */ + int NbPoints( const int theSectionIndex = -1 ) const; + + /** + * Adds new point for section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePoint point to add + * \param theBeforeIndex if not equal -1 then insert point before this index + */ + virtual void AddPoint( const int theSectionIndex, + const HYDROData_IPolyline::Point& thePoint, + const int theBeforeIndex = -1 ) = 0; + + /** + * Replaces point for section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePoint new point + * \param thePointIndex index of point to replace + */ + virtual void SetPoint( const int theSectionIndex, + const HYDROData_IPolyline::Point& thePoint, + const int thePointIndex ) = 0; + + /** + * Removes point from section with index "theSectionIndex". + * \param theSectionIndex index of section + * \param thePointIndex index of point + */ + virtual void RemovePoint( const int theSectionIndex, + const int thePointIndex ) = 0; + + + /** + * Returns list of points. + * \param theSectionIndex if not equal -1 then list of points returned + * only for section with this index + * \return list of points + */ + virtual HYDROData_IPolyline::PointsList GetPoints( const int theSectionIndex = -1 ) const = 0; protected: