Fault result: Added fault result legend

This commit is contained in:
Magne Sjaastad 2014-07-31 08:46:30 +02:00
parent a5e928dec1
commit 0d14436b97
6 changed files with 177 additions and 124 deletions

View File

@ -650,7 +650,7 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
riv->cellResult()->setResultVariable(RimDefines::undefinedResultName()); riv->cellResult()->setResultVariable(RimDefines::undefinedResultName());
} }
riv->cellFaultResult()->customResultSlot()->setResultVariable(RimDefines::undefinedResultName()); riv->cellFaultResult()->updateVisibility();
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel(); RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();

View File

@ -45,10 +45,10 @@ RimFaultResultSlot::RimFaultResultSlot()
{ {
CAF_PDM_InitObject("Fault Result Slot", "", "", ""); CAF_PDM_InitObject("Fault Result Slot", "", "", "");
CAF_PDM_InitField(&visualizationMode, "VisualizationMode", caf::AppEnum<RimFaultResultSlot::FaultVisualizationMode>(RimFaultResultSlot::CELL_RESULT_MAPPING), "Fault Color Mapping", "", "", ""); CAF_PDM_InitField(&m_visualizationMode, "VisualizationMode", caf::AppEnum<RimFaultResultSlot::FaultVisualizationMode>(RimFaultResultSlot::CELL_RESULT_MAPPING), "Fault Color Mapping", "", "", "");
CAF_PDM_InitFieldNoDefault(&customResultSlot, "CustomResultSlot", "Custom Cell Result", ":/CellResult.png", "", ""); CAF_PDM_InitFieldNoDefault(&m_customResultSlot, "CustomResultSlot", "Custom Fault Cell Result", ":/CellResult.png", "", "");
customResultSlot = new RimResultSlot(); m_customResultSlot = new RimResultSlot();
updateVisibility(); updateVisibility();
} }
@ -65,7 +65,8 @@ RimFaultResultSlot::~RimFaultResultSlot()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimFaultResultSlot::setReservoirView(RimReservoirView* ownerReservoirView) void RimFaultResultSlot::setReservoirView(RimReservoirView* ownerReservoirView)
{ {
customResultSlot->setReservoirView(ownerReservoirView); m_reservoirView = ownerReservoirView;
m_customResultSlot->setReservoirView(ownerReservoirView);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -73,12 +74,14 @@ void RimFaultResultSlot::setReservoirView(RimReservoirView* ownerReservoirView)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimFaultResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) void RimFaultResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{ {
if (changedField == &visualizationMode) if (changedField == &m_visualizationMode)
{ {
updateVisibility(); updateVisibility();
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(this); RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(this);
} }
if (m_reservoirView) m_reservoirView->createDisplayModelAndRedraw();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -94,15 +97,28 @@ void RimFaultResultSlot::initAfterRead()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimFaultResultSlot::updateVisibility() void RimFaultResultSlot::updateVisibility()
{ {
if (this->visualizationMode() == FAULT_COLOR || this->visualizationMode() == CELL_RESULT_MAPPING) if (this->m_visualizationMode() == FAULT_COLOR || this->m_visualizationMode() == CELL_RESULT_MAPPING)
{ {
this->customResultSlot.setUiHidden(true); this->m_customResultSlot.setUiHidden(true);
this->customResultSlot.setUiChildrenHidden(true); this->m_customResultSlot.setUiChildrenHidden(true);
} }
else else
{ {
this->customResultSlot.setUiHidden(false); this->m_customResultSlot.setUiHidden(false);
this->customResultSlot.setUiChildrenHidden(false); this->m_customResultSlot.setUiChildrenHidden(false);
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimResultSlot* RimFaultResultSlot::customResultSlot()
{
if (this->m_visualizationMode() == CUSTOM_RESULT_MAPPING)
{
return this->m_customResultSlot();
}
return NULL;
}

View File

@ -29,7 +29,7 @@ class RimReservoirView;
/// ///
/// ///
//================================================================================================== //==================================================================================================
class RimFaultResultSlot : public caf::PdmObject class RimFaultResultSlot : public caf::PdmObject
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:
@ -46,16 +46,17 @@ public:
void setReservoirView(RimReservoirView* ownerReservoirView); void setReservoirView(RimReservoirView* ownerReservoirView);
caf::PdmField<RimResultSlot*> customResultSlot; RimResultSlot* customResultSlot();
void updateVisibility();
protected: protected:
virtual void initAfterRead(); virtual void initAfterRead();
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
private: private:
void updateVisibility(); caf::PdmField< caf::AppEnum< FaultVisualizationMode > > m_visualizationMode;
caf::PdmField<RimResultSlot*> m_customResultSlot;
private: caf::PdmPointer<RimReservoirView> m_reservoirView;
caf::PdmField< caf::AppEnum< FaultVisualizationMode > > visualizationMode;
}; };

View File

@ -102,10 +102,8 @@ RimReservoirView::RimReservoirView()
CAF_PDM_InitFieldNoDefault(&cellEdgeResult, "GridCellEdgeResult", "Cell Edge Result", ":/EdgeResult_1.png", "", ""); CAF_PDM_InitFieldNoDefault(&cellEdgeResult, "GridCellEdgeResult", "Cell Edge Result", ":/EdgeResult_1.png", "", "");
cellEdgeResult = new RimCellEdgeResultSlot(); cellEdgeResult = new RimCellEdgeResultSlot();
CAF_PDM_InitFieldNoDefault(&cellFaultResult, "GridCellFaultResult", "Fault Cell Result", ":/CellResult.png", "", ""); CAF_PDM_InitFieldNoDefault(&faultResult, "GridCellFaultResult", "Fault Result", ":/CellResult.png", "", "");
cellFaultResult = new RimFaultResultSlot(); faultResult = new RimFaultResultSlot();
cellFaultResult.setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&overlayInfoConfig, "OverlayInfoConfig", "Info Box", "", "", ""); CAF_PDM_InitFieldNoDefault(&overlayInfoConfig, "OverlayInfoConfig", "Info Box", "", "", "");
overlayInfoConfig = new Rim3dOverlayInfoConfig(); overlayInfoConfig = new Rim3dOverlayInfoConfig();
@ -167,7 +165,7 @@ RimReservoirView::RimReservoirView()
this->cellEdgeResult()->legendConfig()->setPosition(cvf::Vec2ui(10, 320)); this->cellEdgeResult()->legendConfig()->setPosition(cvf::Vec2ui(10, 320));
this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE); this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE);
this->cellFaultResult()->setReservoirView(this); this->faultResult()->setReservoirView(this);
m_reservoirGridPartManager = new RivReservoirViewPartMgr(this); m_reservoirGridPartManager = new RivReservoirViewPartMgr(this);
@ -182,7 +180,7 @@ RimReservoirView::RimReservoirView()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimReservoirView::~RimReservoirView() RimReservoirView::~RimReservoirView()
{ {
delete this->cellFaultResult(); delete this->faultResult();
delete this->cellResult(); delete this->cellResult();
delete this->cellEdgeResult(); delete this->cellEdgeResult();
delete this->overlayInfoConfig(); delete this->overlayInfoConfig();
@ -521,10 +519,7 @@ void RimReservoirView::createDisplayModel()
// Find the number of time frames the animation needs to show the requested data. // Find the number of time frames the animation needs to show the requested data.
if (this->cellResult()->hasDynamicResult() if (isTimeStepDependentDataVisible())
|| this->propertyFilterCollection()->hasActiveDynamicFilters()
|| this->wellCollection->hasVisibleWellPipes()
|| this->cellResult()->isTernarySaturationSelected())
{ {
CVF_ASSERT(currentGridCellResults()); CVF_ASSERT(currentGridCellResults());
@ -972,7 +967,7 @@ void RimReservoirView::loadDataAndUpdate()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimReservoirView::initAfterRead() void RimReservoirView::initAfterRead()
{ {
this->cellFaultResult()->setReservoirView(this); this->faultResult()->setReservoirView(this);
this->cellResult()->setReservoirView(this); this->cellResult()->setReservoirView(this);
this->cellEdgeResult()->setReservoirView(this); this->cellEdgeResult()->setReservoirView(this);
this->rangeFilterCollection()->setReservoirView(this); this->rangeFilterCollection()->setReservoirView(this);
@ -1392,97 +1387,10 @@ void RimReservoirView::updateLegends()
RigCaseCellResultsData* results = eclipseCase->results(porosityModel); RigCaseCellResultsData* results = eclipseCase->results(porosityModel);
CVF_ASSERT(results); CVF_ASSERT(results);
if (this->cellResult()->hasResult()) updateMinMaxValuesAndAddLegendToView(QString("Cell Results: \n"), this->cellResult(), results);
if (this->faultResult()->customResultSlot())
{ {
double globalMin, globalMax; updateMinMaxValuesAndAddLegendToView(QString("Fault Results: \n"), this->faultResult()->customResultSlot(), results);
double globalPosClosestToZero, globalNegClosestToZero;
results->minMaxCellScalarValues(this->cellResult()->gridScalarIndex(), globalMin, globalMax);
results->posNegClosestToZero(this->cellResult()->gridScalarIndex(), globalPosClosestToZero, globalNegClosestToZero);
double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero;
if (this->cellResult()->hasDynamicResult())
{
results->minMaxCellScalarValues(this->cellResult()->gridScalarIndex(), m_currentTimeStep, localMin, localMax);
results->posNegClosestToZero(this->cellResult()->gridScalarIndex(), m_currentTimeStep, localPosClosestToZero, localNegClosestToZero);
}
else
{
localMin = globalMin;
localMax = globalMax;
localPosClosestToZero = globalPosClosestToZero;
localNegClosestToZero = globalNegClosestToZero;
}
this->cellResult()->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
this->cellResult()->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend());
this->cellResult()->legendConfig->legend()->setTitle(cvfqt::Utils::toString(QString("Cell Results: \n") + this->cellResult()->resultVariable()));
}
else
{
this->cellResult()->legendConfig->setClosestToZeroValues(0, 0, 0, 0);
this->cellResult()->legendConfig->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
}
size_t maxTimeStepCount = results->maxTimeStepCount();
if (this->cellResult()->isTernarySaturationSelected() && maxTimeStepCount > 1)
{
RimReservoirCellResultsStorage* gridCellResults = this->cellResult()->currentGridCellResults();
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SOIL");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
results->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
results->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
this->cellResult()->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SGAS");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
results->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
results->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
this->cellResult()->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SWAT");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
results->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
results->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
this->cellResult()->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax);
}
}
if (this->cellResult()->ternaryLegendConfig->legend())
{
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->ternaryLegendConfig->legend());
}
} }
if (this->cellEdgeResult()->hasResult()) if (this->cellEdgeResult()->hasResult())
@ -1505,6 +1413,105 @@ void RimReservoirView::updateLegends()
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoirView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimResultSlot* resultSlot, RigCaseCellResultsData* cellResultsData)
{
if (resultSlot->hasResult())
{
double globalMin, globalMax;
double globalPosClosestToZero, globalNegClosestToZero;
cellResultsData->minMaxCellScalarValues(resultSlot->gridScalarIndex(), globalMin, globalMax);
cellResultsData->posNegClosestToZero(resultSlot->gridScalarIndex(), globalPosClosestToZero, globalNegClosestToZero);
double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero;
if (resultSlot->hasDynamicResult())
{
cellResultsData->minMaxCellScalarValues(resultSlot->gridScalarIndex(), m_currentTimeStep, localMin, localMax);
cellResultsData->posNegClosestToZero(resultSlot->gridScalarIndex(), m_currentTimeStep, localPosClosestToZero, localNegClosestToZero);
}
else
{
localMin = globalMin;
localMax = globalMax;
localPosClosestToZero = globalPosClosestToZero;
localNegClosestToZero = globalNegClosestToZero;
}
resultSlot->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
resultSlot->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
m_viewer->addColorLegendToBottomLeftCorner(resultSlot->legendConfig->legend());
resultSlot->legendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel + resultSlot->resultVariable()));
}
else
{
resultSlot->legendConfig->setClosestToZeroValues(0, 0, 0, 0);
resultSlot->legendConfig->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
}
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
if (resultSlot->isTernarySaturationSelected() && maxTimeStepCount > 1)
{
RimReservoirCellResultsStorage* gridCellResults = resultSlot->currentGridCellResults();
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SOIL");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SGAS");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SWAT");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultSlot->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax);
}
}
if (resultSlot->ternaryLegendConfig->legend())
{
m_viewer->addColorLegendToBottomLeftCorner(resultSlot->ternaryLegendConfig->legend());
}
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -2044,9 +2051,15 @@ void RimReservoirView::updateFaultColors()
// Update all fault geometry // Update all fault geometry
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> faultGeometriesToRecolor = visibleFaultGeometryTypes(); std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> faultGeometriesToRecolor = visibleFaultGeometryTypes();
RimResultSlot* resultSlot = this->faultResult()->customResultSlot();
if (!resultSlot)
{
resultSlot = this->cellResult();
}
for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i) for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i)
{ {
m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, this->cellResult()); m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, resultSlot);
} }
} }
@ -2066,3 +2079,27 @@ void RimReservoirView::appendFaultName(RigGridBase* grid, size_t cellIndex, cvf:
} }
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimReservoirView::isTimeStepDependentDataVisible() const
{
if (this->cellResult()->hasDynamicResult()) return true;
if (this->propertyFilterCollection()->hasActiveDynamicFilters()) return true;
if (this->wellCollection->hasVisibleWellPipes()) return true;
if (this->cellResult()->isTernarySaturationSelected()) return true;
if (this->faultResult->customResultSlot())
{
if (this->faultResult->customResultSlot()->hasDynamicResult()) return true;
if (this->faultResult->customResultSlot()->isTernarySaturationSelected()) return true;
}
return false;
}

