2017-06-28 08:39:14 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-06-28 08:39:14 -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
|
|
|
//
|
2017-06-28 08:39:14 -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>
|
2017-06-28 08:39:14 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cafPdmField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmObject.h"
|
2017-06-30 09:13:38 -05:00
|
|
|
#include "cafPdmPtrField.h"
|
2017-06-29 15:36:51 -05:00
|
|
|
#include "cafVecIjk.h"
|
2017-06-28 08:39:14 -05:00
|
|
|
|
|
|
|
class RimCase;
|
|
|
|
class RigActiveCellInfo;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-28 08:39:14 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RicCellRangeUi : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RicCellRangeUi();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setCase( RimCase* rimCase );
|
2017-06-28 08:39:14 -05:00
|
|
|
|
2017-06-29 15:36:51 -05:00
|
|
|
caf::VecIjk start() const;
|
|
|
|
caf::VecIjk count() const;
|
2017-06-30 09:13:38 -05:00
|
|
|
QString gridName() const;
|
2017-06-29 15:36:51 -05:00
|
|
|
|
2017-06-28 08:39:14 -05:00
|
|
|
private:
|
2023-02-26 03:48:40 -06:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
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;
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2017-06-28 08:39:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void clampValues();
|
|
|
|
void setDefaultValues();
|
|
|
|
RigActiveCellInfo* activeCellInfo() const;
|
|
|
|
void updateLegendText();
|
2017-06-28 08:39:14 -05:00
|
|
|
|
|
|
|
private:
|
2017-06-30 09:13:38 -05:00
|
|
|
caf::PdmPtrField<RimCase*> m_case;
|
2017-06-28 08:39:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<int> m_gridIndex;
|
2017-06-28 08:39:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<int> m_startIndexI; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> m_startIndexJ; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> m_startIndexK; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> m_cellCountI;
|
|
|
|
caf::PdmField<int> m_cellCountJ;
|
|
|
|
caf::PdmField<int> m_cellCountK;
|
2017-06-28 08:39:14 -05:00
|
|
|
};
|