2020-11-13 08:37:08 -06: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.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimGridStatisticsPlotCollection.h"
|
|
|
|
|
|
|
|
#include "RimGridStatisticsPlot.h"
|
|
|
|
|
|
|
|
#include "cafPdmFieldScriptingCapability.h"
|
|
|
|
#include "cafPdmObjectScriptingCapability.h"
|
|
|
|
|
|
|
|
CAF_PDM_SOURCE_INIT( RimGridStatisticsPlotCollection, "GridStatisticsPlotCollection" );
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimGridStatisticsPlotCollection::RimGridStatisticsPlotCollection()
|
|
|
|
{
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitObject( "Grid Statistics Plots", ":/WellLogPlots16x16.png" );
|
2020-11-13 08:37:08 -06:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_gridStatisticsPlots, "GridStatisticsPlots", "" );
|
2020-11-13 08:37:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-05-03 12:31:00 -05:00
|
|
|
void RimGridStatisticsPlotCollection::loadDataAndUpdateAllPlots()
|
2020-11-13 08:37:08 -06:00
|
|
|
{
|
|
|
|
for ( const auto& w : m_gridStatisticsPlots() )
|
|
|
|
{
|
|
|
|
w->loadDataAndUpdate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-05-03 12:31:00 -05:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
size_t RimGridStatisticsPlotCollection::plotCount() const
|
|
|
|
{
|
|
|
|
return m_gridStatisticsPlots.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-13 08:37:08 -06:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimGridStatisticsPlotCollection::addGridStatisticsPlot( RimGridStatisticsPlot* newPlot )
|
|
|
|
{
|
|
|
|
m_gridStatisticsPlots.push_back( newPlot );
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::vector<RimGridStatisticsPlot*> RimGridStatisticsPlotCollection::gridStatisticsPlots() const
|
|
|
|
{
|
2023-05-12 14:41:34 -05:00
|
|
|
return m_gridStatisticsPlots.childrenByType();
|
2020-11-13 08:37:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimGridStatisticsPlotCollection::deleteAllPlots()
|
|
|
|
{
|
2022-05-31 06:08:07 -05:00
|
|
|
m_gridStatisticsPlots.deleteChildren();
|
2020-11-13 08:37:08 -06:00
|
|
|
}
|