There were added new version of method type returning type by string entry

This commit is contained in:
asl 2005-07-07 09:07:10 +00:00
parent 6dea707b73
commit eaeda2a220
2 changed files with 11 additions and 6 deletions

View File

@ -313,17 +313,21 @@ QVariant SMESHGUI_Selection::isVisible( int ind ) const
return QVariant( false, 0 ); return QVariant( false, 0 );
} }
//=======================================================================
//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( const QString& entry, _PTR(Study) study )
int SMESHGUI_Selection::type( SalomeApp_DataOwner* owner,
_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,7 +63,8 @@ public:
SMESH_Actor* getActor( int ind ) const; SMESH_Actor* getActor( int ind ) const;
static int type( SalomeApp_DataOwner* owner, _PTR(Study) study); static int type( const QString&, _PTR(Study) );
static int type( SalomeApp_DataOwner* owner, _PTR(Study) );
static QString typeName( const int type); static QString typeName( const int type);
private: private: