2016-12-09 11:11:16 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2016-12-09 11:11:16 +01:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2016-12-09 11:11:16 +01:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2016-12-09 11:11:16 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
2026-11-03 08:18:18 +01:00
|
|
|
#include <expected>
|
|
|
|
|
|
2019-03-25 11:07:12 +01:00
|
|
|
class RimAdvancedSnapshotExportDefinition;
|
2016-12-14 09:16:44 +01:00
|
|
|
class RimProject;
|
2018-01-09 10:11:28 +01:00
|
|
|
class Rim3dView;
|
2018-01-15 14:52:22 +01:00
|
|
|
class RimGridView;
|
2024-03-15 09:32:45 +01:00
|
|
|
class RimEclipseView;
|
2016-12-09 11:11:16 +01:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2016-12-09 11:11:16 +01:00
|
|
|
//==================================================================================================
|
2019-03-25 10:56:01 +01:00
|
|
|
class RicAdvancedSnapshotExportFeature : public caf::CmdFeature
|
2016-12-09 11:11:16 +01:00
|
|
|
{
|
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
protected:
|
2023-06-26 14:28:46 +02:00
|
|
|
bool isCommandEnabled() const override;
|
2018-10-18 19:45:57 +02:00
|
|
|
void onActionTriggered( bool isChecked ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2016-12-14 09:16:44 +01:00
|
|
|
|
|
|
|
|
public:
|
2026-11-03 08:18:18 +01:00
|
|
|
static std::expected<void, QString> exportMultipleSnapshots( const QString& folder, RimProject* project );
|
2016-12-22 08:45:30 +01:00
|
|
|
|
2016-12-21 11:25:00 +01:00
|
|
|
private:
|
2026-11-03 08:18:18 +01:00
|
|
|
// The functions below return the number of snapshots that failed to export
|
|
|
|
|
static size_t exportViewVariations( Rim3dView* rimView, RimAdvancedSnapshotExportDefinition* msd, const QString& folder );
|
|
|
|
|
static size_t exportViewVariationsToFolder( RimGridView* rimView, RimAdvancedSnapshotExportDefinition* msd, const QString& folder );
|
2019-09-06 10:40:57 +02:00
|
|
|
static QString resultName( Rim3dView* rimView );
|
2024-03-15 09:32:45 +01:00
|
|
|
static void removeViewFromViewCollection( RimEclipseView* view );
|
2016-12-09 11:11:16 +01:00
|
|
|
};
|