mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2332 2D Intersection View: Command to create view
This commit is contained in:
@@ -51,6 +51,14 @@ Rim2dIntersectionView::~Rim2dIntersectionView(void)
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim2dIntersectionView::setIntersection(RimIntersection* intersection)
|
||||
{
|
||||
m_intersection = intersection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -39,6 +39,8 @@ public:
|
||||
Rim2dIntersectionView(void);
|
||||
virtual ~Rim2dIntersectionView(void);
|
||||
|
||||
void setIntersection(RimIntersection* intersection);
|
||||
|
||||
|
||||
virtual bool isUsingFormationNames() const override;
|
||||
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "cafPdmObjectFactory.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimIntersection.h"
|
||||
|
||||
|
||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimCase, "RimCase");
|
||||
@@ -112,6 +113,22 @@ size_t RimCase::uiToNativeTimeStepIndex(size_t uiTimeStepIndex)
|
||||
return uiTimeStepIndex;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim2dIntersectionView* RimCase::createAndAddIntersectionView(RimIntersection* intersection)
|
||||
{
|
||||
Rim2dIntersectionView* intersectionView = new Rim2dIntersectionView;
|
||||
intersectionView->setIntersection(intersection);
|
||||
|
||||
QString name = QString("View of Intersection %1").arg(intersection->name());
|
||||
intersectionView->name = name;
|
||||
|
||||
m_intersectionViews.push_back(intersectionView);
|
||||
|
||||
return intersectionView;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -34,6 +34,7 @@ class Rim3dView;
|
||||
class RimFormationNames;
|
||||
class RimTimeStepFilter;
|
||||
class Rim2dIntersectionView;
|
||||
class RimIntersection;
|
||||
|
||||
namespace cvf {
|
||||
class BoundingBox;
|
||||
@@ -71,6 +72,8 @@ public:
|
||||
|
||||
size_t uiToNativeTimeStepIndex(size_t uiTimeStepIndex);
|
||||
|
||||
Rim2dIntersectionView* createAndAddIntersectionView(RimIntersection* intersection);
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
virtual std::vector<Rim3dView*> allSpecialViews() const = 0;
|
||||
|
||||
@@ -454,6 +454,8 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
menuBuilder << "RicAppendIntersectionFeature";
|
||||
menuBuilder << "RicAppendIntersectionBoxFeature";
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder << "RicNewIntersectionViewFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimIntersectionBox*>(uiItem))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user