+ class SMESHGUI_EXPORT SelectionProxy
+ {
+ Handle(SALOME_InteractiveObject) myIO;
+ SMESH::SMESH_IDSource_var myObject;
+ SMESH_Actor* myActor;
+ bool myDirty;
+
+ public:
+ enum Type
+ {
+ Unknown,
+ Mesh,
+ Submesh,
+ Group,
+ GroupStd,
+ GroupGeom,
+ GroupFilter
+ };
+
+ // construction
+ SelectionProxy();
+ SelectionProxy( const Handle(SALOME_InteractiveObject)& );
+ SelectionProxy( SMESH::SMESH_IDSource_ptr );
+ SelectionProxy( const SelectionProxy& );
+
+ SelectionProxy& operator= ( const SelectionProxy& );
+
+ // comparison
+ bool operator== ( const SelectionProxy& );
+
+ // general purpose methods
+ void refresh();
+
+ bool isNull() const;
+ operator bool() const;
+
+ SMESH::SMESH_IDSource_ptr object() const;
+ const Handle(SALOME_InteractiveObject)& io() const;
+ SMESH_Actor* actor() const;
+
+ bool isValid() const;
+ void load();
+
+ // methods common to all types of proxy
+ QString name() const;
+ Type type() const;
+ MeshInfo meshInfo() const;
+ SelectionProxy mesh() const;
+ bool hasShapeToMesh() const;
+ GEOM::GEOM_Object_ptr shape() const;
+ QString shapeName() const;
+ int shapeType() const;
+ bool isMeshLoaded() const;
+
+ bool hasNode( int );
+ bool nodeCoordinates( int, XYZ& );
+ bool nodeConnectivity( int, Connectivity& );
+ bool nodePosition( int, Position& );
+ QList<SelectionProxy> nodeGroups( int ) const;
+
+ bool hasElement( int );
+ SMESH::ElementType elementType( int ) const;
+ int elementEntityType( int ) const;
+ bool elementConnectivity( int, Connectivity& );
+ bool elementPosition( int, Position& );
+ bool elementGravityCenter( int, XYZ& );
+ bool elementNormal( int, XYZ& );
+ bool elementControl( int, int, double, double& ) const;
+ QList<SelectionProxy> elementGroups( int ) const;
+
+ // methods that work for mesh only
+ MedInfo medFileInfo() const;
+ QList<SelectionProxy> submeshes() const;
+ QList<SelectionProxy> groups() const;
+
+ // methods that work for group only
+ SMESH::ElementType groupElementType() const;
+ QColor color() const;
+ int size( bool = false ) const;
+ int nbNodes( bool = false ) const;
+ QSet<uint> ids() const;
+
+ private:
+ void init();
+ };
+}