2020-05-13 23:39:55 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2020- Equinor ASA
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-11-04 06:46:17 -06:00
|
|
|
#include "RimStimPlanModelPlotCollection.h"
|
2020-05-13 23:39:55 -05:00
|
|
|
|
2020-11-04 06:46:17 -06:00
|
|
|
#include "RimStimPlanModelPlot.h"
|
2020-05-13 23:39:55 -05:00
|
|
|
|
2020-08-21 04:13:07 -05:00
|
|
|
#include "cafPdmFieldScriptingCapability.h"
|
|
|
|
#include "cafPdmObjectScriptingCapability.h"
|
2020-08-07 03:51:07 -05:00
|
|
|
|
2020-11-04 06:46:17 -06:00
|
|
|
CAF_PDM_SOURCE_INIT( RimStimPlanModelPlotCollection, "StimPlanModelPlotCollection" );
|
2020-05-13 23:39:55 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
RimStimPlanModelPlotCollection::RimStimPlanModelPlotCollection()
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
CAF_PDM_InitScriptableObject( "StimPlan Model Plots", ":/WellLogPlots16x16.png", "", "" );
|
2020-05-13 23:39:55 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitScriptableFieldNoDefault( &m_stimPlanModelPlots, "StimPlanModelPlots", "" );
|
2021-10-13 06:39:46 -05:00
|
|
|
m_stimPlanModelPlots.uiCapability()->setUiTreeHidden( true );
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
RimStimPlanModelPlotCollection::~RimStimPlanModelPlotCollection()
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelPlots.deleteAllChildObjects();
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-05-05 02:43:49 -05:00
|
|
|
void RimStimPlanModelPlotCollection::loadDataAndUpdateAllPlots()
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
for ( const auto& w : m_stimPlanModelPlots() )
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
|
|
|
w->loadDataAndUpdate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-05 02:43:49 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
size_t RimStimPlanModelPlotCollection::plotCount() const
|
|
|
|
{
|
|
|
|
return m_stimPlanModelPlots.size();
|
|
|
|
}
|
|
|
|
|
2020-05-13 23:39:55 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
void RimStimPlanModelPlotCollection::addStimPlanModelPlot( RimStimPlanModelPlot* newPlot )
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelPlots.push_back( newPlot );
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
std::vector<RimStimPlanModelPlot*> RimStimPlanModelPlotCollection::stimPlanModelPlots() const
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
return m_stimPlanModelPlots.childObjects();
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
void RimStimPlanModelPlotCollection::deleteAllPlots()
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelPlots.deleteAllChildObjects();
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|