mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add reload and delete of pressure/depth data
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
#include "RimPlotDataFilterCollection.h"
|
||||
#include "RimPlotDataFilterItem.h"
|
||||
#include "RimPltPlotCollection.h"
|
||||
#include "RimPressureDepthData.h"
|
||||
#include "RimPressureTable.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimRftCase.h"
|
||||
@@ -133,6 +134,7 @@
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryMultiPlotCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryTimeAxisProperties.h"
|
||||
#include "RimSurface.h"
|
||||
#include "RimSurfaceCollection.h"
|
||||
#include "RimValveTemplate.h"
|
||||
@@ -185,7 +187,6 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#include "RimSummaryTimeAxisProperties.h"
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1082,6 +1083,11 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder << "RicNewRftWellLogPlotFeature";
|
||||
}
|
||||
else if ( dynamic_cast<RimPressureDepthData*>( firstUiItem ) )
|
||||
{
|
||||
menuBuilder << "RicOpenInTextEditorFeature";
|
||||
menuBuilder << "RicReloadPressureDepthDataFeature";
|
||||
}
|
||||
|
||||
if ( dynamic_cast<Rim3dView*>( firstUiItem ) )
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "RifKeywordVectorParser.h"
|
||||
|
||||
#include "RimCsvUserData.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimObservedEclipseUserData.h"
|
||||
#include "RimObservedFmuRftData.h"
|
||||
#include "RimObservedSummaryData.h"
|
||||
@@ -112,6 +113,14 @@ std::vector<RimPressureDepthData*> RimObservedDataCollection::allPressureDepthDa
|
||||
return m_observedPressureDepthArray.children();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimObservedDataCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimMainPlotCollection::current()->loadDataAndUpdateAllPlots();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
|
||||
private:
|
||||
bool fileExists( const QString& fileName, QString* errorText = nullptr );
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimObservedSummaryData*> m_observedDataArray;
|
||||
|
||||
@@ -38,6 +38,16 @@ RimPressureDepthData::RimPressureDepthData()
|
||||
m_wells.xmlCapability()->disableIO();
|
||||
m_wells.uiCapability()->setUiReadOnly( true );
|
||||
m_wells.registerGetMethod( this, &RimPressureDepthData::wellNames );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimPressureDepthData::filePath() const
|
||||
{
|
||||
return m_filePath().path();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -53,7 +63,7 @@ void RimPressureDepthData::setFilePath( const QString& path )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPressureDepthData::createRftReaderInterface()
|
||||
{
|
||||
m_fmuRftReader = new RifReaderPressureDepthData( m_filePath );
|
||||
m_fmuRftReader = new RifReaderPressureDepthData( m_filePath().path() );
|
||||
m_fmuRftReader->load();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "RifReaderPressureDepthData.h"
|
||||
|
||||
#include "cafFilePath.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmProxyValueField.h"
|
||||
@@ -35,6 +36,7 @@ class RimPressureDepthData : public RimNamedObject
|
||||
public:
|
||||
RimPressureDepthData();
|
||||
|
||||
QString filePath() const;
|
||||
void setFilePath( const QString& path );
|
||||
void createRftReaderInterface();
|
||||
RifReaderRftInterface* rftReader();
|
||||
@@ -45,6 +47,6 @@ public:
|
||||
private:
|
||||
cvf::ref<RifReaderPressureDepthData> m_fmuRftReader;
|
||||
|
||||
caf::PdmField<QString> m_filePath;
|
||||
caf::PdmField<caf::FilePath> m_filePath;
|
||||
caf::PdmProxyValueField<std::vector<QString>> m_wells;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user