myFileNameGroup = new QGroupBox( tr( "IMPORT_LANDCOVER_FROM_FILE" ) );
- QLabel* aFileNameLabel = new QLabel( tr( "LANCOVER_NAME" ), myFileNameGroup );
+ QLabel* aFileNameLabel = new QLabel( tr( "FILE_NAME" ), myFileNameGroup );
myFileName = new QLineEdit( myFileNameGroup );
myFileName->setReadOnly( true );
aFileNameLayout->addWidget( myFileName );
aFileNameLayout->addWidget( aBrowseBtn );
- myObjectNameGroup = new QGroupBox( tr( "FILE_NAME" ) );
+ myObjectNameGroup = new QGroupBox( tr( "LANDCOVER_NAME" ) );
QLabel* aLandcoverNameLabel = new QLabel( tr( "NAME" ), myObjectNameGroup );
myObjectName = new QLineEdit( myObjectNameGroup );
aLandcoverNameLayout->addWidget( aLandcoverNameLabel );
aLandcoverNameLayout->addWidget( myObjectName );
- QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUND_POLYGONS_OF_SHP_FILE" ), mainFrame() );
+ QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUNDED_POLYGONS" ), mainFrame() );
myPolygons = new QListWidget( aPolygonsGroup );
myPolygons->setSelectionMode( QListWidget::ExtendedSelection );
myPolygons->setEditTriggers( QListWidget::NoEditTriggers );
void HYDROGUI_ImportLandCoverOp::startOperation()
{
HYDROGUI_Operation::startOperation();
+
+ if ( !getPreviewManager() ) {
+ setPreviewManager( ::qobject_cast<OCCViewer_ViewManager*>(
+ module()->getApp()->getViewManager( OCCViewer_Viewer::Type(), true ) ) );
+ }
+
+ if ( !isApplyAndClose() ) {
+ return;
+ }
+
+ HYDROGUI_ImportLandCoverDlg* aPanel =
+ ::qobject_cast<HYDROGUI_ImportLandCoverDlg*>( inputPanel() );
+ if ( !aPanel ) {
+ return;
+ }
+
+ aPanel->reset();
}
<context>
<name>HYDROGUI_ImportLandCoverDlg</name>
- <message>
- <source>IMPORT_LANDCOVER</source>
- <translation>Import Land cover</translation>
- </message>
<message>
<source>LANDCOVER_FILTER</source>
<translation>Shape files (*.shp)</translation>
</message>
+ <message>
+ <source>IMPORT_LANDCOVER_FROM_FILE</source>
+ <translation>Import land cover from file</translation>
+ </message>
+ <message>
+ <source>FILE_NAME</source>
+ <translation>File name</translation>
+ </message>
+ <message>
+ <source>LANDCOVER_NAME</source>
+ <translation>Land cover name</translation>
+ </message>
+ <message>
+ <source>NAME</source>
+ <translation>name:</translation>
+ </message>
+ <message>
+ <source>FOUNDED_POLYGONS</source>
+ <translation>Founded polygons:</translation>
+ </message>
<message>
<source>BAD_IMPORTED_LANDCOVER_FILES</source>
<translation>Land cover import error</translation>
</message>
</context>
-
+ <context>
+ <name>HYDROGUI_ImportLandCoverOp</name>
+ <message>
+ <source>IMPORT_LANDCOVER</source>
+ <translation>Import land cover</translation>
+ </message>
+ <message>
+ <source>DEFAULT_LANDCOVER_NAME</source>
+ <translation>Landcover_0</translation>
+ </message>
+ </context>
+
<context>
<name>HYDROGUI_ImportSinusXOp</name>
<message>