mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4994 Make ComparisonView mode for InfoBox and animation progress
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() );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -725,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