Salome HOME
Typo-fix by Kunda
[modules/geom.git] / src / EntityGUI / EntityGUI_SketcherDlg.cxx
index fde880b435ff86b93d04d8b036b20a894c0f582e..2a18630260e6a0494256b4d37bc17f3dfc220ce9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
@@ -47,6 +47,7 @@
 #include <SalomeApp_Application.h>
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
+#include "utilities.h"
 
 #include <DlgRef.h>
 
@@ -64,6 +65,7 @@
 
 #include <SalomeApp_Study.h>
 #include <SalomeApp_Tools.h>
+#include "utilities.h"
 
 #include <gp_Pln.hxx>
 
@@ -539,7 +541,7 @@ void EntityGUI_SketcherDlg::InitClick()
   Group4Spin->hide();
   GroupRect->hide();
   globalSelection(); // close local selection to clear it
-  localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+  localSelection( TopAbs_VERTEX );
 }
 
 
@@ -625,20 +627,19 @@ void EntityGUI_SketcherDlg::RectClicked()
 {
   InitClick();
   
-  // Connect the selction manager (disconnected in InitClick())
+  // Connect the selection manager (disconnected in InitClick())
   connect( myGeometryGUI->getApp()->selectionMgr(),
        SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
   
   GroupRect->show();
-  
   myX1=0;
-  myX2=10;
-  myY1=0;
-  myY2=10;
-
   GroupRect->SpinBox_DX1->setValue(myX1); 
+  myY1=0;
   GroupRect->SpinBox_DY1->setValue(myY1);
+  myX2=10;
   GroupRect->SpinBox_DX2->setValue(myX2);
+  myY2=10;
   GroupRect->SpinBox_DY2->setValue(myY2);
   
   resize( minimumSizeHint() );
@@ -907,7 +908,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
 {
   InitClick();
   Group3Spin->SpinBox_DX->blockSignals(true); // Block signals in order not to modify
-  Group3Spin->SpinBox_DY->blockSignals(true); // defaut values
+  Group3Spin->SpinBox_DY->blockSignals(true); // default values
   Group3Spin->SpinBox_DZ->blockSignals(true);
   
   Group2Spin->SpinBox_DX->blockSignals(true);
@@ -1142,7 +1143,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
     }
 
     QString Command = myCommand.join( "" );
-    Sketcher_Profile aProfile = Sketcher_Profile( Command.toAscii() );
+    Sketcher_Profile aProfile = Sketcher_Profile( Command.toLatin1() );
     bool isDone = false;
     TopoDS_Shape myShape = aProfile.GetShape( &isDone );
     if ( isDone ) {
@@ -1570,7 +1571,7 @@ void EntityGUI_SketcherDlg::SetEditCurrentArgument()
     selButton->setDown(true);
   }
   globalSelection(); // close local selection to clear it
-  localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
+  localSelection( myNeedType );
 }
 
 
@@ -1590,7 +1591,7 @@ void EntityGUI_SketcherDlg::LineEditReturnPressed()
      myEditCurrentArgument = Group2Sel->LineEdit2;
 
   /* User name of object input management                          */
-  /* If successfull the selection is changed and signal emitted... */
+  /* If successful the selection is changed and signal emitted... */
   /* so SelectionIntoArgument() is automatically called.           */
   const QString objectUserName = myEditCurrentArgument->text();
   QWidget* thisWidget = (QWidget*)this;
@@ -1691,8 +1692,8 @@ void EntityGUI_SketcherDlg::closeEvent( QCloseEvent* e )
 void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
                                             bool isStart )
 {
-  // NOTE Basing the autoapply functionnality on the background picture has no sense anymore
-  // The import picture functionnality is now used for drawing on top of a picture
+  // NOTE Basing the autoapply functionality on the background picture has no sense anymore
+  // The import picture functionality is now used for drawing on top of a picture
   
 //   SUIT_ViewWindow*      theViewWindow  = getDesktop()->activeWindow();
 //   OCCViewer_ViewPort3d* vp             = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
@@ -2258,7 +2259,7 @@ QString EntityGUI_SketcherDlg::GetNewCommand( QString& theParameters )
                                   + ":TT " + QString::number( myX2, Format, DigNum) + " " + QString::number( myY1, Format, DigNum)
                                   + ":WW";
                           
-      theParameters = myX1Str + ":" + myY1Str + ":" + myX2Str + ":" + myY2Str ;
+      theParameters = myX1Str + ":" + myY1Str + ":" + myX1Str + ":" + myY2Str + ":" + myX2Str + ":" + myY2Str + ":" + myX2Str + ":" + myY1Str;
     }
   return myNewCommand;
 }
@@ -2340,12 +2341,12 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
 
     //Last Shape
     QString Command1 = myCommand.join( "" );
-    Sketcher_Profile aProfile1( Command1.toAscii() );
+    Sketcher_Profile aProfile1( Command1.toLatin1() );
     myShape1 = aProfile1.GetShape();
 
     //Current Shape
     QString Command2 = Command1 + GetNewCommand( aParameters );
-    Sketcher_Profile aProfile2( Command2.toAscii() );
+    Sketcher_Profile aProfile2( Command2.toLatin1() );
     myShape2 = aProfile2.GetShape( &isDone, &error );
 
     //Error Message