0022377: EDF 2752 GEOM: Add a preference in order to automatically unpublished parent objects

This commit is contained in:
imn 2015-03-04 16:05:30 +03:00
parent fdcbb78132
commit 4310bcdf3d
177 changed files with 1147 additions and 40 deletions

View File

@ -67,6 +67,7 @@
<parameter name="base_vectors_length" value="1" />
<parameter name="marker_scale" value="3" />
<parameter name="geom_preview" value="true" />
<parameter name="hide_input_object" value="true" />
<parameter name="material" value="[ Default ]" />
<parameter name="predef_materials" value="true" />
<parameter name="edge_width" value="1" />

View File

@ -458,3 +458,14 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects)
return res;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> AdvancedGUI_DividedDiskDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint << myDir;
return res;
}

View File

@ -49,6 +49,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -1252,6 +1252,18 @@ void AdvancedGUI_PipeTShapeDlg::processPreview()
erasePreview(true);
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> AdvancedGUI_PipeTShapeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr1(myPoint1), aGeomObjPtr2(myPoint2), aGeomObjPtr3(myPoint3);
res << aGeomObjPtr1 << aGeomObjPtr2 << aGeomObjPtr3;
return res;
}
//=================================================================================
// function : AdvancedGUI_4Spin
// purpose :

View File

@ -79,6 +79,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -264,6 +264,16 @@ void AdvancedGUI_SmoothingSurfaceDlg::addSubshapesToStudy()
GEOMBase::PublishSubObject( myPoints[i].get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> AdvancedGUI_SmoothingSurfaceDlg::getSourceObjects()
{
return myPoints;
}
//=================================================================================
// function : getNbPoints()
// purpose : Returns the number of points in myPoints list.

View File

@ -46,6 +46,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -622,3 +622,14 @@ void BasicGUI_ArcDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_ArcDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint1 << myPoint2 << myPoint3;
return res;
}

View File

@ -51,6 +51,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -640,3 +640,15 @@ void BasicGUI_CircleDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_CircleDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint << myDir << myPoint1 << myPoint2 << myPoint3
<< myPoint4 << myPoint5 << myPoint6;
return res;
}

View File

@ -50,8 +50,8 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -541,6 +541,14 @@ void BasicGUI_CurveDlg::addSubshapesToStudy()
GEOMBase::PublishSubObject( myPoints[i].get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_CurveDlg::getSourceObjects()
{
return myPoints;
}
//=================================================================================
// function : CreationModeChanged
// purpose :

View File

@ -57,6 +57,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -430,3 +430,14 @@ void BasicGUI_EllipseDlg::addSubshapesToStudy()
GEOMBase::PublishSubObject( myDir.get() );
GEOMBase::PublishSubObject( myMajor.get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_EllipseDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint << myDir << myMajor;
return res;
}

View File

@ -50,6 +50,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -432,3 +432,14 @@ void BasicGUI_LineDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_LineDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint1 << myPoint2 << myFace1 << myFace2;
return res;
}

View File

@ -50,7 +50,8 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();
void enterEvent( QEvent* );

View File

@ -609,7 +609,17 @@ void BasicGUI_MarkerDlg::addSubshapesToStudy()
default:
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_MarkerDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myShape << myPoint << myVectorX << myVectorY;
return res;
}
//=================================================================================

View File

@ -46,47 +46,48 @@ private:
typedef QMap< int, SalomeApp_DoubleSpinBox* > DataMap;
public:
BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
virtual ~BasicGUI_MarkerDlg();
void Init();
BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
virtual ~BasicGUI_MarkerDlg();
void Init();
protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void displayPreview ( const bool = false,
const bool = true,
const bool = true,
const double = -1 );
virtual void addSubshapesToStudy();
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void displayPreview ( const bool = false,
const bool = true,
const bool = true,
const double = -1 );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void enterEvent( QEvent* );
void onSelectionDone0();
void enterEvent( QEvent* );
void onSelectionDone0();
GEOM::GeomObjPtr myShape;
GEOM::GeomObjPtr myPoint;
GEOM::GeomObjPtr myVectorX;
GEOM::GeomObjPtr myVectorY;
GEOM::GeomObjPtr myShape;
GEOM::GeomObjPtr myPoint;
GEOM::GeomObjPtr myVectorX;
GEOM::GeomObjPtr myVectorY;
private slots:
void onOk();
bool onApply();
void onActivate();
void onDeactivate();
void onSelectionDone();
void onValueChanged( double );
void ConstructorsClicked( int );
void SetEditCurrentArgument();
void onOk();
bool onApply();
void onActivate();
void onDeactivate();
void onSelectionDone();
void onValueChanged( double );
void ConstructorsClicked( int );
void SetEditCurrentArgument();
private:
DataMap myData;
int myConstructorId;
int myBlockPreview;
DataMap myData;
int myConstructorId;
int myBlockPreview;
QFrame* aMainGrp;
DlgRef_1Sel* Group1;
DlgRef_3Sel* Group2;
QFrame* aMainGrp;
DlgRef_1Sel* Group1;
DlgRef_3Sel* Group2;
};
#endif // BASICGUI_MARKERDLG_H

