2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 02:45:23 -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.
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
|
|
|
#include "RimCellFilter.h"
|
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
class RigGridBase;
|
|
|
|
class RigMainGrid;
|
|
|
|
class RimCellRangeFilterCollection;
|
2015-05-21 03:05:33 -05:00
|
|
|
class RimEclipseView;
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class CellRangeFilter;
|
2015-05-21 08:39:44 -05:00
|
|
|
class StructGridInterface;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class RimCellRangeFilter : public RimCellFilter
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
|
|
|
RimCellRangeFilter();
|
|
|
|
virtual ~RimCellRangeFilter();
|
|
|
|
|
2013-04-24 05:00:45 -05:00
|
|
|
caf::PdmField<int> gridIndex; // The index of the grid that this filter applies to
|
2013-04-26 01:53:40 -05:00
|
|
|
caf::PdmField<bool> propagateToSubGrids; // Do propagate the effects to the sub-grids
|
2013-04-24 05:00:45 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
caf::PdmField<int> startIndexI; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> startIndexJ; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> startIndexK; // Eclipse indexing, first index is 1
|
|
|
|
caf::PdmField<int> cellCountI;
|
|
|
|
caf::PdmField<int> cellCountJ;
|
|
|
|
caf::PdmField<int> cellCountK;
|
|
|
|
|
2017-06-28 05:37:26 -05:00
|
|
|
void setDefaultValues();
|
|
|
|
void updateActiveState();
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2012-09-14 08:48:49 -05:00
|
|
|
protected:
|
2015-10-21 07:22:51 -05:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2012-09-14 08:48:49 -05:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
2015-10-21 07:22:51 -05:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) ;
|
2015-11-02 00:18:04 -06:00
|
|
|
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName);
|
2012-09-14 08:48:49 -05:00
|
|
|
|
2013-04-24 05:00:45 -05:00
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly );
|
|
|
|
|
2015-11-02 02:30:04 -06:00
|
|
|
private:
|
2017-06-28 05:37:26 -05:00
|
|
|
RimCellRangeFilterCollection* parentContainer();
|
|
|
|
bool isRangeFilterControlled() const;
|
|
|
|
void computeAndSetValidValues();
|
|
|
|
const cvf::StructGridInterface* selectedGrid();
|
2012-05-18 02:45:23 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|