#2332 2D Intersection View: Command to create view

This commit is contained in:
Magne Sjaastad
2018-01-17 11:05:31 +01:00
parent b53603e906
commit 03de2aba5b
10 changed files with 205 additions and 0 deletions
@@ -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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------