Avoid "GROUP" redefinition on win32: add 'MeshObjectType'enum to namespace SMESH

This commit is contained in:
ana 2012-10-10 08:46:51 +00:00
parent afd264a070
commit 5a4525c20f
33 changed files with 175 additions and 174 deletions

View File

@ -39,26 +39,27 @@
#define SMESHFILTERSSELECTION_EXPORT
#endif
enum MeshObjectType {
HYPOTHESIS,
ALGORITHM,
MESH,
SUBMESH,
MESHorSUBMESH,
SUBMESH_VERTEX,
SUBMESH_EDGE,
SUBMESH_FACE,
SUBMESH_SOLID,
SUBMESH_COMPOUND,
GROUP,
GROUP_NODE,
GROUP_EDGE,
GROUP_FACE,
GROUP_VOLUME,
GROUP_0D,
GROUP_BALL,
COMPONENT,
IDSOURCE
namespace SMESH{
enum MeshObjectType {
HYPOTHESIS,
ALGORITHM,
MESH,
SUBMESH,
MESHorSUBMESH,
SUBMESH_VERTEX,
SUBMESH_EDGE,
SUBMESH_FACE,
SUBMESH_SOLID,
SUBMESH_COMPOUND,
GROUP,
GROUP_NODE,
GROUP_EDGE,
GROUP_FACE,
GROUP_VOLUME,
GROUP_0D,
GROUP_BALL,
COMPONENT,
IDSOURCE
};
};
#endif

View File

@ -30,7 +30,7 @@
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SMESH_Gen)
SMESH_TypeFilter::SMESH_TypeFilter (MeshObjectType theType)
SMESH_TypeFilter::SMESH_TypeFilter (SMESH::MeshObjectType theType)
{
myType = theType;
}
@ -88,7 +88,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
switch (myType)
{
case HYPOTHESIS:
case SMESH::HYPOTHESIS:
{
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
// hypo definition
@ -101,7 +101,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
Ok = true;
break;
}
case ALGORITHM:
case SMESH::ALGORITHM:
{
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
// algo definition
@ -114,13 +114,13 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
Ok = true;
break;
}
case MESH:
case SMESH::MESH:
{
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true;
break;
}
case SUBMESH:
case SMESH::SUBMESH:
{
// see SMESH_Gen_i.cxx for tag numbers
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
@ -128,7 +128,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
Ok = true;
break;
}
case MESHorSUBMESH:
case SMESH::MESHorSUBMESH:
{
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true; // mesh
@ -137,82 +137,82 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
Ok = true;
break;
}
case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
case SMESH::SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
Ok = true;
break;
}
case SUBMESH_EDGE:
case SMESH::SUBMESH_EDGE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
Ok = true;
break;
}
case SUBMESH_FACE:
case SMESH::SUBMESH_FACE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
Ok = true;
break;
}
case SUBMESH_SOLID:
case SMESH::SUBMESH_SOLID:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
Ok = true;
break;
}
case SUBMESH_COMPOUND:
case SMESH::SUBMESH_COMPOUND:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
Ok = true;
break;
}
case GROUP:
case SMESH::GROUP:
{
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
Ok = true;
break;
}
case GROUP_NODE:
case SMESH::GROUP_NODE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_NodeGroups))
Ok = true;
break;
}
case GROUP_EDGE:
case SMESH::GROUP_EDGE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_EdgeGroups))
Ok = true;
break;
}
case GROUP_FACE:
case SMESH::GROUP_FACE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_FaceGroups))
Ok = true;
break;
}
case GROUP_VOLUME:
case SMESH::GROUP_VOLUME:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_VolumeGroups))
Ok = true;
break;
}
case GROUP_0D:
case SMESH::GROUP_0D:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_0DElementsGroups))
Ok = true;
break;
}
case GROUP_BALL:
case SMESH::GROUP_BALL:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_BallElementsGroups))
Ok = true;
break;
}
case IDSOURCE:
case SMESH::IDSOURCE:
{
Ok = ( SMESH_TypeFilter(MESHorSUBMESH).isOk( theDataOwner ) ||
SMESH_TypeFilter(GROUP) .isOk( theDataOwner ));
Ok = ( SMESH_TypeFilter(SMESH::MESHorSUBMESH).isOk( theDataOwner ) ||
SMESH_TypeFilter(SMESH::GROUP) .isOk( theDataOwner ));
break;
}
}
@ -220,7 +220,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
return Ok;
}
MeshObjectType SMESH_TypeFilter::type() const
SMESH::MeshObjectType SMESH_TypeFilter::type() const
{
return myType;
}

