// 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
//
//
//
#include "TransformationGUI_MirrorDlg.h"
-#include "QAD_Desktop.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SalomeApp_Application.h"
+#include "LightApp_SelectionMgr.h"
#include <qcheckbox.h>
+#include <qlabel.h>
#include "GEOMImpl_Types.hxx"
// 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, SALOME_Selection* Sel, bool modal, WFlags fl)
- :GEOMBase_Skeleton(parent, name, Sel, 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(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_POINT")));
- QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_AXE")));
- QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_PLANE")));
- QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+ 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")));
+ QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_PLANE")));
+ QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_MIRROR_TITLE"));
GroupPoints->PushButton2->setPixmap(image3);
GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY"));
Layout1->addWidget(GroupPoints, 2, 0);
-
/***************************************************************/
+
+ setHelpFileName("mirror_image.htm");
Init();
}
connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool)));
- connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_MIRROR" ) );
ConstructorsClicked( 0 );
}
-
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void TransformationGUI_MirrorDlg::ConstructorsClicked(int constructorId)
{
- disconnect( mySelection, 0, this, 0 );
+ disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
globalSelection();
myEditCurrentArgument = GroupPoints->LineEdit1;
break;
}
}
- connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
}
}
-//=======================================================================
-// function : ClickOnCancel()
-// purpose :
-//=======================================================================
-void TransformationGUI_MirrorDlg::ClickOnCancel()
-{
- GEOMBase_Skeleton::ClickOnCancel();
-}
-
-
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection has changed
if(myEditCurrentArgument == GroupPoints->LineEdit1)
{
- int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName);
+ int aNbSel = GEOMBase::GetNameOfSelectedIObjects(selectedIO(), aName);
if(aNbSel < 1)
{
myObjects.length(0);
return;
}
- GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects);
+ GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), myObjects);
if (!myObjects.length())
return;
if(aNbSel != 1)
}
else if(myEditCurrentArgument == GroupPoints->LineEdit2)
{
- if(mySelection->IObjectCount() != 1)
+ if(IObjectCount() != 1)
{
myArgument = GEOM::GEOM_Object::_nil();
return;
}
Standard_Boolean testResult = Standard_False;
- myArgument = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult );
+ myArgument = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult );
if(!testResult || CORBA::is_nil( myArgument ))
return;
aName = GEOMBase::GetName( myArgument );
void TransformationGUI_MirrorDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ 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