View File

@ -787,3 +787,15 @@ void BasicGUI_PlaneDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_PlaneDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint << myDir << myPoint1 << myPoint2 << myPoint3
<< myFace << myVec1 << myVec2 << myLCS;
return res;
}

View File

@ -53,6 +53,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -933,6 +933,17 @@ void BasicGUI_PointDlg::addSubshapesToStudy()
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_PointDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myRefPoint << myEdge << myLine1 << myLine2 << myFace;
return res;
}
//=================================================================================
// function : ClickParamCoord()
// purpose :

View File

@ -67,6 +67,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -472,3 +472,14 @@ void BasicGUI_VectorDlg::addSubshapesToStudy()
GEOMBase::PublishSubObject( myPoint2.get() );
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BasicGUI_VectorDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint1 << myPoint2;
return res;
}

View File

@ -51,6 +51,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -501,3 +501,15 @@ void BlocksGUI_BlockDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BlocksGUI_BlockDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myFace1 << myFace2 << myFace3
<< myFace4 << myFace5 << myFace6;
return res;
}

View File

@ -51,6 +51,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -513,3 +513,15 @@ QString BlocksGUI_ExplodeDlg::getNewObjectName (int) const
{
return QString::null;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BlocksGUI_ExplodeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myObject);
res << aGeomObjPtr;
return res;
}

View File

@ -49,6 +49,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
virtual QString getNewObjectName (int CurrObj = -1) const;

View File

@ -282,3 +282,15 @@ GEOM::GEOM_Object_ptr BlocksGUI_PropagateDlg::getFather( GEOM::GEOM_Object_ptr )
{
return myObject;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BlocksGUI_PropagateDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myObject);
res << aGeomObjPtr;
return res;
}

View File

@ -49,6 +49,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:
void ClickOnOk();

View File

@ -570,3 +570,14 @@ void BlocksGUI_QuadFaceDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BlocksGUI_QuadFaceDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myShape1 << myShape2 << myShape3 << myShape4;
return res;
}

View File

@ -58,6 +58,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -619,3 +619,15 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
return res;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BlocksGUI_TrsfDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myShape);
res << aGeomObjPtr;
return res;
}

View File

@ -56,6 +56,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -485,3 +485,14 @@ void BooleanGUI_Dialog::addSubshapesToStudy()
for ( int i = 0; i < myObjects.count(); i++ )
GEOMBase::PublishSubObject( myObjects[i].get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BooleanGUI_Dialog::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myObjects);
res << myObject1;
return res;
}

View File

@ -52,6 +52,7 @@ protected:
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -255,3 +255,12 @@ void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
mainFrame()->CheckBoxAddPrefix->isChecked() );
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_CompoundDlg::getSourceObjects()
{
return myShapes;
}

View File

@ -50,6 +50,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -521,3 +521,14 @@ void BuildGUI_EdgeDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_EdgeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myPoint1 << myPoint2 << myWire << myCurve << myStartPoint;
return res;
}

View File

@ -52,6 +52,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -698,3 +698,14 @@ void BuildGUI_FaceDlg::addSubshapesToStudy()
break;
}
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_FaceDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myWires);
res << myFace << myWire;
return res;
}

View File

@ -56,6 +56,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -276,3 +276,12 @@ bool BuildGUI_ShellDlg::execute( ObjectList& objects )
return true;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_ShellDlg::getSourceObjects()
{
return myFacesAndShells;
}

View File

@ -49,6 +49,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -406,3 +406,12 @@ bool BuildGUI_SolidDlg::execute( ObjectList& objects )
return true;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_SolidDlg::getSourceObjects()
{
return myShells;
}

View File

@ -48,7 +48,8 @@ protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -305,3 +305,12 @@ void BuildGUI_WireDlg::addSubshapesToStudy()
for ( int i = 0; i < myEdgesAndWires.count(); i++ )
GEOMBase::PublishSubObject( myEdgesAndWires[i].get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> BuildGUI_WireDlg::getSourceObjects()
{
return myEdgesAndWires;
}

View File

@ -51,6 +51,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -948,3 +948,14 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
return res;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_FeatureDetectorDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myFace;
return res;
}

