mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Grid statistics. Add argument to control the result text
This commit is contained in:
parent
ea6ae75033
commit
77f4b4bb4b
@ -142,7 +142,7 @@ void RicGridStatisticsDialog::setInfoText(RimView* view)
|
||||
QString text;
|
||||
text = overlayInfo->timeStepText();
|
||||
text += overlayInfo->caseInfoText();
|
||||
text += overlayInfo->resultInfoText(overlayInfo->histogramData());
|
||||
text += overlayInfo->resultInfoText(overlayInfo->histogramData(), true);
|
||||
m_textEdit->setText(text);
|
||||
adjustTextEditHeightToContent();
|
||||
}
|
||||
|
@ -204,12 +204,12 @@ QString Rim3dOverlayInfoConfig::caseInfoText()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData)
|
||||
QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, bool showVolumeWeightedMean)
|
||||
{
|
||||
auto eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
|
||||
auto geoMechView = dynamic_cast<RimGeoMechView*>(m_viewDef.p());
|
||||
|
||||
if (eclipseView) return resultInfoText(histData, eclipseView);
|
||||
if (eclipseView) return resultInfoText(histData, eclipseView, showVolumeWeightedMean);
|
||||
if (geoMechView) return resultInfoText(histData, geoMechView);
|
||||
return "";
|
||||
}
|
||||
@ -486,7 +486,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText(RimGeoMechView* geoMechView)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, RimEclipseView* eclipseView)
|
||||
QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, RimEclipseView* eclipseView, bool showVolumeWeightedMean)
|
||||
{
|
||||
QString infoText;
|
||||
|
||||
@ -557,7 +557,7 @@ QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, Ri
|
||||
"</table>").arg(min).arg(max);
|
||||
}
|
||||
|
||||
if (showVolumeWeightedMean() && histData.weightedMean != HUGE_VAL)
|
||||
if (showVolumeWeightedMean && histData.weightedMean != HUGE_VAL)
|
||||
{
|
||||
infoText += QString("<b>Mobile Volume Weighted Mean:</b> %1").arg(histData.weightedMean);
|
||||
}
|
||||
@ -755,7 +755,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
||||
|
||||
if (showResultInfo())
|
||||
{
|
||||
infoText += resultInfoText(histData);
|
||||
infoText += resultInfoText(histData, showVolumeWeightedMean());
|
||||
}
|
||||
|
||||
if (!infoText.isEmpty())
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
HistogramData histogramData();
|
||||
QString timeStepText();
|
||||
QString caseInfoText();
|
||||
QString resultInfoText(const HistogramData& histData);
|
||||
QString resultInfoText(const HistogramData& histData, bool showVolumeWeightedMean);
|
||||
|
||||
void showStatisticsInfoDialog(bool raise = true);
|
||||
QImage statisticsDialogScreenShotImage();
|
||||
@ -107,7 +107,7 @@ private:
|
||||
HistogramData histogramData(RimGeoMechView* geoMechView);
|
||||
QString caseInfoText(RimEclipseView* eclipseView);
|
||||
QString caseInfoText(RimGeoMechView* geoMechView);
|
||||
QString resultInfoText(const HistogramData& histData, RimEclipseView* eclipseView);
|
||||
QString resultInfoText(const HistogramData& histData, RimEclipseView* eclipseView, bool showVolumeWeightedMean);
|
||||
QString resultInfoText(const HistogramData& histData, RimGeoMechView* geoMechView);
|
||||
|
||||
caf::PdmField<bool> active;
|
||||
|
Loading…
Reference in New Issue
Block a user