Files
ResInsight/ApplicationLibCode/ProjectDataModelCommands/RimcEclipseView.h
T

70 lines
2.5 KiB
C++
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026- Equinor 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 "cafPdmField.h"
#include "cafPdmObjectHandle.h"
#include "cafPdmObjectMethod.h"
#include "cafPdmPtrArrayField.h"
#include <QString>
class RimEclipseView;
class RimFaultInView;
//==================================================================================================
///
//==================================================================================================
class RimcEclipseView_addFaultDistance : public caf::PdmObjectCreationMethod
{
CAF_PDM_HEADER_INIT;
public:
RimcEclipseView_addFaultDistance( caf::PdmObjectHandle* self );
std::expected<caf::PdmObjectHandle*, QString> execute() override;
QString classKeywordReturnedType() const override;
private:
caf::PdmField<QString> m_resultName;
caf::PdmPtrArrayField<RimFaultInView*> m_faults;
};
//==================================================================================================
/// Export the cell result currently shown in the view (at the current time step) to a GRDECL style text file.
//==================================================================================================
class RimEclipseView_exportCurrentProperty : public caf::PdmVoidObjectMethod
{
CAF_PDM_HEADER_INIT;
public:
RimEclipseView_exportCurrentProperty( caf::PdmObjectHandle* self );
void setExportFile( const QString& exportFile );
void setUndefinedValue( double undefinedValue );
std::expected<caf::PdmObjectHandle*, QString> execute() override;
/// Default file base name: <case>-<view>-T<time step>-<property>
static QString defaultFileBaseName( const RimEclipseView* view );
private:
caf::PdmField<QString> m_exportFile;
caf::PdmField<double> m_undefinedValue;
};