#include <gp_XYZ.hxx>
#include <TDataStd_RealArray.hxx>
+#include <TDataStd_AsciiString.hxx>
#include <QFile>
#include <QFileInfo>
return aResAltitude;
}
+void HYDROData_Bathymetry::SetFilePath(const QString& theFilePath)
+{
+ TCollection_AsciiString anAsciiStr( theFilePath.toStdString().c_str() );
+ TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), anAsciiStr );
+}
+
+QString HYDROData_Bathymetry::GetFilePath() const
+{
+ QString aRes;
+
+ Handle(TDataStd_AsciiString) anAsciiStr;
+ if ( myLab.FindChild( DataTag_FilePath ).FindAttribute( TDataStd_AsciiString::GetID(), anAsciiStr ) )
+ aRes = QString( anAsciiStr->Get().ToCString() );
+
+ return aRes;
+}
+
bool HYDROData_Bathymetry::ImportFromFile( const QString& theFileName )
{
// Try to open the file
if ( aRes )
{
- // Update altitude points of this Bathymetry
+ // Update file path and altitude points of this Bathymetry
+ SetFilePath( theFileName );
SetAltitudePoints( aPoints );
}