///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "cafPdmField.h" #include "cafPdmObjectHandle.h" #include "cafPdmObjectMethod.h" #include "cafPdmPtrField.h" #include class Rim3dView; class RimFormationNames; //================================================================================================== /// Replace the grid file of a case (Eclipse result case or GeoMech case) and reload the project. /// /// The project must be saved to file, as the replacement is performed by reloading the project /// through a RiaProjectModifier. An explicit project file can be given to override the current /// project file name (used by the legacy command file interface). //================================================================================================== class RimCase_replaceGrid : public caf::PdmVoidObjectMethod { CAF_PDM_HEADER_INIT; public: RimCase_replaceGrid( caf::PdmObjectHandle* self ); void setNewGridFile( const QString& newGridFile ); void setProjectFile( const QString& projectFile ); std::expected execute() override; private: caf::PdmField m_newGridFile; caf::PdmField m_projectFile; }; //================================================================================================== /// Create a new 3D view in the case. Supports Eclipse cases and GeoMech cases. //================================================================================================== class RimCase_createView : public caf::PdmObjectCreationMethod { CAF_PDM_HEADER_INIT; public: RimCase_createView( caf::PdmObjectHandle* self ); std::expected execute() override; QString classKeywordReturnedType() const override; }; //================================================================================================== /// Set the active formation names of the case. //================================================================================================== class RimCase_setFormationNames : public caf::PdmVoidObjectMethod { CAF_PDM_HEADER_INIT; public: RimCase_setFormationNames( caf::PdmObjectHandle* self ); void setFormationNames( RimFormationNames* formationNames ); std::expected execute() override; private: caf::PdmPtrField m_formationNames; };