mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5017 from OPM/feature-adjust-comparison-overlay-items
Feature adjust comparison overlay items
This commit is contained in:
@@ -425,11 +425,11 @@ bool Rim2dIntersectionView::hasResults()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int Rim2dIntersectionView::timeStepCount()
|
||||
size_t Rim2dIntersectionView::onTimeStepCountRequested()
|
||||
{
|
||||
if ( isTimeStepDependentDataVisible() )
|
||||
{
|
||||
return static_cast<int>( this->ownerCase()->timeStepStrings().size() );
|
||||
return this->ownerCase()->timeStepStrings().size();
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -484,9 +484,9 @@ void Rim2dIntersectionView::onCreateDisplayModel()
|
||||
|
||||
nativeOrOverrideViewer()->removeAllFrames( isUsingOverrideViewer() );
|
||||
|
||||
int tsCount = this->timeStepCount();
|
||||
size_t tsCount = this->timeStepCount();
|
||||
|
||||
for ( int i = 0; i < tsCount; ++i )
|
||||
for ( size_t i = 0; i < tsCount; ++i )
|
||||
{
|
||||
nativeOrOverrideViewer()->addFrame( new cvf::Scene(), isUsingOverrideViewer() );
|
||||
}
|
||||
@@ -679,7 +679,7 @@ void Rim2dIntersectionView::onUpdateLegends()
|
||||
|
||||
if ( legend )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( legend );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( legend, isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,8 @@ protected:
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
bool hasResults();
|
||||
int timeStepCount();
|
||||
|
||||
virtual size_t onTimeStepCountRequested() override;
|
||||
|
||||
private:
|
||||
QString createAutoName() const override;
|
||||
|
||||
@@ -926,7 +926,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
return;
|
||||
}
|
||||
|
||||
m_viewDef->viewer()->showInfoText( m_showCaseInfo() || m_showResultInfo() );
|
||||
m_viewDef->viewer()->showInfoText( m_showCaseInfo() || ( m_showResultInfo() && !m_viewDef->activeComparisonView() ) );
|
||||
m_viewDef->viewer()->showHistogram( false );
|
||||
m_viewDef->viewer()->showAnimationProgress( m_showAnimProgress() );
|
||||
m_viewDef->viewer()->showVersionInfo( m_showVersionInfo() );
|
||||
@@ -1024,6 +1024,12 @@ void Rim3dOverlayInfoConfig::defineUiOrdering( QString uiConfigName, caf::PdmUiO
|
||||
}
|
||||
statGroup->add( &m_statisticsCellRange );
|
||||
}
|
||||
|
||||
bool isUsingComparisonView = m_viewDef->activeComparisonView();
|
||||
m_showResultInfo.uiCapability()->setUiReadOnly( isUsingComparisonView );
|
||||
m_showVolumeWeightedMean.uiCapability()->setUiReadOnly( isUsingComparisonView );
|
||||
m_showHistogram.uiCapability()->setUiReadOnly( isUsingComparisonView );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -453,6 +453,14 @@ bool Rim3dView::isTimeStepDependentDataVisibleInThisOrComparisonView() const
|
||||
return ( isTimeStepDependentDataVisible() || ( otherView && otherView->isTimeStepDependentDataVisible() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t Rim3dView::timeStepCount()
|
||||
{
|
||||
return this->onTimeStepCountRequested();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -142,10 +142,12 @@ public:
|
||||
void forceShowWindowOn();
|
||||
|
||||
// Animation
|
||||
int currentTimeStep() const;
|
||||
void setCurrentTimeStep( int frameIdx );
|
||||
void setCurrentTimeStepAndUpdate( int frameIdx ) override;
|
||||
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
|
||||
int currentTimeStep() const;
|
||||
void setCurrentTimeStep( int frameIdx );
|
||||
void setCurrentTimeStepAndUpdate( int frameIdx ) override;
|
||||
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
|
||||
size_t timeStepCount();
|
||||
QString timeStepName( int frameIdx ) const override;
|
||||
|
||||
// Updating
|
||||
void scheduleCreateDisplayModelAndRedraw();
|
||||
@@ -200,10 +202,12 @@ protected:
|
||||
|
||||
// Abstract methods to implement in subclasses
|
||||
|
||||
virtual void onCreateDisplayModel() = 0;
|
||||
virtual void onUpdateDisplayModelForCurrentTimeStep() = 0;
|
||||
virtual void onUpdateDisplayModelVisibility(){};
|
||||
virtual void onClampCurrentTimestep() = 0;
|
||||
virtual void onCreateDisplayModel() = 0;
|
||||
virtual void onUpdateDisplayModelForCurrentTimeStep() = 0;
|
||||
virtual void onUpdateDisplayModelVisibility(){};
|
||||
virtual void onClampCurrentTimestep() = 0;
|
||||
virtual size_t onTimeStepCountRequested() = 0;
|
||||
|
||||
virtual void onClearReservoirCellVisibilitiesIfNeccessary(){};
|
||||
virtual bool isTimeStepDependentDataVisible() const = 0;
|
||||
virtual void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0;
|
||||
@@ -258,8 +262,7 @@ private:
|
||||
void setCameraPosition( const cvf::Mat4d& cameraPosition ) override;
|
||||
void setCameraPointOfInterest( const cvf::Vec3d& cameraPointOfInterest ) override;
|
||||
|
||||
QString timeStepName( int frameIdx ) const override;
|
||||
void endAnimation() override;
|
||||
void endAnimation() override;
|
||||
|
||||
caf::PdmObjectHandle* implementingPdmObject() override;
|
||||
|
||||
|
||||
@@ -387,7 +387,8 @@ void RimEclipseContourMapView::onUpdateLegends()
|
||||
m_contourMapProjection->updateLegend();
|
||||
if ( projectionLegend->showLegend() )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,6 +268,19 @@ void RimEclipseView::onClampCurrentTimestep()
|
||||
if ( m_currentTimeStep < 0 ) m_currentTimeStep = 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimEclipseView::onTimeStepCountRequested()
|
||||
{
|
||||
if ( this->currentGridCellResults() )
|
||||
{
|
||||
return this->currentGridCellResults()->maxTimeStepCount();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1232,8 +1245,9 @@ void RimEclipseView::onUpdateLegends()
|
||||
|
||||
this->cellEdgeResult()->legendConfig()->setTitle( QString( "Edge Results: \n" ) +
|
||||
this->cellEdgeResult()->resultVariableUiShortName() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner(
|
||||
this->cellEdgeResult()->legendConfig()->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()
|
||||
->addColorLegendToBottomLeftCorner( this->cellEdgeResult()->legendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1266,7 +1280,8 @@ void RimEclipseView::onUpdateLegends()
|
||||
|
||||
if ( fractureColors()->isChecked() && stimPlanLegend->titledOverlayFrame() )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( stimPlanLegend->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( stimPlanLegend->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1277,7 +1292,8 @@ void RimEclipseView::onUpdateLegends()
|
||||
updateVirtualConnectionLegendRanges();
|
||||
|
||||
RimRegularLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig();
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( virtLegend->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( virtLegend->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1307,7 +1323,8 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView( QString
|
||||
}
|
||||
|
||||
resultColors->legendConfig()->setTitle( title );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( resultColors->legendConfig()->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( resultColors->legendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
|
||||
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
|
||||
@@ -1317,8 +1334,9 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView( QString
|
||||
resultColors->ternaryLegendConfig()->titledOverlayFrame() )
|
||||
{
|
||||
resultColors->ternaryLegendConfig()->setTitle( legendLabel );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner(
|
||||
resultColors->ternaryLegendConfig()->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()
|
||||
->addColorLegendToBottomLeftCorner( resultColors->ternaryLegendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,9 @@ private:
|
||||
|
||||
void syncronizeWellsWithResults();
|
||||
|
||||
void onClampCurrentTimestep() override;
|
||||
void onClampCurrentTimestep() override;
|
||||
size_t onTimeStepCountRequested() override;
|
||||
|
||||
void setVisibleGridParts( const std::vector<RivCellSetEnum>& cellSets );
|
||||
void setVisibleGridPartsWatertight();
|
||||
|
||||
|
||||
@@ -380,7 +380,8 @@ void RimGeoMechContourMapView::onUpdateLegends()
|
||||
m_contourMapProjection->updateLegend();
|
||||
if ( projectionLegend->showLegend() )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,8 @@ void RimGeoMechView::onUpdateLegends()
|
||||
|
||||
if ( cellResult()->hasResult() && cellResult()->legendConfig()->showLegend() )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( cellResult()->legendConfig->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( cellResult()->legendConfig->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
|
||||
if ( tensorResults()->showTensors() )
|
||||
@@ -461,8 +462,9 @@ void RimGeoMechView::onUpdateLegends()
|
||||
if ( tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS &&
|
||||
tensorResults()->arrowColorLegendConfig()->showLegend() )
|
||||
{
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner(
|
||||
m_tensorResults->arrowColorLegendConfig->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()
|
||||
->addColorLegendToBottomLeftCorner( m_tensorResults->arrowColorLegendConfig->titledOverlayFrame(),
|
||||
isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -723,6 +725,19 @@ void RimGeoMechView::onClampCurrentTimestep()
|
||||
if ( m_currentTimeStep < 0 ) m_currentTimeStep = 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RimGeoMechView::onTimeStepCountRequested()
|
||||
{
|
||||
if ( m_geomechCase )
|
||||
{
|
||||
return m_geomechCase->geoMechData()->femPartResults()->frameCount();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -121,7 +121,8 @@ private:
|
||||
|
||||
void onUpdateScaleTransform() override;
|
||||
|
||||
void onClampCurrentTimestep() override;
|
||||
void onClampCurrentTimestep() override;
|
||||
size_t onTimeStepCountRequested() override;
|
||||
|
||||
void onUpdateDisplayModelForCurrentTimeStep() override;
|
||||
void onUpdateStaticCellColors() override;
|
||||
|
||||
Reference in New Issue
Block a user