From: rkv Date: Wed, 30 Oct 2013 13:14:43 +0000 (+0000) Subject: Splitting geometry objects to zones is performed on "Next" button in the first wizard... X-Git-Tag: BR_hydro_v_0_3~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=104fb853e59d3f22d9ff8fcfd9d93257e7ad0398;p=modules%2Fhydro.git Splitting geometry objects to zones is performed on "Next" button in the first wizard page of Calculation Case operation. --- diff --git a/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx b/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx index 8d43d446..9d5265ac 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationDlg.cxx @@ -63,6 +63,7 @@ HYDROGUI_CalculationDlg::HYDROGUI_CalculationDlg( HYDROGUI_Module* theModule, co QWizard* aWizard = wizard(); aWizard->addPage( createObjectsPage() ); aWizard->addPage( createZonesPage() ); + connect( aWizard->button( QWizard::NextButton ), SIGNAL( clicked() ), SIGNAL( splitZones() ) ); aWizard->show(); } diff --git a/src/HYDROGUI/HYDROGUI_CalculationDlg.h b/src/HYDROGUI/HYDROGUI_CalculationDlg.h index aa3dbe53..fa48b369 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationDlg.h +++ b/src/HYDROGUI/HYDROGUI_CalculationDlg.h @@ -61,6 +61,7 @@ public slots: signals: void addObjects(); void removeObjects(); + void splitZones(); private: diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 977b440b..552f6841 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -146,8 +146,9 @@ HYDROGUI_InputPanel* HYDROGUI_CalculationOp::createInputPanel() const 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; } @@ -297,7 +298,7 @@ void HYDROGUI_CalculationOp::onApply() void HYDROGUI_CalculationOp::onSplitZones() { - myRegionsList.clear(); + //myRegionsList.clear(); HYDROGUI_CalculationDlg* aPanel = ::qobject_cast( inputPanel() ); @@ -306,35 +307,37 @@ void HYDROGUI_CalculationOp::onSplitZones() 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();