Renaming of more methods in Rim3dView.

Removed virtual method from RiuViewerToViewInterface as it was not used from the interface.
This commit is contained in:
Jacob Støren 2019-10-31 16:37:16 +01:00
parent 7f3f6419ac
commit b51e054ffd
13 changed files with 77 additions and 75 deletions

View File

@ -551,7 +551,7 @@ void Rim2dIntersectionView::onCreateDisplayModel()
void Rim2dIntersectionView::onUpdateCurrentTimeStep() void Rim2dIntersectionView::onUpdateCurrentTimeStep()
{ {
update3dInfo(); update3dInfo();
updateLegends(); onUpdateLegends();
if ( m_flatSimWellPipePartMgr.notNull() ) if ( m_flatSimWellPipePartMgr.notNull() )
{ {
@ -623,7 +623,7 @@ void Rim2dIntersectionView::onUpdateCurrentTimeStep()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateLegends() void Rim2dIntersectionView::onUpdateLegends()
{ {
m_legendObjectToSelect = nullptr; m_legendObjectToSelect = nullptr;
@ -705,10 +705,6 @@ void Rim2dIntersectionView::onResetLegendsInViewer()
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) {} void Rim2dIntersectionView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::onTimeStepChanged() {}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///

View File

@ -82,7 +82,7 @@ public:
bool handleOverlayItemPicked( const cvf::OverlayItem* pickedOverlayItem ) const; bool handleOverlayItemPicked( const cvf::OverlayItem* pickedOverlayItem ) const;
protected: protected:
void updateLegends() override; void onUpdateLegends() override;
bool isGridVisualizationMode() const override; bool isGridVisualizationMode() const override;
void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override; void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override;
@ -90,7 +90,6 @@ protected:
void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override; void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
void onClampCurrentTimestep() override; void onClampCurrentTimestep() override;
void onUpdateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void onTimeStepChanged() override;
void onUpdateStaticCellColors() override; void onUpdateStaticCellColors() override;
void onUpdateScaleTransform() override; void onUpdateScaleTransform() override;
cvf::Transform* scaleTransform() override; cvf::Transform* scaleTransform() override;

View File

@ -432,31 +432,6 @@ void Rim3dView::setComparisonView( Rim3dView* compView )
m_comparisonView.uiCapability()->updateConnectedEditors(); m_comparisonView.uiCapability()->updateConnectedEditors();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setCurrentTimeStepAndUpdate( int frameIndex )
{
setCurrentTimeStep( frameIndex );
this->onUpdateCurrentTimeStep();
if ( Rim3dView* depView = prepareComparisonView() )
{
depView->onUpdateCurrentTimeStep();
depView->appendAnnotationsToModel();
depView->appendMeasurementToModel();
restoreComparisonView();
}
RimProject* project;
firstAncestorOrThisOfTypeAsserted( project );
project->mainPlotCollection()->updateCurrentTimeStepInPlots();
appendAnnotationsToModel();
appendMeasurementToModel();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
@ -499,6 +474,32 @@ void Rim3dView::setCurrentTimeStep( int frameIndex )
this->hasUserRequestedAnimation = true; this->hasUserRequestedAnimation = true;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setCurrentTimeStepAndUpdate( int frameIndex )
{
setCurrentTimeStep( frameIndex );
this->onUpdateCurrentTimeStep();
if ( Rim3dView* depView = prepareComparisonView() )
{
depView->onUpdateCurrentTimeStep();
depView->appendAnnotationsToModel();
depView->appendMeasurementToModel();
restoreComparisonView();
}
RimProject* project;
firstAncestorOrThisOfTypeAsserted( project );
project->mainPlotCollection()->updateCurrentTimeStepInPlots();
appendAnnotationsToModel();
appendMeasurementToModel();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -752,6 +753,14 @@ caf::PdmFieldHandle* Rim3dView::userDescriptionField()
return m_nameConfig->nameField(); return m_nameConfig->nameField();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* Rim3dView::backgroundColorField()
{
return &m_backgroundColor;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1147,7 +1156,7 @@ void Rim3dView::applyBackgroundColorAndFontChanges()
} }
updateGridBoxData(); updateGridBoxData();
updateAnnotationItems(); updateAnnotationItems();
updateLegends(); onUpdateLegends();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1207,6 +1216,8 @@ void Rim3dView::updateDisplayModelVisibility()
viewer()->setEnableMask( mask, false ); viewer()->setEnableMask( mask, false );
viewer()->setEnableMask( mask, true ); viewer()->setEnableMask( mask, true );
this->onUpdateDisplayModelVisibility();
viewer()->update(); viewer()->update();
} }

View File

@ -144,7 +144,7 @@ public:
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const; bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
// Updating // Updating
void updateCurrentTimeStepAndRedraw() override; virtual void updateCurrentTimeStepAndRedraw();
virtual void scheduleGeometryRegen( RivCellSetEnum geometryType ) = 0; virtual void scheduleGeometryRegen( RivCellSetEnum geometryType ) = 0;
void scheduleCreateDisplayModelAndRedraw(); void scheduleCreateDisplayModelAndRedraw();
@ -191,6 +191,7 @@ protected:
bool hasVisibleTimeStepDependent3dWellLogCurves() const; bool hasVisibleTimeStepDependent3dWellLogCurves() const;
void addWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList, void addWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList,
const cvf::BoundingBox& wellPathClipBoundingBox ); const cvf::BoundingBox& wellPathClipBoundingBox );
void updateDisplayModelVisibility();
void addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList, void addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList,
const cvf::BoundingBox& wellPathClipBoundingBox ); const cvf::BoundingBox& wellPathClipBoundingBox );
@ -203,18 +204,15 @@ protected:
RiuViewer* nativeOrOverrideViewer() const; RiuViewer* nativeOrOverrideViewer() const;
bool isUsingOverrideViewer() const; bool isUsingOverrideViewer() const;
// Implementation of RimNameConfigHolderInterface
void performAutoNameUpdate() override;
// Abstract methods to implement in subclasses // Abstract methods to implement in subclasses
virtual void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0; virtual void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0;
virtual void onCreateDisplayModel() = 0; virtual void onCreateDisplayModel() = 0;
virtual void updateDisplayModelVisibility(); virtual void onUpdateDisplayModelVisibility(){};
virtual void onClampCurrentTimestep() = 0; virtual void onClampCurrentTimestep() = 0;
virtual void onUpdateCurrentTimeStep() = 0; virtual void onUpdateCurrentTimeStep() = 0;
virtual void onTimeStepChanged() = 0; virtual void onTimeStepChanged(){};
virtual bool isTimeStepDependentDataVisible() const = 0; virtual bool isTimeStepDependentDataVisible() const = 0;
virtual void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0; virtual void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0;
@ -224,12 +222,13 @@ protected:
virtual cvf::Transform* scaleTransform() = 0; virtual cvf::Transform* scaleTransform() = 0;
virtual void onResetLegendsInViewer() = 0; virtual void onResetLegendsInViewer() = 0;
virtual void updateLegends() = 0; virtual void onUpdateLegends() = 0;
protected: // Fields
caf::PdmField<int> m_currentTimeStep;
protected: protected:
// Timestep Field. Children clamps this differently
caf::PdmField<int> m_currentTimeStep;
// 3D display model data
cvf::ref<cvf::ModelBasicList> m_wellPathPipeVizModel; cvf::ref<cvf::ModelBasicList> m_wellPathPipeVizModel;
cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel; cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel;
cvf::ref<cvf::ModelBasicList> m_highlightVizModel; cvf::ref<cvf::ModelBasicList> m_highlightVizModel;
@ -238,17 +237,11 @@ protected:
cvf::ref<RivAnnotationsPartMgr> m_annotationsPartManager; cvf::ref<RivAnnotationsPartMgr> m_annotationsPartManager;
cvf::ref<RivMeasurementPartMgr> m_measurementPartManager; cvf::ref<RivMeasurementPartMgr> m_measurementPartManager;
private: protected:
// Overridden PdmObject methods: // Overridden PdmObject methods:
void setupBeforeSave() override;
protected:
caf::PdmFieldHandle* userDescriptionField() override; caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* backgroundColorField() caf::PdmFieldHandle* backgroundColorField();
{
return &m_backgroundColor;
}
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue, const QVariant& oldValue,
@ -258,6 +251,9 @@ protected:
QWidget* createViewWidget( QWidget* mainWindowParent ) override; QWidget* createViewWidget( QWidget* mainWindowParent ) override;
void initAfterRead() override; void initAfterRead() override;
private:
void setupBeforeSave() override;
private: private:
// Overridden ViewWindow methods: // Overridden ViewWindow methods:
@ -265,6 +261,9 @@ private:
void deleteViewWidget() override; void deleteViewWidget() override;
QWidget* viewWidget() override; QWidget* viewWidget() override;
// Implementation of RimNameConfigHolderInterface
void performAutoNameUpdate() override final;
// Implementation of RiuViewerToViewInterface // Implementation of RiuViewerToViewInterface
void setCameraPosition( const cvf::Mat4d& cameraPosition ) override; void setCameraPosition( const cvf::Mat4d& cameraPosition ) override;

