Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/geom.git] / src / OperationGUI / OperationGUI_FilletDlg.cxx
index e6986bf03276db0ee28619c5f6d599c607f90a48..7eb174826055648118dd16881615b9ef24ebadcf 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
 //
+
 // GEOM GEOMGUI : GUI for Geometry component
 // File   : OperationGUI_FilletDlg.cxx
 // Author : Damien COQUERET, Open CASCADE S.A.S.
@@ -110,13 +111,13 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg (GeometryGUI* theGeometryGUI, QWi
 
   // Set range of spinboxes
   double SpecificStep = 10.0;
-  initSpinBox(Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group2->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group2->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group3->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox(Group3->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
+  initSpinBox(Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group2->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group2->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group3->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, "length_precision" );
+  initSpinBox(Group3->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, "length_precision" );
 
   setHelpFileName("fillet_operation_page.html");
 
@@ -495,7 +496,7 @@ void OperationGUI_FilletDlg::ActivateThisDialog()
 {
   GEOMBase_Skeleton::ActivateThisDialog();
   connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
-          this, SLOT( SelectionIntoArgument() ) );
+           this, SLOT( SelectionIntoArgument() ) );
 
   ConstructorsClicked( getConstructorId() );
 }
@@ -596,20 +597,20 @@ bool OperationGUI_FilletDlg::isValid (QString& msg)
       return !myShape->_is_nil() && ok;
     case 1:
       if (Group2->RadioButton1->isChecked())
-       ok = Group2->SpinBox_DX->isValid( msg, !IsPreview() );
+        ok = Group2->SpinBox_DX->isValid( msg, !IsPreview() );
       else
       {
-       ok = Group2->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
-       ok = Group2->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+        ok = Group2->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+        ok = Group2->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
       }
       return !myShape->_is_nil() && myEdges.Extent() > 0 && ok;
     case 2:
       if (Group3->RadioButton1->isChecked())
-       ok = Group3->SpinBox_DX->isValid( msg, !IsPreview() );
+        ok = Group3->SpinBox_DX->isValid( msg, !IsPreview() );
       else
       {
-       ok = Group3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
-       ok = Group3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
+        ok = Group3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok;
+        ok = Group3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok;
       }
       return !myShape->_is_nil() && myFaces.Extent() > 0 && ok;
     default: return false;
@@ -645,18 +646,18 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects)
     {
       anObj = anOper->MakeFilletEdges(myShape, getRadius(), aList);
       if (!anObj->_is_nil())
-       aParameters << Group2->SpinBox_DX->text();
+        aParameters << Group2->SpinBox_DX->text();
     }
     else
     {
       anObj = anOper->MakeFilletEdgesR1R2(myShape,
-                                         Group2->SpinBox_DY->value(),
-                                         Group2->SpinBox_DZ->value(),
-                                         aList);
+                                          Group2->SpinBox_DY->value(),
+                                          Group2->SpinBox_DZ->value(),
+                                          aList);
       if (!anObj->_is_nil())
       {
-       aParameters << Group2->SpinBox_DY->text();
-       aParameters << Group2->SpinBox_DZ->text();
+        aParameters << Group2->SpinBox_DY->text();
+        aParameters << Group2->SpinBox_DZ->text();
       }
     }
   }
@@ -670,16 +671,16 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects)
     if (Group3->RadioButton1->isChecked()) {
       anObj = anOper->MakeFilletFaces(myShape, getRadius(), aList);
       if (!anObj->_is_nil())
-       aParameters << Group3->SpinBox_DX->text();
+        aParameters << Group3->SpinBox_DX->text();
     }
     else {
       anObj = anOper->MakeFilletFacesR1R2(myShape,
-                                         Group3->SpinBox_DY->value(),
-                                         Group3->SpinBox_DZ->value(), aList);
+                                          Group3->SpinBox_DY->value(),
+                                          Group3->SpinBox_DZ->value(), aList);
       if (!anObj->_is_nil())
       {
-       aParameters << Group3->SpinBox_DY->text();
-       aParameters << Group3->SpinBox_DZ->text();
+        aParameters << Group3->SpinBox_DY->text();
+        aParameters << Group3->SpinBox_DZ->text();
       }
     }
   }