X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTransformationGUI%2FTransformationGUI_MirrorDlg.cxx;h=5e6868836eaa8d67a391a8dc59ca36e7c164633f;hb=9caf5aba46053fce9214d64e4fb3d45ec46576c9;hp=d255e8f0b5600b544c7ac6f97a89919fe79181cc;hpb=732211808796539fcf1de34e06038e7fb015ece9;p=modules%2Fgeom.git diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index d255e8f0b..5e6868836 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -31,7 +31,7 @@ #include "SUIT_Desktop.h" #include "SUIT_Session.h" #include "SalomeApp_Application.h" -#include "SalomeApp_SelectionMgr.h" +#include "LightApp_SelectionMgr.h" #include #include @@ -49,8 +49,10 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(GeometryGUI* theGeometryGUI, QWidget* parent, + const char* name, bool modal, WFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | + WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_POINT"))); QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_AXE"))); @@ -77,8 +79,9 @@ TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(QWidget* parent, const GroupPoints->PushButton2->setPixmap(image3); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); Layout1->addWidget(GroupPoints, 2, 0); - /***************************************************************/ + + setHelpFileName("mirror_image.htm"); Init(); } @@ -124,7 +127,7 @@ void TransformationGUI_MirrorDlg::Init() connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); initName( tr( "GEOM_MIRROR" ) ); @@ -132,14 +135,13 @@ void TransformationGUI_MirrorDlg::Init() } - //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management //================================================================================= void TransformationGUI_MirrorDlg::ConstructorsClicked(int constructorId) { - disconnect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0 ); + disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 ); globalSelection(); myEditCurrentArgument = GroupPoints->LineEdit1; @@ -164,7 +166,7 @@ void TransformationGUI_MirrorDlg::ConstructorsClicked(int constructorId) break; } } - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } @@ -196,16 +198,6 @@ bool TransformationGUI_MirrorDlg::ClickOnApply() } -//======================================================================= -// function : ClickOnCancel() -// purpose : -//======================================================================= -void TransformationGUI_MirrorDlg::ClickOnCancel() -{ - GEOMBase_Skeleton::ClickOnCancel(); -} - - //================================================================================= // function : SelectionIntoArgument() // purpose : Called when selection has changed @@ -310,22 +302,12 @@ void TransformationGUI_MirrorDlg::SetEditCurrentArgument() void TransformationGUI_MirrorDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); ConstructorsClicked( getConstructorId() ); } -//================================================================================= -// function : DeactivateActiveDialog() -// purpose : public slot to deactivate if active -//================================================================================= -void TransformationGUI_MirrorDlg::DeactivateActiveDialog() -{ - GEOMBase_Skeleton::DeactivateActiveDialog(); -} - - //================================================================================= // function : enterEvent() // purpose : when mouse enter onto the QWidget