1 #include "WidgetPresentationParameters.hxx"
3 WidgetPresentationParameters::WidgetPresentationParameters(QWidget* parent)
6 ui.setupUi(this); // To be done first
9 MEDCALC::MEDPresentationViewMode
10 WidgetPresentationParameters::getViewMode() {
11 QString viewMode = this->ui.comboBoxViewMode->currentText();
12 if (viewMode == tr("LAB_VIEW_MODE_REPLACE")) {
13 return MEDCALC::VIEW_MODE_REPLACE;
15 else if (viewMode == tr("LAB_VIEW_MODE_OVERLAP")) {
16 return MEDCALC::VIEW_MODE_OVERLAP;
18 else if (viewMode == tr("LAB_VIEW_MODE_NEW_LAYOUT")) {
19 return MEDCALC::VIEW_MODE_NEW_LAYOUT;
21 else if (viewMode == tr("LAB_VIEW_MODE_SPLIT_VIEW")) {
22 return MEDCALC::VIEW_MODE_SPLIT_VIEW;
27 WidgetPresentationParameters::getField()
29 return this->ui.comboBoxField->currentText().toStdString();
33 WidgetPresentationParameters::getScalarBarRange()
35 return this->ui.comboBoxScalarBarRange->currentText().toStdString();
39 WidgetPresentationParameters::getScalarBarTimestep()
41 return this->ui.doubleSpinBoxTimeStep->value();
45 WidgetPresentationParameters::getScalarBarMinVal()
47 return this->ui.doubleSpinBoxMinVal->value();
51 WidgetPresentationParameters::getScalarBarMaxVal()
53 return this->ui.doubleSpinBoxMaxVal->value();
56 MEDCALC::MEDPresentationColorMap
57 WidgetPresentationParameters::getColorMap()
59 QString colorMap = this->ui.comboBoxColorMap->currentText();
60 if (colorMap == tr("LAB_BLUE_TO_RED")) {
61 return MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW;
63 else if (colorMap == tr("LAB_COOL_TO_WARM")) {
64 return MEDCALC::COLOR_MAP_COOL_TO_WARM;