Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Dec 19, 2024
1 parent 46d6b03 commit d69de68
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ size_t Rim2dIntersectionView::onTimeStepCountRequested()
{
if ( isTimeStepDependentDataVisible() && ownerCase() )
{
return ownerCase()->timeStepStrings().size();
return timeStepStrings().size();
}

return 0;
Expand Down
16 changes: 14 additions & 2 deletions ApplicationLibCode/ProjectDataModel/Rim3dView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions ApplicationLibCode/ProjectDataModel/Rim3dView.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,11 @@ size_t RimStatisticsContourMapView::onTimeStepCountRequested()

return 0;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimStatisticsContourMapView::timeStepName( int frameIdx ) const
{
return QString( "Step %1" ).arg( frameIdx );
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class RimStatisticsContourMapView : public RimEclipseContourMapView
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;
Expand Down
2 changes: 1 addition & 1 deletion ApplicationLibCode/UserInterface/RiuMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ void RiuMainWindow::refreshAnimationActions()

if ( activeView->isTimeStepDependentDataVisibleInThisOrComparisonView() )
{
timeStepStrings = activeView->ownerCase()->timeStepStrings();
timeStepStrings = activeView->timeStepStrings();
}
else
{
Expand Down

0 comments on commit d69de68

Please sign in to comment.