HYDROData_Bathymetry.h
HYDROData_Calculation.h
HYDROData_Document.h
+ HYDROData_Domain.h
HYDROData_Lambert93.h
HYDROData_Image.h
HYDROData_Iterator.h
HYDROData_Object.h
HYDROData_Polyline.h
HYDROData_VisualState.h
+ HYDROData_Region.h
HYDROData_Tool.h
HYDROData_Zone.h
HYDROOperations_Factory.h
HYDROData_Bathymetry.cxx
HYDROData_Calculation.cxx
HYDROData_Document.cxx
+ HYDROData_Domain.cxx
HYDROData_Image.cxx
HYDROData_Iterator.cxx
HYDROData_Lambert93.cxx
HYDROData_Object.cxx
HYDROData_Polyline.cxx
HYDROData_VisualState.cxx
+ HYDROData_Region.cxx
HYDROData_Tool.cxx
HYDROData_Zone.cxx
HYDROOperations_Factory.cxx
RelativePath=".\HYDROData_Document.cxx"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Domain.cxx"
+ >
+ </File>
<File
RelativePath=".\HYDROData_Image.cxx"
>
RelativePath=".\HYDROData_Polyline.cxx"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Region.cxx"
+ >
+ </File>
<File
RelativePath=".\HYDROData_Tool.cxx"
>
RelativePath=".\HYDROData_Document.h"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Domain.h"
+ >
+ </File>
<File
RelativePath=".\HYDROData_Image.h"
>
RelativePath=".\HYDROData_Polyline.h"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Region.h"
+ >
+ </File>
<File
RelativePath=".\HYDROData_Tool.h"
>
#include "HYDROData_Iterator.h"
#include "HYDROData_Polyline.h"
#include "HYDROData_Zone.h"
+#include "HYDROData_Region.h"
#include <TDataStd_ReferenceList.hxx>
}
aResList << QString( "" );
- aZones = GetSplittedZones();
+ aZones = GetRegions();
anIter.Init( aZones );
for ( ; anIter.More(); anIter.Next() )
{
Handle(HYDROData_Zone) aSplittedZone =
Handle(HYDROData_Zone)::DownCast( anIter.Value() );
if ( !aSplittedZone.IsNull() )
- setPythonReferenceObject( theTreatedObjects, aResList, aSplittedZone, "AddSplittedZone" );
+ setPythonReferenceObject( theTreatedObjects, aResList, aSplittedZone, "AddRegion" );
}
return aResList;
ClearReferenceObjects( DataTag_Zone );
}
-int HYDROData_Calculation::NbSplittedZones() const
+int HYDROData_Calculation::NbRegions() const
{
- return NbReferenceObjects( DataTag_SplittedZone );
+ return NbReferenceObjects( DataTag_Region );
}
-void HYDROData_Calculation::AddSplittedZone( const Handle(HYDROData_Zone)& theZone )
+void HYDROData_Calculation::AddRegion( const Handle(HYDROData_Region)& theRegion )
{
- AddReferenceObject( theZone, DataTag_SplittedZone );
+ AddReferenceObject( theRegion, DataTag_Region );
}
-void HYDROData_Calculation::SetSplittedZone( const int theIndex,
- const Handle(HYDROData_Zone)& theZone )
+void HYDROData_Calculation::SetRegion( const int theIndex,
+ const Handle(HYDROData_Region)& theRegion )
{
- SetReferenceObject( theZone, DataTag_SplittedZone, theIndex );
+ SetReferenceObject( theRegion, DataTag_Region, theIndex );
}
-void HYDROData_Calculation::SetSplittedZones( const HYDROData_SequenceOfObjects& theZones )
+void HYDROData_Calculation::SetRegions( const HYDROData_SequenceOfObjects& theRegions )
{
- SetReferenceObjects( theZones, DataTag_SplittedZone );
+ SetReferenceObjects( theRegions, DataTag_Region );
}
-Handle(HYDROData_Zone) HYDROData_Calculation::GetSplittedZone( const int theIndex ) const
+Handle(HYDROData_Region) HYDROData_Calculation::GetRegion( const int theIndex ) const
{
- return Handle(HYDROData_Zone)::DownCast(
- GetReferenceObject( DataTag_SplittedZone, theIndex ) );
+ return Handle(HYDROData_Region)::DownCast(
+ GetReferenceObject( DataTag_Region, theIndex ) );
}
-HYDROData_SequenceOfObjects HYDROData_Calculation::GetSplittedZones() const
+HYDROData_SequenceOfObjects HYDROData_Calculation::GetRegions() const
{
- return GetReferenceObjects( DataTag_SplittedZone );
+ return GetReferenceObjects( DataTag_Region );
}
-void HYDROData_Calculation::RemoveSplittedZones()
+void HYDROData_Calculation::RemoveRegions()
{
- ClearReferenceObjects( DataTag_SplittedZone );
+ ClearReferenceObjects( DataTag_Region );
}
class Handle(HYDROData_Polyline);
class Handle(HYDROData_Zone);
+class Handle(HYDROData_Region);
DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Object)
DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
DataTag_BoundaryPolyline, ///< reference boundary polyline
DataTag_Zone, ///< reference zones
- DataTag_SplittedZone ///< reference splitted zones
+ DataTag_Region ///< reference regions
};
public:
* Replace the refrence zone for calculation case.
*/
HYDRODATA_EXPORT virtual void SetZone( const int theIndex,
- const Handle(HYDROData_Zone)& theBathymetry );
+ const Handle(HYDROData_Zone)& theZone );
/**
* Sets the refrence zones for calculation case.
/**
- * Returns number of splitted zones for calculation case.
+ * Returns number of regions for calculation case.
*/
- HYDRODATA_EXPORT virtual int NbSplittedZones() const;
+ HYDRODATA_EXPORT virtual int NbRegions() const;
/**
- * Add new one splitted zone for calculation case.
+ * Add new one region for calculation case.
*/
- HYDRODATA_EXPORT virtual void AddSplittedZone( const Handle(HYDROData_Zone)& theZone );
+ HYDRODATA_EXPORT virtual void AddRegion( const Handle(HYDROData_Region)& theRegion );
/**
- * Replace the splitted zone for calculation case.
+ * Replace the region for calculation case.
*/
- HYDRODATA_EXPORT virtual void SetSplittedZone( const int theIndex,
- const Handle(HYDROData_Zone)& theBathymetry );
+ HYDRODATA_EXPORT virtual void SetRegion( const int theIndex,
+ const Handle(HYDROData_Region)& theRegion );
/**
- * Sets the refrence zones for calculation case.
+ * Sets the refrence region for calculation case.
*/
- HYDRODATA_EXPORT virtual void SetSplittedZones( const HYDROData_SequenceOfObjects& theZones );
+ HYDRODATA_EXPORT virtual void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
/**
- * Returns splitted zone of calculation case by index.
+ * Returns region of calculation case by index.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetSplittedZone( const int theIndex ) const;
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const;
/**
- * Returns all splitted zone of calculation case.
+ * Returns all regions of calculation case.
*/
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetSplittedZones() const;
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
/**
- * Removes all splitted refrence zone of calculation case.
+ * Removes all regions of calculation case.
*/
- HYDRODATA_EXPORT virtual void RemoveSplittedZones();
+ HYDRODATA_EXPORT virtual void RemoveRegions();
protected:
--- /dev/null
+
+#include "HYDROData_Domain.h"
+
+#include "HYDROData_Bathymetry.h"
+#include "HYDROData_Document.h"
+#include "HYDROData_Iterator.h"
+
+#include <TDataStd_IntegerArray.hxx>
+
+#include <QColor>
+#include <QStringList>
+
+IMPLEMENT_STANDARD_HANDLE(HYDROData_Domain, HYDROData_Object)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Domain, HYDROData_Object)
+
+HYDROData_Domain::HYDROData_Domain()
+{
+}
+
+HYDROData_Domain::~HYDROData_Domain()
+{
+}
+
+QStringList HYDROData_Domain::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+{
+ QStringList aResList;
+
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
+ if ( aDocument.IsNull() )
+ return aResList;
+
+ QString aDocName = aDocument->GetDocPyName();
+ QString aZoneName = GetName();
+
+ aResList << QString( "%1 = %2.CreateObject( %3 );" )
+ .arg( aZoneName ).arg( aDocName ).arg( getPythonKindId() );
+ aResList << QString( "%1.SetName( \"%2\" );" )
+ .arg( aZoneName ).arg( aZoneName );
+ aResList << QString( "" );
+
+ QColor aFillingColor = GetFillingColor();
+ aResList << QString( "filling_color = QColor( %1, %2, %3, %4 );" )
+ .arg( aFillingColor.red() ).arg( aFillingColor.green() )
+ .arg( aFillingColor.blue() ).arg( aFillingColor.alpha() );
+ aResList << QString( "%1.SetFillingColor( filling_color );" ).arg( aZoneName );
+ aResList << QString( "" );
+
+ QColor aBorderColor = GetBorderColor();
+ aResList << QString( "border_color = QColor( %1, %2, %3, %4 );" )
+ .arg( aBorderColor.red() ).arg( aBorderColor.green() )
+ .arg( aBorderColor.blue() ).arg( aBorderColor.alpha() );
+ aResList << QString( "%1.SetBorderColor( border_color );" ).arg( aZoneName );
+ aResList << QString( "" );
+
+ HYDROData_SequenceOfObjects aZoneBaths = GetBathymetries();
+ HYDROData_SequenceOfObjects::Iterator aBathsIter( aZoneBaths );
+ for ( ; aBathsIter.More(); aBathsIter.Next() )
+ {
+ Handle(HYDROData_Bathymetry) aRefBath =
+ Handle(HYDROData_Bathymetry)::DownCast( aBathsIter.Value() );
+ if ( !aRefBath.IsNull() )
+ setPythonReferenceObject( theTreatedObjects, aResList, aRefBath, "AddBathymetry" );
+ }
+
+ return aResList;
+}
+
+QColor HYDROData_Domain::DefaultFillingColor()
+{
+ return QColor( Qt::green );
+}
+
+void HYDROData_Domain::SetFillingColor( const QColor& theColor )
+{
+ return SetColor( theColor, DataTag_FillingColor );
+}
+
+QColor HYDROData_Domain::GetFillingColor() const
+{
+ return GetColor( DefaultFillingColor(), DataTag_FillingColor );
+}
+
+QColor HYDROData_Domain::DefaultBorderColor()
+{
+ return QColor( Qt::transparent );
+}
+
+void HYDROData_Domain::SetBorderColor( const QColor& theColor )
+{
+ return SetColor( theColor, DataTag_BorderColor );
+}
+
+QColor HYDROData_Domain::GetBorderColor() const
+{
+ return GetColor( DefaultBorderColor(), DataTag_BorderColor );
+}
+
+int HYDROData_Domain::NbBathymetries() const
+{
+ return NbReferenceObjects( DataTag_Bathymetry );
+}
+
+void HYDROData_Domain::AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
+{
+ AddReferenceObject( theBathymetry, DataTag_Bathymetry );
+}
+
+void HYDROData_Domain::SetBathymetry( const int theIndex,
+ const Handle(HYDROData_Bathymetry)& theBathymetry )
+{
+ SetReferenceObject( theBathymetry, DataTag_Bathymetry, theIndex );
+}
+
+Handle(HYDROData_Bathymetry) HYDROData_Domain::GetBathymetry( const int theIndex ) const
+{
+ return Handle(HYDROData_Bathymetry)::DownCast(
+ GetReferenceObject( DataTag_Bathymetry, theIndex ) );
+}
+
+HYDROData_SequenceOfObjects HYDROData_Domain::GetBathymetries() const
+{
+ return GetReferenceObjects( DataTag_Bathymetry );
+}
+
+void HYDROData_Domain::RemoveBathymetries()
+{
+ ClearReferenceObjects( DataTag_Bathymetry );
+}
--- /dev/null
+
+#ifndef HYDROData_Domain_HeaderFile
+#define HYDROData_Domain_HeaderFile
+
+#include <HYDROData_Object.h>
+
+#include <QPointF>
+#include <QList>
+
+class Handle(HYDROData_Bathymetry);
+
+DEFINE_STANDARD_HANDLE(HYDROData_Domain, HYDROData_Object)
+
+
+/**\class HYDROData_Domain
+ * \brief Class that stores/retreives information about the 2d surface.
+ */
+class HYDROData_Domain : public HYDROData_Object
+{
+
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_Bathymetry, ///< reference bathymetries
+ DataTag_FillingColor, ///< filling color of zone
+ DataTag_BorderColor, ///< border color of zone
+ };
+
+public:
+ DEFINE_STANDARD_RTTI(HYDROData_Domain);
+
+ /**
+ * Returns the kind of this object. Must be redefined in all objects of known type.
+ */
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const = 0;
+
+ /**
+ * Dump object to Python script representation.
+ */
+ HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+
+
+ /**
+ * Returns default filling color for new zone.
+ */
+ HYDRODATA_EXPORT static QColor DefaultFillingColor();
+
+ /**
+ * Sets filling color for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
+
+ /**
+ * Returns filling color of zone.
+ */
+ HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
+
+
+ /**
+ * Returns default border color for new zone.
+ */
+ HYDRODATA_EXPORT static QColor DefaultBorderColor();
+
+ /**
+ * Sets border color for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
+
+ /**
+ * Returns border color of zone.
+ */
+ HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
+
+
+ /**
+ * Returns number of bathymetry objects for zone.
+ */
+ HYDRODATA_EXPORT virtual int NbBathymetries() const;
+
+ /**
+ * Add reference bathymetry object for zone.
+ */
+ HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+ /**
+ * Change reference bathymetry object with given index for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetBathymetry( const int theIndex,
+ const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+ /**
+ * Returns reference bathymetry object of zone by it index.
+ */
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
+
+ /**
+ * Returns list of all reference bathymetry objects of zone.
+ */
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBathymetries() const;
+
+ /**
+ * Clear list of bathymetry objects of zone.
+ */
+ HYDRODATA_EXPORT virtual void RemoveBathymetries();
+
+ /**
+ * Returns data of object wrapped to QVariant.
+ * Reimplemented to wrap and return saved 2d polyline.
+ */
+ //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
+
+protected:
+
+ friend class HYDROData_Iterator;
+
+ /**
+ * Creates new object in the internal data structure. Use higher level objects
+ * to create objects with real content.
+ */
+ HYDROData_Domain();
+
+ /**
+ * Destructs properties of the object and object itself, removes it from the document.
+ */
+ ~HYDROData_Domain();
+
+ /**
+ * Returns id for creation of object in python scripting.
+ */
+ virtual QString getPythonKindId() const = 0;
+};
+
+#endif
#include <HYDROData_Bathymetry.h>
#include <HYDROData_Calculation.h>
#include <HYDROData_Zone.h>
+#include <HYDROData_Region.h>
#include <TDataStd_Name.hxx>
#include <NCollection_DataMap.hxx>
case KIND_ZONE:
aResult = new HYDROData_Zone();
break;
+ case KIND_REGION:
+ aResult = new HYDROData_Region();
+ break;
}
if ( !aResult.IsNull() )
const ObjectKind KIND_PROFILES_GROUP = 7;
const ObjectKind KIND_GUIDE_LINE = 8;
const ObjectKind KIND_ZONE = 9;
-const ObjectKind KIND_LAST = KIND_ZONE;
+const ObjectKind KIND_REGION = 10;
+const ObjectKind KIND_LAST = KIND_REGION;
DEFINE_STANDARD_HANDLE(HYDROData_Object, MMgt_TShared)
--- /dev/null
+
+#include "HYDROData_Region.h"
+
+#include <QString>
+
+#define PYTHON_REGION_ID "KIND_REGION"
+
+
+IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Domain)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Domain)
+
+
+HYDROData_Region::HYDROData_Region()
+{
+}
+
+HYDROData_Region::~HYDROData_Region()
+{
+}
+
+QString HYDROData_Region::getPythonKindId() const
+{
+ return QString( PYTHON_REGION_ID );
+}
+
+
+
--- /dev/null
+
+#ifndef HYDROData_Region_HeaderFile
+#define HYDROData_Region_HeaderFile
+
+#include <HYDROData_Domain.h>
+
+
+DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Domain)
+
+
+/**\class HYDROData_Domain
+ * \brief Class that stores/retreives information about the 2d surface.
+ */
+class HYDROData_Region : public HYDROData_Domain
+{
+
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_Domain::DataTag_First + 100, ///< first tag, to reserve
+ };
+
+public:
+ DEFINE_STANDARD_RTTI(HYDROData_Region);
+
+ /**
+ * Returns the kind of this object. Must be redefined in all objects of known type.
+ */
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; }
+
+protected:
+
+ friend class HYDROData_Iterator;
+
+ /**
+ * Creates new object in the internal data structure. Use higher level objects
+ * to create objects with real content.
+ */
+ HYDROData_Region();
+
+ /**
+ * Destructs properties of the object and object itself, removes it from the document.
+ */
+ ~HYDROData_Region();
+
+ /**
+ * Returns id for creation of object in python scripting.
+ */
+ virtual QString getPythonKindId() const;
+};
+
+#endif
#define PYTHON_ZONE_ID "KIND_ZONE"
-IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Object)
-IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Object)
+IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Domain)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Domain)
HYDROData_Zone::HYDROData_Zone()
{
QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList;
-
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
- if ( aDocument.IsNull() )
+ QStringList aResList = HYDROData_Domain::DumpToPython( theTreatedObjects );
+ if ( aResList.isEmpty() )
return aResList;
- QString aDocName = aDocument->GetDocPyName();
- QString aZoneName = GetName();
-
- aResList << QString( "%1 = %2.CreateObject( %3 );" )
- .arg( aZoneName ).arg( aDocName ).arg( PYTHON_ZONE_ID );
- aResList << QString( "%1.SetName( \"%2\" );" )
- .arg( aZoneName ).arg( aZoneName );
- aResList << QString( "" );
-
- QColor aFillingColor = GetFillingColor();
- aResList << QString( "filling_color = QColor( %1, %2, %3, %4 );" )
- .arg( aFillingColor.red() ).arg( aFillingColor.green() )
- .arg( aFillingColor.blue() ).arg( aFillingColor.alpha() );
- aResList << QString( "%1.SetFillingColor( filling_color );" ).arg( aZoneName );
- aResList << QString( "" );
-
- QColor aBorderColor = GetBorderColor();
- aResList << QString( "border_color = QColor( %1, %2, %3, %4 );" )
- .arg( aBorderColor.red() ).arg( aBorderColor.green() )
- .arg( aBorderColor.blue() ).arg( aBorderColor.alpha() );
- aResList << QString( "%1.SetBorderColor( border_color );" ).arg( aZoneName );
aResList << QString( "" );
Handle(HYDROData_Polyline) aRefPolyline = GetPolyline();
setPythonReferenceObject( theTreatedObjects, aResList, aRefPolyline, "SetPolyline" );
- aResList << QString( "" );
-
- HYDROData_SequenceOfObjects aZoneBaths = GetBathymetries();
- HYDROData_SequenceOfObjects::Iterator aBathsIter( aZoneBaths );
- for ( ; aBathsIter.More(); aBathsIter.Next() )
- {
- Handle(HYDROData_Bathymetry) aRefBath =
- Handle(HYDROData_Bathymetry)::DownCast( aBathsIter.Value() );
- if ( !aRefBath.IsNull() )
- setPythonReferenceObject( theTreatedObjects, aResList, aRefBath, "AddBathymetry" );
- }
return aResList;
}
-QColor HYDROData_Zone::DefaultFillingColor()
-{
- return QColor( Qt::green );
-}
-
-void HYDROData_Zone::SetFillingColor( const QColor& theColor )
-{
- return SetColor( theColor, DataTag_FillingColor );
-}
-
-QColor HYDROData_Zone::GetFillingColor() const
-{
- return GetColor( DefaultFillingColor(), DataTag_FillingColor );
-}
-
-QColor HYDROData_Zone::DefaultBorderColor()
-{
- return QColor( Qt::transparent );
-}
-
-void HYDROData_Zone::SetBorderColor( const QColor& theColor )
-{
- return SetColor( theColor, DataTag_BorderColor );
-}
-
-QColor HYDROData_Zone::GetBorderColor() const
-{
- return GetColor( DefaultBorderColor(), DataTag_BorderColor );
-}
-
void HYDROData_Zone::SetPolyline( const Handle(HYDROData_Polyline)& thePolyline )
{
SetReferenceObject( thePolyline, DataTag_Polyline );
ClearReferenceObjects( DataTag_Polyline );
}
-int HYDROData_Zone::NbBathymetries() const
-{
- return NbReferenceObjects( DataTag_Bathymetry );
-}
-
-void HYDROData_Zone::AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
-{
- AddReferenceObject( theBathymetry, DataTag_Bathymetry );
-}
-
-void HYDROData_Zone::SetBathymetry( const int theIndex,
- const Handle(HYDROData_Bathymetry)& theBathymetry )
-{
- SetReferenceObject( theBathymetry, DataTag_Bathymetry, theIndex );
-}
-
-Handle(HYDROData_Bathymetry) HYDROData_Zone::GetBathymetry( const int theIndex ) const
-{
- return Handle(HYDROData_Bathymetry)::DownCast(
- GetReferenceObject( DataTag_Bathymetry, theIndex ) );
-}
-
-HYDROData_SequenceOfObjects HYDROData_Zone::GetBathymetries() const
-{
- return GetReferenceObjects( DataTag_Bathymetry );
-}
-
-void HYDROData_Zone::RemoveBathymetries()
-{
- ClearReferenceObjects( DataTag_Bathymetry );
-}
-
QPainterPath HYDROData_Zone::GetPainterPath() const
{
QPainterPath aPath;
return aPath;
}
+QString HYDROData_Zone::getPythonKindId() const
+{
+ return QString( PYTHON_ZONE_ID );
+}
+
+
+
#ifndef HYDROData_Zone_HeaderFile
#define HYDROData_Zone_HeaderFile
-#include <HYDROData_Object.h>
+#include <HYDROData_Domain.h>
-#include <QPointF>
#include <QPainterPath>
-#include <QList>
-
-class Handle(HYDROData_Bathymetry);
class Handle(HYDROData_Polyline);
-DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Object)
+DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Domain)
/**\class HYDROData_Zone
* \brief Class that stores/retreives information about the 2d face.
*/
-class HYDROData_Zone : public HYDROData_Object
+class HYDROData_Zone : public HYDROData_Domain
{
protected:
*/
enum DataTag
{
- DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Bathymetry, ///< reference bathymetries
+ DataTag_First = HYDROData_Domain::DataTag_First + 100, ///< first tag, to reserve
DataTag_Polyline, ///< reference polyline
- DataTag_FillingColor, ///< filling color of zone
- DataTag_BorderColor, ///< border color of zone
};
public:
/**
* Returns the kind of this object. Must be redefined in all objects of known type.
*/
- HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_ZONE;}
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
/**
* Dump object to Python script representation.
HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
- /**
- * Returns default filling color for new zone.
- */
- HYDRODATA_EXPORT static QColor DefaultFillingColor();
-
- /**
- * Sets filling color for zone.
- */
- HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
-
- /**
- * Returns filling color of zone.
- */
- HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
-
-
- /**
- * Returns default border color for new zone.
- */
- HYDRODATA_EXPORT static QColor DefaultBorderColor();
-
- /**
- * Sets border color for zone.
- */
- HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
-
- /**
- * Returns border color of zone.
- */
- HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
-
-
/**
* Sets reference polyline object for zone.
*/
HYDRODATA_EXPORT virtual void RemovePolyline();
- /**
- * Returns number of bathymetry objects for zone.
- */
- HYDRODATA_EXPORT virtual int NbBathymetries() const;
-
- /**
- * Add reference bathymetry object for zone.
- */
- HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
-
- /**
- * Change reference bathymetry object with given index for zone.
- */
- HYDRODATA_EXPORT virtual void SetBathymetry( const int theIndex,
- const Handle(HYDROData_Bathymetry)& theBathymetry );
-
- /**
- * Returns reference bathymetry object of zone by it index.
- */
- HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
-
- /**
- * Returns list of all reference bathymetry objects of zone.
- */
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBathymetries() const;
-
- /**
- * Clear list of bathymetry objects of zone.
- */
- HYDRODATA_EXPORT virtual void RemoveBathymetries();
-
/**
* Returns data of object wrapped to QVariant.
* Reimplemented to wrap and return saved 2d polyline.
* Destructs properties of the object and object itself, removes it from the document.
*/
~HYDROData_Zone();
+
+ /**
+ * Returns id for creation of object in python scripting.
+ */
+ virtual QString getPythonKindId() const;
};
#endif