mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1493 Remove old export fracture on selected wellpaths feature
This commit is contained in:
@@ -51,7 +51,6 @@ ${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSimWellFractureWellCompletionFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSelectedSimWellFractureWellCompletionFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportWellPathFractureWellCompletionFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSelectedWellPathFractureWellCompletionFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertFractureTemplateUnitFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertAllFractureTemplatesToMetricFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertAllFractureTemplatesToFieldFeature.h
|
||||
@@ -114,7 +113,6 @@ ${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSimWellFractureWellCompletionFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSelectedSimWellFractureWellCompletionFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportWellPathFractureWellCompletionFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicExportSelectedWellPathFractureWellCompletionFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertFractureTemplateUnitFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertAllFractureTemplatesToMetricFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicConvertAllFractureTemplatesToFieldFeature.cpp
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil 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 "RicExportSelectedWellPathFractureWellCompletionFeature.h"
|
||||
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RifFractureExportTools.h"
|
||||
#include "RifFractureExportTools.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimEclipseWellCollection.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureExportSettings.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafPdmObjectHandle.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMessageBox>
|
||||
#include <QString>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicExportSelectedWellPathFractureWellCompletionFeature, "RicExportSelectedWellPathFractureWellCompletionFeature");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedWellPathFractureWellCompletionFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
std::vector<RimWellPath*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
if (!selection.size()) return;
|
||||
|
||||
RimFractureExportSettings exportSettings;
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString projectFolder = app->currentProjectPath();
|
||||
|
||||
RimView* view = app->activeReservoirView();
|
||||
|
||||
RimEclipseCase* caseToApply;
|
||||
view->firstAncestorOrThisOfType(caseToApply);
|
||||
if (!caseToApply) return;
|
||||
|
||||
exportSettings.caseToApply = caseToApply;
|
||||
if (projectFolder.isEmpty())
|
||||
{
|
||||
projectFolder = caseToApply->locationOnDisc();
|
||||
}
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("FRACTURE_EXPORT_DIR", projectFolder);
|
||||
|
||||
QString outputFileName = defaultDir + "/Fractures";
|
||||
exportSettings.fileName = outputFileName;
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Fracture Well Completion Data", "");
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory("FRACTURE_EXPORT_DIR", QFileInfo(exportSettings.fileName).absolutePath());
|
||||
|
||||
RifFractureExportTools::exportWellPathFracturesToEclipseDataInputFile(exportSettings.fileName, selection[0], exportSettings.caseToApply);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedWellPathFractureWellCompletionFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setText("Export Fracture Well Completion Data for Selected wells");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExportSelectedWellPathFractureWellCompletionFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil 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"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicExportSelectedWellPathFractureWellCompletionFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
protected:
|
||||
|
||||
virtual void onActionTriggered(bool isChecked) override;
|
||||
virtual void setupActionLook(QAction* actionToSetup) override;
|
||||
virtual bool isCommandEnabled() override;
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user