View File

@ -34,14 +34,14 @@ class SUIT_DataOwner;
class SMESHFILTERSSELECTION_EXPORT SMESH_TypeFilter : public SUIT_SelectionFilter
{
public:
SMESH_TypeFilter (MeshObjectType theType);
SMESH_TypeFilter (SMESH::MeshObjectType theType);
~SMESH_TypeFilter();
virtual bool isOk (const SUIT_DataOwner*) const;
MeshObjectType type() const;
SMESH::MeshObjectType type() const;
protected:
MeshObjectType myType;
SMESH::MeshObjectType myType;
};
#endif

View File

@ -1577,7 +1577,7 @@
bool CheckOIType(const Handle(SALOME_InteractiveObject) & theIO,
MeshObjectType theType,
SMESH::MeshObjectType theType,
const QString theInTypeName,
QString & theOutTypeName)
{
@ -1609,11 +1609,11 @@
QString aTypeName;
if (
CheckOIType ( theIO, HYPOTHESIS, "Hypothesis", aTypeName ) ||
CheckOIType ( theIO, ALGORITHM, "Algorithm", aTypeName ) ||
CheckOIType ( theIO, MESH, "Mesh", aTypeName ) ||
CheckOIType ( theIO, SUBMESH, "SubMesh", aTypeName ) ||
CheckOIType ( theIO, GROUP, "Group", aTypeName )
CheckOIType ( theIO, SMESH::HYPOTHESIS, "Hypothesis", aTypeName ) ||
CheckOIType ( theIO, SMESH::ALGORITHM, "Algorithm", aTypeName ) ||
CheckOIType ( theIO, SMESH::MESH, "Mesh", aTypeName ) ||
CheckOIType ( theIO, SMESH::SUBMESH, "SubMesh", aTypeName ) ||
CheckOIType ( theIO, SMESH::GROUP, "Group", aTypeName )
)
return aTypeName;
@ -3997,17 +3997,17 @@ void SMESHGUI::initialize( CAM_Application* app )
QString OB = "'ObjectBrowser'",
View = "'" + SVTK_Viewer::Type() + "'",
pat = "'%1'",
mesh = pat.arg( SMESHGUI_Selection::typeName( MESH ) ),
group = pat.arg( SMESHGUI_Selection::typeName( GROUP ) ),
hypo = pat.arg( SMESHGUI_Selection::typeName( HYPOTHESIS ) ),
algo = pat.arg( SMESHGUI_Selection::typeName( ALGORITHM ) ),
mesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::MESH ) ),
group = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
hypo = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
algo = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
elems = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
arg( SMESHGUI_Selection::typeName( SUBMESH_VERTEX ) ).
arg( SMESHGUI_Selection::typeName( SUBMESH_EDGE ) ).
arg( SMESHGUI_Selection::typeName( SUBMESH_FACE ) ).
arg( SMESHGUI_Selection::typeName( SUBMESH_SOLID ) ).
arg( SMESHGUI_Selection::typeName( SUBMESH_COMPOUND ) ).
arg( SMESHGUI_Selection::typeName( SUBMESH ) ),
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_FACE ) ).
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_SOLID ) ).
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_COMPOUND ) ).
arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH ) ),
subMesh = elems,
mesh_part = mesh + " " + subMesh + " " + group,
mesh_group = mesh + " " + group,
@ -6396,11 +6396,11 @@ bool SMESHGUI::renameAllowed( const QString& entry) const {
// check type to prevent renaming of inappropriate objects
int aType = SMESHGUI_Selection::type(qPrintable(entry), SMESH::GetActiveStudyDocument());
if (aType == MESH || aType == GROUP ||
aType == SUBMESH || aType == SUBMESH_COMPOUND ||
aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
aType == HYPOTHESIS || aType == ALGORITHM)
if (aType == SMESH::MESH || aType == SMESH::GROUP ||
aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM)
return true;
return false;
@ -6443,11 +6443,11 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
aName = anAttr;
// check type to prevent renaming of inappropriate objects
int aType = SMESHGUI_Selection::type( qPrintable(entry), SMESH::GetActiveStudyDocument() );
if (aType == MESH || aType == GROUP ||
aType == SUBMESH || aType == SUBMESH_COMPOUND ||
aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
aType == HYPOTHESIS || aType == ALGORITHM) {
if (aType == SMESH::MESH || aType == SMESH::GROUP ||
aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM) {
if ( !name.isEmpty() ) {
SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );

View File

@ -206,7 +206,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
myMesh = SMESH::SMESH_Mesh::_nil();
myMeshFilter = new SMESH_TypeFilter (MESH);
myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
myMeshArray = new SMESH::mesh_array();

View File

@ -193,7 +193,7 @@ void SMESHGUI_ConvToQuadOp::selectionDone()
SUIT_SelectionFilter* SMESHGUI_ConvToQuadOp::createFilter( const int theId ) const
{
if ( theId == 0 )
return new SMESH_TypeFilter( MESHorSUBMESH );
return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
else
return 0;
}

View File

@ -219,7 +219,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Selection filter
myIdSourceFilter = new SMESH_TypeFilter( IDSOURCE );
myIdSourceFilter = new SMESH_TypeFilter( SMESH::IDSOURCE );
myHelpFileName = "copy_mesh_page.html";

View File

@ -176,7 +176,7 @@ void SMESHGUI_DeleteGroupDlg::Init ()
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
// set selection mode
mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
onSelectionDone();
@ -323,7 +323,7 @@ void SMESHGUI_DeleteGroupDlg::enterEvent (QEvent*)
setEnabled(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
//=================================================================================

View File

@ -46,9 +46,9 @@ SMESHGUI_Dialog::SMESHGUI_Dialog( QWidget* parent, const bool modal,
: LightApp_Dialog( parent == 0 ? desktop() : parent, "", modal, allowResize, flags )
{
int pr = prefix( "SMESH" );
typeName( pr + MESH ) = tr( "DLG_MESH" );
typeName( pr + HYPOTHESIS ) = tr( "DLG_HYPO" );
typeName( pr + ALGORITHM ) = tr( "DLG_ALGO" );
typeName( pr + SMESH::MESH ) = tr( "DLG_MESH" );
typeName( pr + SMESH::HYPOTHESIS ) = tr( "DLG_HYPO" );
typeName( pr + SMESH::ALGORITHM ) = tr( "DLG_ALGO" );
setButtonText(1, tr("SMESH_BUT_APPLY_AND_CLOSE")); //rename OK to Apply and Close
if ( flags & Close )
setButtonPosition( Right, Close );

View File

@ -249,7 +249,7 @@ void SMESHGUI_DuplicateNodesDlg::Init()
myGroups3.clear();
// Set selection mode
mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
@ -571,7 +571,7 @@ void SMESHGUI_DuplicateNodesDlg::enterEvent (QEvent*)
// Set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
}

View File

@ -323,16 +323,16 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
mySMESHGUI->SetActiveDialogBox(this);
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
if (aSmeshGroupFilter) aListOfFilters.append(aSmeshGroupFilter);
myElementsFilter = new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
//myPathMeshFilter = new SMESH_TypeFilter (MESH);
myPathMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
//myPathMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
myPathMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
myHelpFileName = "extrusion_along_path_page.html";
@ -978,8 +978,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(NodeSelection);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter(GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter(SMESH::GROUP);
SMESH_NumberFilter* aVertexFilter = new SMESH_NumberFilter ("GEOM", TopAbs_SHAPE,
-1, TopAbs_VERTEX);
QList<SUIT_SelectionFilter*> aListOfFilters;

View File

@ -281,19 +281,19 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
QList<SUIT_SelectionFilter*> aListOfFilters;
aListOfFilters.append(new SMESH_TypeFilter (MESH));
aListOfFilters.append(new SMESH_TypeFilter (SUBMESH_VERTEX));
aListOfFilters.append(new SMESH_TypeFilter (GROUP_NODE));
aListOfFilters.append(new SMESH_TypeFilter (SMESH::MESH));
aListOfFilters.append(new SMESH_TypeFilter (SMESH::SUBMESH_VERTEX));
aListOfFilters.append(new SMESH_TypeFilter (SMESH::GROUP_NODE));
myMeshOrSubMeshOrGroupFilter0D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
aListOfFilters[0] = new SMESH_TypeFilter (MESH);
aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_EDGE);
aListOfFilters[2] = new SMESH_TypeFilter (GROUP_EDGE);
aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_EDGE);
aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_EDGE);
myMeshOrSubMeshOrGroupFilter1D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
aListOfFilters[0] = new SMESH_TypeFilter (MESH);
aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_FACE);
aListOfFilters[2] = new SMESH_TypeFilter (GROUP_FACE);
aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_FACE);
aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_FACE);
myMeshOrSubMeshOrGroupFilter2D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);

