1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROData_LANDCOVER_HeaderFile
20 #define HYDROData_LANDCOVER_HeaderFile
22 #include <HYDROData_Entity.h>
24 DEFINE_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
28 class HYDROData_LandCover : public HYDROData_Entity
31 friend class HYDROData_Iterator;
35 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
36 DataTag_Shape, ///< the shape presentation of the land cover
37 DataTag_StricklerType, ///< the type corresponding to types in the Strickler tables
38 DataTag_Polylines, ///< the set of reference polylines
39 DataTag_FillingColor, ///< filling color of the land cover presentation
40 DataTag_BorderColor ///< border color of the land cover presentation
43 HYDRODATA_EXPORT HYDROData_LandCover();
44 HYDRODATA_EXPORT ~HYDROData_LandCover();
47 DEFINE_STANDARD_RTTI( HYDROData_LandCover );
51 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const;
54 * Dump object to Python script representation.
56 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
59 * Returns the list of all reference objects of this object.
61 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
64 * Update the shape presentation of the land cover.
65 * Call this method whenever you made changes for land cover polylines.
67 HYDRODATA_EXPORT virtual void Update();
70 * Checks that object has 2D presentation. Reimlemented to return true.
72 HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
75 * Set Strickler type for the land cover.
77 HYDRODATA_EXPORT virtual void SetStricklerType( const QString& theType );
80 * Returns Strickler type for the land cover.
82 HYDRODATA_EXPORT virtual QString GetStricklerType() const;
85 * Set reference polyline objects for the land cover.
87 HYDRODATA_EXPORT virtual void SetPolylines( const HYDROData_SequenceOfObjects& thePolylines );
90 * Returns all reference polyline objects of the land cover.
92 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetPolylines() const;
95 * Returns the shape presentation of the land cover.
97 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
100 * Sets filling color for land cover.
102 HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
105 * Returns filling color of land cover.
107 HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
110 * Sets border color for land cover.
112 HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
115 * Returns border color of land cover.
117 HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
120 * Returns default filling color for new land cover.
122 HYDRODATA_EXPORT virtual QColor DefaultFillingColor() const;
125 * Returns default border color for new land cover.
127 HYDRODATA_EXPORT virtual QColor DefaultBorderColor() const;
130 * Build the shape presentation of the land cover.
132 HYDRODATA_EXPORT static TopoDS_Shape buildShape( const HYDROData_SequenceOfObjects& thePolylines,
133 TCollection_AsciiString& theErrorMsg );
136 * Sets the shape presentation of the land cover.
138 HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
143 * Removes the shape from data label of the land cover object.
145 HYDRODATA_EXPORT virtual void removeShape();