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 * Checks that object has 2D presentation. Reimlemented to retun true.
68 HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
71 * Returns default filling color for new channel.
73 HYDRODATA_EXPORT static QColor DefaultFillingColor();
76 * Returns default border color for new channel.
78 HYDRODATA_EXPORT static QColor DefaultBorderColor();
82 // Public methods to work with Channel
85 * Sets reference guide line object for channel.
87 HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
90 * Returns reference guide line object of channel.
92 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
95 * Remove reference guide line object from channel.
97 HYDRODATA_EXPORT virtual void RemoveGuideLine();
101 * Sets reference profile object for channel.
103 HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
106 * Returns reference profile object of channel.
108 HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
111 * Remove reference profile object from channel.
113 HYDRODATA_EXPORT virtual void RemoveProfile();
119 * Returns default filling color for new object.
121 HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
124 * Returns default border color for new object.
126 HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
129 * Returns the type of child altitude object.
130 * Reimplemented to create chanel altitude object.
132 HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const;
136 friend class HYDROData_Iterator;
139 * Creates new object in the internal data structure. Use higher level objects
140 * to create objects with real content.
142 HYDRODATA_EXPORT HYDROData_Channel();
145 * Destructs properties of the object and object itself, removes it from the document.
147 virtual HYDRODATA_EXPORT ~HYDROData_Channel();