View File

@ -251,7 +251,7 @@ void RimEclipseContourMapView::updateGeometry()
progress.setProgress( 30 ); progress.setProgress( 30 );
} }
updateLegends(); // To make sure the scalar mappers are set up correctly onUpdateLegends(); // To make sure the scalar mappers are set up correctly
appendWellsAndFracturesToModel(); appendWellsAndFracturesToModel();
{ // Step 2: generate geometry. Takes about 60% of the time. { // Step 2: generate geometry. Takes about 60% of the time.
@ -373,7 +373,7 @@ void RimEclipseContourMapView::appendPickPointVisToModel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseContourMapView::updateLegends() void RimEclipseContourMapView::onUpdateLegends()
{ {
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {
@ -459,7 +459,7 @@ void RimEclipseContourMapView::fieldChangedByUi( const caf::PdmFieldHandle* chan
} }
else if ( changedField == &m_showScaleLegend ) else if ( changedField == &m_showScaleLegend )
{ {
updateLegends(); onUpdateLegends();
scheduleCreateDisplayModelAndRedraw(); scheduleCreateDisplayModelAndRedraw();
} }
} }

View File

@ -51,7 +51,7 @@ protected:
void appendContourMapProjectionToModel(); void appendContourMapProjectionToModel();
void appendContourLinesToModel(); void appendContourLinesToModel();
void appendPickPointVisToModel(); void appendPickPointVisToModel();
void updateLegends() override; void onUpdateLegends() override;
void updateViewWidgetAfterCreation() override; void updateViewWidgetAfterCreation() override;
void updateViewFollowingRangeFilterUpdates() override; void updateViewFollowingRangeFilterUpdates() override;
void onLoadDataAndUpdate() override; void onLoadDataAndUpdate() override;

View File

@ -561,7 +561,7 @@ void RimEclipseView::onCreateDisplayModel()
else else
{ {
m_overlayInfoConfig()->update3DInfo(); m_overlayInfoConfig()->update3DInfo();
updateLegends(); onUpdateLegends();
} }
std::vector<RimFlowCharacteristicsPlot*> characteristicsPlots; std::vector<RimFlowCharacteristicsPlot*> characteristicsPlots;
@ -596,7 +596,7 @@ void RimEclipseView::onUpdateCurrentTimeStep()
m_propertyFilterCollection()->updateFromCurrentTimeStep(); m_propertyFilterCollection()->updateFromCurrentTimeStep();
updateLegends(); // To make sure the scalar mappers are set up correctly onUpdateLegends(); // To make sure the scalar mappers are set up correctly
updateVisibleGeometriesAndCellColors(); updateVisibleGeometriesAndCellColors();
@ -1070,10 +1070,8 @@ QString RimEclipseView::createAutoName() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateDisplayModelVisibility() void RimEclipseView::onUpdateDisplayModelVisibility()
{ {
Rim3dView::updateDisplayModelVisibility();
faultCollection()->updateConnectedEditors(); faultCollection()->updateConnectedEditors();
// This is required to update the read-only state of simulation wells // This is required to update the read-only state of simulation wells
@ -1159,7 +1157,7 @@ std::vector<size_t> RimEclipseView::indicesToVisibleGrids() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateLegends() void RimEclipseView::onUpdateLegends()
{ {
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {

View File

@ -166,7 +166,7 @@ protected:
private: private:
QString createAutoName() const override; QString createAutoName() const override;
void updateDisplayModelVisibility() override; void onUpdateDisplayModelVisibility() override;
std::vector<size_t> indicesToVisibleGrids() const; std::vector<size_t> indicesToVisibleGrids() const;
void onUpdateScaleTransform() override; void onUpdateScaleTransform() override;
@ -175,7 +175,7 @@ private:
void onUpdateStaticCellColors() override; void onUpdateStaticCellColors() override;
void updateStaticCellColors( RivCellSetEnum geometryType ); void updateStaticCellColors( RivCellSetEnum geometryType );
void updateLegends() override; void onUpdateLegends() override;
void updateMinMaxValuesAndAddLegendToView( QString legendLabel, void updateMinMaxValuesAndAddLegendToView( QString legendLabel,
RimEclipseCellColors* resultColors, RimEclipseCellColors* resultColors,
RigCaseCellResultsData* cellResultsData ); RigCaseCellResultsData* cellResultsData );

View File

@ -254,7 +254,7 @@ void RimGeoMechContourMapView::updateGeometry()
{ {
m_contourMapProjection->generateResultsIfNecessary( m_currentTimeStep() ); m_contourMapProjection->generateResultsIfNecessary( m_currentTimeStep() );
} }
updateLegends(); onUpdateLegends();
progress.setProgress( 30 ); progress.setProgress( 30 );
} }
@ -366,7 +366,7 @@ void RimGeoMechContourMapView::appendPickPointVisToModel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechContourMapView::updateLegends() void RimGeoMechContourMapView::onUpdateLegends()
{ {
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {
@ -452,7 +452,7 @@ void RimGeoMechContourMapView::fieldChangedByUi( const caf::PdmFieldHandle* chan
} }
else if ( changedField == &m_showScaleLegend ) else if ( changedField == &m_showScaleLegend )
{ {
updateLegends(); onUpdateLegends();
scheduleCreateDisplayModelAndRedraw(); scheduleCreateDisplayModelAndRedraw();
} }
} }

View File

@ -53,7 +53,7 @@ protected:
void appendContourMapProjectionToModel(); void appendContourMapProjectionToModel();
void appendContourLinesToModel(); void appendContourLinesToModel();
void appendPickPointVisToModel(); void appendPickPointVisToModel();
void updateLegends() override; void onUpdateLegends() override;
void updateViewWidgetAfterCreation() override; void updateViewWidgetAfterCreation() override;
void updateViewFollowingRangeFilterUpdates() override; void updateViewFollowingRangeFilterUpdates() override;
void onLoadDataAndUpdate() override; void onLoadDataAndUpdate() override;

View File

@ -297,7 +297,7 @@ void RimGeoMechView::onCreateDisplayModel()
} }
else else
{ {
updateLegends(); onUpdateLegends();
m_vizLogic->updateStaticCellColors( -1 ); m_vizLogic->updateStaticCellColors( -1 );
m_crossSectionCollection->applySingleColorEffect(); m_crossSectionCollection->applySingleColorEffect();
@ -318,7 +318,7 @@ RimPropertyFilterCollection* RimGeoMechView::nativePropertyFilterCollection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::onUpdateCurrentTimeStep() void RimGeoMechView::onUpdateCurrentTimeStep()
{ {
updateLegends(); onUpdateLegends();
if ( this->isTimeStepDependentDataVisibleInThisOrComparisonView() ) if ( this->isTimeStepDependentDataVisibleInThisOrComparisonView() )
{ {
@ -430,7 +430,7 @@ void RimGeoMechView::onResetLegendsInViewer()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateLegends() void RimGeoMechView::onUpdateLegends()
{ {
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {

View File

@ -128,7 +128,7 @@ private:
void onResetLegendsInViewer() override; void onResetLegendsInViewer() override;
void updateLegends() override; void onUpdateLegends() override;
void updateTensorLegendTextAndRanges( RimRegularLegendConfig* legendConfig, int timeStepIndex ); void updateTensorLegendTextAndRanges( RimRegularLegendConfig* legendConfig, int timeStepIndex );

View File

@ -57,7 +57,6 @@ public:
virtual cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const = 0; virtual cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const = 0;
virtual void setCurrentTimeStepAndUpdate( int frameIndex ) = 0; virtual void setCurrentTimeStepAndUpdate( int frameIndex ) = 0;
virtual void updateCurrentTimeStepAndRedraw() = 0;
virtual void endAnimation() = 0; virtual void endAnimation() = 0;
}; };