View File

@ -242,8 +242,8 @@ SMESHGUI_FindElemByPointOp::SMESHGUI_FindElemByPointOp()
myHelpFileName = "find_element_by_point_page.html";
QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( MESH ) );
filters.append( new SMESH_TypeFilter( GROUP ) );
filters.append( new SMESH_TypeFilter( SMESH::MESH ) );
filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
myPreview = new SMESH::MeshPreviewStruct();

View File

@ -444,7 +444,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
mySMESHGUI->SetState(800);
mySelectionMode = grpNoSelection;
myMeshFilter = new SMESH_TypeFilter(MESH);
myMeshFilter = new SMESH_TypeFilter(SMESH::MESH);
mySubMeshFilter = new SMESH_LogicalFilter(QList<SUIT_SelectionFilter*>(),
SMESH_LogicalFilter::LO_OR,
/*takeOwnership=*/true);
@ -835,15 +835,15 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
SMESH_TypeFilter* f = 0;
switch (myTypeId) {
case grpNodeSelection: f = new SMESH_TypeFilter(SUBMESH); break;
case grpEdgeSelection: f = new SMESH_TypeFilter(SUBMESH_EDGE); break;
case grpFaceSelection: f = new SMESH_TypeFilter(SUBMESH_FACE); break;
case grpVolumeSelection: f = new SMESH_TypeFilter(SUBMESH_SOLID); break;
default: f = new SMESH_TypeFilter(SUBMESH);
case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH); break;
case grpEdgeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_EDGE); break;
case grpFaceSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_FACE); break;
case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_SOLID); break;
default: f = new SMESH_TypeFilter(SMESH::SUBMESH);
}
QList<SUIT_SelectionFilter*> filtList;
filtList.append( f );
filtList.append( new SMESH_TypeFilter(SUBMESH_COMPOUND));
filtList.append( new SMESH_TypeFilter(SMESH::SUBMESH_COMPOUND));
mySubMeshFilter->setFilters( filtList );
mySelectionMgr->installFilter( mySubMeshFilter );
@ -855,12 +855,12 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
SMESH_TypeFilter* f = 0;
switch (myTypeId) {
case grpNodeSelection: f = new SMESH_TypeFilter(GROUP_NODE); break;
case grpBallSelection: f = new SMESH_TypeFilter(GROUP_BALL); break;
case grpEdgeSelection: f = new SMESH_TypeFilter(GROUP_EDGE); break;
case grpFaceSelection: f = new SMESH_TypeFilter(GROUP_FACE); break;
case grpVolumeSelection: f = new SMESH_TypeFilter(GROUP_VOLUME); break;
default: f = new SMESH_TypeFilter(GROUP);
case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_NODE); break;
case grpBallSelection: f = new SMESH_TypeFilter(SMESH::GROUP_BALL); break;
case grpEdgeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_EDGE); break;
case grpFaceSelection: f = new SMESH_TypeFilter(SMESH::GROUP_FACE); break;
case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_VOLUME); break;
default: f = new SMESH_TypeFilter(SMESH::GROUP);
}
QList<SUIT_SelectionFilter*> filtList;
filtList.append( f );

