// 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
//
//
//
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
-TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg(GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl)
- :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), myGeometryGUI(theGeometryGUI)
+TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg
+ (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_TRANSLATION_DXYZ")));
- QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION_POINTS")));
- QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION_VECTOR")));
- QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
+ SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
+ QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TRANSLATION_DXYZ")));
+ QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TRANSLATION_POINTS")));
+ QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TRANSLATION_VECTOR")));
+ QPixmap image3 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
setCaption(tr("GEOM_TRANSLATION_TITLE"));
Layout1->addWidget(GroupPoints, 2, 0);
/***************************************************************/
+ setHelpFileName("translation.htm");
+
Init();
}
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes & initial values */
- GroupPoints->SpinBox1->RangeStepAndValidator(-999.999, 999.999, step, 3);
- GroupPoints->SpinBox2->RangeStepAndValidator(-999.999, 999.999, step, 3);
- GroupPoints->SpinBox3->RangeStepAndValidator(-999.999, 999.999, step, 3);
+ GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
GroupPoints->SpinBox1->SetValue(0.0);
GroupPoints->SpinBox2->SetValue(0.0);
connect(GroupPoints->SpinBox2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
connect(GroupPoints->SpinBox3, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
- connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox1, SLOT(SetStep(double)));
- connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox2, SLOT(SetStep(double)));
- connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox3, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox1, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox2, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox3, SLOT(SetStep(double)));
connect(GroupPoints->CheckBox1, 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_TRANSLATION" ) );
//=================================================================================
void TransformationGUI_TranslationDlg::ConstructorsClicked(int constructorId)
{
- disconnect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0 );
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myEditCurrentArgument = GroupPoints->LineEdit1;
globalSelection();
}
myEditCurrentArgument->setFocus();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
}
}
-//=======================================================================
-// function : ClickOnCancel()
-// purpose :
-//=======================================================================
-void TransformationGUI_TranslationDlg::ClickOnCancel()
-{
- GEOMBase_Skeleton::ClickOnCancel();
-}
-
-
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case
void TransformationGUI_TranslationDlg::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_TranslationDlg::DeactivateActiveDialog()
-{
- GEOMBase_Skeleton::DeactivateActiveDialog();
+ ConstructorsClicked( getConstructorId() );
}
//=================================================================================
GEOM::GEOM_IOperations_ptr TransformationGUI_TranslationDlg::createOperation()
{
- return myGeometryGUI->GetGeomGen()->GetITransformOperations( getStudyId() );
+ return myGeomGUI->GetGeomGen()->GetITransformOperations( getStudyId() );
}