mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
Migrated to the templated base, preserving each collection's existing XML field keyword for project-file backward compatibility: - RimEnsembleFractureStatisticsCollection - RimEclipseInputPropertyCollection - RimPlotDataFilterCollection - RimGeoMechContourMapViewCollection - RimIntersectionResultsDefinitionCollection - RimCustomObjectiveFunctionCollection - RimStimPlanModelTemplateCollection - RimEnsembleWellLogsCollection - RimEclipseContourMapViewCollection - RimSeismicViewCollection - RimGridInfoCollection - RimEclipseStatisticsCaseCollection - RimWellIASettingsCollection - RimVfpDataCollection External callers that accessed the old public/named array fields directly (RimEclipseInputPropertyCollection::inputProperties, RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from the base. RimCustomObjectiveFunction.h replaced its include of the collection header with a forward declaration to break the new include cycle introduced by the migration.
66 lines
2.7 KiB
C++
66 lines
2.7 KiB
C++
#include "RimEclipseContourMapViewCollection.h"
|
|
|
|
#include "RimEclipseCase.h"
|
|
#include "RimEclipseContourMapView.h"
|
|
|
|
CAF_PDM_SOURCE_INIT( RimEclipseContourMapViewCollection, "Eclipse2dViewCollection" );
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
RimEclipseContourMapViewCollection::RimEclipseContourMapViewCollection()
|
|
{
|
|
CAF_PDM_InitObject( "Contour Maps", ":/2DMaps16x16.png" );
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_items, "EclipseViews", "Contour Maps", ":/CrossSection16x16.png" );
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
RimEclipseContourMapViewCollection::~RimEclipseContourMapViewCollection()
|
|
{
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
std::vector<RimEclipseContourMapView*> RimEclipseContourMapViewCollection::views()
|
|
{
|
|
return items();
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RimEclipseContourMapViewCollection::addView( RimEclipseContourMapView* contourMap )
|
|
{
|
|
addItem( contourMap );
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RimEclipseContourMapViewCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
|
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
|
{
|
|
auto eclipseCase = firstAncestorOrThisOfType<RimEclipseCase>();
|
|
if ( eclipseCase ) eclipseCase->updateConnectedEditors();
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RimEclipseContourMapViewCollection::clearWithoutDelete()
|
|
{
|
|
m_items.clearWithoutDelete();
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RimEclipseContourMapViewCollection::removeChild( RimEclipseContourMapView* contourMap )
|
|
{
|
|
m_items.removeChild( contourMap );
|
|
}
|