mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1772 Add command to store flow characteristics plots
This commit is contained in:
@@ -64,16 +64,17 @@ public:
|
||||
virtual void zoomAll() override;
|
||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
virtual void deleteViewWidget() override;
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
enum TimeSelectionType
|
||||
{
|
||||
ALL_AVAILABLE,
|
||||
SELECT_AVAILABLE
|
||||
};
|
||||
|
||||
protected:
|
||||
// RimViewWindow overrides
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
// Overridden PDM methods
|
||||
|
||||
@@ -40,7 +40,8 @@ RimFlowPlotCollection::RimFlowPlotCollection()
|
||||
CAF_PDM_InitFieldNoDefault(&m_defaultWellAllocPlot, "DefaultWellAllocationPlot", "", "", "", "");
|
||||
m_defaultWellAllocPlot.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_storedWellAllocPlots, "StoredWellAllocationPlots", "Stored Plots", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_storedWellAllocPlots, "StoredWellAllocationPlots", "Stored Well Allocation Plots", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_storedFlowCharacteristicsPlots, "StoredFlowCharacteristicsPlots", "Stored Flow Characteristics Plots", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -67,6 +68,7 @@ void RimFlowPlotCollection::closeDefaultPlotWindowAndDeletePlots()
|
||||
delete m_flowCharacteristicsPlot;
|
||||
|
||||
m_storedWellAllocPlots.deleteAllChildObjects();
|
||||
m_storedFlowCharacteristicsPlots.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -74,7 +76,7 @@ void RimFlowPlotCollection::closeDefaultPlotWindowAndDeletePlots()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFlowPlotCollection::loadDataAndUpdate()
|
||||
{
|
||||
caf::ProgressInfo plotProgress(m_storedWellAllocPlots.size() + 1, "");
|
||||
caf::ProgressInfo plotProgress(m_storedWellAllocPlots.size() + m_storedFlowCharacteristicsPlots.size() + 1, "");
|
||||
|
||||
if (m_defaultWellAllocPlot) m_defaultWellAllocPlot->loadDataAndUpdate();
|
||||
plotProgress.incrementProgress();
|
||||
@@ -84,6 +86,12 @@ void RimFlowPlotCollection::loadDataAndUpdate()
|
||||
p->loadDataAndUpdate();
|
||||
plotProgress.incrementProgress();
|
||||
}
|
||||
|
||||
for (RimFlowCharacteristicsPlot* p : m_storedFlowCharacteristicsPlots)
|
||||
{
|
||||
p->loadDataAndUpdate();
|
||||
plotProgress.incrementProgress();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -94,6 +102,7 @@ size_t RimFlowPlotCollection::plotCount() const
|
||||
size_t plotCount = 0;
|
||||
if (m_defaultWellAllocPlot) plotCount = 1;
|
||||
plotCount += m_storedWellAllocPlots.size();
|
||||
plotCount += m_storedFlowCharacteristicsPlots.size();
|
||||
return plotCount;
|
||||
}
|
||||
|
||||
@@ -105,6 +114,14 @@ void RimFlowPlotCollection::addWellAllocPlotToStoredPlots(RimWellAllocationPlot*
|
||||
m_storedWellAllocPlots.push_back(plot);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFlowPlotCollection::addFlowCharacteristicsPlotToStoredPlots(RimFlowCharacteristicsPlot* plot)
|
||||
{
|
||||
m_storedFlowCharacteristicsPlots.push_back(plot);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
size_t plotCount() const;
|
||||
|
||||
void addWellAllocPlotToStoredPlots(RimWellAllocationPlot* plot);
|
||||
void addFlowCharacteristicsPlotToStoredPlots(RimFlowCharacteristicsPlot* plot);
|
||||
RimWellAllocationPlot* defaultWellAllocPlot();
|
||||
RimFlowCharacteristicsPlot* defaultFlowCharacteristicsPlot();
|
||||
|
||||
@@ -48,4 +49,5 @@ private:
|
||||
caf::PdmChildField<RimFlowCharacteristicsPlot*> m_flowCharacteristicsPlot;
|
||||
caf::PdmChildField<RimWellAllocationPlot*> m_defaultWellAllocPlot;
|
||||
caf::PdmChildArrayField<RimWellAllocationPlot*> m_storedWellAllocPlots;
|
||||
caf::PdmChildArrayField<RimFlowCharacteristicsPlot*> m_storedFlowCharacteristicsPlots;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user