View File

@ -65,6 +65,7 @@ protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -1982,3 +1982,15 @@ bool EntityGUI_FieldDlg::execute()
return true;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_FieldDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myShape);
res << aGeomObjPtr;
return res;
}

View File

@ -70,6 +70,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid (QString&);
virtual bool execute ();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:
void ClickOnOk();

View File

@ -281,3 +281,14 @@ void EntityGUI_IsolineDlg::ValueChangedInSpinBox(double newValue)
{
displayPreview(true);
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_IsolineDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myFace;
return res;
}

View File

@ -56,6 +56,8 @@ protected:
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -671,3 +671,12 @@ gp_Ax3 EntityGUI_PolylineDlg::WPlaneToLCS(GEOM::GeomObjPtr theGeomObj)
return aLCS;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_PolylineDlg::getSourceObjects()
{
return myWPlaneList;
}

View File

@ -56,7 +56,8 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -948,3 +948,15 @@ void EntityGUI_SubShapeDlg::MeasureToggled()
myGreaterFilterCombo->setEnabled(myGreaterFilterCheck->isChecked());
myApplyFilterButton->setEnabled(myLessFilterCheck->isChecked() || myGreaterFilterCheck->isChecked());
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_SubShapeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myObject);
res << aGeomObjPtr;
return res;
}

View File

@ -57,6 +57,7 @@ protected:
virtual bool execute (ObjectList&);
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
virtual QString getNewObjectName (int CurrObj = -1) const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
void closeEvent (QCloseEvent*);

View File

@ -223,3 +223,14 @@ bool EntityGUI_SurfFromFaceDlg::ClickOnApply()
return true;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> EntityGUI_SurfFromFaceDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myFace;
return res;
}

View File

@ -51,6 +51,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:

View File

@ -860,6 +860,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, b
showError();
}
else {
QList<GEOM::GeomObjPtr> anObjectList = getSourceObjects( );
addSubshapesToStudy(); // add Sub-shapes if local selection
const int nbObjs = objects.size();
QStringList anEntryList;
@ -921,6 +922,8 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, b
}
anApp->putInfo( QObject::tr("GEOM_PRP_DONE") );
}
if ( anObjectList.count() > 0 )
hideSourceObjects( anObjectList );
result = true;
}
else
@ -1186,6 +1189,17 @@ void GEOMBase_Helper::addSubshapesToStudy()
//Impemented in Dialogs, called from Accept method
}
//================================================================
// Function : getSourceObjects
// Purpose : Virtual method to get source objects
//================================================================
QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSourceObjects()
{
//Impemented in Dialogs, called from Accept method
QList<GEOM::GeomObjPtr> res;
return res;
}
//================================================================
// Function : getSelected
// Purpose : Get selected object by specified type
@ -1356,6 +1370,19 @@ QList<GEOM::GeomObjPtr> GEOMBase_Helper::getSelected( const QList<TopAbs_ShapeEn
}
return result;
}
//================================================================
// Function : hideSourceObject
// Purpose :
//================================================================
void GEOMBase_Helper::hideSourceObjects( QList<GEOM::GeomObjPtr> theObject )
{
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
if ( resMgr->booleanValue( "Geometry", "hide_input_object", true) ) {
GEOM_Displayer* aDisplayer = getDisplayer();
for ( int i = 0; i < theObject.count(); i++ )
aDisplayer->Erase( theObject[i].get() );
}
}
//================================================================
// Function : setIsApplyAndClose

View File

@ -171,6 +171,7 @@ protected:
virtual QString getObjectName(GEOM::GEOM_Object_ptr object) const;
virtual bool extractPrefix() const;
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, const QString& theName );
GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, int theIndex );
@ -181,6 +182,7 @@ protected:
QList<GEOM::GeomObjPtr> getSelected( TopAbs_ShapeEnum type, int count, bool strict = true );
QList<GEOM::GeomObjPtr> getSelected( const QList<TopAbs_ShapeEnum>& types, int count, bool strict = true );
void hideSourceObjects( QList<GEOM::GeomObjPtr> theObjectList );
void SetIsPreview(const bool thePreview) {isPreview = thePreview;}
bool IsPreview() {return isPreview;}

View File

@ -3400,6 +3400,10 @@ Please, select face, shell or solid and try again</translation>
<source>PREF_DIMENSIONS_SHOW_UNITS</source>
<translation>Show units of measurement</translation>
</message>
<message>
<source>PREF_HIDE_INPUT_OBJECT</source>
<translation>Hide input objects from the viewer</translation>
</message>
<message>
<source>PREF_ISOS</source>
<translation>Number of isolines</translation>

