QString aDbfFileName = thePyScriptPath;
aDbfFileName.replace( ".py", ".dbf" );
- ExportSHP( aShpFileName, true, 1 );
+ ExportSHP( aShpFileName, true, 0.1 );
QString anAttr = "CODE_06"; //TODO: some custom choice
QStringList anAttrValues, aTypes;
aLandcoverNameLayout->addWidget( aLandcoverNameLabel );
aLandcoverNameLayout->addWidget( myObjectName );
- QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUNDED_POLYGONS" ) );
+ QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUND_POLYGONS" ) );
myPolygonsListWidget = new QListWidget( aPolygonsGroup );
myPolygonsListWidget->setSelectionMode( QListWidget::ExtendedSelection );
myPolygonsListWidget->setEditTriggers( QListWidget::NoEditTriggers );
}
void HYDROGUI_ImportLandCoverMapDlg::onItemSelectionChanged()
-{
- emit selectionChanged( getSelectedPolygonNames() );
+{
+ int aCurIndex = GetCurrentWizardIndex();
+ if (aCurIndex == 0)
+ emit selectionChanged( getSelectedPolygonNames() );
}
QStringList HYDROGUI_ImportLandCoverMapDlg::getSelectedPolygonNames() const
bool HYDROGUI_ImportLandCoverMapDlg::acceptCurrent() const
{
//Check the state of the current page
- int aCurrPage = wizard()->currentIndex();
+ int aCurrPage = GetCurrentWizardIndex();
switch ( aCurrPage )
{
case 0:
}
break;
}
+ case 2: //last page
+ {
+ if (myPolygonsListWidget->selectedItems().empty())
+ {
+ SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "LCM_IMPORT_WARNING" ), tr("POLYGONS_ISNT_SELECTED"));
+ return false;
+ }
+ break;
+ }
default:
return false;
}
bool HYDROGUI_ImportLandCoverMapDlg::getDbfState() const
{
return myDbfState;
+}
+
+int HYDROGUI_ImportLandCoverMapDlg::GetCurrentWizardIndex() const
+{
+ return wizard()->currentIndex();
}
\ No newline at end of file
void setDbfState(bool theState);
bool getDbfState() const;
+ int GetCurrentWizardIndex() const;
void FillCorrespondenceTable(const QStringList& theFirstColumn,
const QStringList& theSecondColumn,
<translation>Name</translation>
</message>
<message>
- <source>FOUNDED_POLYGONS</source>
- <translation>Founded polygons:</translation>
+ <source>FOUND_POLYGONS</source>
+ <translation>Found polygons:</translation>
</message>
<message>
<source>USE_DBF_AS_ST</source>