From: mzn Date: Wed, 18 Dec 2013 12:57:07 +0000 (+0000) Subject: Feature #228: Import of polylines from GEOM. X-Git-Tag: BR_hydro_v_0_6~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a9ef3eeee0bcca20637a13af42af8d4918f5dd1;p=modules%2Fhydro.git Feature #228: Import of polylines from GEOM. Implementation of GUI part. --- diff --git a/src/HYDROGUI/CMakeLists.txt b/src/HYDROGUI/CMakeLists.txt index e7adb3cd..95163188 100644 --- a/src/HYDROGUI/CMakeLists.txt +++ b/src/HYDROGUI/CMakeLists.txt @@ -73,7 +73,7 @@ set(PROJECT_HEADERS HYDROGUI_ImportGeomObjectOp.h HYDROGUI_ImportObstacleFromFileOp.h HYDROGUI_ExportCalculationOp.h - HYDROGUI_ObstacleDlg.h + HYDROGUI_GeomObjectDlg.h HYDROGUI_SetColorOp.h HYDROGUI_ColorDlg.h HYDROGUI_ImportProfilesOp.h @@ -153,7 +153,7 @@ set(PROJECT_SOURCES HYDROGUI_ImportGeomObjectOp.cxx HYDROGUI_ImportObstacleFromFileOp.cxx HYDROGUI_ExportCalculationOp.cxx - HYDROGUI_ObstacleDlg.cxx + HYDROGUI_GeomObjectDlg.cxx HYDROGUI_SetColorOp.cxx HYDROGUI_ColorDlg.cxx HYDROGUI_ImportProfilesOp.cxx diff --git a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx index b9938829..344f8cad 100644 --- a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx @@ -22,7 +22,7 @@ #include "HYDROGUI_ImportGeomObjectOp.h" -#include "HYDROGUI_ObstacleDlg.h" +#include "HYDROGUI_GeomObjectDlg.h" #include "HYDROGUI_DataModel.h" #include "HYDROGUI_Module.h" @@ -30,6 +30,7 @@ #include "HYDROGUI_UpdateFlags.h" #include +#include #include #include @@ -46,7 +47,11 @@ HYDROGUI_ImportGeomObjectOp::HYDROGUI_ImportGeomObjectOp( HYDROGUI_Module* theMo myOpType ( theOpType ), myIsToShowPanel ( theIsToShowPanel ) { - setName( tr( "IMPORT_GEOM_OBJECT" ) ); + if ( myOpType == ImportSelectedAsPolyline ) { + setName( tr( "IMPORT_GEOM_OBJECT_AS_POLYLINE" ) ); + } else { + setName( tr( "IMPORT_GEOM_OBJECT_AS_OBSTACLE" ) ); + } } HYDROGUI_ImportGeomObjectOp::~HYDROGUI_ImportGeomObjectOp() @@ -59,17 +64,21 @@ void HYDROGUI_ImportGeomObjectOp::startOperation() // Get GEOM objects to import myGeomObjects.clear(); - if ( myOpType == ImportCreated ) { + if ( myOpType == ImportCreatedAsObstacle ) { myGeomObjects = module()->GetGeomObjectsToImport(); - } else if ( myOpType == ImportSelected ) { - myGeomObjects = HYDROGUI_Tool::GetSelectedGeomObjects( module() ); + } else if ( myOpType == ImportSelectedAsObstacle ) { + myGeomObjects = + HYDROGUI_Tool::GetSelectedGeomObjects( module(), getObstacleTypes() ); + } else if ( myOpType == ImportSelectedAsPolyline ) { + myGeomObjects = + HYDROGUI_Tool::GetSelectedGeomObjects( module(), getPolylineTypes() ); } - HYDROGUI_ObstacleDlg* aPanel = 0; + HYDROGUI_GeomObjectDlg* aPanel = 0; if ( myGeomObjects.count() == 1 ) { // Get panel - aPanel = ::qobject_cast( inputPanel() ); + aPanel = ::qobject_cast( inputPanel() ); if ( aPanel ) { // Reset the panel state @@ -86,11 +95,16 @@ void HYDROGUI_ImportGeomObjectOp::startOperation() } } - // Pass the existing obstacle names to the panel - QStringList anObstacles = - HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_OBSTACLE ); + // Pass the existing object names to the panel + QStringList anExistingNames; + if ( myOpType == ImportCreatedAsObstacle || + myOpType == ImportSelectedAsObstacle ) { + anExistingNames = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_OBSTACLE ); + } else if ( myOpType == ImportSelectedAsPolyline ) { + anExistingNames = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_POLYLINEXY ); + } - aPanel->setObstacleNames( anObstacles ); + aPanel->setObjectNames( anExistingNames ); } } @@ -119,34 +133,35 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags, return false; } - QString anObstacleName; - Handle(HYDROData_Obstacle) anObstacleToEdit; + QString anObjectName; + Handle(HYDROData_Entity) anObjectToEdit; + ObjectKind anObjectKind = + myOpType == ImportSelectedAsPolyline ? KIND_POLYLINEXY : KIND_OBSTACLE; if ( myGeomObjects.count() == 1 ) { // Get panel - HYDROGUI_ObstacleDlg* aPanel = ::qobject_cast( inputPanel() ); + HYDROGUI_GeomObjectDlg* aPanel = ::qobject_cast( inputPanel() ); if ( aPanel ) { - // Check obstacle name - anObstacleName = aPanel->getObstacleName().simplified(); - if ( anObstacleName.isEmpty() ) { + // Check object name + anObjectName = aPanel->getObjectName().simplified(); + if ( anObjectName.isEmpty() ) { theErrorMsg = tr( "INCORRECT_OBJECT_NAME" ); return false; } - // Get obstacle to edit - QString anEditedName = aPanel->getEditedObstacleName().simplified(); + // Get object to edit + QString anEditedName = aPanel->getEditedObjectName().simplified(); if ( !anEditedName.isEmpty() ) { - anObstacleToEdit = Handle(HYDROData_Obstacle)::DownCast( - HYDROGUI_Tool::FindObjectByName( module(), anEditedName, KIND_OBSTACLE ) ); + anObjectToEdit = HYDROGUI_Tool::FindObjectByName( module(), anEditedName, anObjectKind ); } } - if( anObstacleToEdit.IsNull() || anObstacleToEdit->GetName() != anObstacleName ) { + if( anObjectToEdit.IsNull() || anObjectToEdit->GetName() != anObjectName ) { // check that there are no other objects with the same name in the document - Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObstacleName ); + Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName/*, anObjectKind*/ ); if( !anObject.IsNull() ) { - theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObstacleName ); + theErrorMsg = tr( "OBJECT_EXISTS_IN_DOCUMENT" ).arg( anObjectName ); return false; } } @@ -154,45 +169,60 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags, bool anIsOk = false; - // Get the created object as SObject + // Get the GEOM object as SObject foreach ( const QString& anEntry, myGeomObjects ) { _PTR(SObject) aSObject( aStudy->studyDS()->FindObjectID( qPrintable(anEntry)) ); - if (aSObject) { + if ( aSObject ) { // Get the corresponding TopoDS_Shape TopoDS_Shape aShape = GEOMBase::GetShapeFromIOR( aSObject->GetIOR().c_str() ); - if ( !aShape.IsNull() ) { - // Create/edit an obstacle object - Handle(HYDROData_Obstacle) anObstacle; + if ( aShape.IsNull() ) { + continue; + } + + // Create/edit an object + Handle(HYDROData_Entity) anObject; - if ( anObstacleToEdit.IsNull() ) { - anObstacle = + if ( anObjectToEdit.IsNull() ) { + if ( myOpType == ImportCreatedAsObstacle || myOpType == ImportSelectedAsObstacle ) { + anObject = Handle(HYDROData_Obstacle)::DownCast( doc()->CreateObject(KIND_OBSTACLE) ); - + Handle(HYDROData_Obstacle) anObstacle = Handle(HYDROData_Obstacle)::DownCast( anObject ); anObstacle->SetFillingColor( HYDROData_Obstacle::DefaultFillingColor() ); anObstacle->SetBorderColor( HYDROData_Obstacle::DefaultBorderColor() ); - } else { - anObstacle = anObstacleToEdit; + } else if ( myOpType == ImportSelectedAsPolyline ) { + anObject = + Handle(HYDROData_PolylineXY)::DownCast( doc()->CreateObject(KIND_POLYLINEXY) ); } + } else { + anObject = anObjectToEdit; + } - // Set name - if ( anObstacleName.isEmpty() ) { - QString aName = QString::fromStdString( aSObject->GetName() ); - anObstacleName = HYDROGUI_Tool::GenerateObjectName( - module(), aName, QStringList(), true ); - } - if ( anObstacle->GetName() != anObstacleName ) { - anObstacle->SetName( anObstacleName ); - } + // Set name + if ( anObjectName.isEmpty() ) { + QString aName = QString::fromStdString( aSObject->GetName() ); + anObjectName = HYDROGUI_Tool::GenerateObjectName( + module(), aName, QStringList(), true ); + } + if ( anObject->GetName() != anObjectName ) { + anObject->SetName( anObjectName ); + } - anObstacleName.clear(); + anObjectName.clear(); - // Set shape + // Set shape + if ( myOpType == ImportCreatedAsObstacle || myOpType == ImportSelectedAsObstacle ) { + Handle(HYDROData_Obstacle) anObstacle = Handle(HYDROData_Obstacle)::DownCast( anObject ); anObstacle->SetShape3D( aShape ); - - anObstacle->Update(); - - // Set operation status anIsOk = true; + } else if ( myOpType == ImportSelectedAsPolyline ) { + Handle(HYDROData_PolylineXY) aPolyline = Handle(HYDROData_PolylineXY)::DownCast( anObject ); + // TODO ISSUE #228: set the shape ("aShape") to the polyline + // anIsOk = aPolyline->setShape( aShape ); + } + + // Check operation status + if ( anIsOk ) { + anObject->Update(); theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced; } } @@ -205,8 +235,30 @@ HYDROGUI_InputPanel* HYDROGUI_ImportGeomObjectOp::createInputPanel() const { HYDROGUI_InputPanel* aPanel = 0; if ( myIsToShowPanel ) { - aPanel = new HYDROGUI_ObstacleDlg( module(), getName() ); + QString anObjectTypeName = + myOpType == ImportSelectedAsPolyline ? tr("DEFAULT_POLYLINE_NAME") : + tr("DEFAULT_OBSTACLE_NAME"); + aPanel = new HYDROGUI_GeomObjectDlg( module(), getName(), anObjectTypeName ); } return aPanel; +} + +QList HYDROGUI_ImportGeomObjectOp::getObstacleTypes() +{ + QList aTypes; + + aTypes << GEOM::COMPOUND << GEOM::COMPOUND << GEOM::SOLID << + GEOM::SHELL << GEOM::FACE << GEOM::SHAPE; + + return aTypes; +} + +QList HYDROGUI_ImportGeomObjectOp::getPolylineTypes() +{ + QList aTypes; + + aTypes << GEOM::WIRE << GEOM::EDGE; + + return aTypes; } \ No newline at end of file diff --git a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.h b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.h index 6888d34a..4b182584 100644 --- a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.h +++ b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.h @@ -27,6 +27,10 @@ #include +// IDL includes +#include +#include CORBA_SERVER_HEADER(GEOM_Gen) + class HYDROGUI_InputPanel; class HYDROGUI_ImportGeomObjectOp : public HYDROGUI_Operation @@ -34,7 +38,9 @@ class HYDROGUI_ImportGeomObjectOp : public HYDROGUI_Operation Q_OBJECT public: - enum OperationType { ImportCreated, ImportSelected }; + enum OperationType { ImportCreatedAsObstacle, + ImportSelectedAsObstacle, + ImportSelectedAsPolyline }; public: HYDROGUI_ImportGeomObjectOp( HYDROGUI_Module* theModule, @@ -42,6 +48,9 @@ public: const bool theIsToShowPanel = true ); virtual ~HYDROGUI_ImportGeomObjectOp(); + static QList getObstacleTypes(); + static QList getPolylineTypes(); + protected: virtual void startOperation(); virtual void abortOperation(); diff --git a/src/HYDROGUI/HYDROGUI_ImportObstacleFromFileOp.cxx b/src/HYDROGUI/HYDROGUI_ImportObstacleFromFileOp.cxx index 9735ef8a..d51c0985 100644 --- a/src/HYDROGUI/HYDROGUI_ImportObstacleFromFileOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportObstacleFromFileOp.cxx @@ -22,7 +22,7 @@ #include "HYDROGUI_ImportObstacleFromFileOp.h" -#include "HYDROGUI_ObstacleDlg.h" +#include "HYDROGUI_GeomObjectDlg.h" #include "HYDROGUI_DataModel.h" #include "HYDROGUI_Module.h" @@ -61,17 +61,17 @@ void HYDROGUI_ImportObstacleFromFileOp::startOperation() HYDROGUI_Operation::startOperation(); // Get panel - HYDROGUI_ObstacleDlg* aPanel = ::qobject_cast( inputPanel() ); + HYDROGUI_GeomObjectDlg* aPanel = ::qobject_cast( inputPanel() ); if ( aPanel ) { // Reset the panel state aPanel->reset(); // Pass the existing obstacle names to the panel - QStringList anObstacles = + QStringList anObstacleNames = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_OBSTACLE ); - aPanel->setObstacleNames( anObstacles ); + aPanel->setObjectNames( anObstacleNames ); } else { myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true ); myFileDlg->setWindowTitle( getName() ); @@ -105,12 +105,12 @@ bool HYDROGUI_ImportObstacleFromFileOp::processApply( int& theUpdateFlags, Handle(HYDROData_Obstacle) anObstacle; // Get panel - HYDROGUI_ObstacleDlg* aPanel = ::qobject_cast( inputPanel() ); + HYDROGUI_GeomObjectDlg* aPanel = ::qobject_cast( inputPanel() ); if ( aPanel ) { // Get file name and obstacle name defined by the user aFileName = aPanel->getFileName(); - QString anEditedName = aPanel->getEditedObstacleName().simplified(); + QString anEditedName = aPanel->getEditedObjectName().simplified(); // Get obstacle to edit if ( !anEditedName.isEmpty() ) { @@ -134,7 +134,7 @@ bool HYDROGUI_ImportObstacleFromFileOp::processApply( int& theUpdateFlags, } // Check obstacle name - anObstacleName = aPanel->getObstacleName().simplified(); + anObstacleName = aPanel->getObjectName().simplified(); if ( anObstacleName.isEmpty() ) { theErrorMsg = tr( "INCORRECT_OBJECT_NAME" ); return false; @@ -187,7 +187,8 @@ HYDROGUI_InputPanel* HYDROGUI_ImportObstacleFromFileOp::createInputPanel() const { HYDROGUI_InputPanel* aPanel = 0; if ( myIsToShowPanel ) { - aPanel = new HYDROGUI_ObstacleDlg( module(), getName(), true ); + aPanel = new HYDROGUI_GeomObjectDlg( module(), getName(), + tr( "DEFAULT_OBSTACLE_NAME" ), true ); } return aPanel; diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index 1ffbf5aa..81eabc1f 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -40,6 +40,7 @@ #include "HYDROGUI_AbstractDisplayer.h" #include "HYDROGUI_PolylineOp.h" #include "HYDROGUI_SetColorOp.h" +#include "HYDROGUI_ImportGeomObjectOp.h" #include #include @@ -309,10 +310,30 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient, bool anIsDummyObject3D = false; bool anIsObjectCanBeColored = false; - // check the selected GEOM objects - if ( anIsObjectBrowser && !HYDROGUI_Tool::GetSelectedGeomObjects( this ).isEmpty() ) { - theMenu->addAction( action( ImportGeomObjectId ) ); - theMenu->addSeparator(); + // Check the selected GEOM objects (take into account the Object Browser only) + if ( anIsObjectBrowser ) { + QList anObstacleTypes = + HYDROGUI_ImportGeomObjectOp::getObstacleTypes(); + QList aPolylineTypes = + HYDROGUI_ImportGeomObjectOp::getPolylineTypes(); + + bool isCanBeImportedAsObstacle = + !HYDROGUI_Tool::GetSelectedGeomObjects( this, anObstacleTypes ).isEmpty(); + bool isCanBeImportedAsPolyline = + !HYDROGUI_Tool::GetSelectedGeomObjects( this, aPolylineTypes ).isEmpty(); + + // Add import as obstacle action + if ( isCanBeImportedAsObstacle ) { + theMenu->addAction( action( ImportGeomObjectAsObstacleId ) ); + } + // Add import as polyline action + if ( isCanBeImportedAsPolyline ) { + theMenu->addAction( action( ImportGeomObjectAsPolylineId ) ); + } + // Add separator + if ( isCanBeImportedAsObstacle || isCanBeImportedAsPolyline ) { + theMenu->addSeparator(); + } } // check the selected data model objects diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index 7d8dba61..d3a2d04f 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -140,7 +140,8 @@ void HYDROGUI_Module::createActions() createAction( EditDigueId, "EDIT_DIGUE", "EDIT_DIGUE_ICO" ); createAction( ImportObstacleFromFileId, "IMPORT_OBSTACLE_FROM_FILE", "IMPORT_OBSTACLE_FROM_FILE_ICO" ); - createAction( ImportGeomObjectId, "IMPORT_GEOM_OBJECT", "IMPORT_GEOM_OBJECT_ICO" ); + createAction( ImportGeomObjectAsObstacleId, "IMPORT_GEOM_OBJECT_AS_OBSTACLE", "IMPORT_GEOM_OBJECT_ICO" ); + createAction( ImportGeomObjectAsPolylineId, "IMPORT_GEOM_OBJECT_AS_POLYLINE", "IMPORT_GEOM_OBJECT_ICO" ); createAction( CreateBoxId, "CREATE_BOX", "CREATE_BOX_ICO" ); createAction( CreateCylinderId, "CREATE_CYLINDER", "CREATE_CYLINDER_ICO" ); @@ -456,10 +457,13 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const anOp = new HYDROGUI_ImportObstacleFromFileOp( aModule ); break; case ImportCreatedPrimitiveId: - anOp = new HYDROGUI_ImportGeomObjectOp( aModule, HYDROGUI_ImportGeomObjectOp::ImportCreated ); + anOp = new HYDROGUI_ImportGeomObjectOp( aModule, HYDROGUI_ImportGeomObjectOp::ImportCreatedAsObstacle ); break; - case ImportGeomObjectId: - anOp = new HYDROGUI_ImportGeomObjectOp( aModule, HYDROGUI_ImportGeomObjectOp::ImportSelected ); + case ImportGeomObjectAsObstacleId: + anOp = new HYDROGUI_ImportGeomObjectOp( aModule, HYDROGUI_ImportGeomObjectOp::ImportSelectedAsObstacle ); + break; + case ImportGeomObjectAsPolylineId: + anOp = new HYDROGUI_ImportGeomObjectOp( aModule, HYDROGUI_ImportGeomObjectOp::ImportSelectedAsPolyline ); break; case CreateBoxId: application()->activateOperation( "Geometry", GEOMOp::OpBox ); @@ -490,7 +494,8 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const bool HYDROGUI_Module::reusableOperation( const int id ) { - if ( id == ImportGeomObjectId ) { + if ( id == ImportGeomObjectAsObstacleId || + id == ImportGeomObjectAsPolylineId ) { return false; } diff --git a/src/HYDROGUI/HYDROGUI_Operations.h b/src/HYDROGUI/HYDROGUI_Operations.h index e059fda8..7184340a 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.h +++ b/src/HYDROGUI/HYDROGUI_Operations.h @@ -85,7 +85,8 @@ enum OperationId EditSplittedImageId, ImportObstacleFromFileId, - ImportGeomObjectId, + ImportGeomObjectAsObstacleId, + ImportGeomObjectAsPolylineId, ImportCreatedPrimitiveId, CreateBoxId, CreateCylinderId, diff --git a/src/HYDROGUI/HYDROGUI_Tool.cxx b/src/HYDROGUI/HYDROGUI_Tool.cxx index ccea02da..4733af2b 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.cxx +++ b/src/HYDROGUI/HYDROGUI_Tool.cxx @@ -383,7 +383,8 @@ ObjectKind HYDROGUI_Tool::GetSelectedPartition( HYDROGUI_Module* theModule ) return KIND_UNKNOWN; } -QStringList HYDROGUI_Tool::GetSelectedGeomObjects( HYDROGUI_Module* theModule ) +QStringList HYDROGUI_Tool::GetSelectedGeomObjects( HYDROGUI_Module* theModule, + QList theTypes ) { QStringList anEntryList; @@ -414,7 +415,8 @@ QStringList HYDROGUI_Tool::GetSelectedGeomObjects( HYDROGUI_Module* theModule ) GEOM::GEOM_Object_var aGeomObj = GEOMBase::GetObjectFromIOR( aSObject->GetIOR().c_str() ); - if ( !aGeomObj->_is_nil() && aGeomObj->IsShape() ) { + if ( !aGeomObj->_is_nil() && aGeomObj->IsShape() && + theTypes.contains( aGeomObj->GetShapeType() ) ) { anEntryList << anEntry; } } diff --git a/src/HYDROGUI/HYDROGUI_Tool.h b/src/HYDROGUI/HYDROGUI_Tool.h index c3d971da..7e0efdd8 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.h +++ b/src/HYDROGUI/HYDROGUI_Tool.h @@ -33,6 +33,10 @@ #include #include +// IDL includes +#include +#include CORBA_SERVER_HEADER(GEOM_Gen) + class SUIT_ViewManager; class OCCViewer_ViewFrame; @@ -174,9 +178,11 @@ public: /** * \brief Get the selected GEOM objects. * \param theModule module + * \param theTypes the acceptable GEOM object types * \return list of GEOM objects entries */ - static QStringList GetSelectedGeomObjects( HYDROGUI_Module* theModule ); + static QStringList GetSelectedGeomObjects( HYDROGUI_Module* theModule, + QList theTypes ); /** * \brief Find the data object with the specified name. diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index f0f517f5..021ef594 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -15,6 +15,10 @@ DEFAULT_POLYLINE_NAME Polyline + + DEFAULT_OBSTACLE_NAME + Obstacle + DEFAULT_POLYLINE_3D_NAME Polyline3D @@ -136,10 +140,6 @@ does not exist or you have not enough permissions to open it. OBJECT_EXISTS_IN_DOCUMENT Object with name '%1' already exists in the document. - - ZONE_OBJECT_CANNOT_BE_CREATED - Zone can not be created - SAVE_ERROR Study could not be saved @@ -713,8 +713,12 @@ file cannot be correctly imported for a Bathymetry definition. Create box obstacle - DSK_IMPORT_GEOM_OBJECT - Import GEOM object as an obstacle + DSK_IMPORT_GEOM_OBJECT_AS_OBSTACLE + Import GEOM object(s) as obstacle(s) + + + DSK_IMPORT_GEOM_OBJECT_AS_POLYLINE + Import GEOM object(s) as polyline(s) DSK_CREATE_CYLINDER @@ -929,8 +933,12 @@ file cannot be correctly imported for a Bathymetry definition. Import obstacle - MEN_IMPORT_GEOM_OBJECT - Import + MEN_IMPORT_GEOM_OBJECT_AS_OBSTACLE + Import as obstacle + + + MEN_IMPORT_GEOM_OBJECT_AS_POLYLINE + Import as polyline MEN_CREATE_BOX @@ -1125,8 +1133,12 @@ file cannot be correctly imported for a Bathymetry definition. Import obstacle from file - STB_IMPORT_GEOM_OBJECT - Import GEOM object as an obstacle + STB_IMPORT_GEOM_OBJECT_AS_OBSTACLE + Import GEOM object(s) as obstacle(s) + + + STB_IMPORT_GEOM_OBJECT_AS_POLYLINE + Import GEOM object(s) as polyline(s) STB_CREATE_BOX @@ -1441,8 +1453,12 @@ file cannot be correctly imported for a Bathymetry definition. HYDROGUI_ImportGeomObjectOp - IMPORT_GEOM_OBJECT - Import GEOM object + IMPORT_GEOM_OBJECT_AS_OBSTACLE + Import GEOM object as obstacle + + + IMPORT_GEOM_OBJECT_AS_POLYLINE + Import GEOM object as polyline @@ -1500,11 +1516,7 @@ file cannot be correctly imported for an Obstacle definition. - HYDROGUI_ObstacleDlg - - DEFAULT_OBSTACLE_NAME - Obstacle - + HYDROGUI_GeomObjectDlg GET_SHAPE_FROM_FILE Get shape from file @@ -1518,8 +1530,8 @@ file cannot be correctly imported for an Obstacle definition. File name - OBSTACLE_NAME - Obstacle name + OBJECT_NAME + %1 name NAME @@ -1530,20 +1542,16 @@ file cannot be correctly imported for an Obstacle definition. Mode - CREATE_NEW_OBSTACLE + CREATE_NEW Create new - MODIFY_OBSTACLE + MODIFY Modify - OBSTACLE_TO_EDIT - Obstacle to edit - - - OBSTACLE - Obstacle + OBJECT_TO_EDIT + %1 to edit