X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_AddQuadraticElementDlg.cxx;h=94fdeec8a5b45d9dd32e139f5506e975b0165839;hb=3ec0f6d7525fde8284aa1e0381022b64fa98aea3;hp=c4bc516ad7b4496ec0c2015c44e23d9643cbd233;hpb=f5016d85b7b4b88623723027a1585c6414c4dc66;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index c4bc516ad..94fdeec8a 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.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 @@ -121,7 +121,7 @@ namespace SMESH vtkUnstructuredGrid* myGrid; //vtkProperty* myBackProp, *myProp; - //vtkFloatingPointType myRGB[3], myBackRGB[3]; + //double myRGB[3], myBackRGB[3]; SALOME_Actor* myFaceOrientation; vtkPolyDataMapper* myFaceOrientationDataMapper; @@ -140,7 +140,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput(myGrid); + myMapper->SetInputData(myGrid); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); @@ -148,7 +148,7 @@ namespace SMESH myPreviewActor->SetMapper(myMapper); vtkProperty* myProp = vtkProperty::New(); - vtkFloatingPointType aRGB[3], aBackRGB[3]; + double aRGB[3], aBackRGB[3]; GetColor( "SMESH", "fill_color", aRGB[0], aRGB[1], aRGB[2], QColor( 0, 170, 255 ) ); myProp->SetColor( aRGB[0], aRGB[1], aRGB[2] ); myPreviewActor->SetProperty( myProp ); @@ -164,10 +164,10 @@ namespace SMESH // Orientation of faces myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); - myFaceOrientationFilter->SetInput(myGrid); + myFaceOrientationFilter->SetInputData(myGrid); myFaceOrientationDataMapper = vtkPolyDataMapper::New(); - myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); + myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort()); myFaceOrientation = SALOME_Actor::New(); myFaceOrientation->PickableOff(); @@ -628,13 +628,13 @@ void SMESHGUI_AddQuadraticElementDlg::Init() connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int))); connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk())); - connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel())); + connect(buttonCancel, SIGNAL(clicked()), SLOT(reject())); connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply())); connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp())); connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog())); - connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel())); - connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel())); + connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(reject())); + connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(reject())); myCurrentLineEdit = myCornerNodes; @@ -803,14 +803,14 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply() void SMESHGUI_AddQuadraticElementDlg::ClickOnOk() { ClickOnApply(); - ClickOnCancel(); + reject(); } //================================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //================================================================================= -void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel() +void SMESHGUI_AddQuadraticElementDlg::reject() { mySelectionMgr->clearSelected(); mySimulation->SetVisibility(false); @@ -819,7 +819,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel() aViewWindow->SetSelectionMode( ActorSelection ); disconnect(mySelectionMgr, 0, this, 0); mySMESHGUI->ResetState(); - reject(); + QDialog::reject(); } //================================================================================= @@ -1134,26 +1134,6 @@ void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*) ActivateThisDialog(); } -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void SMESHGUI_AddQuadraticElementDlg::closeEvent (QCloseEvent*) -{ - /* same than click on cancel button */ - ClickOnCancel(); -} - -//================================================================================= -// function : hideEvent() -// purpose : caused by ESC key -//================================================================================= -void SMESHGUI_AddQuadraticElementDlg::hideEvent (QHideEvent*) -{ - if (!isMinimized()) - ClickOnCancel(); -} - //================================================================================= // function : onReverse() // purpose :