#include <TColStd_SequenceOfExtendedString.hxx>
+#define _STUDYID_ 1
+
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Application,TDocStd_Application)
static HYDROData_Application* TheApplication = new HYDROData_Application;
//function : GetDocument
//purpose :
//=======================================================================
-bool HYDROData_Application::GetDocumentId(const Handle(HYDROData_Document)& theDocument,
- int& theDocId) const
-{
- DataMapOfStudyIDDocument::Iterator aMapit( myDocuments );
- for ( ; aMapit.More(); aMapit.Next() )
- {
- if ( aMapit.Value() != theDocument )
- continue;
-
- theDocId = aMapit.Key();
- return true;
- }
-
- return false;
-}
-
-//=======================================================================
-//function : GetDocument
-//purpose :
-//=======================================================================
-Handle(HYDROData_Document) HYDROData_Application::GetDocument(int theStudyID) const
+Handle(HYDROData_Document) HYDROData_Application::GetDocument() const
{
- if (myDocuments.IsBound(theStudyID)) {
- return myDocuments.Find(theStudyID);
+ if (myDocuments.IsBound(_STUDYID_)) {
+ return myDocuments.Find(_STUDYID_);
}
// document not found => create the new one
return Handle(HYDROData_Document)();
//function : addDocument
//purpose :
//=======================================================================
-void HYDROData_Application::AddDocument(int theStudyID, const Handle(HYDROData_Document)& theDocument)
+void HYDROData_Application::AddDocument(const Handle(HYDROData_Document)& theDocument)
{
- myDocuments.Bind(theStudyID, theDocument);
+ myDocuments.Bind(_STUDYID_, theDocument);
}
//=======================================================================
DEFINE_STANDARD_RTTIEXT(HYDROData_Application, TDocStd_Application)
private:
- //! Returns document by its study ID, if document doesn't exists return null
- Handle(HYDROData_Document) GetDocument(int theStudyID) const;
-
- //! Get study id by document instance, if document doesn't exists return false
- bool GetDocumentId(const Handle(HYDROData_Document)& theDocument,
- int& theDocId) const;
+ //! Returns document, if document doesn't exists return null
+ Handle(HYDROData_Document) GetDocument() const;
//! Appends document to the application
- void AddDocument(int theStudyID, const Handle(HYDROData_Document)& theDocument);
+ void AddDocument(const Handle(HYDROData_Document)& theDocument);
//! Removes document from the application
void RemoveDocument( const Handle(HYDROData_Document)& theDocument );
return aNewGroup;
}
-QString HYDROData_CalculationCase::Export( int theStudyId ) const
+QString HYDROData_CalculationCase::Export() const
{
#ifdef LIGHT_MODE
return "";
#else
GEOM::GEOM_Gen_var aGEOMEngine = HYDROData_GeomTool::GetGeomGen();
- SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( theStudyId );
QString aGeomObjEntry, anErrorMsg;
QString statMess;
- bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg, statMess );
+ bool isOK = Export( aGEOMEngine, aGeomObjEntry, anErrorMsg, statMess );
return isOK ? aGeomObjEntry : QString();
#endif
}
#ifndef LIGHT_MODE
bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
QString& theGeomObjEntry,
QString& theErrorMsg,
QString& statMess) const
} else if ( isAllNotSubmersible ) {
theErrorMsg = QString("there are no submersible regions.");
} else {
- aRes = Export( theGeomEngine, theStudy, aShToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
+ aRes = Export( theGeomEngine, aShToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
}
if( aRes && !GetLandCoverMap().IsNull() && !GetStricklerTable().IsNull() )
}
bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aShToName,
const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
QString& theGeomObjEntry ) const
#endif // Publish the sewed shape
QString aName = EXPORT_NAME;
GEOM::GEOM_Object_ptr aMainShape =
- HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( theGeomEngine, theStudy, aSewedShape, aFacesToNameModif, aName, theGeomObjEntry );
+ HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( theGeomEngine, aSewedShape, aFacesToNameModif, aName, theGeomObjEntry );
if ( aMainShape->_is_nil() )
return false;
if ( !aGroupsData.IsEmpty() )
{
GEOM::GEOM_IGroupOperations_var aGroupOp =
- theGeomEngine->GetIGroupOperations( theStudy->StudyId() );
+ theGeomEngine->GetIGroupOperations();
NCollection_DataMap< TCollection_AsciiString, NCollection_Sequence<int> >::Iterator aMapIt( aGroupsData );
for ( ; aMapIt.More(); aMapIt.Next() )
if ( aGroupOp->IsDone() )
{
SALOMEDS::SObject_var aGroupSO =
- theGeomEngine->AddInStudy( theStudy, aGeomGroup, aGroupName.ToCString(), aMainShape );
+ theGeomEngine->AddInStudy( aGeomGroup, aGroupName.ToCString(), aMainShape );
}
}
}
/**
* Exports the calculation case data (shell and groups) to GEOM module.
- * \param theStudyId the id of the study where the GEOM module should be used for export
* \return the entry of the GEOM object (empty string in the case of error)
*/
- HYDRODATA_EXPORT virtual QString Export( int theStudyId ) const;
+ HYDRODATA_EXPORT virtual QString Export() const;
/**
* Exports the calculation case data (shell and groups) to GEOM module.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
* \param theGeomObjEntry the published GEOM object entry
* \param theErrorMsg the error message
* \return true in case of success
*/
#ifndef LIGHT_MODE
HYDRODATA_EXPORT virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
QString& theGeomObjEntry,
QString& theErrorMsg,
QString& statMess) const;
/**
* Exports the given faces as shell and the given groups to GEOM module.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
* \param theFaces the list of faces to make shell
* \param theSplitGroups the list of groups
* \return true in case of success
*/
#ifndef LIGHT_MODE
bool Export( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aFacesToName,
const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
QString& theGeomObjEntry ) const;
typedef QMap<Standard_Integer, Handle(HYDROData_Entity)> MapOfOrdered;
typedef QMap<QString, Handle(HYDROData_Entity)> MapOfUnordered;
-Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID)
+Handle(HYDROData_Document) HYDROData_Document::Document()
{
Handle(HYDROData_Document) aResult =
- HYDROData_Application::GetApplication()->GetDocument(theStudyID);
+ HYDROData_Application::GetApplication()->GetDocument();
if (aResult.IsNull()) {
aResult = new HYDROData_Document();
- HYDROData_Application::GetApplication()->AddDocument(theStudyID, aResult);
+ HYDROData_Application::GetApplication()->AddDocument(aResult);
}
return aResult;
}
return aResDoc;
HYDROData_Application* anApp = HYDROData_Application::GetApplication();
-
- DataMapOfStudyIDDocument::Iterator aMapIt( anApp->myDocuments );
- for ( ; aMapIt.More(); aMapIt.Next() )
- {
- Handle(HYDROData_Document) anAppDoc = aMapIt.Value();
- if ( anAppDoc.IsNull() || anAppDoc->myDoc != anObjDoc )
- continue;
-
- aResDoc = anAppDoc;
- break;
- }
+ aResDoc = anApp->GetDocument();
return aResDoc;
}
-bool HYDROData_Document::HasDocument(const int theStudyID)
+bool HYDROData_Document::HasDocument()
{
Handle(HYDROData_Document) aResult =
- HYDROData_Application::GetApplication()->GetDocument(theStudyID);
+ HYDROData_Application::GetApplication()->GetDocument();
return !aResult.IsNull();
}
-bool HYDROData_Document::DocumentId(const Handle(HYDROData_Document)& theDocument,
- int& theDocId )
-{
- return HYDROData_Application::GetApplication()->GetDocumentId(theDocument, theDocId);
-}
-
-Data_DocError HYDROData_Document::Load(const char* theFileName, const int theStudyID)
+Data_DocError HYDROData_Document::Load(const char* theFileName)
{
Handle(TDocStd_Document) aResult;
TCollection_ExtendedString aPath ((const Standard_CString)theFileName);
{}
if (!aResult.IsNull()) {
aResult->SetUndoLimit(UNDO_LIMIT);
- HYDROData_Application::GetApplication()->AddDocument(theStudyID, new HYDROData_Document(aResult));
+ HYDROData_Application::GetApplication()->AddDocument(new HYDROData_Document(aResult));
}
// recognize error
Data_DocError anError;
{
QString aDocName = PYTHON_DOC_NAME;
- /*
- int aDocId = 1;
- if ( DocumentId( this, aDocId ) )
- aDocName += "_" + QString::number( aDocId );
- */
-
return aDocName;
}
// Append document in to the map of treated objects to prevent names overlaping
theTreatedObjects.insert( aDocName, this );
- int aDocId = 1;
- if ( !DocumentId( this, aDocId ) )
- aDocId = 1;
-
QStringList aResScript;
aResScript << QString( "from HYDROPy import *" );
DEFINE_STANDARD_RTTIEXT(HYDROData_Document, MMgt_TShared);
//! Returns the existing document or creates new if it is not exist
- HYDRODATA_EXPORT static Handle(HYDROData_Document) Document(const int theStudyID);
+ HYDRODATA_EXPORT static Handle(HYDROData_Document) Document();
//! Returns the document by object
HYDRODATA_EXPORT static Handle(HYDROData_Document) Document(
public:
//! Returns true if data model contains document for this study
- HYDRODATA_EXPORT static bool HasDocument(const int theStudyID);
+ HYDRODATA_EXPORT static bool HasDocument();
- //! Get study id by document instance, if document doesn't exists return false
- HYDRODATA_EXPORT static bool DocumentId( const Handle(HYDROData_Document)& theDocument,
- int& theDocId );
public:
//! Loads the OCAF document from the file.
//! \param theFileName full name of the file to load
- //! \param theStudyID identifier of the SALOME study to associate with loaded file
//! \returns error status (OK in case of success)
- HYDRODATA_EXPORT static Data_DocError Load(const char* theFileName, const int theStudyID);
+ HYDRODATA_EXPORT static Data_DocError Load(const char* theFileName);
//! Saves the OCAF document to the file.
//! \param theFileName full name of the file to store
static CORBA::ORB_var _ORB = CORBA::ORB_init( _argc, 0, "omniORB4"/*CORBA::ORB_ID*/ );
static SALOME_NamingService _NS( _ORB );
static SALOME_LifeCycleCORBA _LCC( &_NS );
+static SALOMEDS::Study_var _STUDY = SALOMEDS::Study::_nil();
-
-TopoDS_Shape HYDROData_GeomTool::GetShapeFromIOR( const int theStudyId, const QString& theIOR )
+TopoDS_Shape HYDROData_GeomTool::GetShapeFromIOR( const QString& theIOR )
{
// Note that GEOMBase::GetShape() cause crash in batch mode
return aGEOMEngine._retn();
}
-SALOMEDS::Study_var HYDROData_GeomTool::GetStudyByID( const int theStudyId )
+SALOMEDS::Study_var HYDROData_GeomTool::GetStudy()
{
- CORBA::Object_var aSMObject = _NS.Resolve("/myStudyManager");
- SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
- SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID( theStudyId );
-
- return aDSStudy._retn();
+ if (_STUDY->_is_nil())
+ {
+ CORBA::Object_var aStudyObject = _NS.Resolve("/Study");
+ _STUDY = SALOMEDS::Study::_narrow(aStudyObject);
+ }
+ return _STUDY._retn();
}
-QString HYDROData_GeomTool::GetFreeName( SALOMEDS::Study_ptr theStudy, const QString& theBaseName )
+QString HYDROData_GeomTool::GetFreeName( const QString& theBaseName )
{
QString aName = theBaseName;
+ SALOMEDS::Study_var theStudy = GetStudy();
if ( !theStudy->_is_nil() ) {
// collect all object names of GEOM component
QSet<QString> anUsedNames;
return aName;
}
-GEOM::GEOM_Object_ptr HYDROData_GeomTool::publishShapeInGEOM(
- GEOM::GEOM_Gen_var theGeomEngine, SALOMEDS::Study_ptr theStudy,
+GEOM::GEOM_Object_ptr HYDROData_GeomTool::publishShapeInGEOM(
+ GEOM::GEOM_Gen_var theGeomEngine,
const TopoDS_Shape& theShape, const QString& theName,
QString& theGeomObjEntry )
{
theGeomObjEntry = "";
GEOM::GEOM_Object_var aGeomObj;
- if ( theGeomEngine->_is_nil() || theStudy->_is_nil() ||
+ if ( theGeomEngine->_is_nil() ||
theShape.IsNull() ) {
return aGeomObj._retn();
}
SALOMEDS::TMPFile_var aSeqFile = new SALOMEDS::TMPFile( aSize, aSize, anOctetBuf, 1 );
// Restore shape from the stream and get the GEOM object
- GEOM::GEOM_IInsertOperations_var anInsOp = theGeomEngine->GetIInsertOperations( theStudy->StudyId() );
+ GEOM::GEOM_IInsertOperations_var anInsOp = theGeomEngine->GetIInsertOperations();
aGeomObj = anInsOp->RestoreShape( aSeqFile );
// Publish the GEOM object
- theGeomObjEntry = publishGEOMObject( theGeomEngine, theStudy, aGeomObj, theName );
+ theGeomObjEntry = publishGEOMObject( theGeomEngine, aGeomObj, theName );
return aGeomObj._retn();
}
GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const TopoDS_Shape& theShape,
const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aFacesToNameModif,
const QString& theName,
QString& theGeomObjEntry)
{
- GEOM::GEOM_Object_ptr aGeomObj = HYDROData_GeomTool::publishShapeInGEOM( theGeomEngine, theStudy, theShape, theName, theGeomObjEntry );
+ GEOM::GEOM_Object_ptr aGeomObj = HYDROData_GeomTool::publishShapeInGEOM( theGeomEngine, theShape, theName, theGeomObjEntry );
- GEOM::GEOM_IShapesOperations_var anExpOp = theGeomEngine->GetIShapesOperations( theStudy->StudyId() );
+ GEOM::GEOM_IShapesOperations_var anExpOp = theGeomEngine->GetIShapesOperations();
GEOM::ListOfGO* aFc = anExpOp->MakeExplode(aGeomObj, TopAbs_FACE, false);
TopTools_MapOfShape mapShape;
std::string name = Names[i].toStdString();
GEOM::GEOM_Object_ptr anObj = aFc->operator[](i);
//GEOMBase::PublishSubObject( anObj, name.c_str() );
- theGeomEngine->AddInStudy( theStudy, anObj, name.c_str(), aGeomObj );
+ theGeomEngine->AddInStudy( anObj, name.c_str(), aGeomObj );
}
return aGeomObj;
GEOM::GEOM_Object_ptr HYDROData_GeomTool::createFaceInGEOM( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const int theWidth,
const int theHeight,
const QString& theName,
theFaceEntry = "";
GEOM::GEOM_Object_var aGeomObj;
- if ( theGeomEngine->_is_nil() || theStudy->_is_nil() ) {
+ if ( theGeomEngine->_is_nil() ) {
return aGeomObj._retn();
}
- GEOM::GEOM_IBasicOperations_var aBasicOperations = theGeomEngine->GetIBasicOperations( theStudy->StudyId() );
- GEOM::GEOM_IBlocksOperations_var aBlocksOperations = theGeomEngine->GetIBlocksOperations( theStudy->StudyId() );
+ GEOM::GEOM_IBasicOperations_var aBasicOperations = theGeomEngine->GetIBasicOperations();
+ GEOM::GEOM_IBlocksOperations_var aBlocksOperations = theGeomEngine->GetIBlocksOperations();
GEOM::GEOM_Object_var P1 = aBasicOperations->MakePointXYZ( -0.5 * theWidth, -0.5 * theHeight, 0 );
GEOM::GEOM_Object_var P2 = aBasicOperations->MakePointXYZ( 0.5 * theWidth, -0.5 * theHeight, 0 );
GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices( P1, P2 ,P3, P4 );
// Publish the face
- theFaceEntry = publishGEOMObject( theGeomEngine, theStudy, aFace, theName );
+ theFaceEntry = publishGEOMObject( theGeomEngine, aFace, theName );
return aFace._retn();
}
QString HYDROData_GeomTool::publishGEOMObject( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
GEOM::GEOM_Object_ptr theGeomObj,
const QString& theName )
{
QString anEntry;
if ( !theGeomObj->_is_nil() ) {
- QString aName = HYDROData_GeomTool::GetFreeName( theStudy, theName );
+ QString aName = HYDROData_GeomTool::GetFreeName( theName );
SALOMEDS::SObject_var aResultSO =
- theGeomEngine->PublishInStudy( theStudy, SALOMEDS::SObject::_nil(),
+ theGeomEngine->PublishInStudy( SALOMEDS::SObject::_nil(),
theGeomObj, qPrintable( aName ) );
if ( !aResultSO->_is_nil() ) {
anEntry = aResultSO->GetID();
/**
* \brief Get shape by the specified IOR.
* \param theIOR the GEOM object IOR
- * \param theStudyId the study ID
* \return the shape
*/
- static TopoDS_Shape GetShapeFromIOR( const int theStudyId, const QString& theIOR );
+ static TopoDS_Shape GetShapeFromIOR( const QString& theIOR );
/**
* \brief Get GEOM engine.
static GEOM::GEOM_Gen_var GetGeomGen();
/**
- * \brief Get shape by the specified study ID.
- * \param theStudyId the study ID
+ * \brief Get Study.
* \return the study
*/
- static SALOMEDS::Study_var GetStudyByID( const int theStudyId );
+ static SALOMEDS::Study_var GetStudy();
/**
* \brief Get free name for GEOM object.
- * \param theStudy the study
* \param theBaseName the base name
* \return the default name
*/
- static QString GetFreeName( SALOMEDS::Study_ptr theStudy, const QString& theBaseName );
+ static QString GetFreeName( const QString& theBaseName );
/**
* Publish the given shape in GEOM as a GEOM object.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, used for publishing of the shape
* \param theShape the shape to publish as a GEOM object
* \param theName the name of the published object
* \param theGeomObjEntry the entry of the published object
* \return the published GEOM object
*/
static GEOM::GEOM_Object_ptr publishShapeInGEOM( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const TopoDS_Shape& theShape,
const QString& theName,
QString& theGeomObjEntry );
/**
* Create and publish face in GEOM as a GEOM object.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, used for publishing of the face
* \param theWidth the face width
* \param theHeight the face height
* \param theName the name of the published face
* \return the published GEOM object
*/
static GEOM::GEOM_Object_ptr createFaceInGEOM( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const int theWidth,
const int theHeight,
const QString& theName,
/**
* Publish the given GEOM object in the study.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, used for publishing of the object
* \param theGeomObj the GEOM object
* \param theName the object name
* \return the entry of the published object (empty string in case of fail)
*/
static QString publishGEOMObject( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
GEOM::GEOM_Object_ptr theGeomObj,
const QString& theName );
static GEOM::GEOM_Object_ptr ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine,
- SALOMEDS::Study_ptr theStudy,
const TopoDS_Shape& theShape,
const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aShToNameModif,
const QString& theName,
QStringList aPolyList;
TopTools_SequenceOfShape aFaces;
//int aSHapeType = -1;
- int Stat = anImporter.ImportPolygons(HYDROData_Document::Document(1), theSHPFileName, aPolyList, aFaces);
+ int Stat = anImporter.ImportPolygons(HYDROData_Document::Document(), theSHPFileName, aPolyList, aFaces);
//
if (Stat != 1)
return false;
{
HYDROData_ShapeFile anExporter;
QStringList aList;
- anExporter.Export(HYDROData_Document::Document(1), theSHPFileName, this, aList, bUseDiscr, theDefl );
+ anExporter.Export(HYDROData_Document::Document(), theSHPFileName, this, aList, bUseDiscr, theDefl );
if (aList.empty())
return true;
else
return aRes;
}
- int aDocId = -1;
- if ( !HYDROData_Document::DocumentId( HYDROData_Document::Document( myLab ), aDocId ) || aDocId < 0 ) {
- return aRes;
- }
-
// TopoDS_Shape aShape = GEOMBase::GetShapeFromIOR( theIOR.ToCString() );
- TopoDS_Shape aShape = HYDROData_GeomTool::GetShapeFromIOR( aDocId, theIOR.ToCString() );
+ TopoDS_Shape aShape = HYDROData_GeomTool::GetShapeFromIOR( theIOR.ToCString() );
if ( !aShape.IsNull() ) {
SetShape3D( aShape );
{
TCollection_AsciiString aRes;
- int aDocId = -1;
- if ( !HYDROData_Document::DocumentId( HYDROData_Document::Document( myLab ), aDocId ) || aDocId < 0 ) {
- return aRes;
- }
-
#ifndef LIGHT_MODE
- SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
+ SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudy();
if ( !aDSStudy->_is_nil() ) {
TCollection_AsciiString anEntry = GetGeomObjectEntry();
try
{
- res = HYDROData_Document::Load( (char*)aDataFullPath.toLatin1().constData(), aStudyId );
+ res = HYDROData_Document::Load( (char*)aDataFullPath.toLatin1().constData() );
}
catch(...)
{
int aStudyId = theStudy->id();
LightApp_Study* aStudy = ::qobject_cast<LightApp_Study*>( theStudy );
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() || !aStudy )
return false;
// create a new root object
CAM_DataObject* aNewRootObj = new CAM_DataObject();
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theStudyId );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if( aDocument.IsNull() )
return;
Handle(HYDROData_Document) HYDROGUI_DataModel::getDocument() const
{
int aStudyId = module()->application()->activeStudy()->id();
- return HYDROData_Document::Document( aStudyId );
+ return HYDROData_Document::Document();
}
LightApp_DataObject* HYDROGUI_DataModel::createObject( SUIT_DataObject* theParent,
myStatMess.clear();
QString anErrorMsg;
if ( aStudy ) {
- SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
QString anEntry;
- if ( aCalculation->Export( aGeomEngine, aDSStudy, anEntry, theErrorMsg, myStatMess ) ) {
+ if ( aCalculation->Export( aGeomEngine, anEntry, theErrorMsg, myStatMess ) ) {
theUpdateFlags = UF_ObjBrowser;
isOk = true;
}
{
QStringList aNonExpList;
HYDROData_ShapeFile anExporter;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
if (!aPolyXYSeq.IsEmpty() || !aPoly3DSeq.IsEmpty())
//Export polylines
anExporter.Export(aDoc, aFileName, aPolyXYSeq, aPoly3DSeq, aNonExpList);
if ( !aPanel->getFileName().isEmpty() )
anObjName = aPanel->getObjectName();
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
//check if name of LCM is already exists
QSet<QString> aNameList;
//Collect all strickler_types
QSet<QString> aSTSet;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) DefStricklerTableObj;
if ( aDoc )
{
SalomeApp_Study* aStudy =
dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() );
if ( aStudy ) {
- SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
+ SALOMEDS::Study_var aDSStudy = GeometryGUI::getStudyServant();
GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
if ( !aGeomEngine->_is_nil() && !aGeomEngine->_is_nil() ) {
SALOMEDS::StudyBuilder_var aStudyBuilder = aDSStudy->NewBuilder();
if ( theSection == "preferences" && thePref == "default_strickler_coefficient" )
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
if ( resMgr && !aDoc.IsNull() )
aDoc->SetDefaultStricklerCoefficient( resMgr->doubleValue( theSection, thePref, 0 ) );
}
if ( aDesktop && aDesktop->statusBar() )
{
gp_Pnt aWPnt( X, Y, Z );
- int aStudyId = application()->activeStudy()->id();
- HYDROData_Document::Document( aStudyId )->Transform( aWPnt, false );
+ HYDROData_Document::Document()->Transform( aWPnt, false );
double WX = aWPnt.X(), WY = aWPnt.Y();
QString aXStr = HYDROGUI_Tool::GetCoordinateString( X, true );
return;
// Get the document
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( module()->getStudyId() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
if ( !aDoc )
return;
QStringList HYDROGUI_ObjComboBox::objectNames( HYDROData_SequenceOfObjects& theObjects ) const
{
QStringList aNames;
- for ( HYDROData_Iterator it( HYDROData_Document::Document( module()->getStudyId() ), objectType() ); it.More(); it.Next() )
+ for ( HYDROData_Iterator it( HYDROData_Document::Document(), objectType() ); it.More(); it.Next() )
{
if ( !objectFilter() || objectFilter()->isOk( it.Current() ) )
{
Handle(HYDROData_Document) HYDROGUI_Operation::doc() const
{
- return HYDROData_Document::Document( myModule->getStudyId() );
+ return HYDROData_Document::Document();
}
void HYDROGUI_Operation::onApplyAndClose()
void HYDROGUI_Module::enableLCMActions()
{
- HYDROData_Iterator anIt( HYDROData_Document::Document( getStudyId() ), KIND_LAND_COVER_MAP );
+ HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_LAND_COVER_MAP );
bool anEnableTools = anIt.More();
QtxListAction* anAction;
// Export the selected image to GEOM module
if ( aStudy && aViewMgr ) {
- SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
QString aGeomPictureEntry;
- HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aDSStudy, aQImage.width(), aQImage.height(),
+ HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aQImage.width(), aQImage.height(),
anImageName, aGeomPictureEntry );
if ( !aGeomPictureEntry.isEmpty() ) {
if ( myModule )
{
// Construct a list of unique names of all Strickler types defined within the data model
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myModule->getStudyId() );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
if ( aDoc )
{
QStringList aStricklerTypes;
void HYDROGUI_Tool::GetPrsSubObjects( HYDROGUI_Module* theModule,
HYDROData_SequenceOfObjects& theSeq )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if( !aDocument.IsNull() )
{
HYDROData_Iterator anIterator( aDocument );
HYDROData_SequenceOfObjects HYDROGUI_Tool::GetGeometryObjects( HYDROGUI_Module* theModule )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
HYDROData_SequenceOfObjects aResSeq;
{
Handle(HYDROData_Entity) aResObj;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( !aDocument.IsNull() )
aResObj = aDocument->FindObjectByName( theName, theObjectKind );
{
HYDROData_SequenceOfObjects aResSeq;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( !aDocument.IsNull() )
aResSeq = aDocument->FindObjectsByNames( theNames, theObjectKind );
const QStringList& theUsedNames,
const bool theIsTryToUsePurePrefix)
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
return HYDROData_Tool::GenerateObjectName( aDocument, thePrefix, theUsedNames, theIsTryToUsePurePrefix );
}
QColor HYDROGUI_Tool::GenerateFillingColor( HYDROGUI_Module* theModule,
const QStringList& theZoneNames )
{
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
return GenerateFillingColor( aDocument, theZoneNames );
}
/**
* Exports the calculation case data (shell and groups) to GEOM module.
* \param theGeomEngine GEOM module engine
- * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
* \return true in case of success
*/
-//TODO: virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine,
-// SALOMEDS::Study_ptr theStudy );
+//TODO: virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine );
- QString Export( int theStudyId ) const;
+ QString Export( ) const;
public:
// Public methods to work with Calculation services
public:
//! Returns the existing document or creates new if it is not exist
- static HYDROData_Document Document( const int theStudyID ) [opencascade::handle<HYDROData_Document> (const int)] ;
+ static HYDROData_Document Document() [opencascade::handle<HYDROData_Document> ()] ;
%MethodCode
Handle(HYDROData_Document) aDocument;
Py_BEGIN_ALLOW_THREADS
- aDocument = HYDROData_Document::Document( a0 );
+ aDocument = HYDROData_Document::Document();
Py_END_ALLOW_THREADS
if ( !aDocument.IsNull() )
%End
//! Returns true if data model contains document for this study
- static bool HasDocument( const int theStudyID );
+ static bool HasDocument();
//! Loads the OCAF document from the file.
//! \param theFileName full name of the file to load
- //! \param theStudyID identifier of the SALOME study to associate with loaded file
//! \returns error status (OK in case of success)
- static Data_DocError Load( const char* theFileName, const int theStudyID );
+ static Data_DocError Load( const char* theFileName);
//! Saves the OCAF document to the file.
//! \param theFileName full name of the file to store
void test_Dependencies::test_dependencies_broad_cast()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Bathymetry) aBath =
Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
void test_Dependencies::test_calc_case_ref_objects()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_ImmersibleZone) aZone =
Handle(HYDROData_ImmersibleZone)::DownCast( aDoc->CreateObject( KIND_IMMERSIBLE_ZONE ) );
void test_HYDROData_Bathymetry::testFileImport()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Bathymetry) aBathymetry =
Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
void test_HYDROData_Bathymetry::testCopy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Bathymetry) aBathymetry1 =
Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
{
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/test_boundary_polygon_calc_case_1.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
//Calc case already contains already contains 4 boundary poltgons (3 cut, 1 include)
//Update it to recalculate the shape groups
Handle(HYDROData_CalculationCase) aCase =
{
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/test_boundary_polygon_calc_case_2.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
//add boundary polygons to case_1
Handle(HYDROData_CalculationCase) aCase =
Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
{
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/study_cc_1.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_CalculationCase) aCase =
Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
{
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/study_cc_2.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_CalculationCase) aCase =
Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
void test_HYDROData_Channel::test_channel_prs_refs_751()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) Polyline_2 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_DTM::test_creation()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_DTM) DTM =
Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
void test_HYDROData_DTM::test_hydraulic_axis()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile1 =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_profile_conversion_to_2d()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile1 =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_profile_properties()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_profile_discretization_polyline()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_profile_discretization_spline()
{
-Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_curve_to_3d()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile1 =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
void test_HYDROData_DTM::test_presentation()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_DTM) DTM = Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
void test_HYDROData_DTM::test_garonne()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/Profiles.xyz";
{
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/pb_1066.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_CalculationCase) aCase =
Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
// temporarly created file name (in the current directory)
const char* aTestFile = "TestDoc.cbf";
// save
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
CPPUNIT_ASSERT(!aDoc.IsNull());
// keep some saved information to check after retreive
aDoc->NewID();
Data_DocError aStatus = aDoc->Save(aTestFile);
CPPUNIT_ASSERT(aStatus == DocError_OK);
aDoc->Close();
- CPPUNIT_ASSERT(!HYDROData_Document::HasDocument(1));
+ CPPUNIT_ASSERT(!HYDROData_Document::HasDocument());
// open
- aStatus = HYDROData_Document::Load(aTestFile, 2);
+ aStatus = HYDROData_Document::Load(aTestFile);
CPPUNIT_ASSERT(aStatus == DocError_OK);
- CPPUNIT_ASSERT(HYDROData_Document::HasDocument(2));
- aDoc = HYDROData_Document::Document(2);
+ CPPUNIT_ASSERT(HYDROData_Document::HasDocument());
+ aDoc = HYDROData_Document::Document();
CPPUNIT_ASSERT(!aDoc.IsNull());
// check that retreived correctly
CPPUNIT_ASSERT(aDoc->NewID() == anID + 1);
void test_HYDROData_Document::testOperations()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
CPPUNIT_ASSERT(!aDoc.IsNull());
CPPUNIT_ASSERT(!aDoc->IsOperation());
CPPUNIT_ASSERT(!aDoc->IsModified());
void test_HYDROData_Document::testUndoRedo()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
CPPUNIT_ASSERT(!aDoc.IsNull());
CPPUNIT_ASSERT(!aDoc->CanUndo());
CPPUNIT_ASSERT(!aDoc->CanRedo());
void test_HYDROData_Entity::testName()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
static const QString aName("test_name");
void test_HYDROData_Entity::testRemove()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
CPPUNIT_ASSERT(!anObj->IsRemoved());
void test_HYDROData_Entity::testCopy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
static const QString aName("test_name");
void test_HYDROData_Entity::testPythonNameChoice()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
void test_HYDROData_Image::testQImage()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Image) anImage =
Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
void test_HYDROData_Image::testTrsf()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Image) anImage =
Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
void test_HYDROData_Image::testReferences()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Image) anImage1 =
Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
void test_HYDROData_Image::testCopy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Image) anImage1 =
Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
QString refECWPath = REF_DATA_PATH + "/01-2009-0865-6525-LA93.ecw";
QString refPNGPath = REF_DATA_PATH + "/01-2009-0865-6525-LA93.png";
//
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Image) ecwHImage = Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
//
CPPUNIT_ASSERT (ecwHImage->LoadImageECW(refECWPath));
{
static const QString aName1("test_name1");
static const QString aName2("test_name2");
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // image object
anObj->SetName(aName1);
{
static const QString aName1("test_name1");
static const QString aName2("test_name2");
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // image object
anObj->SetName(aName1);
void test_HYDROData_LandCoverMap::test_add_2_objects()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_split()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_incomplete_split()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_merge()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_merge_refs_691()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) Polyline_4 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_LandCoverMap::test_remove()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_import_dbf()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
#include <QTest>
void test_HYDROData_LandCoverMap::test_land_cover_prs_by_types()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_LandCoverMap::test_land_cover_prs_by_coeff()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_LandCoverMap::test_dump_python()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_LandCoverMap::test_transparent_prs()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_LandCoverMap::test_add_triangles()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) Polyline_1 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_LandCoverMap::test_assign_to_calc_case()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
{
//TestViewer::eraseAll(true);
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aFileName = REF_DATA_PATH + "/cyprus_natural.shp";
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
void test_HYDROData_LandCoverMap::test_shp_import_clc_dec()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
void test_HYDROData_LandCoverMap::test_shp_import_nld_areas()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aFileName = REF_DATA_PATH + "/NLD_water_areas_dcw.shp";
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
{
//DEBTRACE("aFFileName: " << aFFileName.toStdString());
//DEBTRACE("aSFileName: " << aSFileName.toStdString());
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
TopTools_SequenceOfShape PolygonFaces;
aDoc->Close();
}
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
TopTools_SequenceOfShape PolygonFaces;
void test_HYDROData_LandCoverMap::test_add_2_section_poly()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) Polyline_12 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_LandCoverMap::test_split_2()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) Polyline_1 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_LandCoverMap::test_export_telemac()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_LandCoverMap::test_copy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_LandCoverMap) aMap =
Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
void test_HYDROData_LandCoverMap::test_shp_clc_classification_perf()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
void test_HYDROData_LandCoverMap::test_shp_clc_classification_check()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
HYDROData_ShapeFile anImporter;
QStringList PolygonList;
void test_HYDROData_LandCoverMap::test_lcm_classification()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_OperationsFactory::testCreate()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
CPPUNIT_ASSERT(aFactory);
void test_HYDROData_OperationsFactory::testCrop()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
// prepare the original image and crop-path
void test_HYDROData_PolylineXY::test_polyline()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline =
Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
void test_HYDROData_PolylineXY::test_copy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline1 =
Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
void test_HYDROData_PolylineXY::test_split_refs_624()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_extraction_immersible_zone()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_extraction_channel_refs_611()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline2d =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_presentation()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline2d =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_split_refs_627()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_custom_polylines()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline1 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_merge_refs_630()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline1 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_split_straight_refs_634()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_PolylineXY) aPolyline1 =
Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
void test_HYDROData_PolylineXY::test_import_from_xyz()
{
NCollection_Sequence<Handle(HYDROData_Entity)> ents;
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/profiles1.xyz";
void test_HYDROData_PolylineXY::test_import_from_sx()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/polylines_sx.sx";
void test_HYDROData_Profile::testFileImport()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
QString aParamFileName = TMP_DIR + QDir::separator() + "parametric.pa";
QString aGeorefFileName = TMP_DIR + QDir::separator() + "georef.pa";
void test_HYDROData_Profile::testCopy()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Profile) aProfile1 =
Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
{
std::string aPath = ( REF_DATA_PATH+"/profiles1.xyz" ).toStdString();
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString aFileName( aPath.c_str() );
NCollection_Sequence<int> aBadProfilesList;
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Stream) aStream =
Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Stream) aStream =
Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
TestViewer::eraseAll( true, true );
// Case 1. Without hydraulic axis
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_Stream) aStream1 =
Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/Profiles.xyz";
TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
fname += "/study_lism_1.cbf";
- CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+ CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROData_SequenceOfObjects profiles;
HYDROData_Iterator it( aDoc, KIND_PROFILE );
void test_HYDROData_StricklerTable::test_import()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_import_export_equivalence()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_type_by_attr()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_unique_attr_name()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable1 =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_colors_sync()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable1 =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_duplication_refs_613()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable1 =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_dump_python()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROData_StricklerTable::test_add_row_in_gui_refs_717()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
void test_HYDROGUI_BathymetryPrs::test_presentation()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_selection()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_text_presentation()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_rescale_default()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
{
TestViewer::eraseAll( true, true );
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
importTestBath( aDoc );
TestViewer::showColorScale( false );
void test_HYDROGUI_LandCoverMapDlg::test_objects_filtering_refs_707()
{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
HYDROGUI_LandCoverArgsFilter f( AddLandCoverId );
Handle(HYDROData_Document) GetDocument()
{
- return HYDROData_Document::Document( 0 );
+ return HYDROData_Document::Document();
}
HYDROGUI_ListModel::Object2VisibleList CreateTestObjects( int theObjCount )