HYDROGUI_CalculationDlg* aPanel = new HYDROGUI_CalculationDlg( module(), getName() );
// Connect signals and slots
- connect( aPanel, SIGNAL( addObjects() ), this, SLOT( onAddObjects() ) );
- connect( aPanel, SIGNAL( removeObjects() ), this, SLOT( onRemoveObjects() ) );
+ connect( aPanel, SIGNAL( addObjects() ), SLOT( onAddObjects() ) );
+ connect( aPanel, SIGNAL( removeObjects() ), SLOT( onRemoveObjects() ) );
+ connect( aPanel, SIGNAL( splitZones() ), SLOT( onSplitZones() ) );
return aPanel;
}
void HYDROGUI_CalculationOp::onSplitZones()
{
- myRegionsList.clear();
+ //myRegionsList.clear();
HYDROGUI_CalculationDlg* aPanel =
::qobject_cast<HYDROGUI_CalculationDlg*>( inputPanel() );
QApplication::setOverrideCursor( Qt::WaitCursor );
- QStringList aGeomObjectNames = aPanel->getSelectedGeomObjects();
- HYDROData_SequenceOfObjects aGeomObjects =
- HYDROGUI_Tool::FindObjectsByNames( module(), aGeomObjectNames );
+ //QStringList aGeomObjectNames = aPanel->getSelectedGeomObjects();
+ //HYDROData_SequenceOfObjects aGeomObjects =
+ // HYDROGUI_Tool::FindObjectsByNames( module(), aGeomObjectNames );
- QStringList aResSplittedZones;
+ //QStringList aResSplittedZones;
- HYDROData_SplitToZonesTool::SplitDataList aSplittedZones =
- HYDROData_SplitToZonesTool::SplitToZones( aGeomObjects );
+ //HYDROData_SplitToZonesTool::SplitDataList aSplittedZones =
+ // HYDROData_SplitToZonesTool::SplitToZones( aGeomObjects );
- QStringList aUsedNames;
+ //QStringList aUsedNames;
- HYDROData_SplitToZonesTool::SplitDataListIterator anIter( aSplittedZones );
- while( anIter.hasNext() )
- {
- Region aRegion;
- aRegion.SplitData = anIter.next();
+ //HYDROData_SplitToZonesTool::SplitDataListIterator anIter( aSplittedZones );
+ //while( anIter.hasNext() )
+ //{
+ // Region aRegion;
+ // aRegion.SplitData = anIter.next();
- aRegion.FillingColor = HYDROGUI_Tool::GenerateFillingColor( module(), aRegion.SplitData.ObjectNames );
- aRegion.BorderColor = QColor( HYDROData_ImmersibleZone::DefaultBorderColor() );
+ // aRegion.FillingColor = HYDROGUI_Tool::GenerateFillingColor( module(), aRegion.SplitData.ObjectNames );
+ // aRegion.BorderColor = QColor( HYDROData_ImmersibleZone::DefaultBorderColor() );
- aRegion.RegionName = HYDROGUI_Tool::GenerateObjectName( module(), "Region", aUsedNames );
+ // aRegion.RegionName = HYDROGUI_Tool::GenerateObjectName( module(), "Region", aUsedNames );
- aUsedNames.append( aRegion.RegionName );
+ // aUsedNames.append( aRegion.RegionName );
- aResSplittedZones.append( aRegion.RegionName );
+ // aResSplittedZones.append( aRegion.RegionName );
- myRegionsList.append( aRegion );
- }
-
+ // myRegionsList.append( aRegion );
+ //}
+ //
+
+ myEditedObject->SplitGeometryObjects();
createPreview();
QApplication::restoreOverrideCursor();