X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MergeDlg.cxx;h=dfb2de764751b266be8c8bdbecbd562edde4a4b7;hb=36550205e6a2af5cf9ee5415066f780b1478478f;hp=7446b54b2d58ba9ac8c33bb122f14c71c1d8856b;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index 7446b54b2..dfb2de764 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -124,7 +124,7 @@ namespace SMESH // Create and display actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput( myIdGrid ); + aMapper->SetInputData( myIdGrid ); myIdActor = SALOME_Actor::New(); myIdActor->SetInfinitive(true); @@ -140,16 +140,16 @@ namespace SMESH myPointsNumDataSet = vtkUnstructuredGrid::New(); myPtsMaskPoints = vtkMaskPoints::New(); - myPtsMaskPoints->SetInput(myPointsNumDataSet); + myPtsMaskPoints->SetInputData(myPointsNumDataSet); myPtsMaskPoints->SetOnRatio(1); myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New(); - myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput()); + myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort()); myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SetTolerance(0.1); myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); - myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput()); + myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort()); #if (VTK_XVERSION < 0x050200) myPtsLabeledDataMapper->SetLabelFormat("%g"); #endif @@ -250,7 +250,7 @@ namespace SMESH anArray->SetValue( i, myIDs[i] ); aDataSet->GetPointData()->SetScalars( anArray ); anArray->Delete(); - myPtsMaskPoints->SetInput( aDataSet ); + myPtsMaskPoints->SetInputData( aDataSet ); myPointLabels->SetVisibility( theIsActorVisible ); } else { @@ -552,7 +552,7 @@ void SMESHGUI_MergeDlg::Init() /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); @@ -571,7 +571,7 @@ void SMESHGUI_MergeDlg::Init() connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); /* to close dialog if study change */ - connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject())); // Init Mesh field from selection SelectionIntoArgument(); @@ -670,7 +670,7 @@ bool SMESHGUI_MergeDlg::ClickOnApply() aMeshEditor->MergeElements (aGroupsOfElements.inout()); if ( myTypeId == 0 ) { - if (myAction ==0) + if (myAction == 0 ) SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INFORMATION"), tr("SMESH_MERGED_NODES").arg(QString::number(ListCoincident->count()).toLatin1().data())); else @@ -697,14 +697,14 @@ bool SMESHGUI_MergeDlg::ClickOnApply() void SMESHGUI_MergeDlg::ClickOnOk() { if (ClickOnApply()) - ClickOnCancel(); + reject(); } //================================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //================================================================================= -void SMESHGUI_MergeDlg::ClickOnCancel() +void SMESHGUI_MergeDlg::reject() { myIdPreview->SetPointsLabeled(false); SMESH::SetPointRepresentation(false); @@ -718,7 +718,7 @@ void SMESHGUI_MergeDlg::ClickOnCancel() if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); - reject(); + QDialog::reject(); } //================================================================================= @@ -1226,26 +1226,6 @@ void SMESHGUI_MergeDlg::enterEvent(QEvent*) ActivateThisDialog(); } -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void SMESHGUI_MergeDlg::closeEvent(QCloseEvent*) -{ - /* same than click on cancel button */ - ClickOnCancel(); -} - -//======================================================================= -//function : hideEvent -//purpose : caused by ESC key -//======================================================================= -void SMESHGUI_MergeDlg::hideEvent (QHideEvent *) -{ - if (!isMinimized()) - ClickOnCancel(); -} - //================================================================================= // function : keyPressEvent() // purpose : @@ -1291,8 +1271,8 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id) SMESH::UpdateView(); // Costruction of the logical filter - SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH); - SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP); + SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH); + SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP); QList aListOfFilters; if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);