mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2089 Cross Plot : Add cross plot collection
This commit is contained in:
parent
bd25c9bc9f
commit
7104064937
@ -65,6 +65,7 @@
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
@ -621,6 +622,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
{
|
||||
RimWellLogPlotCollection* wlpColl = nullptr;
|
||||
RimSummaryPlotCollection* spColl = nullptr;
|
||||
RimSummaryCrossPlotCollection* scpColl = nullptr;
|
||||
RimFlowPlotCollection* flowColl = nullptr;
|
||||
RimRftPlotCollection* rftColl = nullptr;
|
||||
RimPltPlotCollection* pltColl = nullptr;
|
||||
@ -633,6 +635,10 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
{
|
||||
spColl = m_project->mainPlotCollection()->summaryPlotCollection();
|
||||
}
|
||||
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->summaryCrossPlotCollection())
|
||||
{
|
||||
scpColl = m_project->mainPlotCollection()->summaryCrossPlotCollection();
|
||||
}
|
||||
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->flowPlotCollection())
|
||||
{
|
||||
flowColl = m_project->mainPlotCollection()->flowPlotCollection();
|
||||
@ -649,6 +655,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
||||
size_t plotCount = 0;
|
||||
plotCount += wlpColl ? wlpColl->wellLogPlots().size() : 0;
|
||||
plotCount += spColl ? spColl->summaryPlots().size() : 0;
|
||||
plotCount += scpColl ? scpColl->summaryPlots().size() : 0;
|
||||
plotCount += flowColl ? flowColl->plotCount() : 0;
|
||||
plotCount += rftColl ? rftColl->rftPlots().size() : 0;
|
||||
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "RimFlowPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimRftPlotCollection.h"
|
||||
#include "RimPltPlotCollection.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
@ -39,8 +40,8 @@ RimMainPlotCollection::RimMainPlotCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Plots", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&show, "Show", true, "Show 2D Plot Window", "", "", "");
|
||||
show.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_show, "Show", true, "Show 2D Plot Window", "", "", "");
|
||||
m_show.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogPlotCollection, "WellLogPlotCollection", "", "", "", "");
|
||||
m_wellLogPlotCollection.uiCapability()->setUiHidden(true);
|
||||
@ -54,14 +55,18 @@ RimMainPlotCollection::RimMainPlotCollection()
|
||||
CAF_PDM_InitFieldNoDefault(&m_summaryPlotCollection, "SummaryPlotCollection", "Summary Plots", "", "", "");
|
||||
m_summaryPlotCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_summaryCrossPlotCollection, "SummaryCrossPlotCollection", "Summary Cross Plots", "", "", "");
|
||||
m_summaryCrossPlotCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_flowPlotCollection, "FlowPlotCollection", "Flow Diagnostics Plots", "", "", "");
|
||||
m_flowPlotCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
m_wellLogPlotCollection = new RimWellLogPlotCollection();
|
||||
m_rftPlotCollection = new RimRftPlotCollection();
|
||||
m_pltPlotCollection = new RimPltPlotCollection();
|
||||
m_summaryPlotCollection = new RimSummaryPlotCollection();
|
||||
m_flowPlotCollection = new RimFlowPlotCollection();
|
||||
m_wellLogPlotCollection = new RimWellLogPlotCollection();
|
||||
m_rftPlotCollection = new RimRftPlotCollection();
|
||||
m_pltPlotCollection = new RimPltPlotCollection();
|
||||
m_summaryPlotCollection = new RimSummaryPlotCollection();
|
||||
m_summaryCrossPlotCollection = new RimSummaryCrossPlotCollection();
|
||||
m_flowPlotCollection = new RimFlowPlotCollection();
|
||||
|
||||
}
|
||||
|
||||
@ -70,11 +75,12 @@ RimMainPlotCollection::RimMainPlotCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMainPlotCollection::~RimMainPlotCollection()
|
||||
{
|
||||
if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection();
|
||||
if (m_rftPlotCollection()) delete m_rftPlotCollection();
|
||||
if (m_pltPlotCollection()) delete m_pltPlotCollection();
|
||||
if (m_summaryPlotCollection()) delete m_summaryPlotCollection();
|
||||
if (m_flowPlotCollection()) delete m_flowPlotCollection();
|
||||
if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection();
|
||||
if (m_rftPlotCollection()) delete m_rftPlotCollection();
|
||||
if (m_pltPlotCollection()) delete m_pltPlotCollection();
|
||||
if (m_summaryPlotCollection()) delete m_summaryPlotCollection();
|
||||
if (m_summaryCrossPlotCollection()) delete m_summaryCrossPlotCollection();
|
||||
if (m_flowPlotCollection()) delete m_flowPlotCollection();
|
||||
|
||||
}
|
||||
|
||||
@ -91,7 +97,7 @@ void RimMainPlotCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimMainPlotCollection::objectToggleField()
|
||||
{
|
||||
return &show;
|
||||
return &m_show;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -126,6 +132,14 @@ RimSummaryPlotCollection* RimMainPlotCollection::summaryPlotCollection()
|
||||
return m_summaryPlotCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlotCollection* RimMainPlotCollection::summaryCrossPlotCollection()
|
||||
{
|
||||
return m_summaryCrossPlotCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -143,6 +157,7 @@ void RimMainPlotCollection::deleteAllContainedObjects()
|
||||
m_rftPlotCollection()->deleteAllPlots();
|
||||
m_pltPlotCollection()->deleteAllPlots();
|
||||
m_summaryPlotCollection()->summaryPlots.deleteAllChildObjects();
|
||||
m_summaryCrossPlotCollection()->deleteAllChildObjects();
|
||||
|
||||
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ class RimWellLogPlotCollection;
|
||||
class RimRftPlotCollection;
|
||||
class RimPltPlotCollection;
|
||||
class RimSummaryPlotCollection;
|
||||
class RimSummaryCrossPlotCollection;
|
||||
class RimSummaryPlot;
|
||||
class RifReaderEclipseSummary;
|
||||
class RimEclipseResultCase;
|
||||
@ -48,26 +49,29 @@ public:
|
||||
RimMainPlotCollection();
|
||||
virtual ~RimMainPlotCollection();
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||
RimRftPlotCollection* rftPlotCollection();
|
||||
RimPltPlotCollection* pltPlotCollection();
|
||||
RimSummaryPlotCollection* summaryPlotCollection();
|
||||
RimFlowPlotCollection* flowPlotCollection();
|
||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||
RimRftPlotCollection* rftPlotCollection();
|
||||
RimPltPlotCollection* pltPlotCollection();
|
||||
RimSummaryPlotCollection* summaryPlotCollection();
|
||||
RimSummaryCrossPlotCollection* summaryCrossPlotCollection();
|
||||
RimFlowPlotCollection* flowPlotCollection();
|
||||
|
||||
void deleteAllContainedObjects();
|
||||
void updateCurrentTimeStepInPlots();
|
||||
void deleteAllContainedObjects();
|
||||
void updateCurrentTimeStepInPlots();
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
// Overridden PDM methods
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
|
||||
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
|
||||
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
|
||||
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
|
||||
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;
|
||||
private:
|
||||
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
|
||||
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
|
||||
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
|
||||
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
|
||||
caf::PdmChildField<RimSummaryCrossPlotCollection*> m_summaryCrossPlotCollection;
|
||||
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;
|
||||
|
||||
caf::PdmField<bool> show;
|
||||
caf::PdmField<bool> m_show;
|
||||
};
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "RimOilField.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimView.h"
|
||||
#include "RimViewLinker.h"
|
||||
@ -1038,6 +1039,11 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
||||
uiTreeOrdering.add(mainPlotCollection->summaryPlotCollection());
|
||||
}
|
||||
|
||||
if (mainPlotCollection->summaryCrossPlotCollection())
|
||||
{
|
||||
uiTreeOrdering.add(mainPlotCollection->summaryCrossPlotCollection());
|
||||
}
|
||||
|
||||
if (mainPlotCollection->wellLogPlotCollection())
|
||||
{
|
||||
uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection());
|
||||
|
@ -20,6 +20,7 @@ ${CEE_CURRENT_LIST_DIR}RimSummaryFilter.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCurveCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlot.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlotCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCrossPlotCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryTimeAxisProperties.h
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryYAxisProperties.h
|
||||
${CEE_CURRENT_LIST_DIR}RimObservedData.h
|
||||
@ -45,6 +46,7 @@ ${CEE_CURRENT_LIST_DIR}RimSummaryFilter.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCurveCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlot.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryPlotCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryCrossPlotCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryTimeAxisProperties.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimSummaryYAxisProperties.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimObservedData.cpp
|
||||
|
@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil 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 "RimSummaryCrossPlotCollection.h"
|
||||
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimSummaryCrossPlotCollection, "SummaryCrossPlotCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlotCollection::RimSummaryCrossPlotCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Summary Cross Plots", ":/SummaryPlots16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&summaryCrossPlots, "SummaryCrossPlots", "Summary Cross Plots", "", "", "");
|
||||
summaryCrossPlots.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlotCollection::~RimSummaryCrossPlotCollection()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCrossPlotCollection::deleteAllChildObjects()
|
||||
{
|
||||
summaryCrossPlots.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSummaryPlot*> RimSummaryCrossPlotCollection::summaryPlots() const
|
||||
{
|
||||
return summaryCrossPlots.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCrossPlotCollection::updateSummaryNameHasChanged()
|
||||
{
|
||||
for (RimSummaryPlot* plot : summaryCrossPlots)
|
||||
{
|
||||
plot->updateCaseNameHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCrossPlotCollection::summaryPlotItemInfos(QList<caf::PdmOptionItemInfo>* optionInfos) const
|
||||
{
|
||||
for (RimSummaryPlot* plot : summaryCrossPlots())
|
||||
{
|
||||
QIcon icon = plot->uiCapability()->uiIcon();
|
||||
QString displayName = plot->description();
|
||||
|
||||
optionInfos->push_back(caf::PdmOptionItemInfo(displayName, plot, false, icon));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
class RimSummaryPlot;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimSummaryCrossPlotCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimSummaryCrossPlotCollection();
|
||||
virtual ~RimSummaryCrossPlotCollection();
|
||||
|
||||
void deleteAllChildObjects();
|
||||
|
||||
std::vector<RimSummaryPlot*> summaryPlots() const;
|
||||
|
||||
void updateSummaryNameHasChanged();
|
||||
void summaryPlotItemInfos(QList<caf::PdmOptionItemInfo>* optionInfos) const;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimSummaryPlot*> summaryCrossPlots;
|
||||
};
|
Loading…
Reference in New Issue
Block a user