]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Qt4 porting. There are nonsignificant zeros in fields of some dialog boxes, if a...
authordmv <dmv@opencascade.com>
Thu, 9 Oct 2008 11:42:25 +0000 (11:42 +0000)
committerdmv <dmv@opencascade.com>
Thu, 9 Oct 2008 11:42:25 +0000 (11:42 +0000)
17 files changed:
src/BasicGUI/BasicGUI_MarkerDlg.cxx
src/BasicGUI/BasicGUI_MarkerDlg.h
src/BlocksGUI/BlocksGUI_TrsfDlg.cxx
src/BlocksGUI/BlocksGUI_TrsfDlg.h
src/EntityGUI/EntityGUI_SketcherDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.h
src/OperationGUI/OperationGUI_ClippingDlg.cxx
src/OperationGUI/OperationGUI_ClippingDlg.h
src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx
src/RepairGUI/RepairGUI_DivideEdgeDlg.h
src/RepairGUI/RepairGUI_GlueDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.h
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/RepairGUI/RepairGUI_SewingDlg.h
src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx
src/RepairGUI/RepairGUI_ShapeProcessDlg.h

index e7cdef29a7ba73eb425cdb2e96e2c329e42c1c74..4bc68d0c8b949668fa66b2d8375255f295e60f3d 100644 (file)
@@ -99,13 +99,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
   QVBoxLayout* anOriGrpLayout = new QVBoxLayout( anOriGrp );
 
   anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_X" ), anOriGrp ) );
-  myData[ X ] = new QDoubleSpinBox( anOriGrp );
+  myData[ X ] = new QtxDoubleSpinBox( anOriGrp );
   anOriGrpLayout->addWidget( myData[ X ] );
   anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Y" ), anOriGrp ) );
-  myData[ Y ] = new QDoubleSpinBox( anOriGrp );
+  myData[ Y ] = new QtxDoubleSpinBox( anOriGrp );
   anOriGrpLayout->addWidget( myData[ Y ] );
   anOriGrpLayout->addWidget( new QLabel( tr( "GEOM_Z" ), anOriGrp ) );
-  myData[ Z ] = new QDoubleSpinBox( anOriGrp );
+  myData[ Z ] = new QtxDoubleSpinBox( anOriGrp );
   anOriGrpLayout->addWidget( myData[ Z ] );
 
   aMainGrpLayout->addWidget( anOriGrp );
@@ -114,13 +114,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
   QVBoxLayout* aXAxisGrpLayout = new QVBoxLayout( aXAxisGrp );
 
   aXAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), aXAxisGrp ) );
-  myData[ DX1 ] = new QDoubleSpinBox( aXAxisGrp );
+  myData[ DX1 ] = new QtxDoubleSpinBox( aXAxisGrp );
   aXAxisGrpLayout->addWidget( myData[ DX1 ] );
   aXAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), aXAxisGrp ) );
-  myData[ DY1 ] = new QDoubleSpinBox( aXAxisGrp );
+  myData[ DY1 ] = new QtxDoubleSpinBox( aXAxisGrp );
   aXAxisGrpLayout->addWidget( myData[ DY1 ] );
   aXAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), aXAxisGrp ) );
-  myData[ DZ1 ] = new QDoubleSpinBox( aXAxisGrp );
+  myData[ DZ1 ] = new QtxDoubleSpinBox( aXAxisGrp );
   aXAxisGrpLayout->addWidget( myData[ DZ1 ] );
 
   aMainGrpLayout->addWidget( aXAxisGrp );
@@ -129,13 +129,13 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th
   QVBoxLayout* anYAxisGrpLayout = new QVBoxLayout( anYAxisGrp );
 
   anYAxisGrpLayout->addWidget( new QLabel( tr( "DX" ), anYAxisGrp ) );
-  myData[ DX2 ] = new QDoubleSpinBox( anYAxisGrp );
+  myData[ DX2 ] = new QtxDoubleSpinBox( anYAxisGrp );
   anYAxisGrpLayout->addWidget( myData[ DX2 ] );
   anYAxisGrpLayout->addWidget( new QLabel( tr( "DY" ), anYAxisGrp ) );
-  myData[ DY2 ] = new QDoubleSpinBox( anYAxisGrp );
+  myData[ DY2 ] = new QtxDoubleSpinBox( anYAxisGrp );
   anYAxisGrpLayout->addWidget( myData[ DY2 ] );
   anYAxisGrpLayout->addWidget( new QLabel( tr( "DZ" ), anYAxisGrp ) );
