From af5868c0c732a3a4ce29e3abff7d1948e34d54cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Tue, 23 Feb 2016 15:14:03 +0100 Subject: [PATCH] [MEDCalc] Add dock widget for presentation parameters --- src/MEDCalc/gui/CMakeLists.txt | 18 +- src/MEDCalc/gui/DatasourceController.cxx | 1 - src/MEDCalc/gui/MED_msg_en.ts | 107 +++++++--- src/MEDCalc/gui/MED_msg_fr.ts | 111 +++++++--- src/MEDCalc/gui/PresentationController.cxx | 86 +++----- src/MEDCalc/gui/PresentationController.hxx | 3 +- src/MEDCalc/gui/WorkspaceController.cxx | 9 +- src/MEDCalc/gui/dialogs/CMakeLists.txt | 13 +- .../dialogs/WidgetPresentationParameters.cxx | 60 ++++++ .../dialogs/WidgetPresentationParameters.hxx | 30 +++ .../dialogs/WidgetPresentationParameters.ui | 197 ++++++++++++++++++ 11 files changed, 485 insertions(+), 150 deletions(-) create mode 100644 src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx create mode 100644 src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx create mode 100644 src/MEDCalc/gui/dialogs/WidgetPresentationParameters.ui diff --git a/src/MEDCalc/gui/CMakeLists.txt b/src/MEDCalc/gui/CMakeLists.txt index 72e839cf4..62cb36a16 100644 --- a/src/MEDCalc/gui/CMakeLists.txt +++ b/src/MEDCalc/gui/CMakeLists.txt @@ -24,18 +24,14 @@ INCLUDE(UseQtExt) ADD_SUBDIRECTORY(dialogs) -SET(MEDCALCGUI_SOURCES - XmedConsoleDriver.cxx - WorkspaceController.cxx - XmedDataModel.cxx - MEDEventListener_i.cxx - MEDModule.cxx - DatasourceController.cxx - PresentationController.cxx - factory.cxx -) +FILE(GLOB MEDCALCGUI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx") -SET(MEDCALCGUI_HEADERS MEDModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx PresentationController.hxx) +SET(MEDCALCGUI_HEADERS + MEDModule.hxx + MEDEventListener_i.hxx + WorkspaceController.hxx + DatasourceController.hxx + PresentationController.hxx) QT_WRAP_MOC(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS}) diff --git a/src/MEDCalc/gui/DatasourceController.cxx b/src/MEDCalc/gui/DatasourceController.cxx index f7a96890b..5a1444719 100644 --- a/src/MEDCalc/gui/DatasourceController.cxx +++ b/src/MEDCalc/gui/DatasourceController.cxx @@ -67,7 +67,6 @@ DatasourceController::DatasourceController(MEDModule* salomeModule) _dlgInterpolateField = new DlgInterpolateField(_studyEditor); connect(_dlgInterpolateField,SIGNAL(inputValidated()), this, SLOT(OnInterpolateFieldInputValidated())); - } DatasourceController::~DatasourceController() { diff --git a/src/MEDCalc/gui/MED_msg_en.ts b/src/MEDCalc/gui/MED_msg_en.ts index 092e8caa5..251b402ab 100644 --- a/src/MEDCalc/gui/MED_msg_en.ts +++ b/src/MEDCalc/gui/MED_msg_en.ts @@ -4,36 +4,8 @@ PresentationController - LAB_VIEW_MODE_REPLACE - Replace - - - TIP_VIEW_MODE_REPLACE - Replace - - - LAB_VIEW_MODE_OVERLAP - Overlap - - - TIP_VIEW_MODE_OVERLAP - Overlap - - - LAB_VIEW_MODE_NEW_LAYOUT - New layout - - - TIP_VIEW_MODE_NEW_LAYOUT - New layout - - - LAB_VIEW_MODE_SPLIT_VIEW - Split - - - TIP_VIEW_MODE_SPLIT_VIEW - Split + TITLE_PRESENTATION_PARAMETERS + Presentation parameters LAB_PRESENTATION_SCALAR_MAP @@ -180,6 +152,61 @@ This field is already defined in the workspace + + WidgetPresentationParameters + + LAB_FIELD + Field: + + + LAB_EUCLIDEAN_NORM + Euclidean norm + + + LAB_SCALARBAR + Scalar bar: + + + LAB_RANGE + Range: + + + LAB_ALL_TIMESTEPS + All timesteps + + + LAB_ONE_TIMESTEP + Selected timestep + + + LAB_USER_RANGE + User-specified + + + LAB_TIMESTEP + Timestep: + + + LAB_MIN_VALUE + Min value: + + + LAB_MAX_VALUE + Max value: + + + LAB_COLOR_MAP + Color map: + + + LAB_BLUE_TO_RED + Blue to red rainbow + + + LAB_COOL_TO_WARM + Cool to warm + + DlgAlias @@ -477,5 +504,25 @@ FILE_FILTER_ALL All files (*.*) + + LAB_VIEW_MODE + View mode: + + + LAB_VIEW_MODE_REPLACE + Replace + + + LAB_VIEW_MODE_OVERLAP + Overlap + + + LAB_VIEW_MODE_NEW_LAYOUT + New layout + + + LAB_VIEW_MODE_SPLIT_VIEW + Split + diff --git a/src/MEDCalc/gui/MED_msg_fr.ts b/src/MEDCalc/gui/MED_msg_fr.ts index c892ca55d..d339c08b9 100644 --- a/src/MEDCalc/gui/MED_msg_fr.ts +++ b/src/MEDCalc/gui/MED_msg_fr.ts @@ -4,36 +4,8 @@ PresentationController - LAB_VIEW_MODE_REPLACE - Remplacer - - - TIP_VIEW_MODE_REPLACE - Remplacer - - - LAB_VIEW_MODE_OVERLAP - Superposer - - - TIP_VIEW_MODE_OVERLAP - Superposer - - - LAB_VIEW_MODE_NEW_LAYOUT - Nouvel onglet - - - TIP_VIEW_MODE_NEW_LAYOUT - Nouvel onglet - - - LAB_VIEW_MODE_SPLIT_VIEW - Scinder - - - TIP_VIEW_MODE_SPLIT_VIEW - Scinder + TITLE_PRESENTATION_PARAMETERS + Paramètres de presentation LAB_PRESENTATION_SCALAR_MAP @@ -114,10 +86,6 @@ DatasourceController - - MEDPresentationScalarMap - Carte scalaire - LAB_ADD_DATA_SOURCE @@ -184,6 +152,61 @@ Ce champ est déjà défini dans l'espace de travail + + WidgetPresentationParameters + + LAB_FIELD + Champ : + + + LAB_EUCLIDEAN_NORM + Norme euclidienne + + + LAB_SCALARBAR + Echelle de valeurs : + + + LAB_RANGE + Intervalle : + + + LAB_ALL_TIMESTEPS + Tous les pas de temps + + + LAB_ONE_TIMESTEP + Pas de temps sélectionné + + + LAB_USER_RANGE + Personnalisé : + + + LAB_TIMESTEP + Pas de temps : + + + LAB_MIN_VALUE + Valeur min : + + + LAB_MAX_VALUE + Valeur max : + + + LAB_COLOR_MAP + Table de couleurs : + + + LAB_BLUE_TO_RED + Arc-en-ciel blue vers rouge + + + LAB_COOL_TO_WARM + Froid vers chaud + + DlgAlias @@ -481,5 +504,25 @@ FILE_FILTER_ALL Tous les fichiers (*.*) + + LAB_VIEW_MODE + Mode de rendu : + + + LAB_VIEW_MODE_REPLACE + Remplacer + + + LAB_VIEW_MODE_OVERLAP + Superposer + + + LAB_VIEW_MODE_NEW_LAYOUT + Nouvel onglet + + + LAB_VIEW_MODE_SPLIT_VIEW + Scinder + diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index bb432b56b..bd2b83058 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -22,6 +22,7 @@ #include "MEDModule.hxx" #include "Basics_Utils.hxx" #include "QtxActionGroup.h" +#include "QtxActionToolMgr.h" #include "MEDFactoryClient.hxx" #include @@ -35,18 +36,26 @@ #include #include #include - -static const int OPTIONS_VIEW_MODE_ID = 943; -static const int OPTIONS_VIEW_MODE_REPLACE_ID = 944; -static const int OPTIONS_VIEW_MODE_OVERLAP_ID = 945; -static const int OPTIONS_VIEW_MODE_NEW_LAYOUT_ID = 946; -static const int OPTIONS_VIEW_MODE_SPLIT_VIEW_ID = 947; +#include PresentationController::PresentationController(MEDModule* salomeModule) { STDLOG("Creating a PresentationController"); _salomeModule = salomeModule; _studyEditor = _salomeModule->getStudyEditor(); + + _widgetPresentationParameters = new WidgetPresentationParameters(); + + QMainWindow* parent = salomeModule->getApp()->desktop(); + QDockWidget *dockWidget = new QDockWidget(parent); + dockWidget->setVisible(false); + dockWidget->setWindowTitle(tr("TITLE_PRESENTATION_PARAMETERS")); + dockWidget->setObjectName(tr("TITLE_PRESENTATION_PARAMETERS")); + dockWidget->setFeatures(QDockWidget::AllDockWidgetFeatures); + dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + dockWidget->setWidget(_widgetPresentationParameters); + parent->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); + dockWidget->show(); } PresentationController::~PresentationController() @@ -75,49 +84,17 @@ void PresentationController::createActions() { STDLOG("Creating PresentationController actions"); - int toolbarId = _salomeModule->createTool("View Mode", "PresentationToolbar"); + int presentationToolbarId = _salomeModule->createTool("View Mode", "PresentationToolbar"); int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, 1); - // View Mode - QtxActionGroup* ag = _salomeModule->createActionGroup(OPTIONS_VIEW_MODE_ID, true); - ag->setText("View mode"); - ag->setUsesDropDown(true); - - QString label = tr("LAB_VIEW_MODE_REPLACE"); - QString tooltip = tr("TIP_VIEW_MODE_REPLACE"); - QAction* a = _salomeModule->createAction(OPTIONS_VIEW_MODE_REPLACE_ID,label,QIcon(),label,tooltip,0); - a->setCheckable(true); - a->setChecked(true); - ag->add(a); - - label = tr("LAB_VIEW_MODE_OVERLAP"); - tooltip = tr("TIP_VIEW_MODE_OVERLAP"); - a = _salomeModule->createAction(OPTIONS_VIEW_MODE_OVERLAP_ID,label,QIcon(),label,tooltip,0); - a->setCheckable(true); - ag->add(a); - - label = tr("LAB_VIEW_MODE_NEW_LAYOUT"); - tooltip = tr("TIP_VIEW_MODE_NEW_LAYOUT"); - a = _salomeModule->createAction(OPTIONS_VIEW_MODE_NEW_LAYOUT_ID,label,QIcon(),label,tooltip,0); - a->setCheckable(true); - ag->add(a); - - label = tr("LAB_VIEW_MODE_SPLIT_VIEW"); - tooltip = tr("TIP_VIEW_MODE_SPLIT_VIEW"); - a = _salomeModule->createAction(OPTIONS_VIEW_MODE_SPLIT_VIEW_ID,label,QIcon(),label,tooltip,0); - a->setCheckable(true); - ag->add(a); - - _salomeModule->createTool(OPTIONS_VIEW_MODE_ID, toolbarId); - // Presentations - label = tr("LAB_PRESENTATION_SCALAR_MAP"); - tooltip = tr("TIP_PRESENTATION_SCALAR_MAP"); + QString label = tr("LAB_PRESENTATION_SCALAR_MAP"); + QString tooltip = tr("TIP_PRESENTATION_SCALAR_MAP"); QString icon = tr(_getIconName("ICO_PRESENTATION_SCALAR_MAP").c_str()); int actionId; actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeScalarMap()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -125,7 +102,7 @@ PresentationController::createActions() tooltip = tr("TIP_PRESENTATION_CONTOUR"); icon = tr(_getIconName("ICO_PRESENTATION_CONTOUR").c_str()); actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeContour()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -133,7 +110,7 @@ PresentationController::createActions() tooltip = tr("TIP_PRESENTATION_VECTOR_FIELD"); icon = tr(_getIconName("ICO_PRESENTATION_VECTOR_FIELD").c_str()); actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeVectorField()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -141,7 +118,7 @@ PresentationController::createActions() tooltip = tr("TIP_PRESENTATION_SLICES"); icon = tr(_getIconName("ICO_PRESENTATION_SLICES").c_str()); actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeSlices()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -149,7 +126,7 @@ PresentationController::createActions() tooltip = tr("TIP_PRESENTATION_DEFLECTION_SHAPE"); icon = tr(_getIconName("ICO_PRESENTATION_DEFLECTION_SHAPE").c_str()); actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeDeflectionShape()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -157,7 +134,7 @@ PresentationController::createActions() tooltip = tr("TIP_PRESENTATION_POINT_SPRITE"); icon = tr(_getIconName("ICO_PRESENTATION_POINT_SPRITE").c_str()); actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizePointSprite()),icon,tooltip); - _salomeModule->createTool(actionId, toolbarId); + _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); } @@ -165,18 +142,7 @@ PresentationController::createActions() MEDCALC::MEDPresentationViewMode PresentationController::getSelectedViewMode() { - if (_salomeModule->action(OPTIONS_VIEW_MODE_REPLACE_ID)->isChecked()) { - return MEDCALC::VIEW_MODE_REPLACE; - } - else if (_salomeModule->action(OPTIONS_VIEW_MODE_OVERLAP_ID)->isChecked()) { - return MEDCALC::VIEW_MODE_OVERLAP; - } - else if (_salomeModule->action(OPTIONS_VIEW_MODE_NEW_LAYOUT_ID)->isChecked()) { - return MEDCALC::VIEW_MODE_NEW_LAYOUT; - } - else if (_salomeModule->action(OPTIONS_VIEW_MODE_SPLIT_VIEW_ID)->isChecked()) { - return MEDCALC::VIEW_MODE_SPLIT_VIEW; - } + return _widgetPresentationParameters->getViewMode(); } void @@ -212,7 +178,7 @@ PresentationController::visualize(PresentationEvent::EventType eventType) XmedDataObject* dataObject = new XmedDataObject(); dataObject->setFieldHandler(*fieldHandler); event->objectdata = dataObject; - emit presentationSignal(event); + emit presentationSignal(event); // --> WorkspaceController::processPresentationEvent } } diff --git a/src/MEDCalc/gui/PresentationController.hxx b/src/MEDCalc/gui/PresentationController.hxx index d58b926d8..c4a1dacc7 100644 --- a/src/MEDCalc/gui/PresentationController.hxx +++ b/src/MEDCalc/gui/PresentationController.hxx @@ -30,6 +30,7 @@ #include "XmedDataModel.hxx" #include +#include "WidgetPresentationParameters.hxx" typedef struct { enum EventType { @@ -78,7 +79,7 @@ private: private: MEDModule* _salomeModule; SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule - + WidgetPresentationParameters* _widgetPresentationParameters; }; #endif /* PRESENTATION_CONTROLLER_HXX */ diff --git a/src/MEDCalc/gui/WorkspaceController.cxx b/src/MEDCalc/gui/WorkspaceController.cxx index 3137c82d2..5458ecb72 100644 --- a/src/MEDCalc/gui/WorkspaceController.cxx +++ b/src/MEDCalc/gui/WorkspaceController.cxx @@ -40,7 +40,6 @@ * and containing a tree view for rendering a hierarchical data * model. This datamodel contains the objects used in the workspace. */ -//WorkspaceController::WorkspaceController(StandardApp_Module* salomeModule) WorkspaceController::WorkspaceController(MEDModule* salomeModule) : TreeGuiManager(salomeModule->getApp(), "Workspace") { @@ -100,7 +99,7 @@ WorkspaceController::WorkspaceController(MEDModule* salomeModule) } WorkspaceController::~WorkspaceController() { - std::cout << "WorkspaceController::~WorkspaceController()\n"; + STDLOG("WorkspaceController::~WorkspaceController()"); MEDEventListener_i::release(); } @@ -118,14 +117,12 @@ void WorkspaceController::createActions() { QString tooltip = tr("TIP_SAVE_WORKSPACE"); QString icon = tr("ICO_WORKSPACE_SAVE"); int actionId = _salomeModule->createStandardAction(label,this,SLOT(OnSaveWorkspace()),icon,tooltip); - //_salomeModule->addActionInToolbar(actionId); _salomeModule->createTool(actionId, toolbarId); label = tr("LAB_CLEAN_WORKSPACE"); tooltip = tr("TIP_CLEAN_WORKSPACE"); icon = tr("ICO_WORKSPACE_CLEAN"); actionId = _salomeModule->createStandardAction(label,this,SLOT(OnCleanWorkspace()),icon,tooltip); -//_salomeModule->addActionInToolbar(actionId); _salomeModule->createTool(actionId, toolbarId); } @@ -551,8 +548,12 @@ void WorkspaceController::processPresentationEvent(const PresentationEvent* even XmedDataObject* dataObject = event->objectdata; + // --> 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 = ; // from PresentationController combobox MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler(); QStringList commands; commands += QString("medcalc.MakeScalarMap(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode); diff --git a/src/MEDCalc/gui/dialogs/CMakeLists.txt b/src/MEDCalc/gui/dialogs/CMakeLists.txt index 732d72d0f..0367a6c5c 100644 --- a/src/MEDCalc/gui/dialogs/CMakeLists.txt +++ b/src/MEDCalc/gui/dialogs/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D +# Copyright (C) 2012-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -21,14 +21,7 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) INCLUDE(UseQtExt) -SET(MEDCALCGUI_dialogs_FORMS - GenericDialog.ui - DlgAlias.ui - DlgUseInWorkspace.ui - DlgChangeUnderlyingMesh.ui - DlgInterpolateField.ui - DlgImageToMed.ui -) +FILE(GLOB MEDCALCGUI_dialogs_FORMS "${CMAKE_CURRENT_SOURCE_DIR}/*.ui") QT_WRAP_UIC(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS}) SET(MEDCALCGUI_dialogs_FILES @@ -47,6 +40,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${GUI_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${PROJECT_BINARY_DIR}/idl ) SET(MEDCALCGUI_dialogs_SOURCES @@ -56,6 +50,7 @@ SET(MEDCALCGUI_dialogs_SOURCES DlgChangeUnderlyingMesh.cxx DlgInterpolateField.cxx DlgImageToMed.cxx + WidgetPresentationParameters.cxx ) ADD_LIBRARY(MEDCALCGUI_dialogs SHARED ${MEDCALCGUI_dialogs_SOURCES} ${MEDCALCGUI_dialogs_HEADERS_MOC} ${MEDCALCGUI_dialogs_FORMS_HEADERS}) diff --git a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx new file mode 100644 index 000000000..08823ca73 --- /dev/null +++ b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.cxx @@ -0,0 +1,60 @@ +#include "WidgetPresentationParameters.hxx" + +WidgetPresentationParameters::WidgetPresentationParameters(QWidget* parent) + : QWidget(parent) +{ + ui.setupUi(this); // To be done first +} + +MEDCALC::MEDPresentationViewMode +WidgetPresentationParameters::getViewMode() { + QString viewMode = this->ui.comboBoxViewMode->currentText(); + if (viewMode == tr("LAB_VIEW_MODE_REPLACE")) { + return MEDCALC::VIEW_MODE_REPLACE; + } + else if (viewMode == tr("LAB_VIEW_MODE_OVERLAP")) { + return MEDCALC::VIEW_MODE_OVERLAP; + } + else if (viewMode == tr("LAB_VIEW_MODE_NEW_LAYOUT")) { + return MEDCALC::VIEW_MODE_NEW_LAYOUT; + } + else if (viewMode == tr("LAB_VIEW_MODE_SPLIT_VIEW")) { + return MEDCALC::VIEW_MODE_SPLIT_VIEW; + } +} + +std::string +WidgetPresentationParameters::getField() +{ + return this->ui.comboBoxField->currentText().toStdString(); +} + +std::string +WidgetPresentationParameters::getScalarBarRange() +{ + return this->ui.comboBoxScalarBarRange->currentText().toStdString(); +} + +double +WidgetPresentationParameters::getScalarBarTimestep() +{ + return this->ui.doubleSpinBoxTimeStep->value(); +} + +double +WidgetPresentationParameters::getScalarBarMinVal() +{ + return this->ui.doubleSpinBoxMinVal->value(); +} + +double +WidgetPresentationParameters::getScalarBarMaxVal() +{ + return this->ui.doubleSpinBoxMaxVal->value(); +} + +std::string +WidgetPresentationParameters::getColorMap() +{ + return this->ui.comboBoxColorMap->currentText().toStdString(); +} diff --git a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx new file mode 100644 index 000000000..a8a971416 --- /dev/null +++ b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.hxx @@ -0,0 +1,30 @@ +#ifndef WIDGET_PRESENTATION_PARAMETERS_HXX +#define WIDGET_PRESENTATION_PARAMETERS_HXX + +#include "MEDCALCGUIdialogs.hxx" + +#include +#include "ui_WidgetPresentationParameters.h" + +#include +#include CORBA_SERVER_HEADER(MEDPresentationManager) + +class WidgetPresentationParameters : public QWidget +{ +public: + WidgetPresentationParameters(QWidget* parent = 0); + + MEDCALC::MEDPresentationViewMode getViewMode(); + std::string getField(); + std::string getScalarBarRange(); + double getScalarBarTimestep(); + double getScalarBarMinVal(); + double getScalarBarMaxVal(); + std::string getColorMap(); + + private: + Ui_WidgetPresentationParameters ui; // instance of the class defined in ui_WidgetPresentationParameters.h +}; + + +#endif diff --git a/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.ui b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.ui new file mode 100644 index 000000000..00882636e --- /dev/null +++ b/src/MEDCalc/gui/dialogs/WidgetPresentationParameters.ui @@ -0,0 +1,197 @@ + + + WidgetPresentationParameters + + + + 0 + 0 + 404 + 230 + + + + + 300 + 200 + + + + Form + + + + + + LAB_FIELD + + + + + + + + LAB_EUCLIDEAN_NORM + + + + + + + + false + + + LAB_TIMESTEP + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + + + + false + + + LAB_MIN_VALUE + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + + + + false + + + LAB_MAX_VALUE + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + + + + LAB_COLOR_MAP + + + + + + + + LAB_BLUE_TO_RED + + + + + LAB_COOL_TO_WARM + + + + + + + + LAB_VIEW_MODE + + + + + + + + LAB_VIEW_MODE_REPLACE + + + + + LAB_VIEW_MODE_OVERLAP + + + + + LAB_VIEW_MODE_NEW_LAYOUT + + + + + LAB_VIEW_MODE_SPLIT_VIEW + + + + + + + + true + + + + LAB_ALL_TIMESTEPS + + + + + LAB_ONE_TIMESTEP + + + + + LAB_USER_RANGE + + + + + + + + LAB_SCALARBAR + + + + + + + true + + + LAB_RANGE + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + -- 2.39.2