createAction( VISU_EXPORT_TABLE, tr("MEN_EXPORT_TABLE"), QIconSet(), tr("MEN_EXPORT_TABLE"), "", 0, aParent, false,
this, SLOT(OnExportTableToFile()));
- createAction( VISU_IMPORT_MED, tr("MEN_IMPORT_MED"), QIconSet(),
- tr("MEN_IMPORT_MED"), "", 0, aParent, false,
+ createAction( VISU_IMPORT_MED_STRUCTURE, tr("MEN_IMPORT_MED_STRUCTURE"), QIconSet(),
+ tr("MEN_IMPORT_MED_STRUCTURE"), "", 0, aParent, false,
+ this, SLOT(OnImportMedField()));
+
+ createAction( VISU_IMPORT_MED_TIMESTAMP, tr("MEN_IMPORT_MED_TIMESTAMP"), QIconSet(),
+ tr("MEN_IMPORT_MED_TIMESTAMP"), "", 0, aParent, false,
+ this, SLOT(OnImportMedField()));
+
+ createAction( VISU_IMPORT_MED_FIELD, tr("MEN_IMPORT_MED_FIELD"), QIconSet(),
+ tr("MEN_IMPORT_MED_FIELD"), "", 0, aParent, false,
this, SLOT(OnImportMedField()));
//aPixmap = aResourceMgr->loadPixmap("VISU",tr(""));
mgr->insert( action( VISU_IMPORT_TABLE ), -1, -1, -1 ); // import tables from file
mgr->insert( action( VISU_PLOT2D ), -1, -1, -1 ); // create Plot2d View
- mgr->insert( action( VISU_IMPORT_MED ), -1, -1, -1 ); // import MED structure from MED module
+ //mgr->insert( action( VISU_IMPORT_MED ), -1, -1, -1 ); // import MED structure from MED module
// create
mgr->insert( action( VISU_SCALAR_MAP ), -1, -1, -1 ); // scalar bar
mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1", true );
mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1", true );
- aRule = "client='ObjectBrowser' and type='MEDFIELD'";
- mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
+ //aRule = "client='ObjectBrowser' and type='MEDFIELD'";
+ //mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
}
//***************************************************************************
_PTR(SObject) SO = GetCStudy(GetAppStudy(this))->FindObjectID(anIO->getEntry());
bool isExist;
VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
+
if (aType == VISU::TANIMATION) {
action( VISU_SHOW_ANIMATION )->addTo(theMenu);
if (!CORBA::is_nil(anObject)) {
SALOME_MED::MED_var aMED = SALOME_MED::MED::_narrow(anObject);
if (!CORBA::is_nil(aMED.in())) {
- action( VISU_IMPORT_MED )->addTo(theMenu);
- } else {
- _PTR(SObject) aSFather = SO->GetFather();
- if (aSFather) {
- _PTR(GenericAttribute) anAttr;
- aSFather->FindAttribute(anAttr, "AttributeName");
- if (anAttr) {
- _PTR(AttributeName) aName (anAttr);
- std::string aValue = aName->Value();
- if (strcmp(aValue.c_str(), "MEDFIELD") == 0)
- action( VISU_IMPORT_MED )->addTo(theMenu);
+ action( VISU_IMPORT_MED_STRUCTURE )->addTo(theMenu);
+ }
+
+ SALOME_MED::FIELD_var aField = SALOME_MED::FIELD::_narrow(anObject); // "Import Structure"
+ if (!CORBA::is_nil(aField)) {
+ action( VISU_IMPORT_MED_TIMESTAMP )->addTo(theMenu); // "Import TimeStamp"
+ }
+ } else {
+ _PTR(SObject) aSFather = SO->GetFather();
+ if (aSFather) {
+ _PTR(GenericAttribute) anAttr;
+ aSFather->FindAttribute(anAttr, "AttributeName");
+ if (anAttr) {
+ _PTR(AttributeName) aName (anAttr);
+ std::string aValue = aName->Value();
+ if (strcmp(aValue.c_str(), "MEDFIELD") == 0) {
+ action( VISU_IMPORT_MED_FIELD )->addTo(theMenu); // "Import Field"
}
}
}