2015-05-15 11:51:49 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-05-15 11:51:49 -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
|
|
|
//
|
2015-05-15 11:51:49 -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>
|
2015-05-15 11:51:49 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
2015-11-16 00:16:30 -06:00
|
|
|
|
2020-11-18 07:37:43 -06:00
|
|
|
#include "RimCaseDisplayNameTools.h"
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
2015-05-15 11:51:49 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmPtrField.h"
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2015-11-16 00:16:30 -06:00
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2018-01-09 03:11:28 -06:00
|
|
|
class Rim3dView;
|
2018-02-05 06:23:44 -06:00
|
|
|
class RimGridView;
|
2016-08-24 08:19:39 -05:00
|
|
|
class RimFormationNames;
|
2017-08-11 00:34:54 -05:00
|
|
|
class RimTimeStepFilter;
|
2018-01-17 01:00:36 -06:00
|
|
|
class Rim2dIntersectionView;
|
2019-11-26 04:35:21 -06:00
|
|
|
class RimExtrudedCurveIntersection;
|
2018-01-23 07:23:28 -06:00
|
|
|
class Rim2dIntersectionViewCollection;
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class BoundingBox;
|
2015-11-16 00:16:30 -06:00
|
|
|
}
|
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
class RimCase : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2020-11-18 07:37:43 -06:00
|
|
|
using DisplayNameEnum = caf::AppEnum<RimCaseDisplayNameTools::DisplayName>;
|
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
public:
|
|
|
|
RimCase();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimCase() override;
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2022-08-18 00:12:23 -05:00
|
|
|
int caseId() const;
|
|
|
|
void setCaseId( int id );
|
|
|
|
|
|
|
|
QString caseUserDescription() const;
|
|
|
|
void setCaseUserDescription( const QString& description );
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2020-02-21 05:07:15 -06:00
|
|
|
void setGridFileName( const QString& fileName );
|
|
|
|
QString gridFileName() const;
|
|
|
|
|
2022-12-08 00:08:22 -06:00
|
|
|
DisplayNameEnum displayNameType() const;
|
|
|
|
void setDisplayNameType( RimCaseDisplayNameTools::DisplayName displayNameType );
|
|
|
|
void setCustomCaseName( const QString& caseName );
|
|
|
|
void updateAutoShortName();
|
|
|
|
void updateOptionSensitivity();
|
2020-11-18 07:37:43 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<Rim3dView*> views() const;
|
|
|
|
std::vector<RimGridView*> gridViews() const;
|
2016-08-24 08:19:39 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual std::vector<QDateTime> timeStepDates() const = 0;
|
|
|
|
virtual QStringList timeStepStrings() const = 0;
|
|
|
|
virtual QString timeStepName( int frameIdx ) const = 0;
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2020-01-23 07:43:51 -06:00
|
|
|
virtual cvf::BoundingBox reservoirBoundingBox() = 0;
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual cvf::BoundingBox activeCellsBoundingBox() const = 0;
|
|
|
|
virtual cvf::BoundingBox allCellsBoundingBox() const = 0;
|
2015-09-21 04:20:07 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual cvf::Vec3d displayModelOffset() const;
|
2015-11-16 00:16:30 -06:00
|
|
|
|
2020-01-06 07:33:54 -06:00
|
|
|
void setFormationNames( RimFormationNames* formationNames );
|
|
|
|
RimFormationNames* activeFormationNames() const;
|
|
|
|
virtual void updateFormationNamesData() = 0;
|
2015-11-16 00:16:30 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual double characteristicCellSize() const = 0;
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
size_t uiToNativeTimeStepIndex( size_t uiTimeStepIndex );
|
2017-06-19 13:55:58 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
Rim2dIntersectionViewCollection* intersectionViewCollection();
|
2017-10-19 02:57:10 -05:00
|
|
|
|
2020-08-31 07:31:35 -05:00
|
|
|
caf::Signal<> settingsChanged;
|
|
|
|
|
2017-04-06 11:37:43 -05:00
|
|
|
protected:
|
2022-05-29 06:01:27 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
2023-02-26 03:48:40 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2020-11-18 07:37:43 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
virtual std::vector<Rim3dView*> allSpecialViews() const = 0;
|
2019-10-09 02:21:28 -05:00
|
|
|
void initAfterRead() override;
|
2020-11-18 07:37:43 -06:00
|
|
|
void updateTreeItemName();
|
|
|
|
|
|
|
|
virtual QString caseName() const;
|
|
|
|
|
|
|
|
static QString uniqueShortNameCase( RimCase* rimCase, int shortNameLengthLimit );
|
2018-01-17 01:00:36 -06:00
|
|
|
|
2017-04-06 11:37:43 -05:00
|
|
|
private:
|
2020-01-06 07:33:54 -06:00
|
|
|
caf::PdmFieldHandle* userDescriptionField() override;
|
2017-08-11 00:34:54 -05:00
|
|
|
|
|
|
|
protected:
|
2022-08-18 00:12:23 -05:00
|
|
|
caf::PdmField<int> m_caseId;
|
|
|
|
caf::PdmField<QString> m_caseUserDescription;
|
2020-02-21 05:07:15 -06:00
|
|
|
caf::PdmField<caf::FilePath> m_caseFileName;
|
2020-11-18 07:37:43 -06:00
|
|
|
caf::PdmField<DisplayNameEnum> m_displayNameOption;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmChildField<RimTimeStepFilter*> m_timeStepFilter;
|
2018-01-23 07:23:28 -06:00
|
|
|
caf::PdmChildField<Rim2dIntersectionViewCollection*> m_2dIntersectionViewCollection;
|
2020-01-06 07:33:54 -06:00
|
|
|
caf::PdmPtrField<RimFormationNames*> m_activeFormationNames;
|
2018-01-17 01:00:36 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
private:
|
|
|
|
bool m_isInActiveDestruction;
|
2015-05-15 11:51:49 -05:00
|
|
|
};
|