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:
@@ -142,7 +142,7 @@ void RicGridStatisticsDialog::setInfoText(RimView* view)
|
|||||||
QString text;
|
QString text;
|
||||||
text = overlayInfo->timeStepText();
|
text = overlayInfo->timeStepText();
|
||||||
text += overlayInfo->caseInfoText();
|
text += overlayInfo->caseInfoText();
|
||||||
text += overlayInfo->resultInfoText(overlayInfo->histogramData());
|
text += overlayInfo->resultInfoText(overlayInfo->histogramData(), true);
|
||||||
m_textEdit->setText(text);
|
m_textEdit->setText(text);
|
||||||
adjustTextEditHeightToContent();
|
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 eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
|
||||||
auto geoMechView = dynamic_cast<RimGeoMechView*>(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);
|
if (geoMechView) return resultInfoText(histData, geoMechView);
|
||||||
return "";
|
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;
|
QString infoText;
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData, Ri
|
|||||||
"</table>").arg(min).arg(max);
|
"</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);
|
infoText += QString("<b>Mobile Volume Weighted Mean:</b> %1").arg(histData.weightedMean);
|
||||||
}
|
}
|
||||||
@@ -755,7 +755,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
|
|||||||
|
|
||||||
if (showResultInfo())
|
if (showResultInfo())
|
||||||
{
|
{
|
||||||
infoText += resultInfoText(histData);
|
infoText += resultInfoText(histData, showVolumeWeightedMean());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!infoText.isEmpty())
|
if (!infoText.isEmpty())
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
HistogramData histogramData();
|
HistogramData histogramData();
|
||||||
QString timeStepText();
|
QString timeStepText();
|
||||||
QString caseInfoText();
|
QString caseInfoText();
|
||||||
QString resultInfoText(const HistogramData& histData);
|
QString resultInfoText(const HistogramData& histData, bool showVolumeWeightedMean);
|
||||||
|
|
||||||
void showStatisticsInfoDialog(bool raise = true);
|
void showStatisticsInfoDialog(bool raise = true);
|
||||||
QImage statisticsDialogScreenShotImage();
|
QImage statisticsDialogScreenShotImage();
|
||||||
@@ -107,7 +107,7 @@ private:
|
|||||||
HistogramData histogramData(RimGeoMechView* geoMechView);
|
HistogramData histogramData(RimGeoMechView* geoMechView);
|
||||||
QString caseInfoText(RimEclipseView* eclipseView);
|
QString caseInfoText(RimEclipseView* eclipseView);
|
||||||
QString caseInfoText(RimGeoMechView* geoMechView);
|
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);
|
QString resultInfoText(const HistogramData& histData, RimGeoMechView* geoMechView);
|
||||||
|
|
||||||
caf::PdmField<bool> active;
|
caf::PdmField<bool> active;
|
||||||
|
|||||||
Reference in New Issue
Block a user