mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add collection and feature to create saturation pressure plots
This commit is contained in:
parent
795ce019ae
commit
614a3628f0
@ -60,6 +60,8 @@
|
|||||||
#include "RimPltPlotCollection.h"
|
#include "RimPltPlotCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimRftPlotCollection.h"
|
#include "RimRftPlotCollection.h"
|
||||||
|
#include "RimSaturationPressurePlot.h"
|
||||||
|
#include "RimSaturationPressurePlotCollection.h"
|
||||||
#include "RimStimPlanColors.h"
|
#include "RimStimPlanColors.h"
|
||||||
#include "RimSummaryCase.h"
|
#include "RimSummaryCase.h"
|
||||||
#include "RimSummaryCaseCollection.h"
|
#include "RimSummaryCaseCollection.h"
|
||||||
@ -214,7 +216,7 @@ RiaApplication::RiaApplication(int& argc, char** argv)
|
|||||||
|
|
||||||
setWindowIcon(QIcon(":/AppLogo48x48.png"));
|
setWindowIcon(QIcon(":/AppLogo48x48.png"));
|
||||||
|
|
||||||
m_socketServer = new RiaSocketServer(this);
|
m_socketServer = new RiaSocketServer(this);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
m_startupDefaultDirectory = QDir::homePath();
|
m_startupDefaultDirectory = QDir::homePath();
|
||||||
@ -227,7 +229,7 @@ RiaApplication::RiaApplication(int& argc, char** argv)
|
|||||||
// The creation of a font is time consuming, so make sure you really need your own font
|
// The creation of a font is time consuming, so make sure you really need your own font
|
||||||
// instead of using the application font
|
// instead of using the application font
|
||||||
m_standardFont = RiaFontCache::getFont(RiaFontCache::FONT_SIZE_8);
|
m_standardFont = RiaFontCache::getFont(RiaFontCache::FONT_SIZE_8);
|
||||||
|
|
||||||
m_recentFileActionProvider = std::unique_ptr<RiuRecentFileActionProvider>(new RiuRecentFileActionProvider);
|
m_recentFileActionProvider = std::unique_ptr<RiuRecentFileActionProvider>(new RiuRecentFileActionProvider);
|
||||||
|
|
||||||
// Create main windows
|
// Create main windows
|
||||||
@ -660,13 +662,14 @@ bool RiaApplication::loadProject(const QString& projectFileName)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaApplication::loadAndUpdatePlotData()
|
void RiaApplication::loadAndUpdatePlotData()
|
||||||
{
|
{
|
||||||
RimWellLogPlotCollection* wlpColl = nullptr;
|
RimWellLogPlotCollection* wlpColl = nullptr;
|
||||||
RimSummaryPlotCollection* spColl = nullptr;
|
RimSummaryPlotCollection* spColl = nullptr;
|
||||||
RimSummaryCrossPlotCollection* scpColl = nullptr;
|
RimSummaryCrossPlotCollection* scpColl = nullptr;
|
||||||
RimFlowPlotCollection* flowColl = nullptr;
|
RimFlowPlotCollection* flowColl = nullptr;
|
||||||
RimRftPlotCollection* rftColl = nullptr;
|
RimRftPlotCollection* rftColl = nullptr;
|
||||||
RimPltPlotCollection* pltColl = nullptr;
|
RimPltPlotCollection* pltColl = nullptr;
|
||||||
RimGridCrossPlotCollection* gcpColl = nullptr;
|
RimGridCrossPlotCollection* gcpColl = nullptr;
|
||||||
|
RimSaturationPressurePlotCollection* sppColl = nullptr;
|
||||||
|
|
||||||
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->wellLogPlotCollection())
|
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->wellLogPlotCollection())
|
||||||
{
|
{
|
||||||
@ -696,6 +699,10 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
{
|
{
|
||||||
gcpColl = m_project->mainPlotCollection()->gridCrossPlotCollection();
|
gcpColl = m_project->mainPlotCollection()->gridCrossPlotCollection();
|
||||||
}
|
}
|
||||||
|
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->saturationPressurePlotCollection())
|
||||||
|
{
|
||||||
|
sppColl = m_project->mainPlotCollection()->saturationPressurePlotCollection();
|
||||||
|
}
|
||||||
|
|
||||||
size_t plotCount = 0;
|
size_t plotCount = 0;
|
||||||
plotCount += wlpColl ? wlpColl->wellLogPlots().size() : 0;
|
plotCount += wlpColl ? wlpColl->wellLogPlots().size() : 0;
|
||||||
@ -705,6 +712,7 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
plotCount += rftColl ? rftColl->rftPlots().size() : 0;
|
plotCount += rftColl ? rftColl->rftPlots().size() : 0;
|
||||||
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
|
||||||
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
|
plotCount += gcpColl ? gcpColl->gridCrossPlots().size() : 0;
|
||||||
|
plotCount += sppColl ? sppColl->plots().size() : 0;
|
||||||
|
|
||||||
if (plotCount > 0)
|
if (plotCount > 0)
|
||||||
{
|
{
|
||||||
@ -769,6 +777,15 @@ void RiaApplication::loadAndUpdatePlotData()
|
|||||||
plotProgress.incrementProgress();
|
plotProgress.incrementProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sppColl)
|
||||||
|
{
|
||||||
|
for (const auto& sppPlot : sppColl->plots())
|
||||||
|
{
|
||||||
|
sppPlot->loadDataAndUpdate();
|
||||||
|
plotProgress.incrementProgress();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1420,7 +1437,7 @@ void RiaApplication::createMainWindow()
|
|||||||
m_mainWindow->setDefaultWindowSize();
|
m_mainWindow->setDefaultWindowSize();
|
||||||
m_mainWindow->setDefaultToolbarVisibility();
|
m_mainWindow->setDefaultToolbarVisibility();
|
||||||
m_mainWindow->loadWinGeoAndDockToolBarLayout();
|
m_mainWindow->loadWinGeoAndDockToolBarLayout();
|
||||||
m_mainWindow->showWindow();
|
m_mainWindow->showWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1579,7 +1596,8 @@ void RiaApplication::closeMainPlotWindowIfOpenButHidden()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaApplication::addToRecentFiles(const QString& fileName)
|
void RiaApplication::addToRecentFiles(const QString& fileName)
|
||||||
{
|
{
|
||||||
CVF_ASSERT(m_recentFileActionProvider && "The provider needs to be created before any attempts to use the recent file actions");
|
CVF_ASSERT(m_recentFileActionProvider &&
|
||||||
|
"The provider needs to be created before any attempts to use the recent file actions");
|
||||||
m_recentFileActionProvider->addFileName(fileName);
|
m_recentFileActionProvider->addFileName(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1588,7 +1606,8 @@ void RiaApplication::addToRecentFiles(const QString& fileName)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<QAction*> RiaApplication::recentFileActions() const
|
std::vector<QAction*> RiaApplication::recentFileActions() const
|
||||||
{
|
{
|
||||||
CVF_ASSERT(m_recentFileActionProvider && "The provider needs to be created before any attempts to use the recent file actions");
|
CVF_ASSERT(m_recentFileActionProvider &&
|
||||||
|
"The provider needs to be created before any attempts to use the recent file actions");
|
||||||
return m_recentFileActionProvider->actions();
|
return m_recentFileActionProvider->actions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1852,8 +1871,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
|
|||||||
|
|
||||||
m_mainWindow->processMonitor()->stopMonitorWorkProcess();
|
m_mainWindow->processMonitor()->stopMonitorWorkProcess();
|
||||||
|
|
||||||
QMessageBox::warning(
|
QMessageBox::warning(m_mainWindow, "Script execution", "Failed to start script executable located at\n" + program);
|
||||||
m_mainWindow, "Script execution", "Failed to start script executable located at\n" + program);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1915,8 +1933,7 @@ void RiaApplication::applyPreferences()
|
|||||||
|
|
||||||
if (m_mainWindow && m_mainWindow->projectTreeView())
|
if (m_mainWindow && m_mainWindow->projectTreeView())
|
||||||
{
|
{
|
||||||
m_mainWindow->projectTreeView()->enableAppendOfClassNameToUiItemText(
|
m_mainWindow->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText());
|
||||||
m_preferences->appendClassNameToUiText());
|
|
||||||
if (mainPlotWindow())
|
if (mainPlotWindow())
|
||||||
mainPlotWindow()->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText());
|
mainPlotWindow()->projectTreeView()->enableAppendOfClassNameToUiItemText(m_preferences->appendClassNameToUiText());
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,16 @@ ${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotFeature.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicCreateSaturationPressurePlotsFeature.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SOURCE_GROUP_SOURCE_FILES
|
set (SOURCE_GROUP_SOURCE_FILES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.cpp)
|
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicCreateSaturationPressurePlotsFeature.cpp
|
||||||
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
${SOURCE_GROUP_HEADER_FILES}
|
${SOURCE_GROUP_HEADER_FILES}
|
||||||
|
@ -0,0 +1,117 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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 "RicCreateSaturationPressurePlotsFeature.h"
|
||||||
|
|
||||||
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RimEclipseResultCase.h"
|
||||||
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
#include "RimSaturationPressurePlot.h"
|
||||||
|
#include "RimSaturationPressurePlotCollection.h"
|
||||||
|
|
||||||
|
#include "RiuPlotMainWindowTools.h"
|
||||||
|
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT(RicCreateSaturationPressurePlotsFeature, "RicCreateSaturationPressurePlotsFeature");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicCreateSaturationPressurePlotsFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicCreateSaturationPressurePlotsFeature::onActionTriggered(bool isChecked)
|
||||||
|
{
|
||||||
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
|
|
||||||
|
bool launchedFromPlotCollection = true;
|
||||||
|
RimSaturationPressurePlotCollection* collection =
|
||||||
|
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimSaturationPressurePlotCollection>();
|
||||||
|
|
||||||
|
if (!collection)
|
||||||
|
{
|
||||||
|
collection = project->mainPlotCollection()->saturationPressurePlotCollection();
|
||||||
|
launchedFromPlotCollection = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<RimEclipseResultCase*> eclipseCases;
|
||||||
|
{
|
||||||
|
RiaApplication* app = RiaApplication::instance();
|
||||||
|
std::vector<RimCase*> cases;
|
||||||
|
app->project()->allCases(cases);
|
||||||
|
for (auto* rimCase : cases)
|
||||||
|
{
|
||||||
|
auto erc = dynamic_cast<RimEclipseResultCase*>(rimCase);
|
||||||
|
if (erc)
|
||||||
|
{
|
||||||
|
eclipseCases.push_back(erc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RimEclipseResultCase* eclipseResultCase = nullptr;
|
||||||
|
if (eclipseCases.size() == 1)
|
||||||
|
{
|
||||||
|
eclipseResultCase = eclipseCases[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (eclipseResultCase)
|
||||||
|
{
|
||||||
|
eclipseResultCase->ensureReservoirCaseIsOpen();
|
||||||
|
collection->createSaturationPressurePlots(eclipseResultCase);
|
||||||
|
|
||||||
|
std::vector<RimSaturationPressurePlot*> plots = collection->plots();
|
||||||
|
for (auto plot : plots)
|
||||||
|
{
|
||||||
|
plot->loadDataAndUpdate();
|
||||||
|
plot->zoomAll();
|
||||||
|
plot->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
collection->updateAllRequiredEditors();
|
||||||
|
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicCreateSaturationPressurePlotsFeature::setupActionLook(QAction* actionToSetup)
|
||||||
|
{
|
||||||
|
RimSaturationPressurePlotCollection* collection =
|
||||||
|
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimSaturationPressurePlotCollection>();
|
||||||
|
if (!collection)
|
||||||
|
{
|
||||||
|
actionToSetup->setText("New Grid Cross Plot from 3d View");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actionToSetup->setText("Create Saturation Pressure Plots");
|
||||||
|
}
|
||||||
|
actionToSetup->setIcon(QIcon(":/SummaryXPlotsLight16x16.png"));
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "cafCmdFeature.h"
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RicCreateSaturationPressurePlotsFeature : public caf::CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool isCommandEnabled() override;
|
||||||
|
void onActionTriggered(bool isChecked) override;
|
||||||
|
void setupActionLook(QAction* actionToSetup) override;
|
||||||
|
};
|
@ -4,13 +4,18 @@ ${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.h
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.h
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.h
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlot.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlotCollection.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SOURCE_GROUP_SOURCE_FILES
|
set (SOURCE_GROUP_SOURCE_FILES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.cpp)
|
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlot.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlotCollection.cpp
|
||||||
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
${SOURCE_GROUP_HEADER_FILES}
|
${SOURCE_GROUP_HEADER_FILES}
|
||||||
|
@ -151,6 +151,8 @@ QImage RimGridCrossPlot::snapshotWindowContent()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::zoomAll()
|
void RimGridCrossPlot::zoomAll()
|
||||||
{
|
{
|
||||||
|
if (!m_qwtPlot) return;
|
||||||
|
|
||||||
setAutoZoomForAllAxes(true);
|
setAutoZoomForAllAxes(true);
|
||||||
updateAxisInQwt(RiaDefines::PLOT_AXIS_LEFT);
|
updateAxisInQwt(RiaDefines::PLOT_AXIS_LEFT);
|
||||||
updateAxisInQwt(RiaDefines::PLOT_AXIS_BOTTOM);
|
updateAxisInQwt(RiaDefines::PLOT_AXIS_BOTTOM);
|
||||||
@ -277,6 +279,8 @@ void RimGridCrossPlot::updateAxisScaling()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::updateAxisDisplay()
|
void RimGridCrossPlot::updateAxisDisplay()
|
||||||
{
|
{
|
||||||
|
if (!m_qwtPlot) return;
|
||||||
|
|
||||||
updateAxisInQwt(RiaDefines::PLOT_AXIS_BOTTOM);
|
updateAxisInQwt(RiaDefines::PLOT_AXIS_BOTTOM);
|
||||||
updateAxisInQwt(RiaDefines::PLOT_AXIS_LEFT);
|
updateAxisInQwt(RiaDefines::PLOT_AXIS_LEFT);
|
||||||
|
|
||||||
@ -663,6 +667,8 @@ QString RimGridCrossPlot::yAxisParameterString() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::updateAxisInQwt(RiaDefines::PlotAxis axisType)
|
void RimGridCrossPlot::updateAxisInQwt(RiaDefines::PlotAxis axisType)
|
||||||
{
|
{
|
||||||
|
if (!m_qwtPlot) return;
|
||||||
|
|
||||||
RimPlotAxisProperties* axisProperties = m_xAxisProperties();
|
RimPlotAxisProperties* axisProperties = m_xAxisProperties();
|
||||||
QString axisParameterString = xAxisParameterString();
|
QString axisParameterString = xAxisParameterString();
|
||||||
|
|
||||||
@ -799,6 +805,22 @@ std::vector<const QwtPlotCurve*> RimGridCrossPlot::visibleQwtCurves() const
|
|||||||
return plotCurves;
|
return plotCurves;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimPlotAxisProperties* RimGridCrossPlot::xAxisProperties()
|
||||||
|
{
|
||||||
|
return m_xAxisProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimPlotAxisProperties* RimGridCrossPlot::yAxisProperties()
|
||||||
|
{
|
||||||
|
return m_yAxisProperties();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Name Configuration
|
/// Name Configuration
|
||||||
///
|
///
|
||||||
|
@ -106,6 +106,9 @@ protected:
|
|||||||
void updateAxisFromQwt(RiaDefines::PlotAxis axisType);
|
void updateAxisFromQwt(RiaDefines::PlotAxis axisType);
|
||||||
std::vector<const QwtPlotCurve*> visibleQwtCurves() const;
|
std::vector<const QwtPlotCurve*> visibleQwtCurves() const;
|
||||||
|
|
||||||
|
RimPlotAxisProperties* xAxisProperties();
|
||||||
|
RimPlotAxisProperties* yAxisProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_showLegend;
|
caf::PdmField<bool> m_showLegend;
|
||||||
caf::PdmField<int> m_legendFontSize;
|
caf::PdmField<int> m_legendFontSize;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "cafPdmChildArrayField.h"
|
#include "cafPdmChildArrayField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
@ -43,8 +42,4 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildArrayField<RimGridCrossPlot*> m_gridCrossPlots;
|
caf::PdmChildArrayField<RimGridCrossPlot*> m_gridCrossPlots;
|
||||||
|
|
||||||
public:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
#include "cvfqtUtils.h"
|
#include "cvfqtUtils.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "RimEclipseResultCase.h"
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimGridCrossPlotCurveSet, "GridCrossPlotCurveSet");
|
CAF_PDM_SOURCE_INIT(RimGridCrossPlotCurveSet, "GridCrossPlotCurveSet");
|
||||||
|
|
||||||
@ -901,6 +902,22 @@ bool RimGridCrossPlotCurveSet::isYAxisLogarithmic() const
|
|||||||
return parent->isYAxisLogarithmic();
|
return parent->isYAxisLogarithmic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimGridCrossPlotCurveSet::setFromCaseAndEquilibriumRegion(RimEclipseResultCase* eclipseCase, const QString& dynamicResultName)
|
||||||
|
{
|
||||||
|
m_case = eclipseCase;
|
||||||
|
|
||||||
|
m_xAxisProperty->setEclipseCase(eclipseCase);
|
||||||
|
m_xAxisProperty->setResultType(RiaDefines::DYNAMIC_NATIVE);
|
||||||
|
m_xAxisProperty->setResultVariable(dynamicResultName);
|
||||||
|
|
||||||
|
m_yAxisProperty->setEclipseCase(eclipseCase);
|
||||||
|
m_yAxisProperty->setResultType(RiaDefines::STATIC_NATIVE);
|
||||||
|
m_yAxisProperty->setResultVariable("DEPTH");
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -40,6 +40,7 @@ class RimCase;
|
|||||||
class RimGridCrossPlotCurve;
|
class RimGridCrossPlotCurve;
|
||||||
class RimGridView;
|
class RimGridView;
|
||||||
class RimEclipseCase;
|
class RimEclipseCase;
|
||||||
|
class RimEclipseResultCase;
|
||||||
class RimEclipseCellColors;
|
class RimEclipseCellColors;
|
||||||
class RimEclipseResultDefinition;
|
class RimEclipseResultDefinition;
|
||||||
class RimRegularLegendConfig;
|
class RimRegularLegendConfig;
|
||||||
@ -120,6 +121,8 @@ public:
|
|||||||
bool isXAxisLogarithmic() const;
|
bool isXAxisLogarithmic() const;
|
||||||
bool isYAxisLogarithmic() const;
|
bool isYAxisLogarithmic() const;
|
||||||
|
|
||||||
|
void setFromCaseAndEquilibriumRegion(RimEclipseResultCase* eclipseResultCase, const QString& dynamicResultName);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
void onLoadDataAndUpdate(bool updateParentPlot);
|
void onLoadDataAndUpdate(bool updateParentPlot);
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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 "RimSaturationPressurePlot.h"
|
||||||
|
|
||||||
|
#include "RimEclipseResultCase.h"
|
||||||
|
#include "RimGridCrossPlotCurveSet.h"
|
||||||
|
#include "RimPlotAxisAnnotation.h"
|
||||||
|
#include "RimPlotAxisProperties.h"
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(RimSaturationPressurePlot, "RimSaturationPressurePlot");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSaturationPressurePlot::RimSaturationPressurePlot()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("Saturation Pressure Plot", ":/SummaryXPlotLight16x16.png", "", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion(RimEclipseResultCase* eclipseResultCase, int equilibriumRegion)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
|
||||||
|
curveSet->setFromCaseAndEquilibriumRegion(eclipseResultCase, "PRESSURE");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
|
||||||
|
curveSet->setFromCaseAndEquilibriumRegion(eclipseResultCase, "PDEW");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
|
||||||
|
curveSet->setFromCaseAndEquilibriumRegion(eclipseResultCase, "PBUB");
|
||||||
|
}
|
||||||
|
|
||||||
|
RimPlotAxisProperties* yAxisProps = yAxisProperties();
|
||||||
|
|
||||||
|
yAxisProps->setInvertedAxis(true);
|
||||||
|
|
||||||
|
{
|
||||||
|
RimPlotAxisAnnotation* annotation = new RimPlotAxisAnnotation;
|
||||||
|
annotation->setEquilibriumData(eclipseResultCase, equilibriumRegion, RimPlotAxisAnnotation::PL_EQUIL_GAS_OIL_CONTACT);
|
||||||
|
|
||||||
|
yAxisProps->appendAnnotation(annotation);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
RimPlotAxisAnnotation* annotation = new RimPlotAxisAnnotation;
|
||||||
|
annotation->setEquilibriumData(eclipseResultCase, equilibriumRegion, RimPlotAxisAnnotation::PL_EQUIL_WATER_OIL_CONTACT);
|
||||||
|
|
||||||
|
yAxisProps->appendAnnotation(annotation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSaturationPressurePlot::initAfterRead()
|
||||||
|
{
|
||||||
|
yAxisProperties()->showAnnotationObjectsInProjectTree();
|
||||||
|
|
||||||
|
RimGridCrossPlot::initAfterRead();
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "RimGridCrossPlot.h"
|
||||||
|
|
||||||
|
class RimEclipseResultCase;
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
class RimSaturationPressurePlot : public RimGridCrossPlot
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimSaturationPressurePlot();
|
||||||
|
|
||||||
|
void assignCaseAndEquilibriumRegion(RimEclipseResultCase* eclipseResultCase, int equilibriumRegion);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void initAfterRead() override;
|
||||||
|
};
|
@ -0,0 +1,82 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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 "RimSaturationPressurePlotCollection.h"
|
||||||
|
|
||||||
|
#include "RigEclipseCaseData.h"
|
||||||
|
#include "RigEquil.h"
|
||||||
|
|
||||||
|
#include "RimEclipseResultCase.h"
|
||||||
|
#include "RimSaturationPressurePlot.h"
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(RimSaturationPressurePlotCollection, "RimSaturationPressurePlotCollection");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSaturationPressurePlotCollection::RimSaturationPressurePlotCollection()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("Saturation Pressure Plots", ":/SummaryXPlotsLight16x16.png", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_saturationPressurePlots, "SaturationPressurePlots", "Saturation Pressure Plots", "", "", "");
|
||||||
|
m_saturationPressurePlots.uiCapability()->setUiHidden(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSaturationPressurePlotCollection::~RimSaturationPressurePlotCollection() {}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSaturationPressurePlotCollection::createSaturationPressurePlots(RimEclipseResultCase* eclipseResultCase)
|
||||||
|
{
|
||||||
|
if (!eclipseResultCase) return;
|
||||||
|
|
||||||
|
RigEclipseCaseData* eclipseCaseData = eclipseResultCase->eclipseCaseData();
|
||||||
|
if (!eclipseCaseData) return;
|
||||||
|
|
||||||
|
std::vector<RigEquil> equilData = eclipseCaseData->equilData();
|
||||||
|
for (size_t i = 0; i < equilData.size(); i++)
|
||||||
|
{
|
||||||
|
RimSaturationPressurePlot* plot = new RimSaturationPressurePlot();
|
||||||
|
plot->setAsPlotMdiWindow();
|
||||||
|
|
||||||
|
int equilibriumRegion = static_cast<int>(i) + 1;
|
||||||
|
plot->assignCaseAndEquilibriumRegion(eclipseResultCase, equilibriumRegion);
|
||||||
|
|
||||||
|
m_saturationPressurePlots.push_back(plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimSaturationPressurePlot*> RimSaturationPressurePlotCollection::plots()
|
||||||
|
{
|
||||||
|
return m_saturationPressurePlots.childObjects();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSaturationPressurePlotCollection::deleteAllChildObjects()
|
||||||
|
{
|
||||||
|
m_saturationPressurePlots.deleteAllChildObjects();
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2019- 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.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
|
class RimSaturationPressurePlot;
|
||||||
|
class RimEclipseResultCase;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimSaturationPressurePlotCollection : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimSaturationPressurePlotCollection();
|
||||||
|
~RimSaturationPressurePlotCollection() override;
|
||||||
|
|
||||||
|
void createSaturationPressurePlots(RimEclipseResultCase* eclipseResultCase);
|
||||||
|
|
||||||
|
std::vector<RimSaturationPressurePlot*> plots();
|
||||||
|
void deleteAllChildObjects();
|
||||||
|
|
||||||
|
private:
|
||||||
|
caf::PdmChildArrayField<RimSaturationPressurePlot*> m_saturationPressurePlots;
|
||||||
|
};
|
@ -95,6 +95,7 @@
|
|||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPltPlot.h"
|
#include "RimWellPltPlot.h"
|
||||||
#include "RimWellRftPlot.h"
|
#include "RimWellRftPlot.h"
|
||||||
|
#include "RimSaturationPressurePlotCollection.h"
|
||||||
|
|
||||||
#include "RimEllipseFractureTemplate.h"
|
#include "RimEllipseFractureTemplate.h"
|
||||||
#include "RimStimPlanFractureTemplate.h"
|
#include "RimStimPlanFractureTemplate.h"
|
||||||
@ -470,6 +471,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
{
|
{
|
||||||
menuBuilder << "RicCreateGridCrossPlotFeature";
|
menuBuilder << "RicCreateGridCrossPlotFeature";
|
||||||
}
|
}
|
||||||
|
else if (dynamic_cast<RimSaturationPressurePlotCollection*>(uiItem))
|
||||||
|
{
|
||||||
|
menuBuilder << "RicCreateSaturationPressurePlotsFeature";
|
||||||
|
}
|
||||||
else if (dynamic_cast<RimGridCrossPlot*>(uiItem))
|
else if (dynamic_cast<RimGridCrossPlot*>(uiItem))
|
||||||
{
|
{
|
||||||
menuBuilder << "RicPasteGridCrossPlotCurveSetFeature";
|
menuBuilder << "RicPasteGridCrossPlotCurveSetFeature";
|
||||||
|
@ -19,13 +19,14 @@
|
|||||||
|
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
|
|
||||||
#include "RimGridCrossPlot.h"
|
|
||||||
#include "RimGridCrossPlotCollection.h"
|
|
||||||
#include "RimFlowCharacteristicsPlot.h"
|
#include "RimFlowCharacteristicsPlot.h"
|
||||||
#include "RimFlowPlotCollection.h"
|
#include "RimFlowPlotCollection.h"
|
||||||
|
#include "RimGridCrossPlot.h"
|
||||||
|
#include "RimGridCrossPlotCollection.h"
|
||||||
#include "RimPltPlotCollection.h"
|
#include "RimPltPlotCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimRftPlotCollection.h"
|
#include "RimRftPlotCollection.h"
|
||||||
|
#include "RimSaturationPressurePlotCollection.h"
|
||||||
#include "RimSummaryCrossPlotCollection.h"
|
#include "RimSummaryCrossPlotCollection.h"
|
||||||
#include "RimSummaryPlotCollection.h"
|
#include "RimSummaryPlotCollection.h"
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
@ -70,6 +71,9 @@ RimMainPlotCollection::RimMainPlotCollection()
|
|||||||
CAF_PDM_InitFieldNoDefault(&m_gridCrossPlotCollection, "Rim3dCrossPlotCollection", "3d Cross Plots", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_gridCrossPlotCollection, "Rim3dCrossPlotCollection", "3d Cross Plots", "", "", "");
|
||||||
m_gridCrossPlotCollection.uiCapability()->setUiHidden(true);
|
m_gridCrossPlotCollection.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_saturationPressurePlotCollection, "RimSaturationPressurePlotCollection", "Saturation Pressure Plots", "", "", "");
|
||||||
|
m_saturationPressurePlotCollection.uiCapability()->setUiHidden(true);
|
||||||
|
|
||||||
m_wellLogPlotCollection = new RimWellLogPlotCollection();
|
m_wellLogPlotCollection = new RimWellLogPlotCollection();
|
||||||
m_rftPlotCollection = new RimRftPlotCollection();
|
m_rftPlotCollection = new RimRftPlotCollection();
|
||||||
m_pltPlotCollection = new RimPltPlotCollection();
|
m_pltPlotCollection = new RimPltPlotCollection();
|
||||||
@ -77,6 +81,7 @@ RimMainPlotCollection::RimMainPlotCollection()
|
|||||||
m_summaryCrossPlotCollection = new RimSummaryCrossPlotCollection();
|
m_summaryCrossPlotCollection = new RimSummaryCrossPlotCollection();
|
||||||
m_flowPlotCollection = new RimFlowPlotCollection();
|
m_flowPlotCollection = new RimFlowPlotCollection();
|
||||||
m_gridCrossPlotCollection = new RimGridCrossPlotCollection;
|
m_gridCrossPlotCollection = new RimGridCrossPlotCollection;
|
||||||
|
m_saturationPressurePlotCollection = new RimSaturationPressurePlotCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -158,6 +163,14 @@ RimGridCrossPlotCollection* RimMainPlotCollection::gridCrossPlotCollection()
|
|||||||
return m_gridCrossPlotCollection();
|
return m_gridCrossPlotCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSaturationPressurePlotCollection* RimMainPlotCollection::saturationPressurePlotCollection()
|
||||||
|
{
|
||||||
|
return m_saturationPressurePlotCollection();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -170,6 +183,7 @@ void RimMainPlotCollection::deleteAllContainedObjects()
|
|||||||
m_summaryCrossPlotCollection()->deleteAllChildObjects();
|
m_summaryCrossPlotCollection()->deleteAllChildObjects();
|
||||||
m_gridCrossPlotCollection->deleteAllChildObjects();
|
m_gridCrossPlotCollection->deleteAllChildObjects();
|
||||||
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();
|
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();
|
||||||
|
m_saturationPressurePlotCollection()->deleteAllChildObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,30 +2,29 @@
|
|||||||
//
|
//
|
||||||
// Copyright (C) 2015- Statoil ASA
|
// Copyright (C) 2015- Statoil ASA
|
||||||
// Copyright (C) 2015- Ceetron Solutions AS
|
// Copyright (C) 2015- Ceetron Solutions AS
|
||||||
//
|
//
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cafPdmObject.h"
|
|
||||||
#include "cafPdmField.h"
|
|
||||||
#include "cafPdmChildField.h"
|
#include "cafPdmChildField.h"
|
||||||
|
#include "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
class RimWellLogPlotCollection;
|
class RimWellLogPlotCollection;
|
||||||
class RimRftPlotCollection;
|
class RimRftPlotCollection;
|
||||||
@ -37,46 +36,49 @@ class RimSummaryPlot;
|
|||||||
class RifReaderEclipseSummary;
|
class RifReaderEclipseSummary;
|
||||||
class RimEclipseResultCase;
|
class RimEclipseResultCase;
|
||||||
class RimFlowPlotCollection;
|
class RimFlowPlotCollection;
|
||||||
|
class RimSaturationPressurePlotCollection;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RimMainPlotCollection : public caf::PdmObject
|
class RimMainPlotCollection : public caf::PdmObject
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RimMainPlotCollection();
|
RimMainPlotCollection();
|
||||||
~RimMainPlotCollection() override;
|
~RimMainPlotCollection() override;
|
||||||
|
|
||||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||||
RimRftPlotCollection* rftPlotCollection();
|
RimRftPlotCollection* rftPlotCollection();
|
||||||
RimPltPlotCollection* pltPlotCollection();
|
RimPltPlotCollection* pltPlotCollection();
|
||||||
RimSummaryPlotCollection* summaryPlotCollection();
|
RimSummaryPlotCollection* summaryPlotCollection();
|
||||||
RimSummaryCrossPlotCollection* summaryCrossPlotCollection();
|
RimSummaryCrossPlotCollection* summaryCrossPlotCollection();
|
||||||
RimFlowPlotCollection* flowPlotCollection();
|
RimFlowPlotCollection* flowPlotCollection();
|
||||||
RimGridCrossPlotCollection* gridCrossPlotCollection();
|
RimGridCrossPlotCollection* gridCrossPlotCollection();
|
||||||
|
RimSaturationPressurePlotCollection* saturationPressurePlotCollection();
|
||||||
|
|
||||||
|
void deleteAllContainedObjects();
|
||||||
|
void updateCurrentTimeStepInPlots();
|
||||||
|
void updatePlotsWithFormations();
|
||||||
|
void updatePlotsWithCompletions();
|
||||||
|
void deleteAllCachedData();
|
||||||
|
|
||||||
void deleteAllContainedObjects();
|
|
||||||
void updateCurrentTimeStepInPlots();
|
|
||||||
void updatePlotsWithFormations();
|
|
||||||
void updatePlotsWithCompletions();
|
|
||||||
void deleteAllCachedData();
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
caf::PdmFieldHandle* objectToggleField() override;
|
caf::PdmFieldHandle* objectToggleField() override;
|
||||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
|
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
|
||||||
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
|
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
|
||||||
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
|
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
|
||||||
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
|
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
|
||||||
caf::PdmChildField<RimSummaryCrossPlotCollection*> m_summaryCrossPlotCollection;
|
caf::PdmChildField<RimSummaryCrossPlotCollection*> m_summaryCrossPlotCollection;
|
||||||
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;
|
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;
|
||||||
caf::PdmChildField<RimGridCrossPlotCollection*> m_gridCrossPlotCollection;
|
caf::PdmChildField<RimGridCrossPlotCollection*> m_gridCrossPlotCollection;
|
||||||
|
caf::PdmChildField<RimSaturationPressurePlotCollection*> m_saturationPressurePlotCollection;
|
||||||
|
|
||||||
caf::PdmField<bool> m_show;
|
caf::PdmField<bool> m_show;
|
||||||
};
|
};
|
||||||
|
@ -75,6 +75,18 @@ void RimPlotAxisAnnotation::setValue(double value)
|
|||||||
m_value = value;
|
m_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimPlotAxisAnnotation::setEquilibriumData(RimEclipseCase* eclipseCase,
|
||||||
|
int equilibriumRegion,
|
||||||
|
PlotAxisAnnotationType annotationType)
|
||||||
|
{
|
||||||
|
m_sourceCase = eclipseCase;
|
||||||
|
m_equilNum = equilibriumRegion;
|
||||||
|
m_annotationType = annotationType;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -166,7 +178,7 @@ QList<caf::PdmOptionItemInfo> RimPlotAxisAnnotation::calculateValueOptions(const
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < equilItems().size(); i++)
|
for (int i = 0; i < equilItems().size(); i++)
|
||||||
{
|
{
|
||||||
QString uiText = QString("%1").arg(i+1);
|
QString uiText = QString("%1").arg(i + 1);
|
||||||
options.push_back(caf::PdmOptionItemInfo(uiText, i));
|
options.push_back(caf::PdmOptionItemInfo(uiText, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,7 +212,7 @@ void RimPlotAxisAnnotation::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigEquil RimPlotAxisAnnotation::selectedItem() const
|
RigEquil RimPlotAxisAnnotation::selectedItem() const
|
||||||
{
|
{
|
||||||
int index = m_equilNum() -1;
|
int index = m_equilNum() - 1;
|
||||||
|
|
||||||
if (index < equilItems().size())
|
if (index < equilItems().size())
|
||||||
{
|
{
|
||||||
|
@ -50,6 +50,8 @@ public:
|
|||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
void setValue(double value);
|
void setValue(double value);
|
||||||
|
|
||||||
|
void setEquilibriumData(RimEclipseCase* eclipseCase, int equilibriumRegion, PlotAxisAnnotationType annotationType);
|
||||||
|
|
||||||
QString name() const;
|
QString name() const;
|
||||||
double value() const;
|
double value() const;
|
||||||
|
|
||||||
@ -65,17 +67,16 @@ protected:
|
|||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RigEquil selectedItem() const;
|
RigEquil selectedItem() const;
|
||||||
std::vector<RigEquil> equilItems() const;
|
std::vector<RigEquil> equilItems() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<ExportKeywordEnum> m_annotationType;
|
caf::PdmField<ExportKeywordEnum> m_annotationType;
|
||||||
|
|
||||||
caf::PdmField<bool> m_isActive;
|
caf::PdmField<bool> m_isActive;
|
||||||
caf::PdmField<QString> m_name;
|
caf::PdmField<QString> m_name;
|
||||||
caf::PdmField<double> m_value;
|
caf::PdmField<double> m_value;
|
||||||
|
|
||||||
caf::PdmPtrField<RimEclipseCase*> m_sourceCase;
|
caf::PdmPtrField<RimEclipseCase*> m_sourceCase;
|
||||||
caf::PdmField<int> m_equilNum;
|
caf::PdmField<int> m_equilNum;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -99,7 +99,7 @@ RimPlotAxisProperties::RimPlotAxisProperties()
|
|||||||
CAF_PDM_InitFieldNoDefault(&m_annotations, "Annotations", "", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_annotations, "Annotations", "", "", "", "");
|
||||||
|
|
||||||
m_annotations.uiCapability()->setUiHidden(true);
|
m_annotations.uiCapability()->setUiHidden(true);
|
||||||
m_annotations.uiCapability()->setUiTreeChildrenHidden(true);
|
// m_annotations.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
|
||||||
updateOptionSensitivity();
|
updateOptionSensitivity();
|
||||||
}
|
}
|
||||||
@ -316,6 +316,14 @@ std::vector<RimPlotAxisAnnotation*> RimPlotAxisProperties::annotations() const
|
|||||||
return m_annotations.childObjects();
|
return m_annotations.childObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimPlotAxisProperties::appendAnnotation(RimPlotAxisAnnotation* annotation)
|
||||||
|
{
|
||||||
|
m_annotations.push_back(annotation);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -324,6 +332,22 @@ bool RimPlotAxisProperties::isActive() const
|
|||||||
return m_isActive;
|
return m_isActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimPlotAxisProperties::setInvertedAxis(bool enable)
|
||||||
|
{
|
||||||
|
m_isAxisInverted = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimPlotAxisProperties::showAnnotationObjectsInProjectTree()
|
||||||
|
{
|
||||||
|
m_annotations.uiCapability()->setUiTreeChildrenHidden(false);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -72,6 +72,7 @@ public:
|
|||||||
bool isAxisInverted() const;
|
bool isAxisInverted() const;
|
||||||
|
|
||||||
std::vector<RimPlotAxisAnnotation*> annotations() const;
|
std::vector<RimPlotAxisAnnotation*> annotations() const;
|
||||||
|
void appendAnnotation(RimPlotAxisAnnotation* annotation);
|
||||||
|
|
||||||
caf::PdmField<QString> customTitle;
|
caf::PdmField<QString> customTitle;
|
||||||
caf::PdmField<int> titleFontSize;
|
caf::PdmField<int> titleFontSize;
|
||||||
@ -87,6 +88,9 @@ public:
|
|||||||
caf::PdmField<int> valuesFontSize;
|
caf::PdmField<int> valuesFontSize;
|
||||||
|
|
||||||
bool isActive() const;
|
bool isActive() const;
|
||||||
|
|
||||||
|
void setInvertedAxis(bool enable);
|
||||||
|
void showAnnotationObjectsInProjectTree();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "RimFractureTemplate.h"
|
#include "RimFractureTemplate.h"
|
||||||
#include "RimFractureTemplateCollection.h"
|
#include "RimFractureTemplateCollection.h"
|
||||||
#include "RimGridCrossPlotCollection.h"
|
#include "RimGridCrossPlotCollection.h"
|
||||||
|
#include "RimSaturationPressurePlotCollection.h"
|
||||||
#include "RimValveTemplate.h"
|
#include "RimValveTemplate.h"
|
||||||
#include "RimValveTemplateCollection.h"
|
#include "RimValveTemplateCollection.h"
|
||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
@ -1246,6 +1247,11 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
|||||||
{
|
{
|
||||||
itemCollection->add(mainPlotCollection->gridCrossPlotCollection());
|
itemCollection->add(mainPlotCollection->gridCrossPlotCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mainPlotCollection->saturationPressurePlotCollection())
|
||||||
|
{
|
||||||
|
itemCollection->add(mainPlotCollection->saturationPressurePlotCollection());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user