#1532 Move export settings classes to commands folder

This commit is contained in:
Bjørnar Grip Fjær
2017-05-30 14:37:51 +02:00
parent bd74a942fd
commit c55d381cbf
12 changed files with 57 additions and 58 deletions

View File

@@ -7,9 +7,6 @@ endif()
set (SOURCE_GROUP_HEADER_FILES
${CEE_CURRENT_LIST_DIR}RimEclipseCaseCollection.h
${CEE_CURRENT_LIST_DIR}RimCaseCollection.h
${CEE_CURRENT_LIST_DIR}RimCaseAndFileExportSettings.h
${CEE_CURRENT_LIST_DIR}RimExportCompletionDataSettings.h
${CEE_CURRENT_LIST_DIR}RimExportWellSegmentsSettings.h
${CEE_CURRENT_LIST_DIR}RimCellFilter.h
${CEE_CURRENT_LIST_DIR}RimEclipsePropertyFilter.h
${CEE_CURRENT_LIST_DIR}RimPropertyFilterCollection.h
@@ -103,9 +100,6 @@ ${CEE_CURRENT_LIST_DIR}RimWellPathCompletions.h
set (SOURCE_GROUP_SOURCE_FILES
${CEE_CURRENT_LIST_DIR}RimEclipseCaseCollection.cpp
${CEE_CURRENT_LIST_DIR}RimCaseCollection.cpp
${CEE_CURRENT_LIST_DIR}RimCaseAndFileExportSettings.cpp
${CEE_CURRENT_LIST_DIR}RimExportCompletionDataSettings.cpp
${CEE_CURRENT_LIST_DIR}RimExportWellSegmentsSettings.cpp
${CEE_CURRENT_LIST_DIR}RimCellFilter.cpp
${CEE_CURRENT_LIST_DIR}RimEclipsePropertyFilter.cpp
${CEE_CURRENT_LIST_DIR}RimPropertyFilterCollection.cpp

View File

@@ -1,68 +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 "RimCaseAndFileExportSettings.h"
#include "RimTools.h"
#include "cafPdmUiFilePathEditor.h"
CAF_PDM_SOURCE_INIT(RimCaseAndFileExportSettings, "RimCaseAndFileExportSettings");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimCaseAndFileExportSettings::RimCaseAndFileExportSettings()
{
CAF_PDM_InitObject("RimCaseAndFileExportSettings", "", "", "");
CAF_PDM_InitFieldNoDefault(&fileName, "Filename", "Export Filename", "", "", "");
fileName.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
CAF_PDM_InitFieldNoDefault(&caseToApply, "CaseToApply", "Case to Apply", "", "", "");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimCaseAndFileExportSettings::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
{
QList<caf::PdmOptionItemInfo> options;
if (fieldNeedingOptions == &caseToApply)
{
RimTools::caseOptionItems(&options);
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimCaseAndFileExportSettings::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
{
if (field == &fileName)
{
caf::PdmUiFilePathEditorAttribute* myAttr = static_cast<caf::PdmUiFilePathEditorAttribute*>(attribute);
if (myAttr)
{
myAttr->m_selectSaveFileName = true;
}
}
}

View File

@@ -1,45 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017- Statoil ASA
// Copyright (C) 2017- Ceetron Solutions AS
//
// 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 "RimEclipseCase.h"
#include "cafPdmObject.h"
#include "cafPdmField.h"
#include "cafPdmPtrField.h"
//==================================================================================================
///
///
//==================================================================================================
class RimCaseAndFileExportSettings : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimCaseAndFileExportSettings();
caf::PdmField<QString> fileName;
caf::PdmPtrField<RimEclipseCase*> caseToApply;
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
protected:
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
};

View File

@@ -1,35 +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 "RimExportCompletionDataSettings.h"
CAF_PDM_SOURCE_INIT(RimExportCompletionDataSettings, "RimExportCompletionDataSettings");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExportCompletionDataSettings::RimExportCompletionDataSettings()
{
CAF_PDM_InitObject("RimExportCompletionDataSettings", "", "", "");
CAF_PDM_InitField(&includePerforations, "IncludePerforations", true, "Include Perforations", "", "", "");
CAF_PDM_InitField(&includeFishbones, "IncludeFishbones", true, "Include Fishbones", "", "", "");
CAF_PDM_InitField(&includeWpimult, "IncludeWPIMULT", true, "Include WPIMLUT", "", "", "");
CAF_PDM_InitField(&removeLateralsInMainBoreCells, "RemoveLateralsInMainBoreCells", false, "Remove Laterals in Main Bore Cells", "", "", "");
}

View File

@@ -1,41 +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 "RimCaseAndFileExportSettings.h"
#include "cafPdmField.h"
//==================================================================================================
///
///
//==================================================================================================
class RimExportCompletionDataSettings : public RimCaseAndFileExportSettings
{
CAF_PDM_HEADER_INIT;
public:
RimExportCompletionDataSettings();
caf::PdmField<bool> includePerforations;
caf::PdmField<bool> includeFishbones;
caf::PdmField<bool> includeWpimult;
caf::PdmField<bool> removeLateralsInMainBoreCells;
};

View File

@@ -1,51 +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 "RimExportWellSegmentsSettings.h"
namespace caf {
template<>
void RimExportWellSegmentsSettings::PressureDropEnum::setUp()
{
addItem(RimExportWellSegmentsSettings::HYDROSTATIC, "H--", "Hydrostatic");
addItem(RimExportWellSegmentsSettings::HYDROSTATIC_FRICTION, "HF-", "Hydrostatic + Friction");
addItem(RimExportWellSegmentsSettings::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration");
setDefault(RimExportWellSegmentsSettings::HYDROSTATIC);
}
template<>
void RimExportWellSegmentsSettings::LengthAndDepthEnum::setUp()
{
addItem(RimExportWellSegmentsSettings::INC, "INC", "Incremental");
addItem(RimExportWellSegmentsSettings::ABS, "ABS", "Absolute");
setDefault(RimExportWellSegmentsSettings::INC);
}
}
CAF_PDM_SOURCE_INIT(RimExportWellSegmentsSettings, "RimExportWellSegmentsSettings");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExportWellSegmentsSettings::RimExportWellSegmentsSettings()
{
CAF_PDM_InitObject("RimExportWellSegmentsSettings", "", "", "");
CAF_PDM_InitFieldNoDefault(&pressureDrop, "PressureDrop", "Pressure Drop", "", "", "");
CAF_PDM_InitFieldNoDefault(&lengthAndDepth, "LengthAndDepth", "Length and Depth", "", "", "");
}

View File

@@ -1,53 +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 "RimCaseAndFileExportSettings.h"
#include "cafPdmField.h"
//==================================================================================================
///
///
//==================================================================================================
class RimExportWellSegmentsSettings : public RimCaseAndFileExportSettings
{
CAF_PDM_HEADER_INIT;
public:
enum PressureDropType {
HYDROSTATIC,
HYDROSTATIC_FRICTION,
HYDROSTATIC_FRICTION_ACCELERATION
};
typedef caf::AppEnum<RimExportWellSegmentsSettings::PressureDropType> PressureDropEnum;
enum LengthAndDepthType {
ABS,
INC
};
typedef caf::AppEnum<RimExportWellSegmentsSettings::LengthAndDepthType> LengthAndDepthEnum;
RimExportWellSegmentsSettings();
caf::PdmField<PressureDropEnum> pressureDrop;
caf::PdmField<LengthAndDepthEnum> lengthAndDepth;
};