mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4801 Prefix WBS-las export and capitalize file name
This commit is contained in:
@@ -68,6 +68,12 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
|
||||
RicExportToLasFileResampleUi featureUi;
|
||||
featureUi.exportFolder = defaultDir;
|
||||
|
||||
if ( RicWellLogPlotCurveFeatureImpl::parentWellBoreStabilityPlot() )
|
||||
{
|
||||
featureUi.filePrefix = "WBS_";
|
||||
featureUi.capitalizeFileName = true;
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<QString> wellNames;
|
||||
std::vector<double> rkbDiffs;
|
||||
@@ -101,7 +107,7 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
|
||||
lasExporter.setRkbDiffs( wellNames, userDefRkbDiff );
|
||||
}
|
||||
|
||||
lasExporter.writeToFolder( featureUi.exportFolder() );
|
||||
lasExporter.writeToFolder( featureUi.exportFolder(), featureUi.filePrefix(), featureUi.capitalizeFileName() );
|
||||
|
||||
// Remember the path to next time
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( "WELL_LOGS_DIR", featureUi.exportFolder() );
|
||||
|
||||
@@ -47,6 +47,8 @@ RicExportToLasFileResampleUi::RicExportToLasFileResampleUi( void )
|
||||
|
||||
CAF_PDM_InitField( &exportFolder, "ExportFolder", QString(), "Export Folder", "", "", "" );
|
||||
exportFolder.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitField( &filePrefix, "FilePrefix", QString( "" ), "File Prefix", "", "", "" );
|
||||
CAF_PDM_InitField( &capitalizeFileName, "CapitalizeFileName", false, "Capitalize File Name", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &activateResample, "ActivateResample", false, "Resample Curve Data", "", "", "" );
|
||||
activateResample.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
@@ -168,7 +170,8 @@ void RicExportToLasFileResampleUi::updateFieldVisibility()
|
||||
void RicExportToLasFileResampleUi::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &exportFolder );
|
||||
|
||||
uiOrdering.add( &filePrefix );
|
||||
uiOrdering.add( &capitalizeFileName );
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Resampling" );
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ public:
|
||||
~RicExportToLasFileResampleUi() override;
|
||||
|
||||
caf::PdmField<QString> exportFolder;
|
||||
caf::PdmField<QString> filePrefix;
|
||||
caf::PdmField<bool> capitalizeFileName;
|
||||
|
||||
caf::PdmField<bool> activateResample;
|
||||
caf::PdmField<double> resampleInterval;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "RiaColorTables.h"
|
||||
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellBoreStabilityPlot.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
@@ -102,3 +103,18 @@ RimWellRftPlot* RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()
|
||||
|
||||
return wellRftPlot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellBoreStabilityPlot* RicWellLogPlotCurveFeatureImpl::parentWellBoreStabilityPlot()
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
if ( !destinationObject ) return nullptr;
|
||||
|
||||
RimWellBoreStabilityPlot* wbsPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType( wbsPlot );
|
||||
|
||||
return wbsPlot;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
class RimWellBoreStabilityPlot;
|
||||
class RimWellLogCurve;
|
||||
class RimWellAllocationPlot;
|
||||
class RimWellRftPlot;
|
||||
@@ -35,4 +36,5 @@ public:
|
||||
static std::vector<RimWellLogCurve*> selectedWellLogCurves();
|
||||
static RimWellAllocationPlot* parentWellAllocationPlot();
|
||||
static RimWellRftPlot* parentWellRftPlot();
|
||||
static RimWellBoreStabilityPlot* parentWellBoreStabilityPlot();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user