-  myData[ DZ2 ] = new QDoubleSpinBox( anYAxisGrp );
+  myData[ DZ2 ] = new QtxDoubleSpinBox( anYAxisGrp );
   anYAxisGrpLayout->addWidget( myData[ DZ2 ] );
 
   aMainGrpLayout->addWidget( anYAxisGrp );
index 7dc5cd9a9132879477409adad9fb03fd3a61f45b..be0e91183b42937eeda9aa482eb5c092434140fc 100644 (file)
@@ -32,7 +32,7 @@
 
 class DlgRef_1Sel;
 class DlgRef_3Sel;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QFrame;
 
 class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
@@ -41,7 +41,7 @@ class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
 
 private:
   enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
-  typedef QMap< int, QDoubleSpinBox* > DataMap;
+  typedef QMap< int, QtxDoubleSpinBox* > DataMap;
 
 public:
                                 BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
index 040a64e90da87462dc83884bbe90a1055817cad7..053157a9530999f07040d4465a0f1cc240eb55d2 100644 (file)
@@ -111,7 +111,7 @@ void BlocksGUI_TrsfDlg::Init()
 {
   // Set range of spinboxes
   double SpecificStep = 1.0;
-  QMap<int, QDoubleSpinBox*>::iterator anIter;
+  QMap<int, QtxDoubleSpinBox*>::iterator anIter;
   for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
     //anIter.data()->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3);
     initSpinBox(anIter.value(), 1.0, MAX_NUMBER, SpecificStep, 3);
@@ -127,7 +127,7 @@ void BlocksGUI_TrsfDlg::Init()
   for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn)
     connect(anIterBtn.value(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
 
-  QMap<int, QDoubleSpinBox*>::iterator anIterSpin;
+  QMap<int, QtxDoubleSpinBox*>::iterator anIterSpin;
   for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin)
     connect(anIterSpin.value(), SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
 
@@ -449,7 +449,7 @@ void BlocksGUI_TrsfDlg::createSpinWg (const QString& theLbl,
                                       const int      theId)
 {
   QLabel* lab = new QLabel(theLbl, theParent);
-  mySpinBox[theId] = new QDoubleSpinBox(theParent);
+  mySpinBox[theId] = new QtxDoubleSpinBox(theParent);
   QGridLayout* l = 0;
   if (!theParent->layout()) {
     l = new QGridLayout(theParent);
index 2087d481bd5c2b6c900b6047a5b8c0873fd7d63b..2706a2fc2ae72b26269538c77cbe8e03106d11c3 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <QMap>
 
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QGroupBox;
 class QPushButton;
 class QLineEdit;
@@ -78,7 +78,7 @@ private:
 
   QMap<int, QPushButton*>            mySelBtn;
   QMap<int, QLineEdit*>              mySelName;
-  QMap<int, QDoubleSpinBox*>         mySpinBox;
+  QMap<int, QtxDoubleSpinBox*>       mySpinBox;
 
 private slots:
   void                               ClickOnOk();
index 591bc79ac119b981ed0ed28bdacd07f9b480156c..4709813dff69edad9c3536b8ae0a7fe845453e52 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "EntityGUI_SketcherDlg.h"
 #include "EntityGUI_Widgets.h"
+#include <QtxDoubleSpinBox.h>
 
 #include <GEOMBase.h>
 #include <GeometryGUI.h>
@@ -277,7 +278,7 @@ bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event)
   if (event->type() == QEvent::KeyRelease) {
     // NPAL16010 (Sketcher Apply non available if only one line is modified)
     // To have Apply active as soon as value text changed
-    QDoubleSpinBox* aDoubleSpinBox = (QDoubleSpinBox*)object;
+    QtxDoubleSpinBox* aDoubleSpinBox = (QtxDoubleSpinBox*)object;
     if (aDoubleSpinBox)
       ValueChangedInSpinBox( aDoubleSpinBox->value() );
   }
index 02519e43480c4a303a590c7f4750308cfda3e925..c634ea7f690e2e44c84a53188c65b993bc27a2ac 100644 (file)
@@ -24,6 +24,7 @@
 //
 
 #include "OperationGUI_ChamferDlg.h"
+#include <QtxDoubleSpinBox.h>
 
 #include <DlgRef.h>
 #include <GeometryGUI.h>
@@ -84,7 +85,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg (GeometryGUI* theGeometryGUI, Q
 
   int row = aLayout->rowCount();
   aLayout->addWidget(new QLabel(tr("D"), myGrp1), row, 0);
-  aLayout->addWidget((mySpinBox[ SpinBox1 ] = new QDoubleSpinBox(myGrp1)), row++, 2);
+  aLayout->addWidget((mySpinBox[ SpinBox1 ] = new QtxDoubleSpinBox(myGrp1)), row++, 2);
   aLayout->setRowStretch(row, 10);
 
   // Create second group
@@ -145,7 +146,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg (GeometryGUI* theGeometryGUI, Q
 
   // Set range of spinboxes
   double SpecificStep = 10.0;
-  QMap< int, QDoubleSpinBox* >::iterator anIter;
+  QMap< int, QtxDoubleSpinBox* >::iterator anIter;
   for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
     if (anIter.key() == SpinBox44 || anIter.key() == SpinBox34 || anIter.key() == SpinBox24)
       initSpinBox(anIter.value(), 0.001, 89.999, 5, 0);
@@ -175,7 +176,7 @@ OperationGUI_ChamferDlg::~OperationGUI_ChamferDlg()
 void OperationGUI_ChamferDlg::Init()
 {
   // Set Initial values of spinboxes
-  QMap< int, QDoubleSpinBox* >::iterator anIter;
+  QMap< int, QtxDoubleSpinBox* >::iterator anIter;
   for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter)
     anIter.value()->setValue(5);
 
@@ -213,7 +214,7 @@ void OperationGUI_ChamferDlg::Init()
             this, SLOT(LineEditReturnPressed()));
 
   // spin boxes
-  QMap< int, QDoubleSpinBox* >::iterator anIterSpin;
+  QMap< int, QtxDoubleSpinBox* >::iterator anIterSpin;
   for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin)
     connect(anIterSpin.value(), SIGNAL(valueChanged(double)),
             this, SLOT(ValueChangedInSpinBox(double)));
@@ -641,8 +642,8 @@ void OperationGUI_ChamferDlg::createRadioWg(const QString& theLbl1,
   myRadioButton[ theRbId ] = new QRadioButton(theParent);
   QLabel* lab1 = new QLabel(theLbl1, theParent);
   QLabel* lab2 = new QLabel(theLbl2, theParent);
-  mySpinBox[ theSpin1Id ]  = new QDoubleSpinBox(theParent);
-  mySpinBox[ theSpin2Id ]  = new QDoubleSpinBox(theParent);
+  mySpinBox[ theSpin1Id ]  = new QtxDoubleSpinBox(theParent);
+  mySpinBox[ theSpin2Id ]  = new QtxDoubleSpinBox(theParent);
   int row = theLayout->rowCount();
   theLayout->addWidget(myRadioButton[ theRbId ], row, 0);
   theLayout->addWidget(lab1,                     row, 2);
index eb81ae377a3bb2b23e1a3414d1745ef1649bb71b..4d3dd165239094b5a7d943ae3152685f062ff41d 100644 (file)
 
 #include <QMap>
 
-class QDoubleSpinBox;
 class QGroupBox;
 class QPushButton;
 class QLineEdit;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QGridLayout;
 class QRadioButton;
 
@@ -106,7 +105,7 @@ private:
   
   QMap< int, QPushButton* >           mySelBtn;
   QMap< int, QLineEdit* >             mySelName;
-  QMap< int, QDoubleSpinBox* >        mySpinBox;
+  QMap< int, QtxDoubleSpinBox* >      mySpinBox;
   QMap< int, QRadioButton* >          myRadioButton;
 };
 
index 804ddc6cbb381217bd2b0ed3ba297021574bf145..69403e7306ed0b775fab5b836dfb40035d06f850 100644 (file)
@@ -28,6 +28,7 @@
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
+#include <QtxDoubleSpinBox.h>
 
 #include <SUIT_Session.h>
 #include <SUIT_Desktop.h>
@@ -73,13 +74,13 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( GeometryGUI* theGeometryGUI,
   TextLabelNear = new QLabel( tr( "Near" ), GroupArguments );
   GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 );
 
-  SpinBox_Near = new QDoubleSpinBox( GroupArguments );
+  SpinBox_Near = new QtxDoubleSpinBox( COORD_MIN, COORD_MAX, 10.0, 3, 10, GroupArguments );
   GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 );
 
   TextLabelFar = new QLabel( tr( "Far" ), GroupArguments );
   GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 );
 
-  SpinBox_Far = new QDoubleSpinBox( GroupArguments );
+  SpinBox_Far = new QtxDoubleSpinBox(  COORD_MIN, COORD_MAX, 10.0, 3, 10, GroupArguments );
   GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 );
 
   resetButton  = new QPushButton( tr( "Reset" ), GroupArguments );
