2018-10-05 04:49:44 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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 <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-10-09 01:01:56 -05:00
|
|
|
#include "RigCompletionDataGridCell.h"
|
2018-10-05 04:49:44 -05:00
|
|
|
#include "cafCmdFeature.h"
|
2018-10-09 01:01:56 -05:00
|
|
|
#include <cafVecIjk.h>
|
|
|
|
#include <memory>
|
2018-10-05 04:49:44 -05:00
|
|
|
|
|
|
|
class RimSimWellInView;
|
|
|
|
class RimWellPath;
|
2018-10-09 02:47:01 -05:00
|
|
|
class RicExportLgrUi;
|
2018-10-09 01:01:56 -05:00
|
|
|
class QFile;
|
|
|
|
class QTextStream;
|
|
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class LgrInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LgrInfo(const QString&name, caf::VecIjk& sizes) : name(name), sizes(sizes)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
QString name;
|
|
|
|
caf::VecIjk sizes;
|
|
|
|
std::vector<double> values;
|
|
|
|
};
|
2018-10-05 04:49:44 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2018-10-09 02:47:01 -05:00
|
|
|
class RicExportLgrFeature : public caf::CmdFeature
|
2018-10-05 04:49:44 -05:00
|
|
|
{
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
2018-10-09 02:47:01 -05:00
|
|
|
static RicExportLgrUi* openDialog();
|
2018-10-09 01:01:56 -05:00
|
|
|
static bool openFileForExport(const QString& folderName, const QString& fileName, QFile* exportFile);
|
2018-10-09 05:44:42 -05:00
|
|
|
static void exportLgr(QTextStream& stream, const std::map<RigCompletionDataGridCell, LgrInfo>& lgrInfos);
|
2018-10-05 04:49:44 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool isCommandEnabled() override;
|
|
|
|
virtual void onActionTriggered(bool isChecked) override;
|
|
|
|
virtual void setupActionLook(QAction* actionToSetup) override;
|
|
|
|
|
2018-10-09 01:01:56 -05:00
|
|
|
private:
|
2018-10-09 03:10:29 -05:00
|
|
|
static std::vector<RimWellPath*> selectedWellPaths();
|
2018-10-05 04:49:44 -05:00
|
|
|
};
|