mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2331 Cleaned up whitespace. Made crossectionCollection protected
This commit is contained in:
parent
424c6a46f6
commit
b1cf7f6674
@ -64,7 +64,7 @@ void RicNewAzimuthDipIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||
if (!activeView) return;
|
||||
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(activeView->crossSectionCollection);
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(activeView->crossSectionCollection());
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ void RicNewPolylineIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||
if (!activeView) return;
|
||||
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(activeView->crossSectionCollection);
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(activeView->crossSectionCollection());
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ void RicNewSimWellIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
simWell->firstAncestorOrThisOfType(eclView);
|
||||
CVF_ASSERT(eclView);
|
||||
|
||||
RicNewSimWellIntersectionCmd* cmd = new RicNewSimWellIntersectionCmd(eclView->crossSectionCollection, simWell);
|
||||
RicNewSimWellIntersectionCmd* cmd = new RicNewSimWellIntersectionCmd(eclView->crossSectionCollection(), simWell);
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ void RicNewWellPathIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
RimWellPath* wellPath = collection[0];
|
||||
|
||||
RicNewWellPathIntersectionFeatureCmd* cmd = new RicNewWellPathIntersectionFeatureCmd(activeView->crossSectionCollection, wellPath);
|
||||
RicNewWellPathIntersectionFeatureCmd* cmd = new RicNewWellPathIntersectionFeatureCmd(activeView->crossSectionCollection(), wellPath);
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd);
|
||||
}
|
||||
|
||||
|
@ -873,9 +873,9 @@ RimGridView::RimGridView()
|
||||
m_overrideRangeFilterCollection.xmlCapability()->setIOWritable(false);
|
||||
m_overrideRangeFilterCollection.xmlCapability()->setIOReadable(false);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&crossSectionCollection, "CrossSections", "Intersections", "", "", "");
|
||||
crossSectionCollection.uiCapability()->setUiHidden(true);
|
||||
crossSectionCollection = new RimIntersectionCollection();
|
||||
CAF_PDM_InitFieldNoDefault(&m_crossSectionCollection, "CrossSections", "Intersections", "", "", "");
|
||||
m_crossSectionCollection.uiCapability()->setUiHidden(true);
|
||||
m_crossSectionCollection = new RimIntersectionCollection();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_gridCollection, "GridCollection", "GridCollection", "", "", "");
|
||||
m_gridCollection.uiCapability()->setUiHidden(true);
|
||||
@ -918,7 +918,7 @@ RimGridView::~RimGridView(void)
|
||||
|
||||
delete m_rangeFilterCollection;
|
||||
delete m_overrideRangeFilterCollection;
|
||||
delete crossSectionCollection;
|
||||
delete m_crossSectionCollection;
|
||||
delete m_gridCollection;
|
||||
}
|
||||
|
||||
@ -958,6 +958,14 @@ cvf::ref<cvf::UByteArray> RimGridView::currentTotalCellVisibility()
|
||||
return m_currentReservoirCellVisibility;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionCollection* RimGridView::crossSectionCollection() const
|
||||
{
|
||||
return m_crossSectionCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1114,7 +1122,7 @@ void RimGridView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
{
|
||||
if ( changedField == &scaleZ )
|
||||
{
|
||||
crossSectionCollection->updateIntersectionBoxGeometry();
|
||||
m_crossSectionCollection->updateIntersectionBoxGeometry();
|
||||
}
|
||||
|
||||
Rim3dView::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
@ -135,7 +135,6 @@ public:
|
||||
virtual RimCase* ownerCase() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
void setDefaultView();
|
||||
|
||||
RimWellPathCollection* wellPathCollection();
|
||||
@ -167,14 +166,14 @@ protected:
|
||||
virtual void resetLegendsInViewer() = 0;
|
||||
|
||||
protected: // Fields
|
||||
caf::PdmField<int> m_currentTimeStep;
|
||||
caf::PdmField<int> m_currentTimeStep;
|
||||
|
||||
protected:
|
||||
QPointer<RiuViewer> m_viewer;
|
||||
QPointer<RiuViewer> m_viewer;
|
||||
|
||||
cvf::ref<cvf::ModelBasicList> m_wellPathPipeVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_highlightVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_wellPathPipeVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_highlightVizModel;
|
||||
|
||||
private:
|
||||
// Overridden PdmObject methods:
|
||||
@ -220,43 +219,40 @@ class RimGridView : public Rim3dView
|
||||
public:
|
||||
RimGridView();
|
||||
virtual ~RimGridView(void);
|
||||
#if 1
|
||||
|
||||
caf::PdmChildField<RimIntersectionCollection*> crossSectionCollection;
|
||||
void showGridCells(bool enableGridCells);
|
||||
|
||||
Rim3dOverlayInfoConfig* overlayInfoConfig() const;
|
||||
|
||||
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
|
||||
|
||||
void showGridCells(bool enableGridCells);
|
||||
|
||||
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
|
||||
|
||||
virtual const RimPropertyFilterCollection* propertyFilterCollection() const = 0;
|
||||
RimCellRangeFilterCollection* rangeFilterCollection();
|
||||
const RimCellRangeFilterCollection* rangeFilterCollection() const;
|
||||
|
||||
bool hasOverridenRangeFilterCollection();
|
||||
void setOverrideRangeFilterCollection(RimCellRangeFilterCollection* rfc);
|
||||
void replaceRangeFilterCollectionWithOverride();
|
||||
|
||||
RimViewController* viewController() const override;
|
||||
RimViewLinker* assosiatedViewLinker() const override;
|
||||
|
||||
Rim3dOverlayInfoConfig* overlayInfoConfig() const;
|
||||
protected:
|
||||
static void removeModelByName(cvf::Scene* scene, const cvf::String& modelName);
|
||||
|
||||
virtual void onTimeStepChanged() override;
|
||||
|
||||
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) = 0;
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
virtual void selectOverlayInfoConfig() override;
|
||||
RimIntersectionCollection* crossSectionCollection() const;
|
||||
|
||||
virtual const RimPropertyFilterCollection* propertyFilterCollection() const = 0;
|
||||
RimCellRangeFilterCollection* rangeFilterCollection();
|
||||
const RimCellRangeFilterCollection* rangeFilterCollection() const;
|
||||
|
||||
bool hasOverridenRangeFilterCollection();
|
||||
void setOverrideRangeFilterCollection(RimCellRangeFilterCollection* rfc);
|
||||
void replaceRangeFilterCollectionWithOverride();
|
||||
|
||||
RimViewController* viewController() const override;
|
||||
RimViewLinker* assosiatedViewLinker() const override;
|
||||
|
||||
protected:
|
||||
static void removeModelByName(cvf::Scene* scene, const cvf::String& modelName);
|
||||
|
||||
virtual void onTimeStepChanged() override;
|
||||
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) = 0;
|
||||
virtual void selectOverlayInfoConfig() override;
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
protected: // Fields
|
||||
caf::PdmChildField<RimIntersectionCollection*> m_crossSectionCollection;
|
||||
caf::PdmChildField<Rim3dOverlayInfoConfig*> m_overlayInfoConfig;
|
||||
|
||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_rangeFilterCollection;
|
||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_overrideRangeFilterCollection;
|
||||
|
||||
caf::PdmChildField<RimGridCollection*> m_gridCollection;
|
||||
|
||||
protected:
|
||||
@ -265,6 +261,4 @@ protected:
|
||||
private:
|
||||
RimViewLinker* viewLinkerIfMasterView() const;
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
@ -425,7 +425,7 @@ void RimEclipseView::createDisplayModel()
|
||||
// Cross sections
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
m_crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
|
||||
@ -654,11 +654,11 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
m_crossSectionCollection->applySingleColorEffect();
|
||||
}
|
||||
|
||||
if (m_viewer)
|
||||
@ -1474,7 +1474,7 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
|
||||
uiTreeOrdering.add(wellCollection());
|
||||
uiTreeOrdering.add(faultCollection());
|
||||
uiTreeOrdering.add(crossSectionCollection());
|
||||
uiTreeOrdering.add(m_crossSectionCollection());
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
|
@ -221,7 +221,7 @@ void RimGeoMechView::createDisplayModel()
|
||||
// Cross sections
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
m_crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
// If the animation was active before recreating everything, make viewer view current frame
|
||||
@ -234,7 +234,7 @@ void RimGeoMechView::createDisplayModel()
|
||||
{
|
||||
updateLegends();
|
||||
m_vizLogic->updateStaticCellColors(-1);
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
m_crossSectionCollection->applySingleColorEffect();
|
||||
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
}
|
||||
@ -290,18 +290,18 @@ void RimGeoMechView::updateCurrentTimeStep()
|
||||
|
||||
if (this->cellResult()->hasResult())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
m_crossSectionCollection->applySingleColorEffect();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vizLogic->updateStaticCellColors(-1);
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
m_crossSectionCollection->applySingleColorEffect();
|
||||
|
||||
m_viewer->animationControl()->slotPause(); // To avoid animation timer spinning in the background
|
||||
}
|
||||
@ -650,7 +650,7 @@ void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
|
||||
uiTreeOrdering.add(cellResult());
|
||||
|
||||
uiTreeOrdering.add(crossSectionCollection());
|
||||
uiTreeOrdering.add(m_crossSectionCollection());
|
||||
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(m_propertyFilterCollection());
|
||||
|
Loading…
Reference in New Issue
Block a user