@@ -96,10 +97,6 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( GeometryGUI* theGeometryGUI,
   layout->setMargin( 0 ); layout->setSpacing( 6 );
   layout->addWidget( GroupArguments );
 
-  /* Initialisations */
-  initSpinBox( SpinBox_Near, COORD_MIN, COORD_MAX, 10.0, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
-  initSpinBox( SpinBox_Far, COORD_MIN, COORD_MAX, 10.0, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
-
   /* signals and slots connections */
   connect( buttonOk(),    SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
   connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
index 7197f1386f42b4777f2e07cb07330082cc3cd0bd..79565effb5a9659841e152a93678dfa60e9e0bfa 100644 (file)
@@ -32,7 +32,7 @@ class QGroupBox;
 class QLabel;
 class QPushButton;
 class QComboBox;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 
 enum ViewerTypes { VTK, OCC, OTHER };
 
@@ -58,9 +58,9 @@ private:
   
   QGroupBox*        GroupArguments;
   QLabel*           TextLabelNear;
-  QDoubleSpinBox*   SpinBox_Near;
+  QtxDoubleSpinBox* SpinBox_Near;
   QLabel*           TextLabelFar;
-  QDoubleSpinBox*   SpinBox_Far;
+  QtxDoubleSpinBox* SpinBox_Far;
   QPushButton*      resetButton;
   QComboBox*        TypeCB;
 
index 7cea1fd993597e5fb4f4f6a0d2fb9c7dc7ebae01..71bb7db838ae57dfa792a1a83133b66dee5a464f 100644 (file)
@@ -28,6 +28,7 @@
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
+#include <QtxDoubleSpinBox.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
@@ -83,8 +84,7 @@ RepairGUI_DivideEdgeDlg::RepairGUI_DivideEdgeDlg( GeometryGUI* theGeometryGUI, Q
   myIsParameterGr->addButton( rb2, 1 );
   rb1->setChecked( true );
 
-  myValEdt = new QDoubleSpinBox( GroupPoints->Box );
-  initSpinBox( myValEdt, 0., 1., 0.1, 3 );
+  myValEdt = new QtxDoubleSpinBox( 0., 1., 0.1, 3, 32, GroupPoints->Box );
   myValEdt->setValue( 0.5 );
   QLabel* aLbl1 = new QLabel( tr( "GEOM_VALUE" ), GroupPoints->Box );
 
index 59de84f19c86b1920f088123648817b5ee05fd7d..aa11042b12c3bb6e1944c8592666a17d285e5a0c 100644 (file)
@@ -29,7 +29,7 @@
 #include <GEOMBase_Skeleton.h>
 
 class DlgRef_1SelExt;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QButtonGroup;
 
 //=================================================================================
@@ -63,7 +63,7 @@ private:
   
   DlgRef_1SelExt*                    GroupPoints;
   QButtonGroup*                      myIsParameterGr;
-  QDoubleSpinBox*                    myValEdt;
+  QtxDoubleSpinBox*                  myValEdt;
 
 protected slots:
   void                               ClickOnOk();
index c3ddfef0eb2a930007f9d9601fa2891d2d78b302..e361209e20dac98ba825434748624b61f1b469c8 100644 (file)
@@ -28,6 +28,7 @@
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
+#include <QtxDoubleSpinBox.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
@@ -81,8 +82,7 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare
   GroupPoints->LineEdit1->setReadOnly( true );
   
   QLabel* aTolLab = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
-  myTolEdt = new QDoubleSpinBox( GroupPoints->Box );
-  initSpinBox( myTolEdt,  0, 100, 1e-7, 7 );
+  myTolEdt = new QtxDoubleSpinBox( 0.0, 100.0, DEFAULT_TOLERANCE_VALUE, 7, 7, GroupPoints->Box );
   myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
 
   QGridLayout* boxLayout = new QGridLayout( GroupPoints->Box );
@@ -98,7 +98,7 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare
   GroupPoints2->LineEdit1->setReadOnly( true );
 
   QLabel* aTolLab2 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints2->Box );
-  myTolEdt2 = new QDoubleSpinBox( GroupPoints2->Box );
+  myTolEdt2 = new QtxDoubleSpinBox( GroupPoints2->Box );
   initSpinBox( myTolEdt2, 0, 100, 1e-7, 7 );
   myTolEdt2->setValue( DEFAULT_TOLERANCE_VALUE );
 
index efdd034d23b80800002c45386685fe5f8b26e50e..26b33e18598e46083f88a2df7cd748c34e1c9513 100644 (file)
@@ -29,7 +29,7 @@
 #include <GEOMBase_Skeleton.h>
 
 class DlgRef_1SelExt;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QPushButton;
 class QCheckBox;
 
@@ -73,8 +73,8 @@ private:
     
   DlgRef_1SelExt*                    GroupPoints;
   DlgRef_1SelExt*                    GroupPoints2;
-  QDoubleSpinBox*                    myTolEdt;
-  QDoubleSpinBox*                    myTolEdt2;
+  QtxDoubleSpinBox*                  myTolEdt;
+  QtxDoubleSpinBox*                  myTolEdt2;
   QPushButton*                       myDetectBtn;
   QCheckBox*                         mySubShapesChk;
   
index a6d8f1cbadf86600f4066d52e678cb87abb416e1..066c935a474bdbf290c4c18933933f720f23f874 100644 (file)
@@ -28,6 +28,7 @@
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
+#include <QtxDoubleSpinBox.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
@@ -69,13 +70,12 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg( GeometryGUI* theGeometryGUI, QWidget*
   GroupPoints = new DlgRef_1SelExt( centralWidget() );
   GroupPoints->GroupBox1->setTitle( tr( "GEOM_SEWING" ) );
   GroupPoints->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) );
-  GroupPoints->PushButton1->setIcon( image1 );
+  GroupPoints->PushButton1->setIxcon( image1 );
   GroupPoints->LineEdit1->setReadOnly( true );
 
   QGridLayout* aLay = new QGridLayout( GroupPoints->Box );
   aLay->setMargin( 0 ); aLay->setSpacing( 6 );
-  myTolEdt = new QDoubleSpinBox( GroupPoints->Box );
-  initSpinBox( myTolEdt, 0, 100, 1e-7, 10 );
+  myTolEdt = new QtxDoubleSpinBox( 0.0, 100.0, DEFAULT_TOLERANCE_VALUE, 7, 10, GroupPoints->Box );
   myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
   QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
   myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GEOM_FREE_BOUNDARIES" ) ), 
index 4830d979ca71ea32b50a762ad2febdcbd40c9b61..0c170ca6e1591111286df8055f73036275c74fe2 100644 (file)
@@ -29,7 +29,7 @@
 #include <GEOMBase_Skeleton.h>
 
 class DlgRef_1SelExt;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QPushButton;
 
 //=================================================================================
@@ -59,7 +59,7 @@ private:
   GEOM::GEOM_Object_var              myObject;
 
   DlgRef_1SelExt*                    GroupPoints;
-  QDoubleSpinBox*                    myTolEdt;
+  QtxDoubleSpinBox*                    myTolEdt;
   QPushButton*                       myFreeBoundBtn;
   
   int                                myClosed; // Number of free closed boundaries detected. Calculated in execute(), used in onDetect().
index 1abf61dc17933905400be268abb1c6caa8aa21cb..2d7f154070bbcdab77a5d51d8bc5bdb84054d4ec 100755 (executable)
@@ -29,6 +29,7 @@
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
 #include <GEOMImpl_Types.hxx>
+#include <QtxDoubleSpinBox.h>
 
 #include <SalomeApp_Application.h>
 #include <LightApp_SelectionMgr.h>
@@ -123,10 +124,8 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
       
-      myFixShapeTol3D = new QDoubleSpinBox( w );
-      initSpinBox( myFixShapeTol3D, 0, 100, 1e-7, 10 );
-      myFixShapeMaxTol3D = new QDoubleSpinBox( w );
-      initSpinBox( myFixShapeMaxTol3D, 0, 100, 1e-7, 10 );
+      myFixShapeTol3D = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
+      myFixShapeMaxTol3D = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
       
       aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
       aLay->addWidget( myFixShapeTol3D, 0, 1 );
@@ -140,8 +139,7 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
       
-      myFixFaceSizeTol = new QDoubleSpinBox( w );
-      initSpinBox( myFixFaceSizeTol, 0, 100, 1e-7, 10 );
+      myFixFaceSizeTol = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
       
       aLay->addWidget( new QLabel( tr( "GEOM_TOLERANCE" ), w ), 0, 0 );
       aLay->addWidget( myFixFaceSizeTol, 0, 1 );
@@ -153,8 +151,7 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
       
-      myDropSmallEdgesTol3D = new QDoubleSpinBox( w );
-      initSpinBox( myDropSmallEdgesTol3D, 0, 100, 1e-7, 10 );
+      myDropSmallEdgesTol3D = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
   
       aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
       aLay->addWidget( myDropSmallEdgesTol3D, 0, 1 );
@@ -166,10 +163,8 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
       
-      mySplitAngleAngle = new QDoubleSpinBox( w );
-      initSpinBox( mySplitAngleAngle, 0, 360, 1 );
-      mySplitAngleMaxTol = new QDoubleSpinBox( w );
-      initSpinBox( mySplitAngleMaxTol, 0, 100, 1e-7, 10 );
+      mySplitAngleAngle = new QtxDoubleSpinBox(  0, 360, 1, 10, 10, w );
+      mySplitAngleMaxTol = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
       
       aLay->addWidget( new QLabel( tr( "GEOM_ANGLE_1" ), w ), 0, 0 );
       aLay->addWidget( mySplitAngleAngle, 0, 1 );
@@ -195,8 +190,7 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
 
-      mySplitContTol3D = new QDoubleSpinBox( w );
-      initSpinBox( mySplitContTol3D, 0, 100, 1e-7, 10 );
+      mySplitContTol3D = new QtxDoubleSpinBox(  0., 100., 1e-7, 10, 10, w );
       mySplitContSurfCont = new QComboBox( w );
       mySplitContSurfCont->addItems( aContinueties );
       mySplitContCurvCont = new QComboBox( w );
@@ -220,11 +214,9 @@ void RepairGUI_ShapeProcessDlg::init()
       myBSpline3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
       myBSpline2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
 
-      myBSplineTol3D = new QDoubleSpinBox( w );
-      initSpinBox( myBSplineTol3D, 0, 100, 1e-7, 10 );
+      myBSplineTol3D = new QtxDoubleSpinBox(  0., 100., 1e-7, 10, 10, w );
       
-      myBSplineTol2D = new QDoubleSpinBox( w );
-      initSpinBox( myBSplineTol2D, 0, 100, 1e-7, 10 );
+      myBSplineTol2D = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
 
       myBSplineDegree = new QSpinBox( w );
       myBSplineSegments = new QSpinBox( w );
@@ -264,8 +256,7 @@ void RepairGUI_ShapeProcessDlg::init()
       myToBezier3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
       myToBezier2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
   
-      myToBezierMaxTol = new QDoubleSpinBox( w );
-      initSpinBox( myToBezierMaxTol, 0, 100, 1e-7, 10 );
+      myToBezierMaxTol = new QtxDoubleSpinBox(  0., 100., 1e-7, 10, 10, w );
 
       aLay->addWidget( myToBezierSurfModeChk, 0, 0 );
       aLay->addWidget( myToBezier3DCurveChk, 1, 0 );
@@ -280,8 +271,7 @@ void RepairGUI_ShapeProcessDlg::init()
       QGridLayout* aLay = new QGridLayout( w );
       aLay->setMargin( 9 ); aLay->setSpacing( 6 );
 
-      mySameParameterTol3D = new QDoubleSpinBox( w );
-      initSpinBox( mySameParameterTol3D, 0, 100, 1e-7, 10 );
+      mySameParameterTol3D = new QtxDoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
       
       aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
       aLay->addWidget( mySameParameterTol3D, 0, 1 );
@@ -508,8 +498,8 @@ void RepairGUI_ShapeProcessDlg::loadDefaults()
 void RepairGUI_ShapeProcessDlg::setValue( QWidget* theControl, const QString& theValue )
 {
   if ( theControl && !theValue.isNull() ) {
-    if ( qobject_cast<QDoubleSpinBox*>( theControl ) )
-      qobject_cast<QDoubleSpinBox*>( theControl )->setValue( theValue.toDouble() );
+    if ( qobject_cast<QtxDoubleSpinBox*>( theControl ) )
+      qobject_cast<QtxDoubleSpinBox*>( theControl )->setValue( theValue.toDouble() );
     else if ( qobject_cast<QSpinBox*>( theControl ) )
       qobject_cast<QSpinBox*>( theControl )->setValue( theValue.toInt() );
     else if ( qobject_cast<QComboBox*>( theControl ) )
@@ -526,8 +516,8 @@ void RepairGUI_ShapeProcessDlg::setValue( QWidget* theControl, const QString& th
 QString RepairGUI_ShapeProcessDlg::getValue( QWidget* theControl ) const
 {
   if ( theControl ) {
-    if ( qobject_cast<QDoubleSpinBox*>( theControl ) )
-      return QString::number( qobject_cast<QDoubleSpinBox*>( theControl )->value() );
+    if ( qobject_cast<QtxDoubleSpinBox*>( theControl ) )
+      return QString::number( qobject_cast<QtxDoubleSpinBox*>( theControl )->value() );
     else if ( qobject_cast<QSpinBox*>( theControl ) )
       return QString::number( qobject_cast<QSpinBox*>( theControl )->value() );
     else if ( qobject_cast<QComboBox*>( theControl ) )
index 4cfd35302623c093f3db2ee9bba5b7413a55095d..47b1b69fe0addaed9ff028c4dcae4d1815acddae 100755 (executable)
@@ -32,7 +32,7 @@
 
 class DlgRef_1Sel;
 class QSpinBox;
-class QDoubleSpinBox;
+class QtxDoubleSpinBox;
 class QComboBox;
 class QCheckBox;
 class QListWidget;
@@ -84,27 +84,27 @@ private:
   DlgRef_1Sel*                       mySelectWdgt;
   QListWidget*                       myOpList;
   
-  QDoubleSpinBox*                    myFixShapeTol3D;
-  QDoubleSpinBox*                    myFixShapeMaxTol3D;
+  QtxDoubleSpinBox*                  myFixShapeTol3D;
+  QtxDoubleSpinBox*                  myFixShapeMaxTol3D;
 
-  QDoubleSpinBox*                    myFixFaceSizeTol;
+  QtxDoubleSpinBox*                  myFixFaceSizeTol;
   
-  QDoubleSpinBox*                    myDropSmallEdgesTol3D;
+  QtxDoubleSpinBox*                  myDropSmallEdgesTol3D;
 
-  QDoubleSpinBox*                    mySplitAngleAngle;
-  QDoubleSpinBox*                    mySplitAngleMaxTol;
+  QtxDoubleSpinBox*                  mySplitAngleAngle;
+  QtxDoubleSpinBox*                  mySplitAngleMaxTol;
   
   QSpinBox*                          mySplitClosedFacesNum;
   
-  QDoubleSpinBox*                    mySplitContTol3D;
+  QtxDoubleSpinBox*                  mySplitContTol3D;
   QComboBox*                         mySplitContSurfCont;
   QComboBox*                         mySplitContCurvCont;
   
   QCheckBox*                         myBSplineSurfModeChk;
   QCheckBox*                         myBSpline3DCurveChk;
   QCheckBox*                         myBSpline2DCurveChk;
-  QDoubleSpinBox*                    myBSplineTol3D;
-  QDoubleSpinBox*                    myBSplineTol2D;
+  QtxDoubleSpinBox*                  myBSplineTol3D;
+  QtxDoubleSpinBox*                  myBSplineTol2D;
   QSpinBox*                          myBSplineDegree;
   QSpinBox*                          myBSplineSegments;
   QComboBox*                         myBSpline2DCont;
@@ -113,9 +113,9 @@ private:
   QCheckBox*                         myToBezierSurfModeChk;
   QCheckBox*                         myToBezier3DCurveChk;
   QCheckBox*                         myToBezier2DCurveChk;
-  QDoubleSpinBox*                    myToBezierMaxTol;
+  QtxDoubleSpinBox*                  myToBezierMaxTol;
   
-  QDoubleSpinBox*                    mySameParameterTol3D;
+  QtxDoubleSpinBox*                  mySameParameterTol3D;
   
 private slots:
   void                               onOk();