Salome HOME
NPAL17269: Performance pb. when creating a group with GUI.
[modules/geom.git] / src / MeasureGUI / MeasureGUI_PointDlg.cxx
index 34d08f3482c0de2dd35bc05d5f5ea96f68c407e4..ccd2a8f072ee9c511faf47d18b69a3bdb2cfefa7 100644 (file)
@@ -17,7 +17,7 @@
 //  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 "MeasureGUI_PointDlg.h"
 #include "GEOMBase.h"
 
+#include "DlgRef_SpinBox.h"
+
 #include "utilities.h"
+
 #include "SUIT_Session.h"
 #include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 //=================================================================================
 // class    : MeasureGUI_PointDlg()
 // purpose  : Constructs a MeasureGUI_PointDlg which is a child of 'parent'
-//            
 //=================================================================================
 MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
 : MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PointDlg" )
 {
   QPixmap iconPnt( SUIT_Session::session()->resourceMgr()->loadPixmap(
     "GEOM",tr( "ICON_DLG_POINT" ) ) );
-  
+
   QPixmap iconSelect( SUIT_Session::session()->resourceMgr()->loadPixmap(
     "GEOM",tr( "ICON_SELECT" ) ) );
 
@@ -75,7 +77,7 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
   RadioButton1->setPixmap( iconPnt );
 
   QGroupBox* aGrp = new QGroupBox( 2, Qt::Horizontal, tr( "COORDINATES" ), this );
-  
+
   new QLabel( tr( "POINT" ), aGrp );
   QFrame* aFrame = new QFrame( aGrp );
   mySelBtn = new QPushButton( aFrame );
@@ -108,7 +110,7 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
 //=================================================================================
 // function : ~MeasureGUI_PointDlg()
 // purpose  : Destroys the object and frees any allocated resources
-//======================myX->setReadOnly( true );===========================================================
+//=================================================================================
 MeasureGUI_PointDlg::~MeasureGUI_PointDlg()
 {
 }
@@ -178,7 +180,7 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
 
       TopTools_IndexedMapOfShape aShapes;
       TopExp::MapShapes( aShape, aShapes );
-      
+
       if ( aShape != aShapes( i ) )
         aName += QString( ":%1" ).arg( i );
 
@@ -189,9 +191,9 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
     {
       gp_Pnt aPnt = BRep_Tool::Pnt( aPoint );
       mySelEdit->setText( aName );
-      myX->setText( QString( "%1" ).arg( aPnt.X() ) );
-      myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
-      myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
+      myX->setText(DlgRef_SpinBox::PrintDoubleValue(aPnt.X()));
+      myY->setText(DlgRef_SpinBox::PrintDoubleValue(aPnt.Y()));
+      myZ->setText(DlgRef_SpinBox::PrintDoubleValue(aPnt.Z()));
     }
   }
   catch( ... )
@@ -203,23 +205,3 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
     myZ->setText( "" );
   }
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-