mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Statistics dialog. Display time step
This commit is contained in:
@@ -101,7 +101,8 @@ void RicGridStatisticsDialog::setInfoText(RimView* view)
|
|||||||
if (view && overlayInfo)
|
if (view && overlayInfo)
|
||||||
{
|
{
|
||||||
QString text;
|
QString text;
|
||||||
text = overlayInfo->caseInfoText();
|
text = overlayInfo->timeStepText();
|
||||||
|
text += overlayInfo->caseInfoText();
|
||||||
text += overlayInfo->resultInfoText(overlayInfo->histogramData());
|
text += overlayInfo->resultInfoText(overlayInfo->histogramData());
|
||||||
m_textEdit->setText(text);
|
m_textEdit->setText(text);
|
||||||
adjustTextEditHeightToContent();
|
adjustTextEditHeightToContent();
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
#include "RimReservoirCellResultsStorage.h"
|
#include "RimReservoirCellResultsStorage.h"
|
||||||
#include "RimSimWellInViewCollection.h"
|
#include "RimSimWellInViewCollection.h"
|
||||||
#include "RimView.h"
|
#include "RimView.h"
|
||||||
|
#include "RimTools.h"
|
||||||
|
|
||||||
#include "RiuViewer.h"
|
#include "RiuViewer.h"
|
||||||
|
|
||||||
@@ -173,6 +174,19 @@ Rim3dOverlayInfoConfig::HistogramData Rim3dOverlayInfoConfig::histogramData()
|
|||||||
return 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(
|
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>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);
|
"<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());
|
QString zScale = QString::number(geoMechView->scaleZ());
|
||||||
|
|
||||||
infoText = QString(
|
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);
|
"<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>");
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public:
|
|||||||
void setPosition(cvf::Vec2ui position);
|
void setPosition(cvf::Vec2ui position);
|
||||||
|
|
||||||
HistogramData histogramData();
|
HistogramData histogramData();
|
||||||
|
QString timeStepText();
|
||||||
QString caseInfoText();
|
QString caseInfoText();
|
||||||
QString resultInfoText(const HistogramData& histData);
|
QString resultInfoText(const HistogramData& histData);
|
||||||
|
|
||||||
@@ -99,6 +100,8 @@ private:
|
|||||||
void updateEclipse3DInfo(RimEclipseView * reservoirView);
|
void updateEclipse3DInfo(RimEclipseView * reservoirView);
|
||||||
void updateGeoMech3DInfo(RimGeoMechView * geoMechView);
|
void updateGeoMech3DInfo(RimGeoMechView * geoMechView);
|
||||||
|
|
||||||
|
QString timeStepText(RimEclipseView* eclipseView);
|
||||||
|
QString timeStepText(RimGeoMechView* geoMechView);
|
||||||
HistogramData histogramData(RimEclipseView* eclipseView);
|
HistogramData histogramData(RimEclipseView* eclipseView);
|
||||||
HistogramData histogramData(RimGeoMechView* geoMechView);
|
HistogramData histogramData(RimGeoMechView* geoMechView);
|
||||||
QString caseInfoText(RimEclipseView* eclipseView);
|
QString caseInfoText(RimEclipseView* eclipseView);
|
||||||
|
|||||||
Reference in New Issue
Block a user