Salome HOME
[MEDCalc] Manage color maps
[modules/med.git] / src / MEDCalc / gui / dialogs / WidgetPresentationParameters.cxx
index 08823ca73b2ef3f282c93ad2f7d4362a0987a29a..37e41391af0a423487ae7945bfedf804b8c37af2 100644 (file)
@@ -53,8 +53,14 @@ WidgetPresentationParameters::getScalarBarMaxVal()
   return this->ui.doubleSpinBoxMaxVal->value();
 }
 
-std::string
+MEDCALC::MEDPresentationColorMap
 WidgetPresentationParameters::getColorMap()
 {
-  return this->ui.comboBoxColorMap->currentText().toStdString();
+  QString colorMap = this->ui.comboBoxColorMap->currentText();
+  if (colorMap == tr("LAB_BLUE_TO_RED")) {
+    return MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW;
+  }
+  else if (colorMap == tr("LAB_COOL_TO_WARM")) {
+    return MEDCALC::COLOR_MAP_COOL_TO_WARM;
+  }
 }