2012-09-11 09:22:36 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-09-11 09:22:36 +02:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-09-11 09:22:36 +02:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-09-11 09:22:36 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-12-09 09:54:20 +01:00
|
|
|
#include "RigHistogramData.h"
|
2020-11-23 14:35:23 +01:00
|
|
|
|
2020-11-23 22:24:05 +01:00
|
|
|
#include "RimHistogramCalculator.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
#include "cafPdmField.h"
|
2012-09-11 09:22:36 +02:00
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmPointer.h"
|
|
|
|
|
|
2013-05-06 10:55:00 +02:00
|
|
|
#include "cvfVector2.h"
|
2019-02-20 14:45:06 +01:00
|
|
|
|
2017-11-15 20:45:56 +01:00
|
|
|
#include <cmath>
|
2017-11-16 10:39:54 +01:00
|
|
|
#include <memory>
|
2012-09-11 09:22:36 +02:00
|
|
|
|
2019-01-16 10:51:43 +01:00
|
|
|
class RimGeoMechContourMapView;
|
2019-01-11 13:56:35 +01:00
|
|
|
class RimEclipseContourMapView;
|
2015-05-21 10:05:33 +02:00
|
|
|
class RimEclipseView;
|
2015-04-29 22:19:49 +02:00
|
|
|
class RimGeoMechView;
|
2023-08-07 16:35:59 +02:00
|
|
|
class Rim3dView;
|
2017-11-16 10:39:54 +01:00
|
|
|
class RicGridStatisticsDialog;
|
2023-08-07 16:35:59 +02:00
|
|
|
class RimSeismicView;
|
2015-04-29 22:19:49 +02:00
|
|
|
|
2012-09-11 09:22:36 +02:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2012-09-11 09:22:36 +02:00
|
|
|
//==================================================================================================
|
2013-04-26 14:47:34 +02:00
|
|
|
class Rim3dOverlayInfoConfig : public caf::PdmObject
|
2012-09-11 09:22:36 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2017-10-19 07:44:21 +02:00
|
|
|
|
2012-09-11 09:22:36 +02:00
|
|
|
public:
|
|
|
|
|
Rim3dOverlayInfoConfig();
|
2018-10-18 19:45:57 +02:00
|
|
|
~Rim3dOverlayInfoConfig() override;
|
2012-09-11 09:22:36 +02:00
|
|
|
|
|
|
|
|
void update3DInfo();
|
|
|
|
|
|
2023-08-07 16:35:59 +02:00
|
|
|
void setReservoirView( Rim3dView* ownerView );
|
2012-09-11 09:22:36 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setPosition( cvf::Vec2ui position );
|
2015-11-04 12:51:55 +01:00
|
|
|
|
2020-12-09 09:54:20 +01:00
|
|
|
RigHistogramData histogramData();
|
2020-11-23 14:35:23 +01:00
|
|
|
QString timeStepText();
|
|
|
|
|
QString caseInfoText();
|
2020-12-09 09:54:20 +01:00
|
|
|
QString resultInfoText( const RigHistogramData& histData );
|
2017-11-15 20:45:56 +01:00
|
|
|
|
2019-05-06 10:36:05 +02:00
|
|
|
RicGridStatisticsDialog* getOrCreateGridStatisticsDialog();
|
2019-09-06 10:40:57 +02:00
|
|
|
void showStatisticsInfoDialog( bool raise = true );
|
|
|
|
|
QImage statisticsDialogScreenShotImage();
|
2018-02-15 13:00:33 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool showAnimProgress() const;
|
|
|
|
|
bool showCaseInfo() const;
|
|
|
|
|
bool showResultInfo() const;
|
|
|
|
|
bool isActive() const;
|
2017-11-16 10:39:54 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool showVersionInfo() const;
|
2019-02-20 14:40:25 +01:00
|
|
|
|
2019-02-20 14:45:06 +01:00
|
|
|
private:
|
2023-02-26 10:48:40 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-02-20 14:45:06 +01:00
|
|
|
caf::PdmFieldHandle* objectToggleField() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
void updateEclipse3DInfo( RimEclipseView* reservoirView );
|
|
|
|
|
void updateGeoMech3DInfo( RimGeoMechView* geoMechView );
|
2023-08-07 16:35:59 +02:00
|
|
|
void updateSeismicInfo( RimSeismicView* seisView );
|
2019-02-20 14:45:06 +01:00
|
|
|
void update3DInfoIn2dViews() const;
|
2019-09-06 10:40:57 +02:00
|
|
|
QString timeStepText( RimEclipseView* eclipseView );
|
|
|
|
|
QString timeStepText( RimGeoMechView* geoMechView );
|
|
|
|
|
QString caseInfoText( RimEclipseView* eclipseView );
|
|
|
|
|
QString caseInfoText( RimGeoMechView* geoMechView );
|
2023-08-07 16:35:59 +02:00
|
|
|
QString caseInfoText( RimSeismicView* seisView );
|
2023-02-26 10:48:40 +01:00
|
|
|
QString resultInfoText( const RigHistogramData& histData, RimEclipseView* eclipseView, bool showVolumeWeightedMean );
|
|
|
|
|
QString resultInfoText( const RigHistogramData& histData, RimGeoMechView* geoMechView );
|
2017-01-03 13:14:07 +01:00
|
|
|
|
2022-08-19 08:05:59 +02:00
|
|
|
QString sampleCountText( const std::vector<size_t>& histogram );
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void displayPropertyFilteredStatisticsMessage( bool showSwitchToCurrentTimestep );
|
2019-02-20 14:45:06 +01:00
|
|
|
bool hasInvalidStatisticsCombination();
|
2017-01-03 13:14:07 +01:00
|
|
|
|
2012-09-11 09:22:36 +02:00
|
|
|
private:
|
2019-02-20 14:45:06 +01:00
|
|
|
caf::PdmField<bool> m_active;
|
|
|
|
|
caf::PdmField<bool> m_showAnimProgress;
|
|
|
|
|
caf::PdmField<bool> m_showCaseInfo;
|
|
|
|
|
caf::PdmField<bool> m_showResultInfo;
|
|
|
|
|
caf::PdmField<bool> m_showVolumeWeightedMean;
|
|
|
|
|
caf::PdmField<bool> m_showHistogram;
|
|
|
|
|
caf::PdmField<bool> m_showVersionInfo;
|
2015-11-11 17:44:00 +01:00
|
|
|
|
2020-11-23 22:24:05 +01:00
|
|
|
caf::PdmField<caf::AppEnum<RimHistogramCalculator::StatisticsTimeRangeType>> m_statisticsTimeRange;
|
|
|
|
|
caf::PdmField<caf::AppEnum<RimHistogramCalculator::StatisticsCellRangeType>> m_statisticsCellRange;
|
|
|
|
|
|
2023-08-07 16:35:59 +02:00
|
|
|
caf::PdmPointer<Rim3dView> m_viewDef;
|
|
|
|
|
cvf::Vec2ui m_position;
|
2015-04-29 22:19:49 +02:00
|
|
|
|
2020-11-23 22:24:05 +01:00
|
|
|
std::unique_ptr<RimHistogramCalculator> m_histogramCalculator;
|
2017-11-16 10:39:54 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::unique_ptr<RicGridStatisticsDialog> m_gridStatisticsDialog;
|
2012-09-11 09:22:36 +02:00
|
|
|
};
|