Salome HOME
PR: merged from V5_1_4rc1
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ClippingDlg.cxx
index be11acf6cd20a9c0955a1b37113c7d7c7656c18b..13bdc8eb44e3c04518864cba9480e5b489f2bd76 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ClippingDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -343,7 +344,7 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
   SMESHGUI_ClippingDlgLayout->setMargin(MARGIN);
 
   // Controls for selecting, creating, deleting planes
-  QGroupBox* GroupPlanes = new QGroupBox(tr("Clipping planes"), this);
+  QGroupBox* GroupPlanes = new QGroupBox(tr("CLIP_PLANES"), this);
   QHBoxLayout* GroupPlanesLayout = new QHBoxLayout(GroupPlanes);
   GroupPlanesLayout->setSpacing(SPACING);
   GroupPlanesLayout->setMargin(MARGIN);
@@ -373,18 +374,18 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
 
   SpinBoxDistance = new SMESHGUI_SpinBox(GroupParameters);
 
-  TextLabelRot1 = new QLabel(tr("Rotation around X (Y to Z):"), GroupParameters);
+  TextLabelRot1 = new QLabel(tr("ROTATION_AROUND_X_Y2Z"), GroupParameters);
 
   SpinBoxRot1 = new SMESHGUI_SpinBox(GroupParameters);
 
-  TextLabelRot2 = new QLabel(tr("Rotation around Y (X to Z):"), GroupParameters);
+  TextLabelRot2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
 
   SpinBoxRot2 = new SMESHGUI_SpinBox(GroupParameters);
 
-  PreviewCheckBox = new QCheckBox(tr("Show preview"), GroupParameters);
+  PreviewCheckBox = new QCheckBox(tr("SHOW_PREVIEW"), GroupParameters);
   PreviewCheckBox->setChecked(true);
 
-  AutoApplyCheckBox = new QCheckBox(tr("Auto Apply"), GroupParameters);
+  AutoApplyCheckBox = new QCheckBox(tr("AUTO_APPLY"), GroupParameters);
   AutoApplyCheckBox->setChecked(false);
 
   GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
@@ -426,13 +427,13 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
   SMESHGUI_ClippingDlgLayout->addWidget(GroupButtons);
 
   // Initial state
-  SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, 3);
-  SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, 3);
-  SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, 3);
+  SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, "length_precision" );
+  SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
+  SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
 
-  ComboBoxOrientation->addItem(tr("|| X-Y"));
-  ComboBoxOrientation->addItem(tr("|| Y-Z"));
-  ComboBoxOrientation->addItem(tr("|| Z-X"));
+  ComboBoxOrientation->addItem(tr("ALONG_XY"));
+  ComboBoxOrientation->addItem(tr("ALONG_YZ"));
+  ComboBoxOrientation->addItem(tr("ALONG_ZX"));
 
   SpinBoxDistance->SetValue(0.5);
 
@@ -699,16 +700,16 @@ void SMESHGUI_ClippingDlg::onSelectOrientation (int theItem)
     return;
 
   if      (theItem == 0) {
-    TextLabelRot1->setText(tr("Rotation around X (Y to Z):"));
-    TextLabelRot2->setText(tr("Rotation around Y (X to Z):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_X_Y2Z"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_Y_X2Z"));
   }
   else if (theItem == 1) {
-    TextLabelRot1->setText(tr("Rotation around Y (Z to X):"));
-    TextLabelRot2->setText(tr("Rotation around Z (Y to X):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_Y_Z2X"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_Z_Y2X"));
   }
   else if (theItem == 2) {
-    TextLabelRot1->setText(tr("Rotation around Z (X to Y):"));
-    TextLabelRot2->setText(tr("Rotation around X (Z to Y):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_Z_X2Y"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_X_Z2Y"));
   }
 
   if((QComboBox*)sender() == ComboBoxOrientation)
@@ -726,7 +727,7 @@ void SMESHGUI_ClippingDlg::Sinchronize()
 
   QString aName;
   for(int i = 1; i<=aNbPlanes; i++) {
-    aName = QString(tr("Plane# %1")).arg(i);
+    aName = QString(tr("PLANE_NUM")).arg(i);
     ComboBoxPlanes->addItem(aName);
   }
 
@@ -737,7 +738,7 @@ void SMESHGUI_ClippingDlg::Sinchronize()
   if (anIsControlsEnable) {
     onSelectPlane(aPos);
   } else {
-    ComboBoxPlanes->addItem(tr("No planes"));
+    ComboBoxPlanes->addItem(tr("NO_PLANES"));
     SpinBoxRot1->SetValue(0.0);
     SpinBoxRot2->SetValue(0.0);
     SpinBoxDistance->SetValue(0.5);