type method added

This commit is contained in:
sln 2005-08-23 08:55:53 +00:00
parent 3f8d4c84db
commit 1f1c0e4dcb
2 changed files with 11 additions and 4 deletions

View File

@ -316,16 +316,22 @@ QVariant SMESHGUI_Selection::isVisible( int ind ) const
} }
//=======================================================================
//function : type
//purpose :
//=======================================================================
int SMESHGUI_Selection::type( SalomeApp_DataOwner* owner, _PTR(Study) study )
{
return type( owner->entry(), study );
}
//======================================================================= //=======================================================================
//function : type //function : type
//purpose : //purpose :
//======================================================================= //=======================================================================
int SMESHGUI_Selection::type( SalomeApp_DataOwner* owner, int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
_PTR(Study) study )
{ {
QString entry = owner->entry();
_PTR(SObject) obj (study->FindObjectID(entry.latin1())); _PTR(SObject) obj (study->FindObjectID(entry.latin1()));
if( !obj ) if( !obj )
return -1; return -1;

View File

@ -63,6 +63,7 @@ public:
SMESH_Actor* getActor( int ind ) const; SMESH_Actor* getActor( int ind ) const;
static int type( const QString&, _PTR(Study) );
static int type( SalomeApp_DataOwner* owner, _PTR(Study) study); static int type( SalomeApp_DataOwner* owner, _PTR(Study) study);
static QString typeName( const int type); static QString typeName( const int type);