ResInsight/ApplicationLibCode/Commands/ExportCommands/RicCellRangeUi.h

68 lines
2.4 KiB
C
Raw Normal View History

2017-06-28 08:39:14 -05:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil ASA
//
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.
//
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.
//
// 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"
#include "cafPdmObject.h"
#include "cafPdmPtrField.h"
#include "cafVecIjk.h"
2017-06-28 08:39:14 -05:00
class RimCase;
class RigActiveCellInfo;
//==================================================================================================
///
2017-06-28 08:39:14 -05:00
//==================================================================================================
class RicCellRangeUi : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RicCellRangeUi();
void setCase( RimCase* rimCase );
2017-06-28 08:39:14 -05:00
caf::VecIjk start() const;
caf::VecIjk count() const;
QString gridName() const;
2017-06-28 08:39:14 -05:00
private:
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
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
void clampValues();
void setDefaultValues();
RigActiveCellInfo* activeCellInfo() const;
void updateLegendText();
2017-06-28 08:39:14 -05:00
private:
caf::PdmPtrField<RimCase*> m_case;
2017-06-28 08:39:14 -05:00
caf::PdmField<int> m_gridIndex;
2017-06-28 08:39:14 -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
};