NPAL18363: EDF635: We can now select any object in all window.

This commit is contained in:
jfa 2007-12-19 13:36:08 +00:00
parent 582aab65e3
commit 156fe6ad40
5 changed files with 274 additions and 246 deletions

View File

@ -152,27 +152,27 @@ void PrimitiveGUI_BoxDlg::Init()
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double)));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_BOX" ) ); initName( tr( "GEOM_BOX" ) );
ConstructorsClicked(0); ConstructorsClicked(0);
} }
//================================================================================= //=================================================================================
// function : ConstructorsClicked() // function : ConstructorsClicked()
// purpose : Radio button management // purpose : Radio button management
//================================================================================= //=================================================================================
void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId) void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
{ {
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
switch (constructorId) switch (constructorId)
{ {
case 0: case 0:
{ {
// globalSelection( GEOM_POINT ); // globalSelection( GEOM_POINT );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
GroupDimensions->hide(); GroupDimensions->hide();
@ -184,7 +184,7 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
GroupPoints->LineEdit2->setText(""); GroupPoints->LineEdit2->setText("");
myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break; break;
} }
@ -200,7 +200,6 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId)
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : ClickOnOk() // function : ClickOnOk()
// purpose : // purpose :
@ -211,7 +210,6 @@ void PrimitiveGUI_BoxDlg::ClickOnOk()
ClickOnCancel(); ClickOnCancel();
} }
//================================================================================= //=================================================================================
// function : ClickOnApply() // function : ClickOnApply()
// purpose : // purpose :
@ -226,14 +224,13 @@ bool PrimitiveGUI_BoxDlg::ClickOnApply()
return true; return true;
} }
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection as changed // purpose : Called when selection as changed
//================================================================================= //=================================================================================
void PrimitiveGUI_BoxDlg::SelectionIntoArgument() void PrimitiveGUI_BoxDlg::SelectionIntoArgument()
{ {
if ( getConstructorId() != 0 ) if (getConstructorId() != 0)
return; return;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
@ -242,47 +239,53 @@ void PrimitiveGUI_BoxDlg::SelectionIntoArgument()
{ {
if (myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint1 = GEOM::GEOM_Object::_nil(); myPoint1 = GEOM::GEOM_Object::_nil();
else if ( myEditCurrentArgument == GroupPoints->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2)
myPoint2 = GEOM::GEOM_Object::_nil(); myPoint2 = GEOM::GEOM_Object::_nil();
return; return;
} }
// nbSel == 1 // nbSel == 1
Standard_Boolean testResult = Standard_False; Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult ); GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult);
if(!testResult || CORBA::is_nil( aSelectedObject )) if (!testResult || CORBA::is_nil(aSelectedObject))
return; return;
TopoDS_Shape aShape; TopoDS_Shape aShape;
QString aName = GEOMBase::GetName( aSelectedObject ); QString aName = GEOMBase::GetName(aSelectedObject);
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{ {
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
TColStd_IndexedMapOfInteger aMap; TColStd_IndexedMapOfInteger aMap;
aSelMgr->GetIndexes( firstIObject(), aMap ); aSelMgr->GetIndexes(firstIObject(), aMap);
if ( aMap.Extent() == 1 ) if (aMap.Extent() == 1) // Local Selection
{ {
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations( getStudyId() ); getGeomEngine()->GetIShapesOperations( getStudyId() );
int anIndex = aMap( 1 ); int anIndex = aMap( 1 );
aName.append( ":vertex_" + QString::number( anIndex ) ); aName.append( ":vertex_" + QString::number( anIndex ) );
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
aSelMgr->clearSelected(); aSelMgr->clearSelected(); // ???
}
else // Global Selection
{
if (aShape.ShapeType() != TopAbs_VERTEX) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
}
} }
} }
myEditCurrentArgument->setText( aName ); myEditCurrentArgument->setText(aName);
if(myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint1 = aSelectedObject; myPoint1 = aSelectedObject;
else if(myEditCurrentArgument == GroupPoints->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2)
myPoint2 = aSelectedObject; myPoint2 = aSelectedObject;
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : SetEditCurrentArgument() // function : SetEditCurrentArgument()
// purpose : // purpose :
@ -297,13 +300,13 @@ void PrimitiveGUI_BoxDlg::SetEditCurrentArgument()
myEditCurrentArgument = GroupPoints->LineEdit2; myEditCurrentArgument = GroupPoints->LineEdit2;
// globalSelection( GEOM_POINT ); // globalSelection( GEOM_POINT );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
myEditCurrentArgument->setFocus(); myEditCurrentArgument->setFocus();
SelectionIntoArgument(); SelectionIntoArgument();
} }
//================================================================================= //=================================================================================
// function : LineEditReturnPressed() // function : LineEditReturnPressed()
// purpose : // purpose :
@ -326,8 +329,8 @@ void PrimitiveGUI_BoxDlg::LineEditReturnPressed()
void PrimitiveGUI_BoxDlg::ActivateThisDialog() void PrimitiveGUI_BoxDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
ConstructorsClicked( getConstructorId() ); ConstructorsClicked( getConstructorId() );
} }