View File

@ -33,6 +33,7 @@
#include "RivReservoirViewPartMgr.h" #include "RivReservoirViewPartMgr.h"
class RigActiveCellInfo; class RigActiveCellInfo;
class RigCaseCellResultsData;
class RigGridBase; class RigGridBase;
class RigGridCellFaceVisibilityFilter; class RigGridCellFaceVisibilityFilter;
class Rim3dOverlayInfoConfig; class Rim3dOverlayInfoConfig;
@ -170,6 +171,7 @@ public:
void loadDataAndUpdate(); void loadDataAndUpdate();
void createDisplayModelAndRedraw(); void createDisplayModelAndRedraw();
void scheduleCreateDisplayModelAndRedraw(); void scheduleCreateDisplayModelAndRedraw();
bool isTimeStepDependentDataVisible() const;
void scheduleGeometryRegen(unsigned short geometryType); void scheduleGeometryRegen(unsigned short geometryType);
void scheduleReservoirGridGeometryRegen(); void scheduleReservoirGridGeometryRegen();
@ -192,12 +194,12 @@ private:
void updateStaticCellColors(); void updateStaticCellColors();
void updateStaticCellColors(unsigned short geometryType); void updateStaticCellColors(unsigned short geometryType);
void updateLegends(); void updateLegends();
void updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimResultSlot* resultSlot, RigCaseCellResultsData* cellResultsData);
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> visibleFaultGeometryTypes() const; std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> visibleFaultGeometryTypes() const;
void updateFaultForcedVisibility(); void updateFaultForcedVisibility();
void updateFaultColors(); void updateFaultColors();
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager; cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
cvf::ref<RivReservoirPipesPartMgr> m_pipesPartManager; cvf::ref<RivReservoirPipesPartMgr> m_pipesPartManager;

View File

@ -666,10 +666,7 @@ void RiuMainWindow::refreshAnimationActions()
if (app->activeReservoirView()->currentGridCellResults()) if (app->activeReservoirView()->currentGridCellResults())
{ {
if (app->activeReservoirView()->cellResult()->hasDynamicResult() if (app->activeReservoirView()->isTimeStepDependentDataVisible())
|| app->activeReservoirView()->propertyFilterCollection()->hasActiveDynamicFilters()
|| app->activeReservoirView()->wellCollection()->hasVisibleWellPipes()
|| app->activeReservoirView()->cellResult()->isTernarySaturationSelected())
{ {
std::vector<QDateTime> timeStepDates = app->activeReservoirView()->currentGridCellResults()->cellResults()->timeStepDates(0); std::vector<QDateTime> timeStepDates = app->activeReservoirView()->currentGridCellResults()->cellResults()->timeStepDates(0);
bool showHoursAndMinutes = false; bool showHoursAndMinutes = false;