diff --git a/ApplicationCode/CommandFileInterface/CMakeLists_files.cmake b/ApplicationCode/CommandFileInterface/CMakeLists_files.cmake index 85637ddaac..02227c093a 100644 --- a/ApplicationCode/CommandFileInterface/CMakeLists_files.cmake +++ b/ApplicationCode/CommandFileInterface/CMakeLists_files.cmake @@ -8,6 +8,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.h ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.h ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.h ${CMAKE_CURRENT_LIST_DIR}/RicfOpenProject.h +${CMAKE_CURRENT_LIST_DIR}/RicfSetExportFolder.h ${CMAKE_CURRENT_LIST_DIR}/RicfSetStartDir.h ) @@ -20,6 +21,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicfExportSnapshots.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfExportWellPathCompletions.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfLoadCase.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfOpenProject.cpp +${CMAKE_CURRENT_LIST_DIR}/RicfSetExportFolder.cpp ${CMAKE_CURRENT_LIST_DIR}/RicfSetStartDir.cpp ) diff --git a/ApplicationCode/CommandFileInterface/RicfSetExportFolder.cpp b/ApplicationCode/CommandFileInterface/RicfSetExportFolder.cpp new file mode 100644 index 0000000000..7f74c3bdaa --- /dev/null +++ b/ApplicationCode/CommandFileInterface/RicfSetExportFolder.cpp @@ -0,0 +1,42 @@ +#include "RicfSetExportFolder.h" +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#include "RicfSetExportFolder.h" + +#include "RiaApplication.h" + +CAF_PDM_SOURCE_INIT(RicfSetExportFolder, "setExportFolder"); + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RicfSetExportFolder::RicfSetExportFolder() +{ + RICF_InitField(&m_type, "type", RicfCommandFileExecutor::ExportTypeEnum(RicfCommandFileExecutor::COMPLETIONS), "Type", "", "", ""); + RICF_InitField(&m_path, "path", QString(), "Path", "", "", ""); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicfSetExportFolder::execute() +{ + RicfCommandFileExecutor* executor = RicfCommandFileExecutor::instance(); + executor->setExportPath(m_type(), m_path); +} diff --git a/ApplicationCode/CommandFileInterface/RicfSetExportFolder.h b/ApplicationCode/CommandFileInterface/RicfSetExportFolder.h new file mode 100644 index 0000000000..c703ede6de --- /dev/null +++ b/ApplicationCode/CommandFileInterface/RicfSetExportFolder.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////////// +// +// 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 +// for more details. +// +///////////////////////////////////////////////////////////////////////////////// + +#pragma once +#include "RicfCommandObject.h" + +#include "RicfCommandFileExecutor.h" + +#include "cafPdmField.h" + +class RicfSetExportFolder : public RicfCommandObject +{ + CAF_PDM_HEADER_INIT; + +public: + RicfSetExportFolder(); + + virtual void execute() override; + +private: + caf::PdmField m_type; + caf::PdmField m_path; +};