Work in progress

This commit is contained in:
Jon Jenssen 2024-12-19 13:09:09 +01:00
parent 65f1f0b009
commit 2aa790e2db
8 changed files with 36 additions and 14 deletions

View File

@ -62,7 +62,7 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFileName( RimViewWindow* v
//--------------------------------------------------------------------------------------------------
QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dView* rimView )
{
QStringList timeSteps = rimView->ownerCase()->timeStepStrings();
QStringList timeSteps = rimView->timeStepStrings();
int timeStep = rimView->currentTimeStep();
QString fileName =

View File

@ -455,7 +455,7 @@ size_t Rim2dIntersectionView::onTimeStepCountRequested()
{
if ( isTimeStepDependentDataVisible() && ownerCase() )
{
return ownerCase()->timeStepStrings().size();
return timeStepStrings().size();
}
return 0;

View File

@ -604,13 +604,25 @@ size_t Rim3dView::timeStepCount()
//--------------------------------------------------------------------------------------------------
QString Rim3dView::timeStepName( int frameIdx ) const
{
if ( this->ownerCase() )
if ( ownerCase() )
{
return this->ownerCase()->timeStepName( frameIdx );
return ownerCase()->timeStepName( frameIdx );
}
return QString( "" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QStringList Rim3dView::timeStepStrings() const
{
if ( ownerCase() )
{
return ownerCase()->timeStepStrings();
}
return QStringList();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -150,12 +150,13 @@ public:
void forceShowWindowOn();
// Timestep control
int currentTimeStep() const;
void setCurrentTimeStep( int frameIdx );
void setCurrentTimeStepAndUpdate( int frameIdx ) override;
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
size_t timeStepCount();
QString timeStepName( int frameIdx ) const override;
int currentTimeStep() const;
void setCurrentTimeStep( int frameIdx );
void setCurrentTimeStepAndUpdate( int frameIdx ) override;
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
size_t timeStepCount();
QString timeStepName( int frameIdx ) const override;
virtual QStringList timeStepStrings() const;
// Animation control
caf::Signal<> updateAnimations;

View File

@ -162,7 +162,7 @@ void RimAdvancedSnapshotExportDefinition::getTimeStepStrings( QList<caf::PdmOpti
QStringList timeSteps;
timeSteps = view->ownerCase()->timeStepStrings();
timeSteps = view->timeStepStrings();
for ( int i = 0; i < timeSteps.size(); i++ )
{

View File

@ -239,3 +239,11 @@ size_t RimStatisticsContourMapView::onTimeStepCountRequested()
return 0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimStatisticsContourMapView::timeStepName( int frameIdx ) const
{
return QString( "Step %1" ).arg( frameIdx );
}

View File

@ -39,8 +39,9 @@ protected:
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void onClampCurrentTimestep() override;
size_t onTimeStepCountRequested() override;
void onClampCurrentTimestep() override;
size_t onTimeStepCountRequested() override;
QString timeStepName( int frameIdx ) const override;
// void createContourMapGeometry();
void onUpdateLegends() override;

View File

@ -1009,7 +1009,7 @@ void RiuMainWindow::refreshAnimationActions()
if ( activeView->isTimeStepDependentDataVisibleInThisOrComparisonView() )
{
timeStepStrings = activeView->ownerCase()->timeStepStrings();
timeStepStrings = activeView->timeStepStrings();
}
else
{