2017-08-04 11:25:17 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-08-04 11:25:17 +02: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
|
|
|
//
|
2017-08-04 11:25:17 +02: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>
|
2017-08-04 11:25:17 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
2026-11-03 08:18:18 +01:00
|
|
|
#include <expected>
|
|
|
|
|
|
2026-09-16 15:30:34 +02:00
|
|
|
class Rim3dView;
|
|
|
|
|
|
2017-08-04 11:25:17 +02:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-08-04 11:25:17 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RicSnapshotAllViewsToFileFeature : public caf::CmdFeature
|
|
|
|
|
{
|
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
static void saveAllViews();
|
2017-08-04 11:25:17 +02:00
|
|
|
|
2026-11-03 08:18:18 +01:00
|
|
|
// Returns an error description if one or more views could not be exported
|
|
|
|
|
static std::expected<void, QString> exportSnapshotOfViewsIntoFolder( const QString& snapshotFolderName,
|
|
|
|
|
int width = -1,
|
|
|
|
|
int height = -1,
|
|
|
|
|
const QString& prefix = "",
|
|
|
|
|
int caseId = -1,
|
|
|
|
|
int viewId = -1 );
|
2017-08-04 11:25:17 +02:00
|
|
|
|
2026-11-03 08:18:18 +01:00
|
|
|
// Returns an error description if the snapshot could not be exported
|
|
|
|
|
static std::expected<void, QString>
|
2026-09-16 15:30:34 +02:00
|
|
|
exportSnapshotOfView( Rim3dView* view, const QString& snapshotFolderName, int width = -1, int height = -1, const QString& prefix = "" );
|
|
|
|
|
|
2017-08-04 11:25:17 +02:00
|
|
|
protected:
|
2019-09-06 10:40:57 +02:00
|
|
|
void onActionTriggered( bool isChecked ) override;
|
|
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2017-08-04 11:25:17 +02:00
|
|
|
};
|