View File

@ -3400,6 +3400,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>PREF_DIMENSIONS_SHOW_UNITS</source>
<translation>Afficher les unités</translation>
</message>
<message>
<source>PREF_HIDE_INPUT_OBJECT</source>
<translation type="unfinished">Hide input objects from the viewer</translation>
</message>
<message>
<source>PREF_ISOS</source>
<translation>Nombre d&apos;isolignes</translation>

View File

@ -3343,6 +3343,10 @@
<source>PREF_DIMENSIONS_SHOW_UNITS</source>
<translation></translation>
</message>
<message>
<source>PREF_HIDE_INPUT_OBJECT</source>
<translation type="unfinished">Hide input objects from the viewer</translation>
</message>
<message>
<source>PREF_ISOS</source>
<translation></translation>

View File

@ -2539,6 +2539,9 @@ void GeometryGUI::createPreferences()
addPreference( tr( "GEOM_PREVIEW" ), operationsGroup,
LightApp_Preferences::Bool, "Geometry", "geom_preview" );
addPreference( tr( "PREF_HIDE_INPUT_OBJECT" ), operationsGroup,
LightApp_Preferences::Bool, "Geometry", "hide_input_object" );
int DependencyViewId = addPreference( tr( "PREF_TAB_DEPENDENCY_VIEW" ) );
int treeGeneralGroup = addPreference( tr( "PREF_GROUP_GENERAL" ), DependencyViewId );

View File

@ -404,3 +404,12 @@ void GenerationGUI_FillingDlg::addSubshapesToStudy()
foreach( GEOM::GeomObjPtr o, myObjects )
GEOMBase::PublishSubObject( o.get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GenerationGUI_FillingDlg::getSourceObjects()
{
return myObjects;
}

View File

@ -50,6 +50,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -544,3 +544,16 @@ bool GenerationGUI_PipeDlg::extractPrefix() const
{
return myBaseObjects.count() > 1;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GenerationGUI_PipeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myBaseObjects);
res << myPath << myVec;
for (int i = 0; i < myLocations.count(); i++)
res << myLocations[i];
return res;
}

View File

@ -52,6 +52,7 @@ protected:
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual bool extractPrefix() const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -391,3 +391,16 @@ void GenerationGUI_PipePathDlg::addSubshapesToStudy()
for (i = 0; i < myBase2Objects.count(); i++)
GEOMBase::PublishSubObject(myBase2Objects[i].get());
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GenerationGUI_PipePathDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myBase1Objects);
res << myShape ;
for (int i = 0; i < myBase2Objects.count(); i++)
res << myBase2Objects[i];
return res;
}

View File

@ -49,6 +49,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -759,3 +759,14 @@ bool GenerationGUI_PrismDlg::extractPrefix() const
{
return myBaseObjects.count() > 1;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GenerationGUI_PrismDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myBaseObjects);
res << myVec << myPoint1 << myPoint2 ;
return res;
}

View File

@ -54,6 +54,7 @@ protected:
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual bool extractPrefix() const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -375,3 +375,14 @@ bool GenerationGUI_RevolDlg::extractPrefix() const
{
return myBaseObjects.count() > 1;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GenerationGUI_RevolDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res(myBaseObjects);
res << myAxis;
return res;
}

View File

@ -51,6 +51,7 @@ protected:
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
virtual bool extractPrefix() const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -319,3 +319,21 @@ GEOM::GEOM_Object_ptr GroupGUI_BooleanDlg::getFather(GEOM::GEOM_Object_ptr theOb
}
return aFatherObj._retn();
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GroupGUI_BooleanDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
for (int i = 0; i < myListShapes.length(); i++) {
GEOM::GeomObjPtr aGeomObjPtr(myListShapes[i]);
res << aGeomObjPtr;
}
for (int i = 0; i < myListTools.length(); i++) {
GEOM::GeomObjPtr aGeomObjPtr(myListTools[i]);
res << aGeomObjPtr;
}
return res;
}

View File

@ -53,6 +53,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -224,10 +224,12 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
{
GEOM_Displayer* aDisplayer = getDisplayer();
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
bool isHideObjects = resMgr->booleanValue( "Geometry", "hide_input_object", true);
if (myWasHiddenMain) {
aDisplayer->Erase(myMainObj);
myIsHiddenMain = true;
} else {
}
else if (!isHideObjects) {
aDisplayer->Display(myMainObj);
myIsHiddenMain = false;
}
@ -1429,3 +1431,15 @@ void GroupGUI_GroupDlg::MeasureToggled()
myGreaterFilterCombo->setEnabled(myGreaterFilterCheck->isChecked());
myApplyFilterButton->setEnabled(myLessFilterCheck->isChecked() || myGreaterFilterCheck->isChecked());
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> GroupGUI_GroupDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr1(myMainObj), aGeomObjPtr2(myInPlaceObj);
res << aGeomObjPtr1 << aGeomObjPtr2;
return res;
}

