Statistics dialog. Display time step

This commit is contained in:
Bjørn Erik Jensen 2017-11-28 15:07:46 +01:00
parent 6fae55f07c
commit c530841e41
3 changed files with 55 additions and 3 deletions

View File

@ -101,7 +101,8 @@ void RicGridStatisticsDialog::setInfoText(RimView* view)
if (view && overlayInfo)
{
QString text;
text = overlayInfo->caseInfoText();
text = overlayInfo->timeStepText();
text += overlayInfo->caseInfoText();
text += overlayInfo->resultInfoText(overlayInfo->histogramData());
m_textEdit->setText(text);
adjustTextEditHeightToContent();

View File

@ -48,6 +48,7 @@
#include "RimReservoirCellResultsStorage.h"
#include "RimSimWellInViewCollection.h"
#include "RimView.h"
#include "RimTools.h"
#include "RiuViewer.h"
@ -173,6 +174,19 @@ Rim3dOverlayInfoConfig::HistogramData Rim3dOverlayInfoConfig::histogramData()
return HistogramData();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString Rim3dOverlayInfoConfig::timeStepText()
{
RimEclipseView * eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
RimGeoMechView * geoMechView = dynamic_cast<RimGeoMechView*>(m_viewDef.p());
if (eclipseView) return timeStepText(eclipseView);
if (geoMechView) return timeStepText(geoMechView);
return "";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -421,7 +435,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText(RimEclipseView* eclipseView)
}
infoText += QString(
"<p><b><center>-- %1 --</center></b><p> "
"<p><b>-- %1 --</b><p> "
"<b>Cell count. Total:</b> %2 <b>Active:</b> %3 <br>"
"<b>Main Grid I,J,K:</b> %4, %5, %6 <b>Z-Scale:</b> %7<br>").arg(caseName, totCellCount, activeCellCountText, iSize, jSize, kSize, zScale);
}
@ -449,7 +463,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText(RimGeoMechView* geoMechView)
QString zScale = QString::number(geoMechView->scaleZ());
infoText = QString(
"<p><b><center>-- %1 --</center></b><p>"
"<p><b>-- %1 --</b><p>"
"<b>Cell count:</b> %2 <b>Z-Scale:</b> %3<br>").arg(caseName, cellCount, zScale);
}
}
@ -797,6 +811,40 @@ void Rim3dOverlayInfoConfig::updateGeoMech3DInfo(RimGeoMechView * geoMechView)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString Rim3dOverlayInfoConfig::timeStepText(RimEclipseView* eclipseView)
{
int currTimeStepIndex = eclipseView->currentTimeStep();
std::vector<QDateTime> timeSteps = eclipseView->currentGridCellResults()->allTimeStepDatesFromEclipseReader();
QString dateFormat = RimTools::createTimeFormatStringFromDates(timeSteps);
QString dateTimeString = QString("Time Step: %1/%2 %3").arg(QString::number(currTimeStepIndex),
QString::number(timeSteps.size() - 1),
timeSteps[currTimeStepIndex].toString(dateFormat));
return QString("<p><b><center>-- %1 --</center></b>").arg(dateTimeString) +
QString("<center>------------------------------------------------</center>");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString Rim3dOverlayInfoConfig::timeStepText(RimGeoMechView* geoMechView)
{
int currTimeStepIndex = geoMechView->currentTimeStep();
QStringList timeSteps = geoMechView->geoMechCase()->timeStepStrings();
QString dateTimeString = QString("Time Step: %1/%2 %3").arg(QString::number(currTimeStepIndex),
QString::number(timeSteps.size() - 1),
timeSteps[currTimeStepIndex]);
return QString("<p><b><center>-- %1 --</center></b>").arg(dateTimeString) +
QString("<center>------------------------------------------------</center>");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -72,6 +72,7 @@ public:
void setPosition(cvf::Vec2ui position);
HistogramData histogramData();
QString timeStepText();
QString caseInfoText();
QString resultInfoText(const HistogramData& histData);
@ -99,6 +100,8 @@ private:
void updateEclipse3DInfo(RimEclipseView * reservoirView);
void updateGeoMech3DInfo(RimGeoMechView * geoMechView);
QString timeStepText(RimEclipseView* eclipseView);
QString timeStepText(RimGeoMechView* geoMechView);
HistogramData histogramData(RimEclipseView* eclipseView);
HistogramData histogramData(RimGeoMechView* geoMechView);
QString caseInfoText(RimEclipseView* eclipseView);