- // --> Send commands to SALOME Python console
- if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
- QString viewMode = _getViewMode();
- //QString displayedInfo = ; // from PresentationController combobox
- //QString scalarBarRange = ; // from PresentationController spinbox
- QString colorMap = _getColorMap();
- MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
- QStringList commands;
- commands += QString("presentation_id = medcalc.MakeScalarMap(accessField(%1), %2, colorMap=%3)").arg(fieldHandler->id).arg(viewMode).arg(colorMap);
- commands += QString("presentation_id");
- _consoleDriver->exec(commands);
- }
- else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR ) {
- QString viewMode = _getViewMode();
- MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
- QStringList commands;
- commands += QString("presentation_id = medcalc.MakeContour(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
- commands += QString("presentation_id");
- _consoleDriver->exec(commands);
- }
- else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) {
- QString viewMode = _getViewMode();
- MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
- QStringList commands;
- commands += QString("presentation_id = medcalc.MakeVectorField(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
- commands += QString("presentation_id");
- _consoleDriver->exec(commands);
- }
- else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SLICES ) {
- QString viewMode = _getViewMode();
- MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
- QStringList commands;
- commands += QString("presentation_id = medcalc.MakeSlices(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
- commands += QString("presentation_id");
- _consoleDriver->exec(commands);
- }
- else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
- QString viewMode = _getViewMode();
- MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();