#2102 Statistics dialog. Dialog contents updates as 3D view is modified

This commit is contained in:
Bjørn Erik Jensen
2017-11-16 10:39:54 +01:00
parent 4b48da4250
commit 24843f55b6
6 changed files with 63 additions and 42 deletions

View File

@@ -20,6 +20,8 @@
#include "Rim3dOverlayInfoConfig.h"
#include "RicGridStatisticsDialog.h"
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
#include "RigEclipseNativeVisibleCellsStatCalc.h"
@@ -102,6 +104,8 @@ Rim3dOverlayInfoConfig::Rim3dOverlayInfoConfig()
//m_statisticsCellRange.uiCapability()->setUiHidden(true);
m_isVisCellStatUpToDate = false;
m_gridStatisticsDialog = std::unique_ptr<RicGridStatisticsDialog>(new RicGridStatisticsDialog(nullptr));
}
//--------------------------------------------------------------------------------------------------
@@ -366,6 +370,24 @@ QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, Ri
return infoText;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dOverlayInfoConfig::showStatisticsInfoDialog()
{
auto eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
if (eclipseView)
{
m_gridStatisticsDialog->setLabel("Grid statistics");
m_gridStatisticsDialog->setInfoText(eclipseView);
m_gridStatisticsDialog->setHistogramData(eclipseView);
m_gridStatisticsDialog->resize(600, 800);
m_gridStatisticsDialog->show();
m_gridStatisticsDialog->raise();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -398,7 +420,14 @@ void Rim3dOverlayInfoConfig::update3DInfo()
}
RimEclipseView * reservoirView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
if (reservoirView) updateEclipse3DInfo(reservoirView);
if (reservoirView)
{
updateEclipse3DInfo(reservoirView);
// Update statistics dialog
m_gridStatisticsDialog->setInfoText(reservoirView);
m_gridStatisticsDialog->setHistogramData(reservoirView);
}
RimGeoMechView * geoMechView = dynamic_cast<RimGeoMechView*>(m_viewDef.p());
if (geoMechView) updateGeoMech3DInfo(geoMechView);
}