View File

@ -166,7 +166,7 @@ void PrimitiveGUI_ConeDlg::Init()
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double)));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( tr( "GEOM_CONE" ) ); initName( tr( "GEOM_CONE" ) );
@ -180,14 +180,15 @@ void PrimitiveGUI_ConeDlg::Init()
//================================================================================= //=================================================================================
void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId) void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId)
{ {
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
switch(constructorId) switch(constructorId)
{ {
case 0 : case 0 :
{ {
// globalSelection( GEOM_POINT ); // globalSelection( GEOM_POINT );
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); globalSelection(); // to break prvious local selection
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
GroupDimensions->hide(); GroupDimensions->hide();
resize(0, 0); resize(0, 0);
GroupPoints->show(); GroupPoints->show();
@ -197,7 +198,7 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId)
GroupPoints->LineEdit2->setText(tr("")); GroupPoints->LineEdit2->setText(tr(""));
myPoint = myDir = GEOM::GEOM_Object::_nil(); myPoint = myDir = GEOM::GEOM_Object::_nil();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break; break;
} }
@ -256,12 +257,12 @@ void PrimitiveGUI_ConeDlg::ClickOnCancel()
//================================================================================= //=================================================================================
void PrimitiveGUI_ConeDlg::SelectionIntoArgument() void PrimitiveGUI_ConeDlg::SelectionIntoArgument()
{ {
if ( getConstructorId() != 0 ) if (getConstructorId() != 0)
return; return;
if(IObjectCount() != 1) if (IObjectCount() != 1)
{ {
if(myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint = GEOM::GEOM_Object::_nil(); myPoint = GEOM::GEOM_Object::_nil();
else if (myEditCurrentArgument == GroupPoints->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2)
myDir = GEOM::GEOM_Object::_nil(); myDir = GEOM::GEOM_Object::_nil();
@ -278,25 +279,39 @@ void PrimitiveGUI_ConeDlg::SelectionIntoArgument()
TopoDS_Shape aShape; TopoDS_Shape aShape;
QString aName = GEOMBase::GetName( aSelectedObject ); QString aName = GEOMBase::GetName( aSelectedObject );
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{ {
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if (myEditCurrentArgument == GroupPoints->LineEdit2)
aNeedType = TopAbs_EDGE;
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
TColStd_IndexedMapOfInteger aMap; TColStd_IndexedMapOfInteger aMap;
aSelMgr->GetIndexes( firstIObject(), aMap ); aSelMgr->GetIndexes( firstIObject(), aMap );
if ( aMap.Extent() == 1 ) if (aMap.Extent() == 1)
{ {
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations( getStudyId() ); getGeomEngine()->GetIShapesOperations(getStudyId());
int anIndex = aMap( 1 ); int anIndex = aMap(1);
if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
aName.append( ":edge_" + QString::number( anIndex ) );
else
aName.append( ":vertex_" + QString::number( anIndex ) );
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
aSelMgr->clearSelected(); aSelMgr->clearSelected(); // ???
if (aNeedType == TopAbs_EDGE)
aName.append(":edge_" + QString::number(anIndex));
else
aName.append(":vertex_" + QString::number(anIndex));
}
else
{
if (aShape.ShapeType() != aNeedType) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
} }
} }
myEditCurrentArgument->setText( aName ); }
myEditCurrentArgument->setText(aName);
if (myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint = aSelectedObject; myPoint = aSelectedObject;
@ -306,7 +321,6 @@ void PrimitiveGUI_ConeDlg::SelectionIntoArgument()
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : SetEditCurrentArgument() // function : SetEditCurrentArgument()
// purpose : // purpose :
@ -346,7 +360,6 @@ void PrimitiveGUI_ConeDlg::LineEditReturnPressed()
} }
} }
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
@ -354,13 +367,12 @@ void PrimitiveGUI_ConeDlg::LineEditReturnPressed()
void PrimitiveGUI_ConeDlg::ActivateThisDialog() void PrimitiveGUI_ConeDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
ConstructorsClicked( getConstructorId() ); ConstructorsClicked(getConstructorId());
} }
//================================================================================= //=================================================================================
// function : DeactivateActiveDialog() // function : DeactivateActiveDialog()
// purpose : public slot to deactivate if active // purpose : public slot to deactivate if active

View File

@ -159,7 +159,7 @@ void PrimitiveGUI_CylinderDlg::Init()
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, 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)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
initName( tr( "GEOM_CYLINDER" ) ); initName( tr( "GEOM_CYLINDER" ) );
@ -173,13 +173,13 @@ void PrimitiveGUI_CylinderDlg::Init()
//================================================================================= //=================================================================================
void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId) void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId)
{ {
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
switch(constructorId) switch (constructorId)
{ {
case 0 : case 0 :
{ {
// globalSelection( GEOM_POINT ); globalSelection( GEOM_POINT ); // to break previous local selection
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
GroupDimensions->hide(); GroupDimensions->hide();
@ -191,7 +191,7 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId)
GroupPoints->LineEdit2->setText(tr("")); GroupPoints->LineEdit2->setText(tr(""));
myPoint = myDir = GEOM::GEOM_Object::_nil(); myPoint = myDir = GEOM::GEOM_Object::_nil();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break; break;
} }
@ -250,14 +250,14 @@ void PrimitiveGUI_CylinderDlg::ClickOnCancel()
//================================================================================= //=================================================================================
void PrimitiveGUI_CylinderDlg::SelectionIntoArgument() void PrimitiveGUI_CylinderDlg::SelectionIntoArgument()
{ {
if ( getConstructorId() != 0 ) if (getConstructorId() != 0)
return; return;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
if(IObjectCount() != 1) if (IObjectCount() != 1)
{ {
if(myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint = GEOM::GEOM_Object::_nil(); myPoint = GEOM::GEOM_Object::_nil();
else if (myEditCurrentArgument == GroupPoints->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2)
myDir = GEOM::GEOM_Object::_nil(); myDir = GEOM::GEOM_Object::_nil();
@ -266,32 +266,45 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument()
/* nbSel == 1 */ /* nbSel == 1 */
Standard_Boolean testResult = Standard_False; Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult);
if(!testResult || CORBA::is_nil( aSelectedObject )) if (!testResult || CORBA::is_nil(aSelectedObject))
return; return;
QString aName = GEOMBase::GetName( aSelectedObject ); QString aName = GEOMBase::GetName(aSelectedObject);
TopoDS_Shape aShape; TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{ {
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if (myEditCurrentArgument == GroupPoints->LineEdit2)
aNeedType = TopAbs_EDGE;
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
TColStd_IndexedMapOfInteger aMap; TColStd_IndexedMapOfInteger aMap;
aSelMgr->GetIndexes( firstIObject(), aMap ); aSelMgr->GetIndexes(firstIObject(), aMap);
if ( aMap.Extent() == 1 ) if (aMap.Extent() == 1) // Local Selection
{ {
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations( getStudyId() ); getGeomEngine()->GetIShapesOperations(getStudyId());
int anIndex = aMap( 1 ); int anIndex = aMap(1);
if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
aName.append( ":edge_" + QString::number( anIndex ) );
else
aName.append( ":vertex_" + QString::number( anIndex ) );
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
aSelMgr->clearSelected(); aSelMgr->clearSelected(); // ???
if (aNeedType == TopAbs_EDGE)
aName.append(":edge_" + QString::number(anIndex));
else
aName.append(":vertex_" + QString::number(anIndex));
}
else // Global Selection
{
if (aShape.ShapeType() != aNeedType) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
} }
} }
myEditCurrentArgument->setText( aName ); }
myEditCurrentArgument->setText(aName);
if (myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint = aSelectedObject; myPoint = aSelectedObject;
@ -300,7 +313,6 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument()
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : SetEditCurrentArgument() // function : SetEditCurrentArgument()
// purpose : // purpose :
@ -309,12 +321,12 @@ void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
if(send == GroupPoints->PushButton1) { if (send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupPoints->LineEdit1;
globalSelection( GEOM_POINT ); // to break previous local selection globalSelection( GEOM_POINT ); // to break previous local selection
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
} }
else if(send == GroupPoints->PushButton2) { else if (send == GroupPoints->PushButton2) {
myEditCurrentArgument = GroupPoints->LineEdit2; myEditCurrentArgument = GroupPoints->LineEdit2;
globalSelection( GEOM_LINE ); // to break previous local selection globalSelection( GEOM_LINE ); // to break previous local selection
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
@ -340,7 +352,6 @@ void PrimitiveGUI_CylinderDlg::LineEditReturnPressed()
} }
} }
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
@ -348,13 +359,12 @@ void PrimitiveGUI_CylinderDlg::LineEditReturnPressed()
void PrimitiveGUI_CylinderDlg::ActivateThisDialog() void PrimitiveGUI_CylinderDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
ConstructorsClicked( getConstructorId() ); ConstructorsClicked(getConstructorId());
} }
//================================================================================= //=================================================================================
// function : enterEvent() // function : enterEvent()
// purpose : // purpose :
@ -464,7 +474,6 @@ double PrimitiveGUI_CylinderDlg::getRadius() const
return 0; return 0;
} }
//================================================================================= //=================================================================================
// function : getHeight() // function : getHeight()
// purpose : // purpose :

View File

@ -90,7 +90,6 @@ PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(GeometryGUI* theGeometryGUI, QWid
Init(); Init();
} }
//================================================================================= //=================================================================================
// function : ~PrimitiveGUI_SphereDlg() // function : ~PrimitiveGUI_SphereDlg()
// purpose : Destroys the object and frees any allocated resources // purpose : Destroys the object and frees any allocated resources
@ -100,7 +99,6 @@ PrimitiveGUI_SphereDlg::~PrimitiveGUI_SphereDlg()
/* no need to delete child widgets, Qt does it all for us */ /* no need to delete child widgets, Qt does it all for us */
} }
//================================================================================= //=================================================================================
// function : Init() // function : Init()
// purpose : // purpose :
@ -134,29 +132,31 @@ void PrimitiveGUI_SphereDlg::Init()
connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); 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)),
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double))); GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
GroupDimensions->SpinBox_DX, SLOT(SetStep(double)));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
initName(tr("GEOM_SPHERE")); initName(tr("GEOM_SPHERE"));
ConstructorsClicked(0); ConstructorsClicked(0);
} }
//================================================================================= //=================================================================================
// function : ConstructorsClicked() // function : ConstructorsClicked()
// purpose : Radio button management // purpose : Radio button management
//================================================================================= //=================================================================================
void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId) void PrimitiveGUI_SphereDlg::ConstructorsClicked (int constructorId)
{ {
disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
switch (constructorId) switch (constructorId)
{ {
case 0: case 0:
{ {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
GroupDimensions->hide(); GroupDimensions->hide();
resize(0, 0); resize(0, 0);
@ -166,7 +166,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId)
GroupPoints->LineEdit1->setText(""); GroupPoints->LineEdit1->setText("");
myPoint = GEOM::GEOM_Object::_nil(); myPoint = GEOM::GEOM_Object::_nil();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
break; break;
} }
@ -182,7 +182,6 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId)
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : ClickOnOk() // function : ClickOnOk()
// purpose : // purpose :
@ -193,7 +192,6 @@ void PrimitiveGUI_SphereDlg::ClickOnOk()
ClickOnCancel(); ClickOnCancel();
} }
//================================================================================= //=================================================================================
// function : ClickOnApply() // function : ClickOnApply()
// purpose : // purpose :
@ -208,30 +206,27 @@ bool PrimitiveGUI_SphereDlg::ClickOnApply()
return true; return true;
} }
//=================================================================================
//=======================================================================
// function : ClickOnCancel() // function : ClickOnCancel()
// purpose : // purpose :
//======================================================================= //=================================================================================
void PrimitiveGUI_SphereDlg::ClickOnCancel() void PrimitiveGUI_SphereDlg::ClickOnCancel()
{ {
GEOMBase_Skeleton::ClickOnCancel(); GEOMBase_Skeleton::ClickOnCancel();
} }
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case // purpose : Called when selection as changed or other case
//================================================================================= //=================================================================================
void PrimitiveGUI_SphereDlg::SelectionIntoArgument() void PrimitiveGUI_SphereDlg::SelectionIntoArgument()
{ {
if ( getConstructorId() != 0 ) if (getConstructorId() != 0)
return; return;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
if(IObjectCount() != 1) if (IObjectCount() != 1)
{ {
myPoint = GEOM::GEOM_Object::_nil(); myPoint = GEOM::GEOM_Object::_nil();
return; return;
@ -239,36 +234,43 @@ void PrimitiveGUI_SphereDlg::SelectionIntoArgument()
/* nbSel == 1 ! */ /* nbSel == 1 ! */
Standard_Boolean testResult = Standard_False; Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult);
if (!testResult || CORBA::is_nil( aSelectedObject )) if (!testResult || CORBA::is_nil(aSelectedObject))
return; return;
QString aName = GEOMBase::GetName( aSelectedObject ); QString aName = GEOMBase::GetName(aSelectedObject);
TopoDS_Shape aShape; TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{ {
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
TColStd_IndexedMapOfInteger aMap; TColStd_IndexedMapOfInteger aMap;
aSelMgr->GetIndexes( firstIObject(), aMap ); aSelMgr->GetIndexes(firstIObject(), aMap);
if ( aMap.Extent() == 1 ) if (aMap.Extent() == 1) // Local Selection
{ {
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations( getStudyId() ); getGeomEngine()->GetIShapesOperations( getStudyId() );
int anIndex = aMap( 1 ); int anIndex = aMap( 1 );
aName.append( ":vertex_" + QString::number( anIndex ) );
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
aSelMgr->clearSelected(); aSelMgr->clearSelected();
aName.append( ":vertex_" + QString::number( anIndex ) );
}
else // Global Selection
{
if (aShape.ShapeType() != TopAbs_VERTEX) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
}
} }
} }
myEditCurrentArgument->setText( aName ); myEditCurrentArgument->setText(aName);
myPoint = aSelectedObject; myPoint = aSelectedObject;
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : LineEditReturnPressed() // function : LineEditReturnPressed()
// purpose : // purpose :
@ -283,7 +285,6 @@ void PrimitiveGUI_SphereDlg::LineEditReturnPressed()
} }
} }
//================================================================================= //=================================================================================
// function : SetEditCurrentArgument() // function : SetEditCurrentArgument()
// purpose : // purpose :
@ -292,15 +293,15 @@ void PrimitiveGUI_SphereDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
if(send == GroupPoints->PushButton1) { if (send == GroupPoints->PushButton1) {
GroupPoints->LineEdit1->setFocus(); GroupPoints->LineEdit1->setFocus();
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupPoints->LineEdit1;
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
SelectionIntoArgument(); SelectionIntoArgument();
} }
} }
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :
@ -308,13 +309,12 @@ void PrimitiveGUI_SphereDlg::SetEditCurrentArgument()
void PrimitiveGUI_SphereDlg::ActivateThisDialog() void PrimitiveGUI_SphereDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
ConstructorsClicked( getConstructorId() ); ConstructorsClicked(getConstructorId());
} }
//================================================================================= //=================================================================================
// function : DeactivateActiveDialog() // function : DeactivateActiveDialog()
// purpose : public slot to deactivate if active // purpose : public slot to deactivate if active
@ -324,7 +324,6 @@ void PrimitiveGUI_SphereDlg::DeactivateActiveDialog()
GEOMBase_Skeleton::DeactivateActiveDialog(); GEOMBase_Skeleton::DeactivateActiveDialog();
} }
//================================================================================= //=================================================================================
// function : enterEvent() // function : enterEvent()
// purpose : // purpose :
@ -335,7 +334,6 @@ void PrimitiveGUI_SphereDlg::enterEvent(QEvent* e)
ActivateThisDialog(); ActivateThisDialog();
} }
//================================================================================= //=================================================================================
// function : ValueChangedInSpinBox() // function : ValueChangedInSpinBox()
// purpose : // purpose :
@ -345,7 +343,6 @@ void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox()
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : createOperation // function : createOperation
// purpose : // purpose :
@ -355,7 +352,6 @@ GEOM::GEOM_IOperations_ptr PrimitiveGUI_SphereDlg::createOperation()
return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); return getGeomEngine()->GetI3DPrimOperations( getStudyId() );
} }
//================================================================================= //=================================================================================
// function : isValid // function : isValid
// purpose : // purpose :
@ -369,32 +365,34 @@ bool PrimitiveGUI_SphereDlg::isValid( QString& msg )
// function : execute // function : execute
// purpose : // purpose :
//================================================================================= //=================================================================================
bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) bool PrimitiveGUI_SphereDlg::execute (ObjectList& objects)
{ {
bool res = false; bool res = false;
GEOM::GEOM_Object_var anObj; GEOM::GEOM_Object_var anObj;
switch ( getConstructorId() ) switch (getConstructorId())
{ {
case 0 : case 0:
{ {
if ( !CORBA::is_nil( myPoint ) ) { if (!CORBA::is_nil(myPoint)) {
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeSpherePntR( myPoint, getRadius() ); anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->
MakeSpherePntR(myPoint, getRadius());
res = true; res = true;
} }
break; break;
} }
case 1 : case 1:
{ {
anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeSphereR( getRadius() ); anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->
MakeSphereR(getRadius());
res = true; res = true;
break; break;
} }
} }
if ( !anObj->_is_nil() ) if (!anObj->_is_nil())
objects.push_back( anObj._retn() ); objects.push_back(anObj._retn());
return res; return res;
} }
@ -405,12 +403,9 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects )
//================================================================================= //=================================================================================
void PrimitiveGUI_SphereDlg::closeEvent( QCloseEvent* e ) void PrimitiveGUI_SphereDlg::closeEvent( QCloseEvent* e )
{ {
//myGeomGUI->SetState( -1 );
GEOMBase_Skeleton::closeEvent( e ); GEOMBase_Skeleton::closeEvent( e );
} }
//================================================================================= //=================================================================================
// function : getRadius() // function : getRadius()
// purpose : // purpose :