View File

@ -65,6 +65,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
void closeEvent (QCloseEvent*);

View File

@ -352,3 +352,14 @@ void MeasureGUI_BndBoxDlg::addSubshapesToStudy()
{
GEOMBase::PublishSubObject( myObj.get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_BndBoxDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myObj;
return res;
}

View File

@ -52,6 +52,7 @@ protected:
void redisplayPreview();
virtual void processObject();
virtual SALOME_Prs* buildPrs();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -349,3 +349,14 @@ void MeasureGUI_CenterMassDlg::addSubshapesToStudy()
{
GEOMBase::PublishSubObject( myObj.get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_CenterMassDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myObj;
return res;
}

View File

@ -49,6 +49,7 @@ protected:
virtual bool isValid( QString& );
virtual void addSubshapesToStudy();
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:
void ClickOnOk();

View File

@ -546,6 +546,17 @@ void MeasureGUI_DistanceDlg::addSubshapesToStudy()
GEOMBase::PublishSubObject( myObj2.get() );
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_DistanceDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myObj1 << myObj2;
return res;
}
//=================================================================================
// function : MeasureGUI_DistanceGroup
// purpose :

View File

@ -101,6 +101,7 @@ protected:
virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
virtual QString getNewObjectName (int CurrObj = -1) const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
void redisplayPreview();
virtual void processObject();

View File

@ -677,3 +677,14 @@ double MeasureGUI_FastCheckIntersectionsDlg::getTolerance()
return 0.0;
return aVal;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_FastCheckIntersectionsDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myObj1 << myObj2;
return res;
}

View File

@ -50,6 +50,7 @@ protected:
virtual bool isValid(QString &);
virtual bool execute(ObjectList &);
virtual bool extractPrefix() const;
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:

View File

@ -333,3 +333,15 @@ GEOM::GEOM_Object_ptr MeasureGUI_GetNonBlocksDlg::getFather (GEOM::GEOM_Object_p
{
return myObj;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_GetNonBlocksDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myObj);
res << aGeomObjPtr;
return res;
}

View File

@ -52,6 +52,7 @@ protected:
virtual bool isValid (QString &msg);
virtual bool execute (ObjectList&);
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:
void ClickOnOk();

View File

@ -360,3 +360,15 @@ bool MeasureGUI_NormaleDlg::execute (ObjectList& objects)
return true;
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> MeasureGUI_NormaleDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr1(myFace), aGeomObjPtr2(myPoint);
res << aGeomObjPtr1 << aGeomObjPtr2;
return res;
}

View File

@ -45,6 +45,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -306,3 +306,15 @@ void OperationGUI_ArchimedeDlg::ValueChangedInSpinBox(double newValue)
{
processPreview();
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> OperationGUI_ArchimedeDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myShape);
res << aGeomObjPtr;
return res;
}

View File

@ -47,7 +47,8 @@ protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -966,3 +966,15 @@ void OperationGUI_ChamferDlg::RadioButtonPressed()
processPreview();
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> OperationGUI_ChamferDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myShape);
res << aGeomObjPtr;
return res;
}

View File

@ -66,6 +66,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private slots:
void ClickOnOk();

View File

@ -395,3 +395,14 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
// {
// GEOMBase::PublishSubObject( myObject2.get() );
// }
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> OperationGUI_ExtrudedFeatureDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
res << myObject1 << myObject2;
return res;
}

View File

@ -62,6 +62,7 @@ protected:
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
// virtual void addSubshapesToStudy();
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
private:
void Init();

View File

@ -425,3 +425,15 @@ double OperationGUI_Fillet1d2dDlg::getRadius() const
{
return GroupVertexes->SpinBox_DX->value();
}
//=================================================================================
// function : getSourceObjects
// purpose : virtual method to get source objects
//=================================================================================
QList<GEOM::GeomObjPtr> OperationGUI_Fillet1d2dDlg::getSourceObjects()
{
QList<GEOM::GeomObjPtr> res;
GEOM::GeomObjPtr aGeomObjPtr(myShape);
res << aGeomObjPtr;
return res;
}

Some files were not shown because too many files have changed in this diff Show More