#define ENUM2STRING( x, y ) \
case y: \
x = QString( #y ); \
- break;
+ break
QString VisuGUI_Selection::type( const int ind ) const
{
QString aResStr;
VISU::Storable::TRestoringMap aMap;
- GetSelectedObj( study(), entry( ind ), &aMap );
+ CORBA::Object_var anObject = GetSelectedObj( study(), entry( ind ), &aMap );
bool isExist;
const QString& aVal = VISU::Storable::FindValue(aMap,"myComment",&isExist);
if ( isExist )
aResStr = "VISU::T" + aVal;
+ else{
+ VISU::Base_var aVisuObj = VISU::Base::_narrow( anObject );
+ if ( !CORBA::is_nil( aVisuObj ) ){
+ VISU::VISUType aType = aVisuObj->GetType();
+ switch (aType) {
+ ENUM2STRING( aResStr, VISU::TVISUGEN );
+ ENUM2STRING( aResStr, VISU::TRESULT );
+ ENUM2STRING( aResStr, VISU::TTABLE );
+ ENUM2STRING( aResStr, VISU::TCURVE );
+ ENUM2STRING( aResStr, VISU::TCONTAINER );
+ ENUM2STRING( aResStr, VISU::TMESH );
+ ENUM2STRING( aResStr, VISU::TSCALARMAP );
+ ENUM2STRING( aResStr, VISU::TISOSURFACE );
+ ENUM2STRING( aResStr, VISU::TDEFORMEDSHAPE );
+ ENUM2STRING( aResStr, VISU::TCUTPLANES );
+ ENUM2STRING( aResStr, VISU::TCUTLINES );
+ ENUM2STRING( aResStr, VISU::TVECTORS );
+ ENUM2STRING( aResStr, VISU::TSTREAMLINES );
+ ENUM2STRING( aResStr, VISU::TPLOT3D );
+ ENUM2STRING( aResStr, VISU::TANIMATION );
+ }
+ }
+ }
+
return aResStr;
}
if ( VISU_Actor* anVISUActor = FindActor( aView, entry( ind ).latin1() ) ){
int aRepresent = anVISUActor->GetRepresentation();
switch ( aRepresent ){
- ENUM2STRING( aResStr, VISU::POINT )
- ENUM2STRING( aResStr, VISU::WIREFRAME )
- ENUM2STRING( aResStr, VISU::SHADED )
- ENUM2STRING( aResStr, VISU::INSIDEFRAME )
- ENUM2STRING( aResStr, VISU::SURFACEFRAME )
+ ENUM2STRING( aResStr, VISU::POINT );
+ ENUM2STRING( aResStr, VISU::WIREFRAME );
+ ENUM2STRING( aResStr, VISU::SHADED );
+ ENUM2STRING( aResStr, VISU::INSIDEFRAME );
+ ENUM2STRING( aResStr, VISU::SURFACEFRAME );
}
}
}