2019-03-18 06:52:01 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2019-03-18 06:52:01 -05: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 03:40:57 -05:00
|
|
|
//
|
2019-03-18 06:52:01 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2019-03-18 06:52:01 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-04-01 09:21:43 -05:00
|
|
|
#include "cafAppEnum.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2019-03-18 06:52:01 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2019-04-01 09:21:43 -05:00
|
|
|
#include "cvfVector3.h"
|
2019-03-18 06:52:01 -05:00
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigEclipseCaseData;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2019-03-18 06:52:01 -05:00
|
|
|
//==================================================================================================
|
2019-03-29 07:37:25 -05:00
|
|
|
class RicExportEclipseSectorModelUi : public caf::PdmObject
|
2019-03-18 06:52:01 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
enum ResultExportOptions
|
|
|
|
{
|
|
|
|
EXPORT_NO_RESULTS,
|
|
|
|
EXPORT_TO_GRID_FILE,
|
|
|
|
EXPORT_TO_SINGLE_SEPARATE_FILE,
|
|
|
|
EXPORT_TO_SEPARATE_FILE_PER_RESULT
|
|
|
|
};
|
2021-10-14 07:36:06 -05:00
|
|
|
using ResultExportOptionsEnum = caf::AppEnum<ResultExportOptions>;
|
2019-03-18 06:52:01 -05:00
|
|
|
|
2019-04-01 09:21:43 -05:00
|
|
|
enum GridBoxSelection
|
|
|
|
{
|
|
|
|
VISIBLE_CELLS_BOX,
|
|
|
|
ACTIVE_CELLS_BOX,
|
|
|
|
FULL_GRID_BOX,
|
|
|
|
MANUAL_SELECTION
|
|
|
|
};
|
2021-10-14 07:36:06 -05:00
|
|
|
using GridBoxSelectionEnum = caf::AppEnum<GridBoxSelection>;
|
2019-04-01 09:21:43 -05:00
|
|
|
|
2019-03-18 06:52:01 -05:00
|
|
|
public:
|
2019-04-26 03:35:21 -05:00
|
|
|
RicExportEclipseSectorModelUi();
|
2019-03-29 07:37:25 -05:00
|
|
|
~RicExportEclipseSectorModelUi() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
const QStringList& tabNames() const;
|
2019-04-01 09:21:43 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setCaseData( RigEclipseCaseData* caseData = nullptr,
|
|
|
|
const cvf::Vec3i& visibleMin = cvf::Vec3i::ZERO,
|
|
|
|
const cvf::Vec3i& visibleMax = cvf::Vec3i::ZERO );
|
2019-04-26 03:35:21 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::Vec3i min() const;
|
|
|
|
cvf::Vec3i max() const;
|
|
|
|
void setMin( const cvf::Vec3i& min );
|
|
|
|
void setMax( const cvf::Vec3i& max );
|
|
|
|
void applyBoundaryDefaults();
|
|
|
|
void removeInvalidKeywords();
|
2019-03-18 06:52:01 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<bool> exportGrid;
|
|
|
|
caf::PdmField<QString> exportGridFilename;
|
|
|
|
caf::PdmField<bool> exportInLocalCoordinates;
|
|
|
|
caf::PdmField<bool> makeInvisibleCellsInactive;
|
2019-03-29 08:26:49 -05:00
|
|
|
|
2019-03-21 04:35:52 -05:00
|
|
|
caf::PdmField<ResultExportOptionsEnum> exportFaults;
|
|
|
|
caf::PdmField<QString> exportFaultsFilename;
|
|
|
|
|
2019-04-01 07:15:50 -05:00
|
|
|
caf::PdmField<ResultExportOptionsEnum> exportParameters;
|
|
|
|
caf::PdmField<QString> exportParametersFilename;
|
2019-03-28 14:42:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<std::vector<QString>> selectedKeywords;
|
|
|
|
|
|
|
|
caf::PdmField<GridBoxSelectionEnum> exportGridBox;
|
2019-03-18 06:52:01 -05:00
|
|
|
|
2019-04-01 09:21:43 -05:00
|
|
|
caf::PdmField<int> refinementCountI;
|
|
|
|
caf::PdmField<int> refinementCountJ;
|
|
|
|
caf::PdmField<int> refinementCountK;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2019-03-18 06:52:01 -05:00
|
|
|
protected:
|
2019-04-01 09:21:43 -05:00
|
|
|
caf::PdmField<int> minI;
|
|
|
|
caf::PdmField<int> maxI;
|
|
|
|
caf::PdmField<int> minJ;
|
|
|
|
caf::PdmField<int> maxJ;
|
|
|
|
caf::PdmField<int> minK;
|
|
|
|
caf::PdmField<int> maxK;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly ) override;
|
2019-03-18 06:52:01 -05:00
|
|
|
|
|
|
|
static std::set<QString> mainKeywords();
|
2019-09-06 03:40:57 -05:00
|
|
|
QString defaultFolder() const;
|
|
|
|
QString defaultGridFileName() const;
|
|
|
|
QString defaultResultsFileName() const;
|
|
|
|
QString defaultFaultsFileName() const;
|
2019-04-01 09:21:43 -05:00
|
|
|
|
2019-03-18 06:52:01 -05:00
|
|
|
private:
|
|
|
|
RigEclipseCaseData* m_caseData;
|
2019-04-01 09:21:43 -05:00
|
|
|
cvf::Vec3i m_visibleMin;
|
|
|
|
cvf::Vec3i m_visibleMax;
|
|
|
|
QStringList m_tabNames;
|
2019-03-18 06:52:01 -05:00
|
|
|
};
|