mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2632 Export Completions : Show settings for avalable completions types
This commit is contained in:
parent
c759ef71b9
commit
7a09b9a146
@ -71,6 +71,10 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
||||
|
||||
CAF_PDM_InitField(&excludeMainBoreForFishbones, "ExcludeMainBoreForFishbones", false, " Exclude Main Bore Transmissibility", "", "", "");
|
||||
m_displayForSimWell = true;
|
||||
|
||||
m_fracturesEnabled = true;
|
||||
m_perforationsEnabled = true;
|
||||
m_fishbonesEnabled = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -89,6 +93,30 @@ void RicExportCompletionDataSettingsUi::showForWellPath()
|
||||
m_displayForSimWell = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enableFractures(bool enable)
|
||||
{
|
||||
m_fracturesEnabled = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enablePerforations(bool enable)
|
||||
{
|
||||
m_perforationsEnabled = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enableFishbone(bool enable)
|
||||
{
|
||||
m_fishbonesEnabled = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -141,37 +169,58 @@ QList<caf::PdmOptionItemInfo> RicExportCompletionDataSettingsUi::calculateValueO
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* generalExportSettings = uiOrdering.addNewGroup("General Export Settings");
|
||||
generalExportSettings->add(&folder);
|
||||
generalExportSettings->add(&caseToApply);
|
||||
generalExportSettings->add(&compdatExport);
|
||||
generalExportSettings->add(&useLateralNTG);
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("File Settings");
|
||||
|
||||
group->add(&folder);
|
||||
group->add(&fileSplit);
|
||||
}
|
||||
|
||||
generalExportSettings->add(&fileSplit);
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Settings");
|
||||
|
||||
group->add(&caseToApply);
|
||||
group->add(&compdatExport);
|
||||
group->add(&useLateralNTG);
|
||||
}
|
||||
|
||||
if (!m_displayForSimWell)
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup("Visible Completions");
|
||||
|
||||
group->add(&includeFishbones);
|
||||
group->add(&excludeMainBoreForFishbones);
|
||||
if (!includeFishbones) excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(true);
|
||||
else excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(false);
|
||||
|
||||
group->add(&includePerforations);
|
||||
group->add(&timeStep);
|
||||
if (!includePerforations) timeStep.uiCapability()->setUiReadOnly(true);
|
||||
else timeStep.uiCapability()->setUiReadOnly(false);
|
||||
|
||||
group->add(&includeFractures);
|
||||
|
||||
if (compdatExport == WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
|
||||
if (!m_displayForSimWell)
|
||||
{
|
||||
includeFractures.uiCapability()->setUiReadOnly(true);
|
||||
if (m_fishbonesEnabled)
|
||||
{
|
||||
group->add(&includeFishbones);
|
||||
group->add(&excludeMainBoreForFishbones);
|
||||
if (!includeFishbones)
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(true);
|
||||
else
|
||||
excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
|
||||
if (m_perforationsEnabled)
|
||||
{
|
||||
group->add(&includePerforations);
|
||||
group->add(&timeStep);
|
||||
if (!includePerforations)
|
||||
timeStep.uiCapability()->setUiReadOnly(true);
|
||||
else
|
||||
timeStep.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
else if (compdatExport == TRANSMISSIBILITIES)
|
||||
|
||||
if (m_fracturesEnabled)
|
||||
{
|
||||
includeFractures.uiCapability()->setUiReadOnly(false);
|
||||
group->add(&includeFractures);
|
||||
|
||||
if (compdatExport == WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
|
||||
{
|
||||
includeFractures.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else if (compdatExport == TRANSMISSIBILITIES)
|
||||
{
|
||||
includeFractures.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,10 @@ public:
|
||||
void showForSimWells();
|
||||
void showForWellPath();
|
||||
|
||||
void enableFractures(bool enable);
|
||||
void enablePerforations(bool enable);
|
||||
void enableFishbone(bool enable);
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
protected:
|
||||
@ -77,5 +81,9 @@ protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
bool m_displayForSimWell;
|
||||
bool m_displayForSimWell;
|
||||
|
||||
bool m_fracturesEnabled;
|
||||
bool m_perforationsEnabled;
|
||||
bool m_fishbonesEnabled;
|
||||
};
|
||||
|
@ -24,11 +24,15 @@
|
||||
#include "RicExportFeatureImpl.h"
|
||||
|
||||
#include "RimDialogData.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
@ -81,6 +85,50 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
|
||||
if (exportSettings->folder().isEmpty()) exportSettings->folder = defaultDir;
|
||||
|
||||
std::vector<RimSimWellFracture*> simWellFractures;
|
||||
std::vector<RimWellPathFracture*> wellPathFractures;
|
||||
std::vector<RimFishbonesMultipleSubs*> wellPathFishbones;
|
||||
std::vector<RimPerforationInterval*> wellPathPerforations;
|
||||
|
||||
for (auto s : simWells)
|
||||
{
|
||||
s->descendantsIncludingThisOfType(simWellFractures);
|
||||
}
|
||||
|
||||
for (auto w : wellPaths)
|
||||
{
|
||||
w->descendantsIncludingThisOfType(wellPathFractures);
|
||||
w->descendantsIncludingThisOfType(wellPathFishbones);
|
||||
w->descendantsIncludingThisOfType(wellPathPerforations);
|
||||
}
|
||||
|
||||
if ((!simWellFractures.empty()) || (!wellPathFractures.empty()))
|
||||
{
|
||||
exportSettings->enableFractures(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enableFractures(false);
|
||||
}
|
||||
|
||||
if (!wellPathFishbones.empty())
|
||||
{
|
||||
exportSettings->enableFishbone(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enableFishbone(false);
|
||||
}
|
||||
|
||||
if (!wellPathPerforations.empty())
|
||||
{
|
||||
exportSettings->enablePerforations(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
exportSettings->enablePerforations(false);
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), exportSettings, dialogTitle, "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user