mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-25 06:12:04 +05:00
NPAL16160,NPAL16123: Unify dialogs behaviour, enlarge precision of double numbers displaying.
This commit is contained in:
parent
4e2f485a8e
commit
efc0d6c141
@ -35,17 +35,10 @@
|
||||
|
||||
#include <qlabel.h>
|
||||
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
#include <GC_MakeArcOfCircle.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=================================================================================
|
||||
// class : BasicGUI_ArcDlg()
|
||||
// purpose : Constructs a BasicGUI_ArcDlg which is a child of 'parent', with the
|
||||
@ -58,9 +51,10 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
|
||||
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
||||
{
|
||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC")));
|
||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
|
||||
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ARC")));
|
||||
QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ARC_CENTER")));
|
||||
QPixmap image2(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||
|
||||
setCaption(tr("GEOM_ARC_TITLE"));
|
||||
|
||||
@ -103,6 +97,7 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
|
||||
Layout1->addWidget( Group3Pnts, 2, 0 );
|
||||
Layout1->addWidget( Group3Pnts2, 2, 0 );
|
||||
/***************************************************************/
|
||||
|
||||
setHelpFileName("arc.htm");
|
||||
|
||||
@ -126,13 +121,7 @@ BasicGUI_ArcDlg::~BasicGUI_ArcDlg()
|
||||
void BasicGUI_ArcDlg::Init()
|
||||
{
|
||||
/* init variables */
|
||||
// myGeomGUI->SetState( 0 );
|
||||
globalSelection( GEOM_POINT );
|
||||
|
||||
myConstructorId = -1;
|
||||
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||
myEditCurrentArgument->setFocus();
|
||||
|
||||
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||
Group3Pnts2->radioButton4->setChecked(FALSE);
|
||||
|
||||
@ -168,12 +157,65 @@ void BasicGUI_ArcDlg::Init()
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
initName( tr( "GEOM_ARC" ));
|
||||
|
||||
|
||||
ConstructorsClicked( 0 );
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ConstructorsClicked()
|
||||
// purpose : Radio button management
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::ConstructorsClicked (int constructorId)
|
||||
{
|
||||
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||
|
||||
switch (constructorId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
globalSelection( GEOM_POINT );
|
||||
|
||||
Group3Pnts->show();
|
||||
resize(0, 0);
|
||||
Group3Pnts2->hide();
|
||||
|
||||
Group3Pnts->LineEdit1->setText(Group3Pnts2->LineEdit1->text());
|
||||
Group3Pnts->LineEdit2->setText(Group3Pnts2->LineEdit2->text());
|
||||
Group3Pnts->LineEdit3->setText(Group3Pnts2->LineEdit3->text());
|
||||
|
||||
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
globalSelection( GEOM_POINT );
|
||||
|
||||
Group3Pnts->hide();
|
||||
resize(0, 0);
|
||||
Group3Pnts2->show();
|
||||
|
||||
Group3Pnts2->LineEdit1->setText(Group3Pnts->LineEdit1->text());
|
||||
Group3Pnts2->LineEdit2->setText(Group3Pnts->LineEdit2->text());
|
||||
Group3Pnts2->LineEdit3->setText(Group3Pnts->LineEdit3->text());
|
||||
|
||||
myEditCurrentArgument = Group3Pnts2->LineEdit1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||
this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
if (CORBA::is_nil(myPoint1))
|
||||
SelectionIntoArgument();
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnOk()
|
||||
// purpose :
|
||||
@ -184,15 +226,6 @@ void BasicGUI_ArcDlg::ClickOnOk()
|
||||
ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::ClickOnCancel()
|
||||
{
|
||||
GEOMBase_Skeleton::ClickOnCancel();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnApply()
|
||||
// purpose :
|
||||
@ -203,19 +236,6 @@ bool BasicGUI_ArcDlg::ClickOnApply()
|
||||
return false;
|
||||
|
||||
initName();
|
||||
|
||||
// reset
|
||||
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||
Group3Pnts->LineEdit1->setText( "" );
|
||||
Group3Pnts->LineEdit2->setText( "" );
|
||||
Group3Pnts->LineEdit3->setText( "" );
|
||||
Group3Pnts2->LineEdit1->setText( "" );
|
||||
Group3Pnts2->LineEdit2->setText( "" );
|
||||
Group3Pnts2->LineEdit3->setText( "" );
|
||||
if (getConstructorId() == 0) myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||
if (getConstructorId() == 1) myEditCurrentArgument = Group3Pnts2->LineEdit1;
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -230,7 +250,9 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
return;
|
||||
|
||||
myEditCurrentArgument->setText("");
|
||||
if ( IObjectCount() != 1 ){
|
||||
|
||||
if ( IObjectCount() != 1 )
|
||||
{
|
||||
switch (getConstructorId())
|
||||
{
|
||||
case 0:
|
||||
@ -251,6 +273,7 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// nbSel == 1
|
||||
Standard_Boolean aRes = Standard_False;
|
||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes );
|
||||
@ -281,6 +304,22 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : LineEditReturnPressed()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::LineEditReturnPressed()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
if (send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
|
||||
send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3)
|
||||
{
|
||||
myEditCurrentArgument = send;
|
||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetEditCurrentArgument()
|
||||
// purpose :
|
||||
@ -310,22 +349,6 @@ void BasicGUI_ArcDlg::SetEditCurrentArgument()
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : LineEditReturnPressed()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::LineEditReturnPressed()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
if ( send == Group3Pnts->LineEdit1 || send == Group3Pnts->LineEdit2 || send == Group3Pnts->LineEdit3 ||
|
||||
send == Group3Pnts2->LineEdit1 || send == Group3Pnts2->LineEdit2 || send == Group3Pnts2->LineEdit3 )
|
||||
{
|
||||
myEditCurrentArgument = send;
|
||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ActivateThisDialog()
|
||||
// purpose :
|
||||
@ -333,33 +356,13 @@ void BasicGUI_ArcDlg::LineEditReturnPressed()
|
||||
void BasicGUI_ArcDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
// myGeomGUI->SetState( 0 );
|
||||
globalSelection( GEOM_POINT );
|
||||
|
||||
myEditCurrentArgument = Group3Pnts->LineEdit1;
|
||||
myEditCurrentArgument->setFocus();
|
||||
|
||||
Group3Pnts->LineEdit1->setText( "" );
|
||||
Group3Pnts->LineEdit2->setText( "" );
|
||||
Group3Pnts->LineEdit3->setText( "" );
|
||||
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : DeactivateActiveDialog()
|
||||
// purpose : public slot to deactivate if active
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::DeactivateActiveDialog()
|
||||
{
|
||||
// myGeomGUI->SetState( -1 );
|
||||
GEOMBase_Skeleton::DeactivateActiveDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : enterEvent()
|
||||
@ -371,6 +374,7 @@ void BasicGUI_ArcDlg::enterEvent(QEvent* e)
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : createOperation
|
||||
// purpose :
|
||||
@ -412,8 +416,10 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) ){
|
||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->MakeArc(myPoint1, myPoint2, myPoint3);
|
||||
if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) )
|
||||
{
|
||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->
|
||||
MakeArc(myPoint1, myPoint2, myPoint3);
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
@ -422,61 +428,21 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
||||
{
|
||||
bool Sense;
|
||||
(Group3Pnts2->radioButton4->isChecked()) ? Sense = true : Sense = false;
|
||||
if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) ){
|
||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->MakeArcCenter(myPoint1, myPoint2, myPoint3,Sense);
|
||||
if ( !CORBA::is_nil(myPoint1) && !CORBA::is_nil(myPoint2) &&!CORBA::is_nil(myPoint3) )
|
||||
{
|
||||
anObj = GEOM::GEOM_ICurvesOperations::_narrow(getOperation())->
|
||||
MakeArcCenter(myPoint1, myPoint2, myPoint3, Sense);
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !anObj->_is_nil() ){
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
GEOMBase_Skeleton::closeEvent( e );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ConstructorsClicked()
|
||||
// purpose : Radio button management
|
||||
//=================================================================================
|
||||
void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
||||
{
|
||||
|
||||
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
|
||||
|
||||
switch (constructorId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Group3Pnts->show();
|
||||
resize(0, 0);
|
||||
Group3Pnts2->hide();
|
||||
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
Group3Pnts->hide();
|
||||
resize(0, 0);
|
||||
Group3Pnts2->show();
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ReverseSense()
|
||||
// purpose : Orientation of the arc
|
||||
|
@ -37,6 +37,7 @@
|
||||
#else
|
||||
#define BASICGUI_WNT_EXPORT
|
||||
#endif
|
||||
|
||||
//=================================================================================
|
||||
// class : BasicGUI_ArcDlg
|
||||
// purpose :
|
||||
@ -56,12 +57,10 @@ protected:
|
||||
virtual bool isValid( QString& );
|
||||
virtual bool execute( ObjectList& objects );
|
||||
|
||||
virtual void closeEvent( QCloseEvent* e );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void enterEvent(QEvent* e);
|
||||
int myConstructorId;
|
||||
|
||||
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
|
||||
|
||||
DlgRef_3Sel_QTD* Group3Pnts;
|
||||
@ -69,11 +68,9 @@ private :
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnCancel();
|
||||
bool ClickOnApply();
|
||||
|
||||
void ActivateThisDialog();
|
||||
void DeactivateActiveDialog();
|
||||
void ConstructorsClicked(int);
|
||||
void LineEditReturnPressed();
|
||||
void SelectionIntoArgument();
|
||||
|
@ -125,7 +125,7 @@ void BasicGUI_CircleDlg::Init()
|
||||
double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
||||
GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPntVecR->SpinBox_DX->SetValue( 100 );
|
||||
|
||||
/* signals and slots connections */
|
||||
|
@ -114,8 +114,8 @@ void BasicGUI_EllipseDlg::Init()
|
||||
double aMajorR( 200. ), aMinorR( 100. );
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 );
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY );
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY );
|
||||
GroupPoints->SpinBox_DX->SetValue( aMajorR );
|
||||
GroupPoints->SpinBox_DY->SetValue( aMinorR );
|
||||
|
||||
|
@ -176,7 +176,7 @@ void BasicGUI_MarkerDlg::Init()
|
||||
|
||||
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter )
|
||||
{
|
||||
anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 );
|
||||
anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
|
||||
connect( anIter.data(), SIGNAL( valueChanged( double ) ),
|
||||
this, SLOT( onValueChanged( double ) ) );
|
||||
}
|
||||
|
@ -138,11 +138,11 @@ void BasicGUI_PlaneDlg::Init()
|
||||
double aTrimSize = 2000.0;
|
||||
|
||||
/* min, max, step and decimals for spin boxes */
|
||||
GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, aStep, 3 );
|
||||
GroupPntDir->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPntDir->SpinBox_DX->SetValue( aTrimSize );
|
||||
Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
||||
Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
|
||||
Group3Pnts->SpinBox_DX->SetValue( aTrimSize );
|
||||
GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3);
|
||||
GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, DBL_DIGITS_DISPLAY);
|
||||
GroupFace->SpinBox_DX->SetValue( aTrimSize );
|
||||
|
||||
/* signals and slots connections */
|
||||
|
@ -118,9 +118,9 @@ void BasicGUI_VectorDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes */
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
double dx( 0. ), dy( 0. ), dz( 200. );
|
||||
GroupDimensions->SpinBox_DX->SetValue( dx );
|
||||
|
@ -123,6 +123,7 @@ void GenerationGUI_PrismDlg::Init()
|
||||
GroupPoints2->LineEdit2->setReadOnly( true );
|
||||
GroupPoints2->LineEdit3->setReadOnly( true );
|
||||
|
||||
myPoint1 = myPoint2 = myBase = myVec = GEOM::GEOM_Object::_nil();
|
||||
myOkBase = myOkVec = myOkPnt1 = myOkPnt2 = false;
|
||||
|
||||
/* Get setting of step value from file configuration */
|
||||
@ -130,7 +131,7 @@ void GenerationGUI_PrismDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(100.0);
|
||||
|
||||
/* signals and slots connections */
|
||||
@ -146,7 +147,8 @@ void GenerationGUI_PrismDlg::Init()
|
||||
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
|
||||
GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
|
||||
|
||||
connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse()));
|
||||
|
||||
@ -160,7 +162,7 @@ void GenerationGUI_PrismDlg::Init()
|
||||
connect(GroupPoints2->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||
|
||||
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
initName(tr("GEOM_EXTRUSION"));
|
||||
@ -181,20 +183,17 @@ void GenerationGUI_PrismDlg::ConstructorsClicked(int constructorId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
globalSelection( GEOM_POINT );
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
||||
GroupPoints2->hide();
|
||||
resize(0, 0);
|
||||
GroupPoints->show();
|
||||
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
GroupPoints->LineEdit1->setText("");
|
||||
GroupPoints->LineEdit1->setText(GroupPoints2->LineEdit1->text()); // keep base
|
||||
GroupPoints->LineEdit2->setText("");
|
||||
GroupPoints2->LineEdit1->setText("");
|
||||
GroupPoints2->LineEdit2->setText("");
|
||||
GroupPoints2->LineEdit3->setText("");
|
||||
myPoint1 = myPoint2 = myBase = myVec = GEOM::GEOM_Object::_nil();
|
||||
myOkBase = myOkVec = myOkPnt1 = myOkPnt2 = false;
|
||||
myVec = GEOM::GEOM_Object::_nil();
|
||||
myOkVec = false;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -207,13 +206,11 @@ void GenerationGUI_PrismDlg::ConstructorsClicked(int constructorId)
|
||||
GroupPoints2->show();
|
||||
|
||||
myEditCurrentArgument = GroupPoints2->LineEdit1;
|
||||
GroupPoints2->LineEdit1->setText("");
|
||||
GroupPoints2->LineEdit1->setText(GroupPoints->LineEdit1->text()); // keep base
|
||||
GroupPoints2->LineEdit2->setText("");
|
||||
GroupPoints2->LineEdit3->setText("");
|
||||
myPoint1 = myPoint2 = myBase = myVec = GEOM::GEOM_Object::_nil();
|
||||
myOkBase = myOkVec = myOkPnt1 = myOkPnt2 = false;
|
||||
GroupPoints->LineEdit1->setText("");
|
||||
GroupPoints->LineEdit2->setText("");
|
||||
myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
|
||||
myOkPnt1 = myOkPnt2 = false;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -222,6 +219,9 @@ void GenerationGUI_PrismDlg::ConstructorsClicked(int constructorId)
|
||||
myEditCurrentArgument->setFocus();
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
if (!myOkBase)
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
@ -287,7 +287,6 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
|
||||
displayPreview();
|
||||
}
|
||||
else // getConstructorId()==1 - extrusion using 2 points
|
||||
{
|
||||
@ -327,8 +326,9 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
|
||||
@ -450,7 +450,12 @@ GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
|
||||
//=================================================================================
|
||||
bool GenerationGUI_PrismDlg::isValid( QString& )
|
||||
{
|
||||
return myOkBase && ( myOkVec || (myOkPnt1 && myOkPnt2) );
|
||||
if (getConstructorId() == 0)
|
||||
// by vector and height
|
||||
return (myOkBase && myOkVec);
|
||||
|
||||
// by two points
|
||||
return (myOkBase && myOkPnt1 && myOkPnt2);
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -71,11 +71,12 @@ private :
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
|
||||
void ActivateThisDialog();
|
||||
void ConstructorsClicked(int);
|
||||
void LineEditReturnPressed();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void ConstructorsClicked(int);
|
||||
void ValueChangedInSpinBox();
|
||||
void onReverse();
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ void GenerationGUI_RevolDlg::Init()
|
||||
|
||||
double SpecificStep = 5;
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(45.0);
|
||||
|
||||
/* signals and slots connections */
|
||||
|
@ -117,9 +117,9 @@ void PrimitiveGUI_BoxDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes */
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
double initValue = 200.0;
|
||||
GroupDimensions->SpinBox_DX->SetValue(initValue);
|
||||
|
@ -119,12 +119,12 @@ void PrimitiveGUI_ConeDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
double aRadius1(100.0), aRadius2(0.0), aHeight(300.0);
|
||||
GroupPoints->SpinBox_DX->SetValue(aRadius1);
|
||||
|
@ -118,13 +118,13 @@ void PrimitiveGUI_CylinderDlg::Init()
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
/* First constructor : radius */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
/* First constructor : algebric height */
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
/* Second constructor : radius */
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
/* Second constructor : algebric height */
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
GroupPoints->SpinBox_DX->SetValue(100.0);
|
||||
GroupPoints->SpinBox_DY->SetValue(300.0);
|
||||
|
@ -112,8 +112,8 @@ void PrimitiveGUI_SphereDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DX->SetValue(100.0);
|
||||
GroupDimensions->SpinBox_DX->SetValue(100.0);
|
||||
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=================================================================================
|
||||
// class : PrimitiveGUI_TorusDlg()
|
||||
// purpose : Constructs a PrimitiveGUI_TorusDlg which is a child of 'parent', with the
|
||||
@ -53,9 +51,10 @@ PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(GeometryGUI* theGeometryGUI, QWidge
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
|
||||
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
||||
{
|
||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TORUS_PV")));
|
||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_TORUS_DXYZ")));
|
||||
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0(aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TORUS_PV")));
|
||||
QPixmap image1(aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TORUS_DXYZ")));
|
||||
QPixmap image2(aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||
|
||||
setCaption(tr("GEOM_TORUS_TITLE"));
|
||||
|
||||
@ -117,10 +116,10 @@ void PrimitiveGUI_TorusDlg::Init()
|
||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, 3);
|
||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY);
|
||||
|
||||
GroupPoints->SpinBox_DX->SetValue(300.0);
|
||||
GroupPoints->SpinBox_DY->SetValue(100.0);
|
||||
@ -130,6 +129,7 @@ void PrimitiveGUI_TorusDlg::Init()
|
||||
/* signals and slots connections */
|
||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
|
||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
||||
|
||||
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||
@ -143,12 +143,16 @@ void PrimitiveGUI_TorusDlg::Init()
|
||||
connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||
connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
|
||||
GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
|
||||
GroupPoints->SpinBox_DY, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
|
||||
GroupDimensions->SpinBox_DX, SLOT(SetStep(double)));
|
||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
|
||||
GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
|
||||
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
initName( tr( "GEOM_TORUS" ) );
|
||||
@ -162,13 +166,13 @@ void PrimitiveGUI_TorusDlg::Init()
|
||||
//=================================================================================
|
||||
void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
|
||||
{
|
||||
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
|
||||
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||
|
||||
switch (constructorId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
globalSelection( GEOM_LINE );
|
||||
globalSelection( GEOM_POINT );
|
||||
|
||||
GroupDimensions->hide();
|
||||
resize(0, 0);
|
||||
@ -179,8 +183,10 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
|
||||
GroupPoints->LineEdit2->setText(tr(""));
|
||||
myPoint = myDir = GEOM::GEOM_Object::_nil();
|
||||
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
SelectionIntoArgument();
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
@ -192,6 +198,7 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
@ -217,21 +224,10 @@ bool PrimitiveGUI_TorusDlg::ClickOnApply()
|
||||
return false;
|
||||
|
||||
initName();
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ClickOnCancel()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void PrimitiveGUI_TorusDlg::ClickOnCancel()
|
||||
{
|
||||
GEOMBase_Skeleton::ClickOnCancel();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SelectionIntoArgument()
|
||||
// purpose : Called when selection as changed or other case
|
||||
@ -252,7 +248,6 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* nbSel == 1 */
|
||||
Standard_Boolean testResult = Standard_False;
|
||||
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult );
|
||||
@ -270,6 +265,22 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : LineEditReturnPressed()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void PrimitiveGUI_TorusDlg::LineEditReturnPressed()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
if (send == GroupPoints->LineEdit1 ||
|
||||
send == GroupPoints->LineEdit2)
|
||||
{
|
||||
myEditCurrentArgument = send;
|
||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetEditCurrentArgument()
|
||||
// purpose :
|
||||
@ -292,22 +303,6 @@ void PrimitiveGUI_TorusDlg::SetEditCurrentArgument()
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : LineEditReturnPressed()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void PrimitiveGUI_TorusDlg::LineEditReturnPressed()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
if(send == GroupPoints->LineEdit1 ||
|
||||
send == GroupPoints->LineEdit2)
|
||||
{
|
||||
myEditCurrentArgument = send;
|
||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ActivateThisDialog()
|
||||
// purpose :
|
||||
@ -315,7 +310,8 @@ void PrimitiveGUI_TorusDlg::LineEditReturnPressed()
|
||||
void PrimitiveGUI_TorusDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||
|
||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
@ -333,16 +329,6 @@ void PrimitiveGUI_TorusDlg::enterEvent(QEvent* e)
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : DeactivateActiveDialog()
|
||||
// purpose : public slot to deactivate if active
|
||||
//=================================================================================
|
||||
void PrimitiveGUI_TorusDlg::DeactivateActiveDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::DeactivateActiveDialog();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ValueChangedInSpinBox
|
||||
// purpose :
|
||||
@ -387,15 +373,18 @@ bool PrimitiveGUI_TorusDlg::execute( ObjectList& objects )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (!CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir )){
|
||||
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeTorusPntVecRR(myPoint, myDir, getRadius1(), getRadius2());
|
||||
if (!CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ))
|
||||
{
|
||||
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->
|
||||
MakeTorusPntVecRR(myPoint, myDir, getRadius1(), getRadius2());
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeTorusRR(getRadius1(), getRadius2());
|
||||
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->
|
||||
MakeTorusRR(getRadius1(), getRadius2());
|
||||
res = true;
|
||||
break;
|
||||
}
|
||||
@ -408,16 +397,6 @@ bool PrimitiveGUI_TorusDlg::execute( ObjectList& objects )
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void PrimitiveGUI_TorusDlg::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
GEOMBase_Skeleton::closeEvent( e );
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : getRadius1()
|
||||
// purpose :
|
||||
|
@ -52,11 +52,10 @@ protected:
|
||||
virtual bool isValid( QString& );
|
||||
virtual bool execute( ObjectList& objects );
|
||||
|
||||
virtual void closeEvent( QCloseEvent* e );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void enterEvent(QEvent* e);
|
||||
|
||||
double getRadius1() const;
|
||||
double getRadius2() const;
|
||||
|
||||
@ -68,9 +67,8 @@ private:
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ClickOnCancel();
|
||||
|
||||
void ActivateThisDialog();
|
||||
void DeactivateActiveDialog();
|
||||
void LineEditReturnPressed();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
|
Loading…
x
Reference in New Issue
Block a user