mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 18:30:36 +05:00
Qt4 porting. There are nonsignificant zeros in fields of some dialog boxes, if a DoubleSpin box is used.
This commit is contained in:
parent
87435661cb
commit
872de32076
@ -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 );
|
||||
|
@ -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* );
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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() );
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -32,11 +32,10 @@
|
||||
|
||||
#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;
|
||||
};
|
||||
|
||||
|
@ -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() ) );
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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" ) ),
|
||||
|
@ -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().
|
||||
|
@ -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 ) )
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user