mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-18 23:50:36 +05:00
rnc : Slight GUI improvements
This commit is contained in:
parent
9e31f81bd0
commit
fd2a29b763
@ -559,10 +559,10 @@ void EntityGUI_SketcherDlg::Point2Clicked( int constructorId )
|
|||||||
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X2" ) );
|
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X2" ) );
|
||||||
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y2" ) );
|
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y2" ) );
|
||||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||||
myDX = 0.0;
|
myX = 0.0;
|
||||||
Group3Spin->SpinBox_DX->setValue( myDX );
|
Group3Spin->SpinBox_DX->setValue( myX );
|
||||||
myDY = 0.0;
|
myY = 0.0;
|
||||||
Group3Spin->SpinBox_DY->setValue( myDY );
|
Group3Spin->SpinBox_DY->setValue( myY );
|
||||||
myRadius=0.0;
|
myRadius=0.0;
|
||||||
Group3Spin->SpinBox_DZ->setValue( myRadius );
|
Group3Spin->SpinBox_DZ->setValue( myRadius );
|
||||||
Group3Spin->show();
|
Group3Spin->show();
|
||||||
@ -576,18 +576,18 @@ void EntityGUI_SketcherDlg::Point2Clicked( int constructorId )
|
|||||||
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X2" ) );
|
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X2" ) );
|
||||||
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y2" ) );
|
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_Y2" ) );
|
||||||
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_CENTER_X" ) );
|
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_CENTER_X" ) );
|
||||||
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_CENTER_Y" ) );
|
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_CENTER_Y" ) );
|
||||||
myDX = 0.0;
|
|
||||||
Group4Spin->SpinBox_DX->setValue( myDX );
|
|
||||||
myDY = 0.0;
|
|
||||||
Group4Spin->SpinBox_DY->setValue( myDY );
|
|
||||||
myXc = 0.0;
|
myXc = 0.0;
|
||||||
Group4Spin->SpinBox_DZ->setValue( myXc );
|
Group4Spin->SpinBox_DX->setValue( myXc );
|
||||||
myYc = 0.0;
|
myYc = 0.0;
|
||||||
Group4Spin->SpinBox_DS->setValue( myYc );
|
Group4Spin->SpinBox_DY->setValue( myYc );
|
||||||
|
myX = 0.0;
|
||||||
|
Group4Spin->SpinBox_DZ->setValue( myX );
|
||||||
|
myY = 0.0;
|
||||||
|
Group4Spin->SpinBox_DS->setValue( myY );
|
||||||
Group4Spin->show();
|
Group4Spin->show();
|
||||||
Group4Spin->buttonApply->setFocus();
|
Group4Spin->buttonApply->setFocus();
|
||||||
|
|
||||||
@ -636,18 +636,18 @@ void EntityGUI_SketcherDlg::Point2Clicked( int constructorId )
|
|||||||
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, step, "length_precision" );
|
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_DX2" ) );
|
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_DX2" ) );
|
||||||
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_DY2" ) );
|
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_DY2" ) );
|
||||||
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_CENTER_DX" ) );
|
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_CENTER_DX" ) );
|
||||||
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_CENTER_DY" ) );
|
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_CENTER_DY" ) );
|
||||||
myDX = 0.0;
|
|
||||||
Group4Spin->SpinBox_DX->setValue( myDX );
|
|
||||||
myDY = 0.0;
|
|
||||||
Group4Spin->SpinBox_DY->setValue( myDY );
|
|
||||||
myDXc = 0.0;
|
myDXc = 0.0;
|
||||||
Group4Spin->SpinBox_DZ->setValue( myDXc );
|
Group4Spin->SpinBox_DX->setValue( myDXc );
|
||||||
myDYc = 0.0;
|
myDYc = 0.0;
|
||||||
Group4Spin->SpinBox_DS->setValue( myDYc );
|
Group4Spin->SpinBox_DY->setValue( myDYc );
|
||||||
|
myDX = 0.0;
|
||||||
|
Group4Spin->SpinBox_DZ->setValue( myDX );
|
||||||
|
myDY = 0.0;
|
||||||
|
Group4Spin->SpinBox_DS->setValue( myDY );
|
||||||
Group4Spin->show();
|
Group4Spin->show();
|
||||||
Group4Spin->buttonApply->setFocus();
|
Group4Spin->buttonApply->setFocus();
|
||||||
|
|
||||||
@ -680,8 +680,8 @@ void EntityGUI_SketcherDlg::Point2Clicked( int constructorId )
|
|||||||
else if ( constructorId == 2 ){ // Point + center
|
else if ( constructorId == 2 ){ // Point + center
|
||||||
mySketchType = PT_SEL_CENTER;
|
mySketchType = PT_SEL_CENTER;
|
||||||
myEditCurrentArgument = Group2Sel->LineEdit1;
|
myEditCurrentArgument = Group2Sel->LineEdit1;
|
||||||
Group2Sel->TextLabel1->setText( tr( "GEOM_SKETCHER_END_POINT2" ) );
|
Group2Sel->TextLabel2->setText( tr( "GEOM_SKETCHER_END_POINT2" ) );
|
||||||
Group2Sel->TextLabel2->setText( tr( "GEOM_SKETCHER_CENTER2" ) );
|
Group2Sel->TextLabel1->setText( tr( "GEOM_SKETCHER_CENTER2" ) );
|
||||||
Group2Sel->LineEdit1->setEnabled(true);
|
Group2Sel->LineEdit1->setEnabled(true);
|
||||||
Group2Sel->PushButton1->setDown(true);
|
Group2Sel->PushButton1->setDown(true);
|
||||||
Group2Sel->LineEdit2->setEnabled(false);
|
Group2Sel->LineEdit2->setEnabled(false);
|
||||||
@ -1255,27 +1255,27 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
gp_Pnt aPnt;
|
gp_Pnt aPnt;
|
||||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||||
myX = aPnt.X();
|
myXc = aPnt.X();
|
||||||
myY = aPnt.Y();
|
myYc = aPnt.Y();
|
||||||
Group2Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
Group2Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if( Group4Spin->isVisible() && mySketchType == PT_ABS ) {
|
if( Group4Spin->isVisible() && mySketchType == PT_ABS ) {
|
||||||
disconnect( Group4Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
disconnect( Group4Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
disconnect( Group4Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
disconnect( Group4Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
Group4Spin->SpinBox_DX->setValue(myX);
|
Group4Spin->SpinBox_DX->setValue(myXc);
|
||||||
Group4Spin->SpinBox_DY->setValue(myY);
|
Group4Spin->SpinBox_DY->setValue(myYc);
|
||||||
connect( Group4Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( Group4Spin->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( Group4Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( Group4Spin->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
} else if ( Group4Spin->isVisible() && mySketchType == PT_RELATIVE ) {
|
} else if ( Group4Spin->isVisible() && mySketchType == PT_RELATIVE ) {
|
||||||
if ( myLastX1 && myLastY1 ) {
|
if ( myLastX1 && myLastY1 ) {
|
||||||
Group4Spin->SpinBox_DX->setValue(myX - myLastX1);
|
Group4Spin->SpinBox_DX->setValue(myXc - myLastX1);
|
||||||
Group4Spin->SpinBox_DY->setValue(myY - myLastY1);
|
Group4Spin->SpinBox_DY->setValue(myYc - myLastY1);
|
||||||
} else {
|
} else {
|
||||||
if ( mySketchState != FIRST_POINT ) {
|
if ( mySketchState != FIRST_POINT ) {
|
||||||
Group4Spin->SpinBox_DX->setValue(myX - tmpX);
|
Group4Spin->SpinBox_DX->setValue(myXc - tmpX);
|
||||||
Group4Spin->SpinBox_DY->setValue(myY - tmpY);
|
Group4Spin->SpinBox_DY->setValue(myYc - tmpY);
|
||||||
} else {
|
} else {
|
||||||
Group4Spin->SpinBox_DX->setValue(myX);
|
Group4Spin->SpinBox_DX->setValue(myXc);
|
||||||
Group4Spin->SpinBox_DY->setValue(myY);
|
Group4Spin->SpinBox_DY->setValue(myYc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1302,27 +1302,27 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
gp_Pnt aPnt;
|
gp_Pnt aPnt;
|
||||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||||
myXc = aPnt.X();
|
myX = aPnt.X();
|
||||||
myYc = aPnt.Y();
|
myY = aPnt.Y();
|
||||||
Group2Sel->LineEdit2->setText( GEOMBase::GetName( aSelectedObject ) );
|
Group2Sel->LineEdit2->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
if( Group4Spin->isVisible() && mySketchType == PT_ABS ) {
|
if( Group4Spin->isVisible() && mySketchType == PT_ABS ) {
|
||||||
disconnect( Group4Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
disconnect( Group4Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
disconnect( Group4Spin->SpinBox_DS, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
disconnect( Group4Spin->SpinBox_DS, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
Group4Spin->SpinBox_DZ->setValue(myXc);
|
Group4Spin->SpinBox_DZ->setValue(myX);
|
||||||
Group4Spin->SpinBox_DS->setValue(myYc);
|
Group4Spin->SpinBox_DS->setValue(myY);
|
||||||
connect( Group4Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( Group4Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect( Group4Spin->SpinBox_DS, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
connect( Group4Spin->SpinBox_DS, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
} else if ( Group4Spin->isVisible() && mySketchType == PT_RELATIVE ) {
|
} else if ( Group4Spin->isVisible() && mySketchType == PT_RELATIVE ) {
|
||||||
if ( myLastX1 && myLastY1 ) {
|
if ( myLastX1 && myLastY1 ) {
|
||||||
Group4Spin->SpinBox_DZ->setValue(myXc - myLastX1);
|
Group4Spin->SpinBox_DZ->setValue(myX - myLastX1);
|
||||||
Group4Spin->SpinBox_DS->setValue(myYc - myLastY1);
|
Group4Spin->SpinBox_DS->setValue(myY - myLastY1);
|
||||||
} else {
|
} else {
|
||||||
if ( mySketchState != FIRST_POINT ) {
|
if ( mySketchState != FIRST_POINT ) {
|
||||||
Group4Spin->SpinBox_DZ->setValue(myXc - tmpX);
|
Group4Spin->SpinBox_DZ->setValue(myX - tmpX);
|
||||||
Group4Spin->SpinBox_DS->setValue(myYc - tmpY);
|
Group4Spin->SpinBox_DS->setValue(myY - tmpY);
|
||||||
} else {
|
} else {
|
||||||
Group4Spin->SpinBox_DZ->setValue(myXc);
|
Group4Spin->SpinBox_DZ->setValue(myX);
|
||||||
Group4Spin->SpinBox_DS->setValue(myYc);
|
Group4Spin->SpinBox_DS->setValue(myY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1699,24 +1699,24 @@ void EntityGUI_SketcherDlg::ValueChangedInSpinBox( double newValue )
|
|||||||
myRadiusStr = vxStr;
|
myRadiusStr = vxStr;
|
||||||
}
|
}
|
||||||
if ( mySketchType == PT_ABS_CENTER ) {
|
if ( mySketchType == PT_ABS_CENTER ) {
|
||||||
myX = vx;
|
myXc = vx;
|
||||||
myY = vy;
|
myYc = vy;
|
||||||
myXc = vz;
|
myX = vz;
|
||||||
myYc = vs;
|
myY = vs;
|
||||||
myXStr = vxStr;
|
myXcStr = vxStr;
|
||||||
myYStr = vyStr;
|
myYcStr = vyStr;
|
||||||
myXcStr = vzStr;
|
myXStr = vzStr;
|
||||||
myYcStr = vsStr;
|
myYStr = vsStr;
|
||||||
}
|
}
|
||||||
else if ( mySketchType == PT_REL_CENTER ) {
|
else if ( mySketchType == PT_REL_CENTER ) {
|
||||||
myDX = vx;
|
myDXc = vx;
|
||||||
myDY = vy;
|
myDYc = vy;
|
||||||
myDXc = vz;
|
myDX = vz;
|
||||||
myDYc = vs;
|
myDY = vs;
|
||||||
myDXStr = vxStr;
|
myDXcStr = vxStr;
|
||||||
myDYStr = vyStr;
|
myDYcStr = vyStr;
|
||||||
myDXcStr = vzStr;
|
myDXStr = vzStr;
|
||||||
myDYcStr = vsStr;
|
myDYStr = vsStr;
|
||||||
}
|
}
|
||||||
if ( mySketchType == DIR_ANGLE_LENGTH ) {
|
if ( mySketchType == DIR_ANGLE_LENGTH ) {
|
||||||
myAngle = vx;
|
myAngle = vx;
|
||||||
|
Loading…
Reference in New Issue
Block a user