View File

@ -419,7 +419,7 @@ SUIT_SelectionFilter* SMESHGUI_GroupOnShapeOp::createFilter( const int theId ) c
if ( theId == _ELEM_GEOM || theId == _NODE_GEOM )
return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
else if ( theId == _MESH )
return new SMESH_TypeFilter( MESH );
return new SMESH_TypeFilter( SMESH::MESH );
else
return ( SUIT_SelectionFilter*) 0;
}

View File

@ -233,7 +233,7 @@ void SMESHGUI_GroupOpDlg::Init()
// set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
/*!
@ -464,7 +464,7 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*)
setEnabled(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
/*!

View File

@ -217,8 +217,8 @@ void SMESHGUI_Make2DFrom3DDlg::onGroupChecked()
SMESHGUI_Make2DFrom3DOp::SMESHGUI_Make2DFrom3DOp()
: SMESHGUI_SelectionOp(),
myMeshFilter(MESH),
myGroupFilter(GROUP)
myMeshFilter(SMESH::MESH),
myGroupFilter(SMESH::GROUP)
{
}

View File

@ -190,8 +190,8 @@ SMESHGUI_MinDistance::SMESHGUI_MinDistance( QWidget* parent )
connect( mySecondTgt, SIGNAL( textEdited( QString ) ), this, SLOT( secondEdited() ) );
QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
filters.append( new SMESH_TypeFilter( GROUP ) );
filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
mySecondTgt->setEnabled( mySecond->checkedId() != OriginTgt );
@ -706,8 +706,8 @@ SMESHGUI_BoundingBox::SMESHGUI_BoundingBox( QWidget* parent )
connect( mySource, SIGNAL( textEdited( QString ) ), this, SLOT( sourceEdited() ) );
QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
filters.append( new SMESH_TypeFilter( GROUP ) );
filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
clear();

View File

@ -1291,8 +1291,8 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
SMESH::UpdateView();
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -297,9 +297,9 @@ SUIT_SelectionFilter* SMESHGUI_MeshOp::createFilter( const int theId ) const
return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
}
else if ( theId == SMESHGUI_MeshDlg::Obj && !myToCreate )
return new SMESH_TypeFilter( MESHorSUBMESH );
return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
else if ( theId == SMESHGUI_MeshDlg::Mesh )
return new SMESH_TypeFilter( MESH );
return new SMESH_TypeFilter( SMESH::MESH );
else
return 0;
}

View File

@ -998,12 +998,12 @@ void SMESHGUI_MultiEditDlg::setSelectionMode()
if (mySubmeshChk->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter(SUBMESH));
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::SUBMESH));
}
else if (myGroupChk->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
}
if (entityType()) {

View File

@ -182,7 +182,7 @@ void SMESHGUI_RenumberingDlg::Init()
myMesh = SMESH::SMESH_Mesh::_nil();
myMeshFilter = new SMESH_TypeFilter (MESH);
myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));

View File

@ -401,22 +401,22 @@ SUIT_SelectionFilter* SMESHGUI_ReorientFacesOp::createFilter( const int what ) c
case EObject:
{
QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( MESH ));
filters.append( new SMESH_TypeFilter( SUBMESH_FACE ));
filters.append( new SMESH_TypeFilter( GROUP_FACE ));
filters.append( new SMESH_TypeFilter( SMESH::MESH ));
filters.append( new SMESH_TypeFilter( SMESH::SUBMESH_FACE ));
filters.append( new SMESH_TypeFilter( SMESH::GROUP_FACE ));
return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
}
case EPoint:
{
QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( IDSOURCE ));
filters.append( new SMESH_TypeFilter( SMESH::IDSOURCE ));
filters.append( new SMESH_NumberFilter( "GEOM",TopAbs_VERTEX, 1, TopAbs_VERTEX ));
return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
}
case EFace:
case EDirection:
{
return new SMESH_TypeFilter( IDSOURCE );
return new SMESH_TypeFilter( SMESH::IDSOURCE );
}
}
return NULL;

View File

@ -301,8 +301,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -281,8 +281,8 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -285,8 +285,8 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -551,7 +551,7 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
return -1;
if( objComponent->GetIOR()==obj->GetIOR() )
return COMPONENT;
return SMESH::COMPONENT;
int aLevel = obj->Depth() - objComponent->Depth(),
aFTag = objFather->Tag(),
@ -562,16 +562,16 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
{
case 1:
if (anOTag >= SMESH::Tag_FirstMeshRoot)
res = MESH;
res = SMESH::MESH;
break;
case 2:
switch (aFTag)
{
case SMESH::Tag_HypothesisRoot:
res = HYPOTHESIS;
res = SMESH::HYPOTHESIS;
break;
case SMESH::Tag_AlgorithmsRoot:
res = ALGORITHM;
res = SMESH::ALGORITHM;
break;
}
break;
@ -579,25 +579,25 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
switch (aFTag)
{
case SMESH::Tag_SubMeshOnVertex:
res = SUBMESH_VERTEX;
res = SMESH::SUBMESH_VERTEX;
break;
case SMESH::Tag_SubMeshOnEdge:
res = SUBMESH_EDGE;
res = SMESH::SUBMESH_EDGE;
break;
case SMESH::Tag_SubMeshOnFace:
res = SUBMESH_FACE;
res = SMESH::SUBMESH_FACE;
break;
case SMESH::Tag_SubMeshOnSolid:
res = SUBMESH_SOLID;
res = SMESH::SUBMESH_SOLID;
break;
case SMESH::Tag_SubMeshOnCompound:
res = SUBMESH_COMPOUND;
res = SMESH::SUBMESH_COMPOUND;
break;
default:
if (aFTag >= SMESH::Tag_FirstGroup)
res = GROUP;
res = SMESH::GROUP;
else
res = SUBMESH;
res = SMESH::SUBMESH;
}
break;
}
@ -614,29 +614,29 @@ QString SMESHGUI_Selection::typeName( const int t )
{
switch( t )
{
case HYPOTHESIS:
case SMESH::HYPOTHESIS:
return "Hypothesis";
case ALGORITHM:
case SMESH::ALGORITHM:
return "Algorithm";
case MESH:
case SMESH::MESH:
return "Mesh";
case SUBMESH:
case SMESH::SUBMESH:
return "SubMesh";
case MESHorSUBMESH:
case SMESH::MESHorSUBMESH:
return "Mesh or submesh";
case SUBMESH_VERTEX:
case SMESH::SUBMESH_VERTEX:
return "Mesh vertex";
case SUBMESH_EDGE:
case SMESH::SUBMESH_EDGE:
return "Mesh edge";
case SUBMESH_FACE:
case SMESH::SUBMESH_FACE:
return "Mesh face";
case SUBMESH_SOLID:
case SMESH::SUBMESH_SOLID:
return "Mesh solid";
case SUBMESH_COMPOUND:
case SMESH::SUBMESH_COMPOUND:
return "Mesh compound";
case GROUP:
case SMESH::GROUP:
return "Group";
case COMPONENT:
case SMESH::COMPONENT:
return "Component";
default:
return "Unknown";

View File

@ -263,7 +263,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
QList<SUIT_SelectionFilter*> aListOfFilters;
aListOfFilters << new SMESH_TypeFilter(MESHorSUBMESH) << new SMESH_TypeFilter(GROUP);
aListOfFilters << new SMESH_TypeFilter(SMESH::MESHorSUBMESH) << new SMESH_TypeFilter(SMESH::GROUP);
myMeshOrSubMeshOrGroupFilter =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);

View File

@ -284,8 +284,8 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -288,8 +288,8 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule ) :
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);

View File

@ -72,7 +72,7 @@ StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
//================================================================================
StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
( MeshObjectType objType, QWidget* parent, bool multiSelection )
( SMESH::MeshObjectType objType, QWidget* parent, bool multiSelection )
: QWidget( parent ), myMultiSelection( multiSelection )
{
myFilter = new SMESH_TypeFilter( objType );

View File

@ -58,7 +58,7 @@ public:
QWidget* parent,
bool multiSelection=false,
bool stretch=true);
StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType,
StdMeshersGUI_ObjectReferenceParamWdg( SMESH::MeshObjectType objType,
QWidget* parent,
bool multiSelection=false);
~StdMeshersGUI_ObjectReferenceParamWdg();

View File

@ -1006,7 +1006,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 1 ),
h->GetSourceEdge()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@ -1024,7 +1024,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 2 ),
h->GetSourceFace()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@ -1048,7 +1048,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 3, TopAbs_FACE, 6, true ),
h->GetSource3DShape()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@ -1073,7 +1073,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
item.myName = tr( "SMESH_SOURCE_EDGES" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_EDGE ),
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_EDGE ),
groupEntries));
item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
@ -1098,7 +1098,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
item.myName = tr( "SMESH_SOURCE_FACES" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_FACE ),
customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_FACE ),
groupEntries));
item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );