2 #ifndef HYDROData_Channel_HeaderFile
3 #define HYDROData_Channel_HeaderFile
5 #include "HYDROData_ArtificialObject.h"
7 class Handle(HYDROData_Polyline3D);
8 class Handle(HYDROData_Profile);
9 class TopTools_SequenceOfShape;
10 class TopTools_ListOfShape;
12 DEFINE_STANDARD_HANDLE(HYDROData_Channel, HYDROData_ArtificialObject)
14 /**\class HYDROData_Channel
18 class HYDROData_Channel : public HYDROData_ArtificialObject
22 * Enumeration of tags corresponding to the persistent object parameters.
26 DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
32 DEFINE_STANDARD_RTTI(HYDROData_Channel);
35 * Returns the kind of this object. Must be redefined in all objects of known type.
37 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_CHANNEL;}
40 * Dump object to Python script representation.
42 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
45 * Returns the list of all reference objects of this object.
47 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
50 * Returns the top shape of the object.
52 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
55 * Returns the 3d shape of the object.
57 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
60 * Update the shape presentations of stream.
61 * Call this method whenever you made changes for channel data.
63 HYDRODATA_EXPORT virtual void Update();
66 * Returns default filling color for new channel.
68 HYDRODATA_EXPORT static QColor DefaultFillingColor();
71 * Returns default border color for new channel.
73 HYDRODATA_EXPORT static QColor DefaultBorderColor();
77 // Public methods to work with Channel
80 * Sets reference guide line object for channel.
82 HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
85 * Returns reference guide line object of channel.
87 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
90 * Remove reference guide line object from channel.
92 HYDRODATA_EXPORT virtual void RemoveGuideLine();
96 * Sets reference profile object for channel.
98 HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
101 * Returns reference profile object of channel.
103 HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
106 * Remove reference profile object from channel.
108 HYDRODATA_EXPORT virtual void RemoveProfile();
114 * Returns default filling color for new object.
116 HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
119 * Returns default border color for new object.
121 HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
124 * Returns the type of child altitude object.
125 * Reimplemented to create chanel altitude object.
127 HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const;
131 friend class HYDROData_Iterator;
134 * Creates new object in the internal data structure. Use higher level objects
135 * to create objects with real content.
137 HYDRODATA_EXPORT HYDROData_Channel();
140 * Destructs properties of the object and object itself, removes it from the document.
142 virtual HYDRODATA_EXPORT ~HYDROData_Channel();