View File

@ -159,19 +159,18 @@ void PrimitiveGUI_TorusDlg::Init()
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)),
GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); GroupDimensions->SpinBox_DY, SLOT(SetStep(double)));
connect(myGeomGUI->getApp()->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_TORUS" ) ); initName( tr( "GEOM_TORUS" ) );
ConstructorsClicked(0); ConstructorsClicked(0);
} }
//================================================================================= //=================================================================================
// function : ConstructorsClicked() // function : ConstructorsClicked()
// purpose : Radio button management // purpose : Radio button management
//================================================================================= //=================================================================================
void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId) void PrimitiveGUI_TorusDlg::ConstructorsClicked (int constructorId)
{ {
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
@ -179,7 +178,8 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
{ {
case 0: case 0:
{ {
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
GroupDimensions->hide(); GroupDimensions->hide();
resize(0, 0); resize(0, 0);
@ -216,7 +216,7 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
//================================================================================= //=================================================================================
void PrimitiveGUI_TorusDlg::ClickOnOk() void PrimitiveGUI_TorusDlg::ClickOnOk()
{ {
if ( ClickOnApply() ) if (ClickOnApply())
ClickOnCancel(); ClickOnCancel();
} }
@ -227,7 +227,7 @@ void PrimitiveGUI_TorusDlg::ClickOnOk()
//================================================================================= //=================================================================================
bool PrimitiveGUI_TorusDlg::ClickOnApply() bool PrimitiveGUI_TorusDlg::ClickOnApply()
{ {
if ( !onAccept() ) if (!onAccept())
return false; return false;
initName(); initName();
@ -241,7 +241,7 @@ bool PrimitiveGUI_TorusDlg::ClickOnApply()
//================================================================================= //=================================================================================
void PrimitiveGUI_TorusDlg::SelectionIntoArgument() void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
{ {
if ( getConstructorId() != 0 ) if (getConstructorId() != 0)
return; return;
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
@ -257,32 +257,46 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
/* nbSel == 1 */ /* nbSel == 1 */
Standard_Boolean testResult = Standard_False; Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult);
if (!testResult || CORBA::is_nil( aSelectedObject )) if (!testResult || CORBA::is_nil(aSelectedObject))
return; return;
QString aName = GEOMBase::GetName( aSelectedObject ); QString aName = GEOMBase::GetName(aSelectedObject);
TopoDS_Shape aShape; TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{ {
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if (myEditCurrentArgument == GroupPoints->LineEdit2)
aNeedType = TopAbs_EDGE;
LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
TColStd_IndexedMapOfInteger aMap; TColStd_IndexedMapOfInteger aMap;
aSelMgr->GetIndexes( firstIObject(), aMap ); aSelMgr->GetIndexes(firstIObject(), aMap);
if ( aMap.Extent() == 1 ) if (aMap.Extent() == 1) // Local Selection
{ {
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations( getStudyId() ); getGeomEngine()->GetIShapesOperations( getStudyId() );
int anIndex = aMap( 1 ); int anIndex = aMap(1);
if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
aName.append( ":edge_" + QString::number( anIndex ) );
else
aName.append( ":vertex_" + QString::number( anIndex ) );
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
aSelMgr->clearSelected(); aSelMgr->clearSelected();
if (aNeedType == TopAbs_EDGE)
aName.append(":edge_" + QString::number(anIndex));
else
aName.append(":vertex_" + QString::number(anIndex));
}
else // Global Selection
{
if (aShape.ShapeType() != aNeedType) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
} }
} }
myEditCurrentArgument->setText( aName ); }
myEditCurrentArgument->setText(aName);
if (myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1)
myPoint = aSelectedObject; myPoint = aSelectedObject;
@ -292,7 +306,6 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
displayPreview(); displayPreview();
} }
//================================================================================= //=================================================================================
// function : LineEditReturnPressed() // function : LineEditReturnPressed()
// purpose : // purpose :
@ -378,7 +391,6 @@ GEOM::GEOM_IOperations_ptr PrimitiveGUI_TorusDlg::createOperation()
return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); return getGeomEngine()->GetI3DPrimOperations( getStudyId() );
} }
//================================================================================= //=================================================================================
// function : isValid // function : isValid
// purpose : // purpose :
@ -388,7 +400,6 @@ bool PrimitiveGUI_TorusDlg::isValid( QString& msg )
return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) : true; return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) : true;
} }
//================================================================================= //=================================================================================
// function : execute // function : execute
// purpose : // purpose :
@ -426,7 +437,6 @@ bool PrimitiveGUI_TorusDlg::execute( ObjectList& objects )
return res; return res;
} }
//================================================================================= //=================================================================================
// function : getRadius1() // function : getRadius1()
// purpose : // purpose :
@ -441,7 +451,6 @@ double PrimitiveGUI_TorusDlg::getRadius1() const
return 0; return 0;
} }
//================================================================================= //=================================================================================
// function : getRadius2() // function : getRadius2()
// purpose : // purpose :